We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi All
I'm using STM32L073 and already have a bootloader at 0x8000000 to 0x8002ffff. This bootloader will check the application FW(crc & length) and jump to FW's entrypoint at begging third word of FW image.
The FW image header
// Firmware header __attribute__((section(".fwhdr"))) const volatile boot_fwhdr fwhdr = { // CRC and size will be patched by external tool .crc = 0, .size = BOOT_MAGIC_SIZE, .entrypoint = (uint32_t) _start, };
I want to add the header to image's begging, but i don't know how to edit my scatter file. And can using bootloader check FW OK, than jump to entrypoint to start application. The original scatter file is
LR_IROM1 0x08003000 0x00010000 { ; load region size_region ER_IROM1 0x08003000 0x00010000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_IRAM1 0x20000000 0x00005000 { ; RW data .ANY (+RW +ZI) } }