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

Getting problem to upload Bootloader HEX file through nRFgo Studio...

Hello,

I am working on nRF52832 chip using SDK 15.3.0 in segger embedded studio.

I implemented DFU in my application and it's working properly.

But my problem is when I upload HEX file of boot-loader using nRFgo Studio at that time I am getting error as shown below,

For download HEX file I am try 2 method

Method 1:

1) download soft-device HEX file,

     Path: ..\..\..\components\softdevice\s132\hex\s132_nrf52_6.1.1_softdevice

2) Download bootloader HEX file,

    Path: ..\..\..\Example\dfu\secure_bootloader\pca10040_ble\ses\Output\Release\Exe\secure_bootloader_ble_s132_pca10040.hex

Method 2:

Merge HEX file of bootloader setting generated by nrfutil.exe and bootloader hex file.

For merge and generate HEX file using below command,

1) Generate boot-loader settings as per our Application using below command,

nrfutil settings generate --family NRF52 --application application.hex --application-version 3 --bootloader-version 2 --bl-settings-version 2 settings_52832.hex

2) Merge HEX file using below command,

mergehex -m settings_52832.hex mergehex -m settings.hex secure_serial_bootloader.hex -o bootloader_w_settings.hex.hex -o bootloader_w_settings.hex

after this HEX file I upload same way using nRFgo Studio but getting same error. 

Bootloade RAM AND FLASH address is shown below,

FLASH_PH_START=0x0
FLASH_PH_SIZE=0x80000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x10000
FLASH_START=0x78000
FLASH_SIZE=0x6000
RAM_START=0x200057b8
RAM_SIZE=0xa848

And application RAM and FLASH address is shown below,

FLASH_PH_START=0x0 
FLASH_PH_SIZE=0x80000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x10000
FLASH_START=0x26000
FLASH_SIZE=0x5a000
RAM_START=0x20002640
RAM_SIZE=0xd9c0

Please give me solution for this problem as soon as possible.

Regards,

Urvisha Andani

  • Hi Urvisha, 

    nRFGo Studio is deprecated for the nRF52 Series and you need to use nRF Connect Programmer instead. 

    The application is configured to use all the available flash on the nRF52832, i.e. FLASH_START+FLASH_SIZE = FLASH_PH_SIZE. In the bootloader RAM and Flash settings you see that the bootloader starts at 0x78000, hence you need to adjust the application FLASH_SIZE to 0x26000-0x78000 = 0x52000.

    Best regards

    Bjørn

  • nRFGo Studio is deprecated for the nRF52 Series and you need to use nRF Connect Programmer instead. 

    Thanks for support.

    I tried this and I upload successfully HEX file using nRF Connect Programmer.

    The application is configured to use all the available flash on the nRF52832, i.e. FLASH_START+FLASH_SIZE = FLASH_PH_SIZE. In the bootloader RAM and Flash settings you see that the bootloader starts at 0x78000, hence you need to adjust the application FLASH_SIZE to 0x26000-0x78000 = 0x52000.

    I am changed FLASE size as you suggest.
    In this I am getting problem of upload .zip file using bootloader.

    And also using older one FLASH size(0x5e000) I am getting same problem. 

    I am use merge HEX file of softdevice, bootloader bootloader setting page, application.

    I use command mention in below document to merge HEX file,

    DFU FLOW.docx 

  • Urvisha Andani said:

    In this I am getting problem of upload .zip file using bootloader.

    And also using older one FLASH size(0x5e000) I am getting same problem. 

    I am use merge HEX file of softdevice, bootloader bootloader setting page, application.

    I use command mention in below document to merge HEX file,

     Hi Urvisha, 

    Can you elaborate on the problems you are facing after changing the flash size of the application?  Do you have any logs from nRF Connect when the upload of the zip fails?

    The mergehex commands look ok. Does the application start after you flash the sd_app_boot_setting_complete_52832.hex to the nRF52832?

    Best regards

    Bjørn

  • Sorry for late reply.

    Can you elaborate on the problems you are facing after changing the flash size of the application?  Do you have any logs from nRF Connect when the upload of the zip fails?

    Yes, Show below attached images.

                                 

    The mergehex commands look ok. Does the application start after you flash the sd_app_boot_setting_complete_52832.hex to the nRF52832?

    Yes, application start after flash sd_app_boot_seeting_complete_52832.hex, But in this I am getting problem to upload new dfu package.

    I follow below step,

    1) Erase chip and through nRF connect programmer I am upload  sd_app_boot_seeting_complete_52832.hex file.

    2) Connect device with nrf connect mobile application.

    3) Enable notification of DFU and send request.

    4)Device Start advertising of bootloader code.

    5) Device connect with mobile application and i upload .zip file in thisI am getting problem and device disconnect with mobile.

    So, Please give me solution for this.

  • You are getting a firmware version error, so this means that either the application version, i.e. --application-version 1 or the bootloader version, i.e. --bootloader-version 1, is to low, see Acceptance rules for versions, copy pasted relevant section below:

    Firmware version: If the image contains a bootloader, the image is accepted if the new firmware version is greater than (>) the existing version of the bootloader. If the image contains an application, the image is accepted if the new firmware version is greater than or equal to (>=) the existing version of the application. If the image contains a SoftDevice and no SoftDevice is already present, the fw_version is checked against the existing application's version to determine whether the update can overwrite it.

    Can you post the nrfutil command you used to generate the .zip for the update in step 5?

Related