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

Dfu problem in segger

Hi

Getting problem in DFU feature while using segger embedded studio.Device gets programmed  successfully but stops working after that.

I am following the same process for keil and segger IDE. For keil it's working fine, but for segger it fails.

For DFU I am following this thread :

devzone.nordicsemi.com/.../

I am using sdk 11

Has any one tried dfu feature using segger IDE?

Are there any additional steps for DFU in segger IDE?

  • Hi Vidar,

    Thank you.

    I am able to compile (DFU boot-loader project) without error using the project folder you have provided with nrf51 DK.

    We are working with nrf51822 chip. Do you recommend any changes in the project you have shared for this chip?

  • I have tested the OTA feature using the zip file using the the outputs generated by Keil. The .bat script I have used for this is the following.

    @ echo off
    cd C:\Keil_v5\ARM\ARMCC\bin
    rem pause
    echo "including %1 %2"
    rem pause
    copy "%1\nrf51422_xxac_s130.axf" C:\Keil_v5\ARM\ARMCC\bin\%2.axf
    rem  pause
    fromelf.exe --bin --output %2.bin %2.axf
    rem  pause 
    move "%2.bin" "C:\Program Files (x86)\Nordic Semiconductor\nRFgo Studio"
    rem  pause
    cd C:\Program Files (x86)\Nordic Semiconductor\nRFgo Studio
    rem  pause
    nrfutil.exe dfu genpkg --application %2.bin %2.zip
    rem  pause
    move "%2.zip" "%1"
    rem  pause
    move "%2.bin" "%1"
    rem  pause

    I would like to know how to create the equivalent zip file using the outputs generated by Segger (Please note that the .axf file is not generated while working with Segger).

    What I have tried?

    I have tried to use the following script (for Segger). After programming over the air using the zip file generated by this method, the device stops advertising.

    @ echo off
    cd C:\Program Files (x86)\Nordic Semiconductor\nRFgo Studio
    rem pause
    echo "including %1"
    rem pause
    copy "%1\*.bin" "C:\Program Files (x86)\Nordic Semiconductor\nRFgo Studio\%2.bin"
    rem  pause
    nrfutil.exe dfu genpkg --application %2.bin %2.zip
    rem  pause
    copy "C:\Program Files (x86)\Nordic Semiconductor\nRFgo Studio\%2.zip" "%1"
    rem  pause
    
    

    Suggestions?

  • Hi.

    There are some things which are unclear for me.

    You are now using SDK 11? Which version of nrfutil do you have? Because if you read the README on GitHub about versions you can read this:

    • Version 0.5.2 generates legacy firmware packages compatible with nRF SDK 11.0 and older
    • Versions 1.5.0 and later generate modern firmware packages compatible with nRF SDK 12.0 and newer

    What does the file you put into your packet contain? Do you expect it to advertise? Have you added a bootloader settings page?

    Best regards,

    Andreas

  • I have added the reply inline.

    There are some things which are unclear for me.

    You are now using SDK 11?

    Yes.

    Which version of nrfutil do you have? Because if you read the README on GitHub about versions you can read this:

    • Version 0.5.2 generates legacy firmware packages compatible with nRF SDK 11.0 and older
    • Versions 1.5.0 and later generate modern firmware packages compatible with nRF SDK 12.0 and newer

      We have been  using nrf util version 0.3 which worked okay with Keil. So I assume the version of nrfutil is not the issue.

    What does the file you put into your packet contain? Do you expect it to advertise?

    Yes, it is supposed to advertise, connect to our mobile and do some packet transfer.

    Have you added a bootloader settings page?

    We have already added bootloader settings. Attached the batch file which we are using to generated merged hex file.

    @ echo off
    cd C:\Program Files (x86)\Nordic Semiconductor\nrf5x\bin
    
    mergehex.exe -m app_valid_setting_apply.hex tmp_dfu_dual_bank_ble_no_s130_pca10028.hex -o test1.hex
    rem  pause 
    mergehex.exe -m test1.hex tmp_s130_nrf51_2.0.0_softdevice.hex -o test2.hex
    rem  pause 
    echo "including %1 %2"
    rem  pause 
    copy "%1\nrf51422_xxac_s130.hex" "C:\Program Files (x86)\Nordic Semiconductor\nrf5x\bin\%2.hex"
    rem  pause
    mergehex.exe -m test2.hex %2.hex -o %2_merge.hex
    rem  pause 
    move "%2_merge.hex" "%1"
    rem  pause 

  • Hi.

    Can you please try to upgrade to nrfutil version 0.5.2?

    Best regards,

    Andreas

Related