Hello,
I am trying to implement a CAN Bootloader using the TivaWare Bootloader Code. So far, I managed to successfully flash and execute an application to the TM4C over CAN, but I cannot return to the bootloader. More precisely, I can return to the bootloader (i.e. the UpdateHandler) using the SVCall, but somewhere in the "ProcessorInit" function it fails causing the programm to jump to the FaultISR.
// function copied from boot_demo1.c void JumpToBootLoader(void) { HWREG(NVIC_DIS0) = 0xffffffff; HWREG(NVIC_DIS1) = 0xffffffff; (*((void (*)(void))(*(uint32_t *)0x2c)))(); }
//defines from bl_config.h #define APP_START_ADDRESS 0x1000 #define VTABLE_START_ADDRESS 0x1000
//linker script #define APP_BASE 0x00001000 #define RAM_BASE 0x20000000 MEMORY { FLASH (RX) : origin = APP_BASE, length = 0x3F000 SRAM (RWX) : origin = RAM_BASE, length = 0x00008000 } SECTIONS { .intvecs: > APP_BASE .text : > FLASH .const : > FLASH .cinit : > FLASH .pinit : > FLASH .init_array : > FLASH .vtable : > RAM_BASE .data : > SRAM .bss : > SRAM .sysmem : > SRAM .stack : > SRAM }
Above, I provided the sections of code that I think have the highest potential of causing this problem. The application that I'm running does nothing more than to blink an LED a few times and than jump back to the bootloader. Is the configuration in general correct? Is it ok that I override the bootloaders vector table (in SRAM) with the one of my application?
Any help would be highly appreciated.
Regards,
Josua