diff --git a/include/printf.h b/include/printf.h index 777bd88f6..24d488fad 100644 --- a/include/printf.h +++ b/include/printf.h @@ -35,7 +35,9 @@ #endif #if defined(DEBUG_UART) - void uart_init(void); + #ifndef UART_FLASH + void uart_init(void); + #endif void uart_write(const char* buf, unsigned int sz); /* turn on small printf support */ diff --git a/src/boot_renesas.c b/src/boot_renesas.c index e8c26a5fb..a67a22a81 100644 --- a/src/boot_renesas.c +++ b/src/boot_renesas.c @@ -49,14 +49,16 @@ void do_boot(const uint32_t *app_offset) { void (*app_entry)(void); uint32_t app_sp; + +#ifdef BOOT_ENTRY_OFFSET + /* add byte offset to uint32_t */ + app_offset += BOOT_ENTRY_OFFSET/sizeof(uint32_t); +#endif + (void) app_offset; (void) app_sp; (void) app_entry; - #ifndef BOOT_ENTRY_OFFSET - #define BOOT_ENTRY_OFFSET 0x00 - #endif - /* add byte offset to uint32_t */ - app_offset += BOOT_ENTRY_OFFSET/sizeof(uint32_t); + #if defined(__RX__) /* Do unconditional jump (r1 = app_offset) */ #if defined(__CCRX__)