@@ -136,6 +136,7 @@ int hal_hsm_server_cleanup(void);
136136/* Force longcall on printf functions (called from panic) */
137137void uart_printf (const char * fmt , ...) TC3_LONGCALL ;
138138void uart_vprintf (const char * fmt , va_list argp ) TC3_LONGCALL ;
139+ void wolfBoot_panic (void ) TC3_LONGCALL ;
139140#endif
140141
141142/* RAM buffer to hold the contents of an entire flash sector*/
@@ -300,14 +301,12 @@ void hal_init(void)
300301
301302#ifdef DEBUG_UART
302303 uart_init ();
303-
304304#ifndef WOLFBOOT_AURIX_TC3XX_HSM
305- char hello_string [] = "Hello from TC3xx wolfBoot on Tricore\n" ;
305+ wolfBoot_printf ( "Hello from TC3xx wolfBoot on Tricore\n" ) ;
306306#else
307- char hello_string [] = "Hello from TC3xx wolfBoot on HSM\n" ;
308- #endif
309- uart_write (hello_string , sizeof (hello_string ) - 1 );
307+ wolfBoot_printf ("Hello from TC3xx wolfBoot on HSM\n" );
310308#endif
309+ #endif /* DEBUG_UART */
311310}
312311
313312/* This function is called by the bootloader at a very late stage, before
@@ -322,6 +321,10 @@ void hal_prepare_boot(void)
322321#endif /* WOLFBOOT_AURIX_GPIO_TIMING */
323322
324323#ifdef DEBUG_UART
324+ /* One final printf so we can block on transmit completion. Prevents reset
325+ * before last byte is transmitted */
326+ wolfBoot_printf ("hal_prepare_boot\n" );
327+ tc3_uart_BlockOnTC (board_uart );
325328 tc3_uart_Cleanup (board_uart );
326329#endif
327330
0 commit comments