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

SDK12 DFU Nrf_dfu_settings.c used RAM 1.7k

  1. Nrf_dfu_settings.c used 1.7k RAM in examples\ble_peripheral\experimental_ble_app_buttonless_dfu project ?can used more less?

  2. Nrf_dfu_settings.c -> nrf_dfu_settings_write used "static nrf_dfu_settings_t temp_dfu_settings" can used "nrf_dfu_settings_t temp_dfu_settings", not static?

Parents
  • Hi Cesar,

    The Nrf_dfu_settings.c doesn't use 1.7kB. It actually only uses ~700 bytes. You can find the ZI data of 1.7kB but it's largely contributed by m_dfu_settings_buffer which is on flash , not RAM. It's a place holder we put to avoid the linker to put any code into that place on flash that we use to store bootloader setting. You can find m_dfu_settings_buffer is not located anywhere in RAM.

    1. No, you can't change it to non-static because the data stored in temp_dfu_settings will be used later on by fstorage to store data to flash. If you don't declare it as static the content will be discarded after the function finish (and before fstorage can store the data to flash).

    May I ask why you want to reduce RAM usage of the bootloader ? Note that the usage of RAM of the bootloader won't affect your application RAM size.

  • @Cesar: I don't understand what you mean in your reply. I already explained above, the nrf_dfu_settings.c occupied 1.7kB in ZI data but it won't consume 1.7kB in RAM as 1kB of the bootloader setting located on flash only.

Reply Children
No Data
Related