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

nRF Connect for Desktop to download hex file error

I use nRF Connect for Desktop to download hex file(nrf52810).

Use the following example:

nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040e_ble +
nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_buttonless_dfu\pca10040e+
nRF5_SDK_15.3.0_59ac345\components\softdevice\s112\hex\s112_nrf52_6.1.1_softdevice.hex

merge generation SDK_APP.hex.

Download prompt error,Only SDK_APP.hex , the other will not go wrong.
But i use nRfgo Studio download successful.

Parents
  • Do I understand you correctly?

    • If you program an other hex file (e.g. nRF5_SDK_15.3.0..\examples\peripheral\blinky\hex\blinky_pca10040.hex) using the nRF Connect Programmer app, it works fine
    • If you program the SDK_APP.hex file using nRfgo studio, you don't experience any problems?

    Some more questions:

    • Could you explain how you created the hex files? Did you follow the steps in BLE Secure DFU Bootloader?
    • Could you upload the SDK_APP.hex file as well? Then I can try to recreate your issue.
    • What version of the Programmer app are you using?

    Best regards,

    Simon

  • yes,If program the SDK_APP.hex file using nRfgo studio, that is no problems.

    Programmer  version V3.2.0.

    SDK_APP.hex generation step:

    nrfutil settings generate --family NRF52810 --application nrf52810_xxaa.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 bootloader_setting.hex


    mergehex --merge s112_nrf52_6.1.1_softdevice.hex nrf52810_xxaa.hex nrf52810_xxaa_s112.hex -o output3to1.hex


    mergehex --merge output3to1.hex bootloader_setting.hex --output sdk_app.hex

    3716.sdk_app.hex

    Do you have \ble_app_buttonless_dfu test_images(nrf52810)?

    Thanks!

  • I was able to program the SDK_APP.hex file on the nRF52832 DK.

    I see that you are using pca10040e projects (e-extension makes it possible to emulate nrf52810 on nrf52832), these are supposed to run on an nrf52832. Have you followed the steps under "Transferring emulated project" in this link in order to run in on an nrf52810?

    If you are having more problems with this project, please ask, and I will help you.

    Best regards,

    Simon

  • I using pca10040e projects.

    In the C/C++ preprocessor settings, remove the defines "DEVELOP_IN_NRF52832 " and "NRFX_COREDEP_DELAY_US_LOOP_CYCLES ".

    The problem is still the same,Can you test with nrf52810?

    Thanks!

  • I made it work by doing the following

    1. Create a new folder "DFU_nRF52810" in Desktop to put all the files in
    2. Generate private key
      • "nrfutil keys generate priv.pem"
    3. Generate the public key from private
      • nrfutil keys display --key pk --format code priv.pem --out_file public_key.c
    4. Put public key in "<..>\nRF5_SDK_15.3.0_59ac345\examples\dfu"
    5. Generate settings page from buttonless dfu example
      • Open nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_buttonless_dfu\pca10040e2\s112\ses
      • Remove definitions DEVELOP_IN_NRF52832 and NRFX_COREDEP_DELAY_US_LOOP_CYCLES
      • Build the ble_app_buttonless_dfu example
        • (Located inside "<..>\nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_buttonless_dfu\pca10040e\s112\ses\Output\Release\Exe\ble_app_buttonless_dfu_pca10040e_s112.hex")
      • Generate settings hex file based on this application hex file
        • nrfutil settings generate --family NRF52810 --application ble_app_buttonless_dfu_pca10040e_s112.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 settings.hex
    6. Install micro-ecc
    7. Compile the bootloader
      •  Open "nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040e_ble\ses"
      • Remove definitions DEVELOP_IN_NRF52832 and NRFX_COREDEP_DELAY_US_LOOP_CYCLES
      • Build it
        • Hex is located in "secure_bootloader\pca10040e_ble\ses\Output\Release\Exe\secure_bootloader_ble_s112_pca10040e.hex"
    8. Merge the bootloader and settings page
      • mergehex -m secure_bootloader_ble_s112_pca10040e.hex settings.hex -o merged_settings_and_bootloader.hex
    9. Program everything onto the nRF52810 using nRF Connect Programmer app
      • Program merged_settings_and_bootloader.hex
      • Program s112_nrf52_6.1.1_softdevice.hex
      • Program ble_app_buttonless_dfu_pca10040e_s112.hex
    10. Run it
      • Press the reset button
      • If you open nRF Connect for mobile, you should see the buttonless app advertising
      • If you press button 4 while reset, you should see the dfu app advertising

    ble_app_buttonless_dfu_pca10040e_s112.hex

    s112_nrf52_6.1.1_softdevice.hex

    merged_settings_and_bootloader.hex

    Best regards,

    Simon

Reply
  • I made it work by doing the following

    1. Create a new folder "DFU_nRF52810" in Desktop to put all the files in
    2. Generate private key
      • "nrfutil keys generate priv.pem"
    3. Generate the public key from private
      • nrfutil keys display --key pk --format code priv.pem --out_file public_key.c
    4. Put public key in "<..>\nRF5_SDK_15.3.0_59ac345\examples\dfu"
    5. Generate settings page from buttonless dfu example
      • Open nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_buttonless_dfu\pca10040e2\s112\ses
      • Remove definitions DEVELOP_IN_NRF52832 and NRFX_COREDEP_DELAY_US_LOOP_CYCLES
      • Build the ble_app_buttonless_dfu example
        • (Located inside "<..>\nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_buttonless_dfu\pca10040e\s112\ses\Output\Release\Exe\ble_app_buttonless_dfu_pca10040e_s112.hex")
      • Generate settings hex file based on this application hex file
        • nrfutil settings generate --family NRF52810 --application ble_app_buttonless_dfu_pca10040e_s112.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 settings.hex
    6. Install micro-ecc
    7. Compile the bootloader
      •  Open "nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040e_ble\ses"
      • Remove definitions DEVELOP_IN_NRF52832 and NRFX_COREDEP_DELAY_US_LOOP_CYCLES
      • Build it
        • Hex is located in "secure_bootloader\pca10040e_ble\ses\Output\Release\Exe\secure_bootloader_ble_s112_pca10040e.hex"
    8. Merge the bootloader and settings page
      • mergehex -m secure_bootloader_ble_s112_pca10040e.hex settings.hex -o merged_settings_and_bootloader.hex
    9. Program everything onto the nRF52810 using nRF Connect Programmer app
      • Program merged_settings_and_bootloader.hex
      • Program s112_nrf52_6.1.1_softdevice.hex
      • Program ble_app_buttonless_dfu_pca10040e_s112.hex
    10. Run it
      • Press the reset button
      • If you open nRF Connect for mobile, you should see the buttonless app advertising
      • If you press button 4 while reset, you should see the dfu app advertising

    ble_app_buttonless_dfu_pca10040e_s112.hex

    s112_nrf52_6.1.1_softdevice.hex

    merged_settings_and_bootloader.hex

    Best regards,

    Simon

Children
Related