This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

status of SRAM during an over the air update

The project I am working on stores information in SRAM while it waits for the radio to get in range and transmit data.

I want to know if I can put items in SRAM buffer that will remain there during an over the air firmware update.

I will not change the boot loader.  I am concerned there might be a reset during the over the air update that

will invalidate the contents of all SRAM.

Parents Reply
  • You can use the __attribute__ keyword in your code to place a variable in the non_init section:

    static uint8_t data[SIZE] __attribute__((section(".non_init")));

    Then you need to edit the flash_placement.xml (located in same directory as project file) to ensure the .no_init section is placed in an area of RAM that is not already used by the bootloader or application:

    <ProgramSection alignment="4" load="No" name=".non_init" start="START_ADDRESS" size="SIZE"/>

Children
Related