diff options
Diffstat (limited to 'core/host/main.c')
-rw-r--r-- | core/host/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/host/main.c b/core/host/main.c index b046f3b584..e7b6718ac8 100644 --- a/core/host/main.c +++ b/core/host/main.c @@ -5,6 +5,7 @@ /* Entry point of unit test executable */ +#include "console.h" #include "flash.h" #include "hooks.h" #include "system.h" @@ -13,6 +14,10 @@ #include "timer.h" #include "uart.h" +/* Console output macros */ +#define CPUTS(outstr) cputs(CC_SYSTEM, outstr) +#define CPRINTF(format, args...) cprintf(CC_SYSTEM, format, ## args) + int main(void) { register_test_end_hook(); @@ -25,6 +30,15 @@ int main(void) hook_init(); uart_init(); + if (system_jumped_to_this_image()) { + CPRINTF("[%T Emulator initialized after sysjump]\n"); + } else { + CPUTS("\n\n--- Emulator initialized after reboot ---\n"); + CPUTS("[Reset cause: "); + system_print_reset_flags(); + CPUTS("]\n"); + } + task_start(); return 0; |