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

Sec bootloader can not success boot appliction after flashing device

Hi, 

     I use SDK16 ble sec-bootloader and merged application image together followed by the guide of the website 

nrfutil settings generate --family NRF52 --application app_flies_52840.hex --application-version-string 0.0.2 --bootloader-version 1 --bl-settings-version 1 settings_s140.hex
mergehex.exe --merge s140_nrf52_7.0.1_softdevice.hex dfu_ble_bootloader.hex --output fw_sd_boot.hex
mergehex.exe --merge app_flies_52840.hex fw_sd_boot.hex settings_s140.hex --output fw_all_s140.hex

nrfjprog.exe --family NRF52 --eraseall
nrfjprog.exe --family NRF52  --verify --program fw_all_s140.hex 
nrfjprog.exe --family NRF52 --reset

   unfortunalately , after flahsing fw_all_s140.hex to device, device still boot into DFU mode. 

   How I build a really release image file to factory? 

BR.

Parents
  • Hi Guorong, 

    You should use --family NRF52840 for nRF52840 while generating the bootloader setting. 

    -Amanda H.

  • D:\work\synsor\res\OTA>nrfutil settings generate  --family NRF52840 --application app_flies_52840.hex --application-version-string 0.0.2 --bootloader-version 1 --bl-settings-version 1 settings_s13
    2.hex
    
    Note: Generating a DFU settings page with backup page included.
    This is only required for bootloaders from nRF5 SDK 15.1 and newer.
    If you want to skip backup page generation, use --no-backup option.
    
    Generated Bootloader DFU settings .hex file and stored it in: settings_s132.hex
    
    Bootloader DFU Settings:
    * File:                     settings_s132.hex
    * Family:                   NRF52840
    * Start Address:            0x000FF000
    * CRC:                      0xFDCBA735
    * Settings Version:         0x00000001 (1)
    * App Version:              0x00000002 (2)
    * Bootloader Version:       0x00000001 (1)
    * Bank Layout:              0x00000000
    * Current Bank:             0x00000000
    * Application Size:         0x00016C9C (93340 bytes)
    * Application CRC:          0x58CBA51D
    * Bank0 Bank Code:          0x00000001
    * Softdevice Size:          0x00000000 (0 bytes)
    * Boot Validation CRC:      0x00000000
    * SD Boot Validation Type:  0x00000000 (0)
    * App Boot Validation Type: 0x00000000 (0)
    
    
    D:\work\synsor\res\OTA>mergehex.exe --merge dfu_ble_bootloader_P101_dbg.hex settings_s132.hex --output test.hex
    Parsing input hex files.
    Merging files.
    ERROR: The hex files cannot be merged since there are conflicts.
    
    

    Got an error with merge hex files

  • Can you upload bootloader.hex and settings.hex? I want to see where the conflict is. The bootloader should not have any data overlapping with the settings page.

    -Amanda H.

  • remove the FF000 address content from DFU bootlader hex file manually , and success boot up application now.

    So how to solve this conflict with mergehex tool instead manually. try help but no useful information.

    D:\work\synsor\res\OTA\test>mergehex --help
    
    Usage:
    -------------------------------------------------------------------------------
    
     -h  --help                  Displays this help.
    
     -v  --version               Displays the mergehex version.
    
     -q  --quiet                 Reduces the stdout text info. Must be combined
                                 with another command.
    
     -m  --merge <hex.file> <hex.file> [<hex.file>]         Hex files to be merged.
                                 Must be combined with --output command.
    
     -o  --output <hex.file>     Hex file result of the merge. Must be combined
                                 with --merge command.
    
    -------------------------------------------------------------------------------

  • Please try to modify FLASH_START to 0xf1000. You can refer the memory setting pca10056_s140_ble under of nRF5_SDK_16.0.0_98a08e2\examples\dfu\secure_bootloader. 

    -Amanda H.

Reply Children
No Data
Related