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

PCA10056 flash the merge hex

Q1 I compile sdk13.0.0 generate nrf52840_xxaa.hex(app), nrf52840_xxaa_s140.hex(bootloader). I used merge tool make a hex file, then burn the file into PCA10056 DK by nrfjprog, but system reset entry DFU mode.

mergehex -m s140_nrf52840_5.0.0-2.alpha_softdevice.hex nrf52840_xxaa_s140.hex -o nrf52840_s140_and_scure_bootloader.hex mergehex -m nrf52840_s140_and_scure_bootloader.hex nrf52840_xxaa.hex -o NRF52840_S_B_A.hex

nrfjprog -f NRF52 -s 683246430 -e nrfjprog -f NRF52 -s 683246430 --program NRF52840_S_B_A.hex nrfjprog -f NRF52 -s 683246430 -r

Q2 Use nrfstudio cannot bootloader.hex(Verification failed),but can download by MDK Jlink.

Where is problem?

Parents
  • Q1 The problem is that it is the bootloaders task to validate the application based on CRC during boot, also it needs to set an "application present" flag so it knows there is an application there. This is automatically done when you first flash the bootloader, then use the bootloader to upload the application. If you want to merge the application and bootloader before flashing, a settings page must be generated with the correct info about the application. This settings page will go in the last flash page after the bootloader (memory layout)

    To generate the settings page you can use the nrfutils tool. Please see this link: infocenter.nordicsemi.com/.../nrfutil_settings_generate_display.html

    The settings page must then be merged with application (and SD) and bootloader using mergehex, and then flashed using nrfjprog

    Q2 nRFgo studio has some internal checks that fail with certain types of hex files. We are working on a solution to this. Meanwhile, we recommend using nrfjprog instead.

Reply
  • Q1 The problem is that it is the bootloaders task to validate the application based on CRC during boot, also it needs to set an "application present" flag so it knows there is an application there. This is automatically done when you first flash the bootloader, then use the bootloader to upload the application. If you want to merge the application and bootloader before flashing, a settings page must be generated with the correct info about the application. This settings page will go in the last flash page after the bootloader (memory layout)

    To generate the settings page you can use the nrfutils tool. Please see this link: infocenter.nordicsemi.com/.../nrfutil_settings_generate_display.html

    The settings page must then be merged with application (and SD) and bootloader using mergehex, and then flashed using nrfjprog

    Q2 nRFgo studio has some internal checks that fail with certain types of hex files. We are working on a solution to this. Meanwhile, we recommend using nrfjprog instead.

Children
No Data
Related