This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

valid app check inside bootloader code

Hello to all, i'm new to nRF51822 ble developing but have experience with embedded design on various microcontroller;

I have a little problem inside bootloader code: in order to properly launch the application (if it is present) i perform a simple check using the function bootloader_app_is_valid (from the ble_dfu example from Nordic) to verify if a valid app is stored into the flash;

Initially this code seemed to work but now it is just not working anymore: it seems that also when the application is correctly flashed into the micro, the code above detects no valid application stored but i can't figure out the reason; the bootloader code is the same while the application code is changing (due to my develop). I have also tried to reflash an old app code which i remembered to work togheter with bootloader but the result now is the same.

I am using pure eclipse-gcc projects under eclipse kepler: for the application my project is derived from that posted by Nikita here devzone.nordicsemi.com/.../ , for the bootloader (ble dual bank configuration) my project is derived from that posted by Nguyen Hoan Hoang here devzone.nordicsemi.com/.../

i am also using nRFgo studio within jlink arm to upload all the softwares to the nRF51822, currently i am using the nRF51822DK development kit board.

Any idea on what is happened or how can i update my code to check if a valid application is stored into the flash?

thanks to all Max

Parents
  • Thanks Nikita, i already saw that post but did't remember that option;

    Anyway i'm, using gcc so can't use the "uint8_t m_boot_settings[CODE_PAGE_SIZE] attribute((at(BOOTLOADER_SETTINGS_ADDRESS))) attribute((used)) = {BANK_VALID_APP};" statement because the "at" attribute is for keil and is not recognized by gcc;

    i have managed to solve the problem by adding the " = {BANK_VALID_APP}" initialization to the previous present attribute for gcc relative to the bootloader setting "uint8_t attribute((section (".bootloader_settings_sect"))) m_boot_settings[CODE_PAGE_SIZE] attribute((used))"

    Thanks

  • So you used this?

    __attribute__((section (".bootloader_settings_sect"))) m_boot_settings[CODE_PAGE_SIZE] __attribute__((used)) = {BANK_VALID_APP};
    
Reply Children
No Data
Related