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

Bootloader hardfault

Hi,

Im trying to use BLE DFU Bootloader from examples. I loaded SD8 and then bootloader via nrfStudio (dont have a valid app flashed), but I cant see the device from Android app. I decided to do some debugging via Keil. I recompiled Bootloader with no optimisation and moved bootloader address to 0x3A000.

If I try to debug in Keil it doesnt stop at main, but if i manually press stop it gets into hardfault: image description

Memory settings: image description

Compilation settings: image description

Im using Revision 3 chip. What do I do wrong?

app.zip

hex

Bootloader

Bootloader hex O3

bootloader package without BANK_VALID_APP

Bootloader HEX without BANK_VALID_APP

Memory map according to NRF Studio: Memory map

Bootloader optimisation Level 2 gets stuck on run: image description

Image size > 0x6400

Parents
  • The only place it writes to flash are these 2 addresses:

    #define FLASH0_START_ADDRESS (uint32_t *)(0x3A000-0x400*2) //Last 2KB
    #define FLASH1_START_ADDRESS (uint32_t *)(0x3A000-0x400*1) //Last 1KB
    

    Doesnt write into softdevice, but may be with dual bank config it makes some problems?

Reply
  • The only place it writes to flash are these 2 addresses:

    #define FLASH0_START_ADDRESS (uint32_t *)(0x3A000-0x400*2) //Last 2KB
    #define FLASH1_START_ADDRESS (uint32_t *)(0x3A000-0x400*1) //Last 1KB
    

    Doesnt write into softdevice, but may be with dual bank config it makes some problems?

Children
No Data
Related