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

Programming custom NRF52 board using J-Link

When I try to program custom NRF52 board using a J-Link v9 (It's probably a copy product), I'm getting the error below. I also have several NRF52/NRF53 DK boards when I try using their debug-out for programming, there is no problem. When I use J-Flash utility instead nrfjprog, again there is no problem.

Flashing: _build/toxophilite.hex
nrfjprog -f nrf52 --program _build/toxophilite.hex --sectorerase --log
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.
make: *** [Makefile:287: flash] Error 33
"make flash" terminated with exit code 2. Build might be incomplete.

I've attached the log.

[2021-Mar-31 13:57:23] [ info] nrfjprog -f nrf52 --program _build/toxophilite.hex --sectorerase --log 
[2021-Mar-31 13:57:23] [ info] nrfjprog version 10.12.1 
[2021-Mar-31 13:57:23] [ info] --------------------------------------------------------------------------------
[2021-Mar-31 13:57:23] [debug] [ nRF0x0] - open_dll
[2021-Mar-31 13:57:23] [ info] [ nRF0x0] - Load library at C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_NRF52_NRFJPROG.dll.
[2021-Mar-31 13:57:23] [ info] [ nRF0x0] - Library loaded, loading member functions.
[2021-Mar-31 13:57:23] [ info] [ nRF0x0] - Member functions succesfully loaded.
[2021-Mar-31 13:57:23] [ info] [Backend] - Logger callback at 0x522020 registered in Segger backend logger.
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] Logger callback at 0x522020 registered in JLink logger.
[2021-Mar-31 13:57:23] [debug] [nRF520x0] - open
[2021-Mar-31 13:57:23] [debug] [Backend] - open_dll
[2021-Mar-31 13:57:23] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Mar-31 13:57:23] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLinkARM.dll.
[2021-Mar-31 13:57:23] [ info] [Backend] - Library loaded, loading member functions.
[2021-Mar-31 13:57:23] [ info] [Backend] - Member functions succesfully loaded.
[2021-Mar-31 13:57:23] [debug] [Backend] - dll_version
[2021-Mar-31 13:57:23] [ info] [Backend] - Segger dll version 6.98.e loaded.
[2021-Mar-31 13:57:23] [debug] [ nRF0x0] - enum_emu_snr
[2021-Mar-31 13:57:23] [debug] [nRF520x0] - enum_emu_snr
[2021-Mar-31 13:57:23] [debug] [Backend] - is_connected_to_emu
[2021-Mar-31 13:57:23] [debug] [Backend] - enum_emu_snr
[2021-Mar-31 13:57:23] [debug] [Backend] - ---just_enum_emu_snr
[2021-Mar-31 13:57:23] [debug] [Backend] - ---just_get_num_emus
[2021-Mar-31 13:57:23] [debug] [Backend] - is_connected_to_emu
[2021-Mar-31 13:57:23] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Mar-31 13:57:23] [debug] [nRF520x0] - connect_to_emu_with_snr
[2021-Mar-31 13:57:23] [debug] [Backend] - is_connected_to_emu
[2021-Mar-31 13:57:23] [debug] [Backend] - connect_to_emu_with_snr
[2021-Mar-31 13:57:23] [debug] [Backend] - is_connected_to_emu
[2021-Mar-31 13:57:23] [debug] [Backend] - ---just_enum_emu_snr
[2021-Mar-31 13:57:23] [debug] [Backend] - ---just_get_num_emus
[2021-Mar-31 13:57:23] [debug] [Backend] - ---just_connect_to_emu_with_snr
[2021-Mar-31 13:57:23] [debug] [Backend] - ---just_connect_to_emu_without_snr
[2021-Mar-31 13:57:23] [ info] [Backend] - Segger logging enabled.
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] Firmware: J-Link V9 compiled Feb  2 2021 16:34:10
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] Firmware: J-Link V9 compiled Feb  2 2021 16:34:10
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] Decompressing FW timestamp took 250 us
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] Hardware: V9.20
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] S/N: 4294967295
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] OEM: SEGGER
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] TELNET listener socket opened on port 19021
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Starting webserver
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Webserver running on local port 19080
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] - 13.646ms returns "O.K."  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetHWStatus(...)  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] - 0.616ms returns 0  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] - 0.013ms returns 0x01  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] - 0.009ms returns 0x00  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] - 0.213ms returns 0x00  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] - 0.040ms returns 0  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] - 0.577ms returns 0x00  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetSpeed(2000)  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] - 0.098ms  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetSN()  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] - 0.017ms returns -1  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
[2021-Mar-31 13:57:23] [ info] [Backend] - JLinkARM.dll reported "-1", an unknown error.
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] - 0.043ms  
[2021-Mar-31 13:57:23] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Close()  
[2021-Mar-31 13:57:23] [debug] [Backend] - is_connected_to_emu
[2021-Mar-31 13:57:23] [debug] [ nRF0x0] - close_dll
[2021-Mar-31 13:57:23] [debug] [nRF520x0] - close
[2021-Mar-31 13:57:23] [debug] [Backend] - is_connected_to_emu
[2021-Mar-31 13:57:23] [debug] [Backend] - close
[2021-Mar-31 13:57:23] [debug] [Backend] - disconnect_from_emu
[2021-Mar-31 13:57:23] [debug] [Backend] - is_connected_to_emu
[2021-Mar-31 13:57:23] [debug] [Backend] - Segger Backend closed.
[2021-Mar-31 13:57:23] [debug] [nRF520x0] - nRF family DLL closed

Parents Reply Children
No Data
Related