This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil scatter file entrypoint for OTA firmware image

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)
  }
}