Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years ago.
EFM32 Mbed Bootloader
I have a question regarding the Mbed Bootloader https://github.com/ARMmbed/mbed-os-example-bootloader.
First of all, I want to build an Application which gets a Firmware-Update (over Ethernet, Bluetooth, RS232, …) stores it somewhere (SD-Card, Flash, …) and self-updates it by resetting.
I successfully build and run the Mbed Bootloader for the on the EFM32 Pearl Gecko (EFM32PG12_STK3402). Therefore I had to adapt the targets.json file and did some minor modifications, so far so good. But I have problems loading/starting the “new” blinky-firmware-example.
I debugged it and the bootloader is able to read the firmware form the SD-Card and stores it to the Flash, but when I call
#define POST_APPLICATION_ADDR 0x40000 […] mbed_start_application(POST_APPLICATION_ADDR);
the firmware will not start.
I also tested “mbed_start_application()” by setting the address to 0x0, which should recall the bootloader and it does it like I expected. Therefore I suggest the bootloader itself is working correctly.
I think I need to change/adapt something in the linker script of the blinky-firmware-example. I already set the Mbed Start address to 0x40000. See:
#if !defined(MBED_APP_START) #warning "MBED_APP_START not defined" /* Added to see if the linker jumps inside it */ #define MBED_APP_START 0x40000 #endif
I think that I need to add/change the address of the Vector Table Address in the linker script, but I don’t know how to do that (see https://docs.mbed.com/docs/mbed-os-handbook/en/latest/advanced/flash/), because until now, I never modified or wrote linker-scripts, so I have zero experience with it.
Can anyone please help me with this issue, or show me how and which parts to adapt in the linker script? I am running out of ideas…
I added the linker script as pdf, because a *.ld wasn't accepted... :-(