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

Implementing buttonless_dfu to hrs_freertos

Hi,

I am developing the 'buttonless dfu' to the 'hrs freertos' using the SDK v15.3.0.

However, after I compiled the modified code and loaded to the target broad, I got the below error.

    <info> app: nrf_sdh_ble_enable() err:0 ram_start:0x20002258
    <error> app: Fatal error

Is there any example for this application?

Thanks

Parents
  • Hi Amanda,

    Thanks for your help.

    Yes. I am using SEGGER Embedded Studio in my development.

    After enabled the DEBUG mode, I got more information about this issue as below.

        <info> app: nrf_sdh_ble_enable() err:0 ram_start:0x20002210
        <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at /home/15v3_0/sdk/examples/ble_peripheral/ble_app_hrs_freertos_dfu/main.c:648
    PC at: 0x0002DF83
        <error> app: End of error report

    And, the error was reported after calling sd_ble_uuid_vs_add().

  • Hi Amanda,

    Thank you for your information. They are very helpful.

    Now, I can flash the application image to the DK using mobile APP.

    However, I still have a problem on flashing the application image using SES. I followed the tutorial to setup the SES.

    After I ran the application image, I got the below error.

        <error> app: No bootloader was found
        <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at          /home/15v3_0/sdk/examples/ble_peripheral/ble_app_buttonless_dfu_evboard/main.c:854
    PC at: 0x0002FAD1
        <error> app: End of error report

    But I INSTALLED the bootloader image and the SoftDevice image before.

Reply
  • Hi Amanda,

    Thank you for your information. They are very helpful.

    Now, I can flash the application image to the DK using mobile APP.

    However, I still have a problem on flashing the application image using SES. I followed the tutorial to setup the SES.

    After I ran the application image, I got the below error.

        <error> app: No bootloader was found
        <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at          /home/15v3_0/sdk/examples/ble_peripheral/ble_app_buttonless_dfu_evboard/main.c:854
    PC at: 0x0002FAD1
        <error> app: End of error report

    But I INSTALLED the bootloader image and the SoftDevice image before.

Children
  • Hi Amanda,

    I also found that according to this. The '--bl-settings-version' for SDK 15.3.0 was required to be set to '2'. However, I only could set it to be '1' otherwise, I got error.

    Is it ok for me to set the '--bl-settings-version' to '1'?

  • Hi Terry,

    Terry said:
    I also found that according to this. The '--bl-settings-version' for SDK 15.3.0 was required to be set to '2'. However, I only could set it to be '1' otherwise, I got error.

    Please provide the complete command you used and the error message. 

    What is the nrfutil version? 

    C:\WINDOWS\system32>nrfutil version
    nrfutil version 5.2.0

    -Amanda H.

  • Hi Amanda,

    The version of nrfutil is 3.3.2

    I am developing on Ubuntu 16.04.

    The command I used is as below

    nrfutil settings generate --family NRF52 --application application.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 bootloaderSettings.hex
     

    If I set the '--bl-settings-version' to '2', I got the below error,

    Traceback (most recent call last):
    File "/home/terrychan/.local/bin/nrfutil", line 11, in <module>
    sys.exit(cli())
    File "/home/terrychan/.local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
    File "/home/terrychan/.local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
    File "/home/terrychan/.local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/home/terrychan/.local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/home/terrychan/.local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "/home/terrychan/.local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
    File "/home/terrychan/.local/lib/python2.7/site-packages/nordicsemi/__main__.py", line 239, in generate
    sett.generate(arch=family, app_file=application, app_ver=application_version_internal, bl_ver=bootloader_version, bl_sett_ver=bl_settings_version)
    File "/home/terrychan/.local/lib/python2.7/site-packages/nordicsemi/dfu/bl_dfu_sett.py", line 125, in generate
    raise NordicSemiException("Unknown bootloader settings version")
    pc_ble_driver_py.exceptions.NordicSemiException: Unknown bootloader settings version

    Hi Amanda,

    I used another PC in which I install the nrfutil version 6.1.0.

    I used the below command to generate the bootloader setting

    nrfutil settings generate --family NRF52 --application application.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 bootloaderSettings.hex

    And then, I used the below command to program the application + bootloader setting

    echo Merging: application.hex and bootloaderSettings.hex
    mergehex -m ./application.hex ./bootloaderSettings.hex -o mergedBootloadersettingsApplication.hex
    
    echo Flashing: mergedBootloadersettingsApplication.hex
    nrfjprog -f nrf52 --program mergedBootloadersettingsApplication.hex --sectorerase
    
    sleep 2
    
    nrfjprog -f nrf52 --reset
    
    rm -fv bootloaderSettings.hex
    rm -fv mergedBootloadersettingsApplication.hex

    However, the EV board could not be booted up

    Please note that I programmed the bootloader + SD with the below command

    echo Merging: bootloader.hex and s132_nrf52_6.1.1_softdevice.hex
    mergehex -m ./bootloader.hex ./s132_nrf52_6.1.1_softdevice.hex -o mergedBootloaderSoftdevice.hex
    
    echo Flashing: mergedBootloaderSoftdevice.hex
    nrfjprog -f nrf52 --program mergedBootloaderSoftdevice.hex --chiperase
    
    sleep 2
    
    nrfjprog -f nrf52 --reset
    
    rm -fv mergedBootloaderSoftdevice.hex
    

  • Hi Terry,

    Terry said:
    The version of nrfutil is 3.3.2

    I think this version is too old to support SDK 15.3 later. 

    Terry said:
    Please note that I programmed the bootloader + SD with the below command

    After you program the bootloader + SD, you should see the device advertises with the name as "DfuTarg". 

    Terry said:
    And then, I used the below command to program the application + bootloader setting

     What is the application you used? Is it your application or example application? If you use hrs_application_s132  + bootloader setting, you should see the device advertises with the name as "Nordic_HRM" after programing and reset. If you can work with the example application, you could see the step-5--debugging-application-fw-with-bootloader-in-place.

    -Amanda H.

Related