1 #include "bootloader.h"
5 #ifdef BOOTLOADER_ADDRESS
6 #define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0))
7 extern uint32_t __ram0_end__;
9 void bootloader_jump(void) {
10 *((unsigned long *)(SYMVAL(__ram0_end__) - 4)) = 0xDEADBEEF; // set magic flag => reset handler will jump into boot loader
13 #else /* BOOTLOADER_ADDRESS */
14 void bootloader_jump(void) {}
15 #endif /* BOOTLOADER_ADDRESS */