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

Bootloader start application at 0x1000 fails

I'm using an example project of the secure serial bootloader (pca10056_uart_debug) and changed some configuration for my custom board. I added RTT debugging and changed uart pins as well as hwfc. As application I'm using a already existing project, that is set up with the SDK16 and SD140. I compiled bootloader (with new key) and application seperate and generated the bootloader settings of the application. After merging everything together (SD140+APP+BL+Settings), I cross checked the address of SD,APP and BL with the NRFConnect app. Everything seems ok.  Then I cleaned and flashed the chip with nrfjprog. The bootloader wants to start the app at 0x1000 but the application does not start at this point.

Do I have to configure or change something in the Application Project settings or configuration setup of the Applicatoin? What could be the problem of hanging after initiating the app start?

For settings generation I use this command:

nrfutil settings generate --family NRF52840 --application testapp.hex --application-version 1 --bootloader-version 0 --bl-settings-version 2 --app-boot-validation NO_VALIDATION --key-file ../my_private_key.key settings.hex

For merging:

mergehex -m $(SD) $(TESTAPP) $(OUTPUT)/secure_bootloader_uart_mbr_custom_board.hex -o .temp_output1.hex
mergehex -m .temp_output1.hex settings.hex -o $(OUTPUT)/merge_out_SD_APP_BL_SETTINGS.hex

For flashing:

nrfjprog -f nrf52 --program $(OUTPUT)/merge_out_SD_APP_BL_SETTINGS.hex --sectorerase

The memory layout after merging all:

Here the output of the RTT debugging after resetting the chip.

Parents Reply
  • Hello,

    Thanks for the quick reply.

    I'm using the mbr_blinky example and tried it with and without the bootloader. 

    Without bootloader the example runs fine (blinky_mbr.hex + mbr.hex). Adding the bl + settings (settings of blinky_pca10056_mbr.hex) I'm having the same problem.

    I checked the project settings of the blinky_mbr example:

    linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x1000;FLASH_SIZE=0xff000;RAM_START=0x20000008;RAM_SIZE=0x3fff8"
          
    linker_section_placements_segments="FLASH RX 0x0 0x100000;RAM RWX 0x20000000 0x40000"

    I don't know the difference of RAM_PH_START and RAM_START but I suppose that the example with mbr shuld be configured correctly?    

Children
Related