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

Transfering data from the App to the bootloader

Hi,

I'd like to transfer some data from my App (using fstorage) to the bootloader (using pstorage).

Given that that the two storage mechanisms are different, how can I transfer data between from the App to the bootloader?

I wish to transfer about 60 bytes.

Thanks Lee

Parents
  • Are you using keil? What i did using keil is:

    • set separate RAM memory section in target options (IRAM2, set proper addresses there and tick NoInit)

    • prepare modified scatter file for linker and modify it according to previous step, in my case it is:

      RW_IRAM2 0x2000F000 UNINIT 0x00001000 { *(NoInit) }

    • static data_t data attribute((section("NoInit"), zero_init));

    • enable ram retention on chip ofcourse

    And when you do similar settings in both app and bootloader, you may have similar addresses of the variables. but it will be much safer if you just put ex. pointer of the location of these variables in fixed place in RAM - somewhere in Keil manual it is described how to use attribute to do it...

    in gcc it is data_t data attribute ((section(".noinit")));

    I think data should not be static. however i am not sure.

Reply
  • Are you using keil? What i did using keil is:

    • set separate RAM memory section in target options (IRAM2, set proper addresses there and tick NoInit)

    • prepare modified scatter file for linker and modify it according to previous step, in my case it is:

      RW_IRAM2 0x2000F000 UNINIT 0x00001000 { *(NoInit) }

    • static data_t data attribute((section("NoInit"), zero_init));

    • enable ram retention on chip ofcourse

    And when you do similar settings in both app and bootloader, you may have similar addresses of the variables. but it will be much safer if you just put ex. pointer of the location of these variables in fixed place in RAM - somewhere in Keil manual it is described how to use attribute to do it...

    in gcc it is data_t data attribute ((section(".noinit")));

    I think data should not be static. however i am not sure.

Children
No Data
Related