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

SES Error Reported Failed to Download Application

After pressing F5 I get.

Preparing target for download
Executing Reset script TargetInterface.resetAndStop()
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Downloading ‘s132_nrf52_6.1.1_softdevice.hex’ to J-Link
Programming 2.7 KB of addresses 00000000 — 00000aff
Programming 144.3 KB of addresses 00001000 — 0002514f
Download successful
Downloading ‘nuBorn.elf’ to J-Link
Programming 73.9 KB of addresses 00026000 — 000387c7
Programming 0.0 KB of addresses 000387c8 — 000387db
Programming 5.9 KB of .rodata addresses 000387dc — 00039fd7
Programming 0.0 KB of addresses 00039fd8 — 0003a02b
Download failed

It worked before I updated SES to 4.30a.  I can debug using 4.30a on my laptop with the same hardware (u-blox evk-nina-302) without any problem. 

Parents
  • Ok, just to verify: 

    It worked before I updated SES to 4.30a.  I can debug using 4.30a on my laptop with the same hardware (u-blox evk-nina-302) without any problem. 

     Do you have two computers, both updated to SES 4.30a? Is the configuration the same on both as well? Do both have same version of nrfjprog? 

    Are you able to program the device (CTRL+F5)? Can you program using nrfjprog?

    Sorry for not having any answer at the moment, I will need more information.

    Kind regards,
    Øyvind

Reply
  • Ok, just to verify: 

    It worked before I updated SES to 4.30a.  I can debug using 4.30a on my laptop with the same hardware (u-blox evk-nina-302) without any problem. 

     Do you have two computers, both updated to SES 4.30a? Is the configuration the same on both as well? Do both have same version of nrfjprog? 

    Are you able to program the device (CTRL+F5)? Can you program using nrfjprog?

    Sorry for not having any answer at the moment, I will need more information.

    Kind regards,
    Øyvind

Children
  • 1) My laptop is still running 4.30 I didn't want to update it to 4.30a because I can't afford for it to fail too. 

    2) Both systems are running Windows 7 64 bit and are otherwise configured similarly except for the drives. The failed system has an E: drive whereas my laptop has only C:

    I have installed the IDE on E drive because C: is almost full. I have to admit that I accidentally installed it on the C: drive, and then uninstalled and re-installed in on the E: drive.

    Now I notice Segger J-Link is now installed on the C: drive. The original J-Link install could have been on the E drive. But after re-installing I put it on the C: drive.  

    3) Both systems are running nrfjprog version: 10.5.0

    4) CTRL+F5 gives me the  error message box as in my original post and the following:

    Connecting ‘J-Link’ using ‘USB’
    Connecting to target using SWD
    Loaded E:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30/bin/JLink_x64.dll
    Firmware Version: J-Link OB-SAM3U128 V3 compiled Aug 22 2019 17:29:22
    DLL Version: 6.54c
    Hardware Version: V3.00
    Target Voltage: 3.300
    Device "NRF52832_XXAA" selected.
    InitTarget() start
    InitTarget() end
    Found SW-DP with ID 0x2BA01477
    Scanning AP map to find all available APs
    AP[2]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    AP[1]: JTAG-AP (IDR: 0x02880000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    Found Cortex-M4 r0p1, Little endian.
    FPUnit: 6 code (BP) slots and 2 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Downloading ‘s132_nrf52_6.1.1_softdevice.hex’ to J-Link
    Programming 2.7 KB of addresses 00000000 — 00000aff
    Programming 144.3 KB of addresses 00001000 — 0002514f
    Download successful
    Downloading ‘PEP_Module.elf’ to J-Link
    Programming 81.6 KB of addresses 00026000 — 0003a693
    Programming 0.0 KB of addresses 0003a694 — 0003a6a7
    Programming 6.7 KB of .rodata addresses 0003a6a8 — 0003c1d7
    Programming 0.0 KB of addresses 0003c1d8 — 0003c22b
    Download failed
    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Downloading ‘s132_nrf52_6.1.1_softdevice.hex’ to J-Link
    Programming 2.7 KB of addresses 00000000 — 00000aff
    Programming 144.3 KB of addresses 00001000 — 0002514f
    Download successful
    Downloading ‘PEP_Module.elf’ to J-Link
    Programming 81.6 KB of addresses 00026000 — 0003a693
    Programming 0.0 KB of addresses 0003a694 — 0003a6a7
    Programming 6.7 KB of .rodata addresses 0003a6a8 — 0003c1d7
    Programming 0.0 KB of addresses 0003c1d8 — 0003c22b
    Download failed

    5) Programming with nrfjprog:

    C:\nrf-command-line-tools\bin>nrfjprog -f nrf52 --program E:\Git\myProject\Output\Debug\Exe\myProject.hex --sectorerase
    Parsing hex file.
    Erasing page at address 0x26000.
    Erasing page at address 0x27000.
    ... // redacted for brevity
    Erasing page at address 0x39000.
    Erasing page at address 0x3A000.
    Applying system reset.
    Checking that the area to write is not protected.
    Programming device.

    C:\nrf-command-line-tools\bin>nrfjprog -f nrf52 --reset
    Applying system reset.
    Run.

    C:\nrf-command-line-tools\bin>

    However, the app does not run on the dev board.

  • Hello, 

    My apologies for the late reply.

    Looking at the information you posted, can you please tell me about the setup you are using? Are you using the Nordic SDK? What is PEP_module.elf compared to nuBorn.elf and myProject.hex? Have you tried to program any of our examples from the nRF SDK? 

     

    dbaird said:
    5) Programming with nrfjprog:

     Erasing page at address 0x3A000 is the last page to be erased. While in number 4 it says Programming 6.7 KB of .rodata addresses 0003a6a8 — 0003c1d7.

    Are these the same projects? I'm confused that it differs in write size compared to erase.

  • 6) I am using Nordic SDK 15.3.0

    7) There are two projects that I am working with:.nuBorn and PEP_Module.  nuBorn is a branch of PEP_Module. myProj was another variant. Sorry for the confusion.  In my effort to isolate the problem, I have tried many variations.  PEP_Module is the more stable, So I will stick with that from now on.

    8) I have not programmed any of the examples since before the problem started. Is there a particular example you want me to try?

  • Does not matter what example you try, main important thing is to open in Segger Embedded Studio and verify that you are able to build and program your device with it. The simplest example would be the Beacon Transmitter Sample Application. You'll find this in examples\ble_peripheral\ble_app_beacon\pca10056\s140\ses\ble_app_beacon_pca10056_s140.emProject

    If this does not work, I suggest cleaning your installs. First check the path of Segger J-Link in Windows Environment, and the nRF Command Line tools. If these are correct, then you need verify that you have only one instance installed of each. 

    Last suggestion is to uninstall Segger J-Link and nRF Command Line Tools, then reinstall both.

  • Finally got it working again.  I uninstalled: SES, J-Link, and the 3 Windows Driver Packages - Segger ...  using the control panel Programs and Features.  I used regedit to delete all Segger, J-Link and jlink Keys (caution - this may require re-installation of some other programs with dependencies on these keys). I installed SES 4.20a (this was the original version the code was developed on), J-link V6.54c, upgraded SES to 4.30c and restarted my PC.  

    I suspect the problem originated when I updated to SES 4.30a, but installed it on C: instead of E: where 4.20a was originally installed. After that, re-installing on drive E: did not fix the problem.  So, I believe the registry keys, which are not removed when uninstalling, were incorrect after the the C: drive installation and thus had to be deleted before re-installing everything. 

    Thanks for  your help.

Related