Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions hal/aurix_tc3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ int hal_hsm_server_cleanup(void);
/* Force longcall on printf functions (called from panic) */
void uart_printf(const char* fmt, ...) TC3_LONGCALL;
void uart_vprintf(const char* fmt, va_list argp) TC3_LONGCALL;
void wolfBoot_panic(void) TC3_LONGCALL;
#endif

/* RAM buffer to hold the contents of an entire flash sector*/
Expand Down Expand Up @@ -300,14 +301,12 @@ void hal_init(void)

#ifdef DEBUG_UART
uart_init();

#ifndef WOLFBOOT_AURIX_TC3XX_HSM
char hello_string[] = "Hello from TC3xx wolfBoot on Tricore\n";
wolfBoot_printf("Hello from TC3xx wolfBoot on Tricore\n");
#else
char hello_string[] = "Hello from TC3xx wolfBoot on HSM\n";
#endif
uart_write(hello_string, sizeof(hello_string) - 1);
wolfBoot_printf("Hello from TC3xx wolfBoot on HSM\n");
#endif
#endif /* DEBUG_UART */
}

/* This function is called by the bootloader at a very late stage, before
Expand All @@ -322,6 +321,10 @@ void hal_prepare_boot(void)
#endif /* WOLFBOOT_AURIX_GPIO_TIMING */

#ifdef DEBUG_UART
/* One final printf so we can block on transmit completion. Prevents reset
* before last byte is transmitted */
wolfBoot_printf("hal_prepare_boot\n");
tc3_uart_BlockOnTC(board_uart);
tc3_uart_Cleanup(board_uart);
#endif

Expand Down