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

Question about path to hex file when using nrfjprog utility

Hi, 

The following command will not work:

> "/mnt/c/Program Files/Nordic Semiconductor/nrf-command-line-tools/bin/nrfjprog.exe" --family NRF52 --program "/mnt/c/Nordic Semiconductor/nRF5SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s132/hex/s132_nrf52_7.2.0_softdevice.hex" --snr 682436173

I get this error:

Parsing image file.
ERROR: The file specified could not be found.

But the following does work and I don't know why:

> cd  "/mnt/c/Nordic Semiconductor/nRF5SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s132/hex/"

> "/mnt/c/Program Files/Nordic Semiconductor/nrf-command-line-tools/bin/nrfjprog.exe" --family NRF52 --program "s132_nrf52_7.2.0_softdevice.hex" --snr 682436173

My question is this: Why doesn't it work to give the full path to --program ? Is this a bug with nrfjprog?

My setup is

 - CMake 3.19.3

 - WSL2 (with UBuntu 20.04)

 - Visual Studio Code 1.52.1

 - Ninja 

 - nRF52 SDK (17.0.2_d674dde)

Parents
  • Hi,

    Something is obviously wrong, and although you have found a workaround it is not fully clear what and where the issue lies. It can be nrfjprog or it can be the system, and it can be the path length, or the space in the file name, or the use of absolute path, or something else.

    Can you run the (failing) nrfjprog command with the --log flag added, and provide the resulting log.log file?

    Regards,
    Terje

  • Here it is:

    I have tried:

    1. Removing space from file path. It does not resolve the issue

    2. Moved the .hex file to the top directory on my machine. "/mnt/c/hexfile.hex". It does not resolve the issue.

    3. Executing the nrfjprog command directly in the terminal. It does not resolve the issue so I doubt if this issue can be traced back to my CMake setup.

    When I look at the log.log below and compare it to a log where the command works I see the first discrepancy is this line: [debug] [ nRF0x0] - is_bprot_enabled does not appear for the failing command and instead I see [debug] [ nRF0x0] - close_dll

    [2021-Feb-04 14:50:35] [ info] --------------------------------------------------------------------------------
    [2021-Feb-04 14:50:35] [ info] nrfjprog.exe --log --family NRF52 --program /mnt/c/Nordic Semiconductor/nRF5SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s132/hex/s132_nrf52_7.2.0_softdevice.hex --sectorerase --verify --snr 682436173 
    [2021-Feb-04 14:50:35] [ info] nrfjprog version 10.12.1 
    [2021-Feb-04 14:50:35] [ info] --------------------------------------------------------------------------------
    [2021-Feb-04 14:50:35] [debug] [ nRF0x0] - open_dll
    [2021-Feb-04 14:50:35] [ info] [ nRF0x0] - Load library at C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_NRF52_NRFJPROG.dll.
    [2021-Feb-04 14:50:35] [ info] [ nRF0x0] - Library loaded, loading member functions.
    [2021-Feb-04 14:50:35] [ info] [ nRF0x0] - Member functions succesfully loaded.
    [2021-Feb-04 14:50:35] [ info] [Backend] - Logger callback at 0x7ff6cfba56f0 registered in Segger backend logger.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Logger callback at 0x7ff6cfba56f0 registered in JLink logger.
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - open
    [2021-Feb-04 14:50:35] [debug] [Backend] - open_dll
    [2021-Feb-04 14:50:35] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
    [2021-Feb-04 14:50:35] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLink_x64.dll.
    [2021-Feb-04 14:50:35] [ info] [Backend] - Library loaded, loading member functions.
    [2021-Feb-04 14:50:35] [ info] [Backend] - Member functions succesfully loaded.
    [2021-Feb-04 14:50:35] [debug] [Backend] - dll_version
    [2021-Feb-04 14:50:35] [ info] [Backend] - Segger dll version 6.88.a loaded.
    [2021-Feb-04 14:50:35] [debug] [ nRF0x0] - enum_emu_snr
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - enum_emu_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [debug] [Backend] - enum_emu_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_enum_emu_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_get_num_emus
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [debug] [ nRF0x0] - connect_to_emu_with_snr
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - connect_to_emu_with_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [debug] [Backend] - connect_to_emu_with_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_enum_emu_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_get_num_emus
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_connect_to_emu_with_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_connect_to_emu_without_snr
    [2021-Feb-04 14:50:35] [ info] [Backend] - Segger logging enabled.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Hardware: V1.00
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] S/N: 682436173
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] OEM: SEGGER
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] TELNET listener socket opened on port 19021
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Starting webserver
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Webserver running on local port 19080
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 6.077ms returns "O.K."  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetHWStatus(...)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.206ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.008ms returns 0x01  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.008ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.008ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.034ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.586ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetSpeed(2000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.110ms  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetSN()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.009ms returns 682436173  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_load_core_data
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.005ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("device = nRF52", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml 
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully. 
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Device "NRF52" selected.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Device "NRF52" selected.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 60.362ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_debug_port_idr
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - coresight_configure
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_Configure()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.981ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.421ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x2BA01477
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.331ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.010ms  
    [2021-Feb-04 14:50:35] [debug] [ nRF0x0] - read_device_version
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - read_device_info
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.009ms returns 0x01  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - Just_read_device_version
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - Just_readback_status
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - Just_is_ctrl_ap_available
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_is_debug_region_powered
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.265ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x01)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0xF0000040
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.265ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 1, DP Bank 0, AP Bank 15
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x010000F0)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.252ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x02880000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.329ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x02880000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.330ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x02880000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.303ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x02880000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.328ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 1, DP Bank 0, AP Bank 0
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x01000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.246ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x00000001
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.305ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x00000001
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.291ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x00000001
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.270ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x00000001
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.270ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [nRF520x0] - Protection status read as NONE
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_connect_to_device
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_device
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsConnected()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.010ms returns FALSE  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_load_core_data
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.004ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("device = nRF52", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Device "NRF52" selected.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Device "NRF52" selected.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 1.625ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Connect()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] InitTarget() start
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] InitTarget() start
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ]  J-Link Script File: Executing InitTarget() 
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] InitTarget() end
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] InitTarget() end
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Found SW-DP with ID 0x2BA01477
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Found SW-DP with ID 0x2BA01477
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] DPIDR: 0x2BA01477
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] DPIDR: 0x2BA01477
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP map detection skipped. Manually configured AP map found.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP map detection skipped. Manually configured AP map found.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: AHB-AP (IDR: Not set)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: AHB-AP (IDR: Not set)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: Core found
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: Core found
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: AHB-AP ROM base: 0xE00FF000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: AHB-AP ROM base: 0xE00FF000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Found Cortex-M4 r0p1, Little endian.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Found Cortex-M4 r0p1, Little endian.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] -- Max. mem block: 0x00004698
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE000EDF0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE0002000)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] FPUnit: 6 code (BP) slots and 2 literal slots
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] FPUnit: 6 code (BP) slots and 2 literal slots
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE000EDFC)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_WriteMem(4 bytes @ 0xE000EDFC)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE0001000)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_WriteMem(4 bytes @ 0xE0001000)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE000ED88)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_WriteMem(4 bytes @ 0xE000ED88)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE000ED88)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_WriteMem(4 bytes @ 0xE000ED88)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CoreSight components:
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CoreSight components:
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0] @ E00FF000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0] @ E00FF000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(64 bytes @ 0xE00FF000)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE000EFE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE0001FE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE0002FE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE0000FE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE0040FE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE0041FE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 123.477ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORE_GetFound()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.019ms returns 0xE0000FF  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_invalidate_cache
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("InvalidateCache", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.030ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ReadMemU32(0x10000130, 0x1 Items)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0x10000130)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Data:  06 00 00 00
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.713ms returns 1 (0x1)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_connect_to_device
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_invalidate_cache
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("InvalidateCache", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.016ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ReadMemU32(0x10000134, 0x1 Items)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0x10000134)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Data:  06 00 00 00
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.653ms returns 1 (0x1)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - Just_decode_device_version
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_connect_to_device
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_invalidate_cache
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("InvalidateCache", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.016ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ReadMemU32(0x10000110, 0x1 Items)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0x10000110)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Data:  00 02 00 00
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.662ms returns 1 (0x1)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.021ms  
    [2021-Feb-04 14:50:35] [debug] [ nRF0x0] - close_dll
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - close
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.065ms returns 0x01  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - close
    [2021-Feb-04 14:50:35] [debug] [Backend] - disconnect_from_emu
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_disconnect_from_emu
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_device
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsConnected()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.017ms returns TRUE  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_is_debug_region_powered
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.479ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x01)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0xF0000040
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.400ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [Backend] - Disable trace before closing connection.
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_write_u32
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_WriteU32_64(0xE000EDFC, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Debug reg: DEMCR
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU is running
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_WriteMem(4 bytes @ 0xE000EDFC)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 1.122ms returns 0 (0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_is_debug_region_powered
    [2021-Feb-04 14:50:35] [ info] [Backend] - Shortcut, lock is on and debug region is powered.
    [2021-Feb-04 14:50:35] [debug] [Backend] - unpower_debug_and_system_regions
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_write_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.371ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x01, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.311ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_is_debug_region_powered
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_debug_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x01)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x00000040
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.411ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.019ms  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Close()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - Segger Backend closed.
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - nRF family DLL closed
    

Reply
  • Here it is:

    I have tried:

    1. Removing space from file path. It does not resolve the issue

    2. Moved the .hex file to the top directory on my machine. "/mnt/c/hexfile.hex". It does not resolve the issue.

    3. Executing the nrfjprog command directly in the terminal. It does not resolve the issue so I doubt if this issue can be traced back to my CMake setup.

    When I look at the log.log below and compare it to a log where the command works I see the first discrepancy is this line: [debug] [ nRF0x0] - is_bprot_enabled does not appear for the failing command and instead I see [debug] [ nRF0x0] - close_dll

    [2021-Feb-04 14:50:35] [ info] --------------------------------------------------------------------------------
    [2021-Feb-04 14:50:35] [ info] nrfjprog.exe --log --family NRF52 --program /mnt/c/Nordic Semiconductor/nRF5SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s132/hex/s132_nrf52_7.2.0_softdevice.hex --sectorerase --verify --snr 682436173 
    [2021-Feb-04 14:50:35] [ info] nrfjprog version 10.12.1 
    [2021-Feb-04 14:50:35] [ info] --------------------------------------------------------------------------------
    [2021-Feb-04 14:50:35] [debug] [ nRF0x0] - open_dll
    [2021-Feb-04 14:50:35] [ info] [ nRF0x0] - Load library at C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_NRF52_NRFJPROG.dll.
    [2021-Feb-04 14:50:35] [ info] [ nRF0x0] - Library loaded, loading member functions.
    [2021-Feb-04 14:50:35] [ info] [ nRF0x0] - Member functions succesfully loaded.
    [2021-Feb-04 14:50:35] [ info] [Backend] - Logger callback at 0x7ff6cfba56f0 registered in Segger backend logger.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Logger callback at 0x7ff6cfba56f0 registered in JLink logger.
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - open
    [2021-Feb-04 14:50:35] [debug] [Backend] - open_dll
    [2021-Feb-04 14:50:35] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
    [2021-Feb-04 14:50:35] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLink_x64.dll.
    [2021-Feb-04 14:50:35] [ info] [Backend] - Library loaded, loading member functions.
    [2021-Feb-04 14:50:35] [ info] [Backend] - Member functions succesfully loaded.
    [2021-Feb-04 14:50:35] [debug] [Backend] - dll_version
    [2021-Feb-04 14:50:35] [ info] [Backend] - Segger dll version 6.88.a loaded.
    [2021-Feb-04 14:50:35] [debug] [ nRF0x0] - enum_emu_snr
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - enum_emu_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [debug] [Backend] - enum_emu_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_enum_emu_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_get_num_emus
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [debug] [ nRF0x0] - connect_to_emu_with_snr
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - connect_to_emu_with_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [debug] [Backend] - connect_to_emu_with_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_enum_emu_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_get_num_emus
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_connect_to_emu_with_snr
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_connect_to_emu_without_snr
    [2021-Feb-04 14:50:35] [ info] [Backend] - Segger logging enabled.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Hardware: V1.00
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] S/N: 682436173
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] OEM: SEGGER
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] TELNET listener socket opened on port 19021
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Starting webserver
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] WEBSRV Webserver running on local port 19080
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 6.077ms returns "O.K."  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetHWStatus(...)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.206ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.008ms returns 0x01  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("DisableFlashDL", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.008ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.008ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetHookUnsecureDialog(...)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.034ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_TIF_Select(JLINKARM_TIF_SWD)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.586ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_SetSpeed(2000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.110ms  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_GetSN()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.009ms returns 682436173  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_load_core_data
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.005ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("device = nRF52", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml 
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully. 
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Device "NRF52" selected.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Device "NRF52" selected.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 60.362ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_debug_port_idr
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - coresight_configure
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_Configure()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.981ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.421ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x2BA01477
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.331ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.010ms  
    [2021-Feb-04 14:50:35] [debug] [ nRF0x0] - read_device_version
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - read_device_info
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.009ms returns 0x01  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - Just_read_device_version
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - Just_readback_status
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - Just_is_ctrl_ap_available
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_is_debug_region_powered
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.265ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x01)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0xF0000040
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.265ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 1, DP Bank 0, AP Bank 15
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x010000F0)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.252ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x02880000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.329ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x02880000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.330ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x02880000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.303ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x02880000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.328ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 1, DP Bank 0, AP Bank 0
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x01000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.246ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x00000001
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.305ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x00000001
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.291ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x00000001
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.270ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_access_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_access_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(AP reg 0x03)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x00000001
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.270ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [nRF520x0] - Protection status read as NONE
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_connect_to_device
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_device
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsConnected()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.010ms returns FALSE  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_load_core_data
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.004ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("device = nRF52", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Device "NRF52" selected.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Device "NRF52" selected.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 1.625ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Connect()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] InitTarget() start
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] InitTarget() start
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ]  J-Link Script File: Executing InitTarget() 
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] InitTarget() end
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] InitTarget() end
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Found SW-DP with ID 0x2BA01477
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Found SW-DP with ID 0x2BA01477
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] DPIDR: 0x2BA01477
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] DPIDR: 0x2BA01477
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP map detection skipped. Manually configured AP map found.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP map detection skipped. Manually configured AP map found.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: AHB-AP (IDR: Not set)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: AHB-AP (IDR: Not set)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: Core found
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: Core found
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: AHB-AP ROM base: 0xE00FF000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] AP[0]: AHB-AP ROM base: 0xE00FF000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Found Cortex-M4 r0p1, Little endian.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Found Cortex-M4 r0p1, Little endian.
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] -- Max. mem block: 0x00004698
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE000EDF0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE0002000)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] FPUnit: 6 code (BP) slots and 2 literal slots
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] FPUnit: 6 code (BP) slots and 2 literal slots
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE000EDFC)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_WriteMem(4 bytes @ 0xE000EDFC)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE0001000)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_WriteMem(4 bytes @ 0xE0001000)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE000ED88)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_WriteMem(4 bytes @ 0xE000ED88)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0xE000ED88)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_WriteMem(4 bytes @ 0xE000ED88)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CoreSight components:
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CoreSight components:
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0] @ E00FF000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0] @ E00FF000
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(64 bytes @ 0xE00FF000)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE000EFE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE0001FE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE0002FE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE0000FE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE0040FE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(32 bytes @ 0xE0041FE0)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 123.477ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORE_GetFound()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.019ms returns 0xE0000FF  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_invalidate_cache
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("InvalidateCache", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.030ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ReadMemU32(0x10000130, 0x1 Items)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0x10000130)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Data:  06 00 00 00
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.713ms returns 1 (0x1)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_connect_to_device
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_invalidate_cache
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("InvalidateCache", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.016ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ReadMemU32(0x10000134, 0x1 Items)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0x10000134)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Data:  06 00 00 00
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.653ms returns 1 (0x1)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - Just_decode_device_version
    [2021-Feb-04 14:50:35] [debug] [Backend] - read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_connect_to_device
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_u32
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_invalidate_cache
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ExecCommand("InvalidateCache", ...).   
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.016ms returns 0x00  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_ReadMemU32(0x10000110, 0x1 Items)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_ReadMem(4 bytes @ 0x10000110)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Data:  00 02 00 00
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.662ms returns 1 (0x1)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.021ms  
    [2021-Feb-04 14:50:35] [debug] [ nRF0x0] - close_dll
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - close
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_emu
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsOpen()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.065ms returns 0x01  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Lock()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - close
    [2021-Feb-04 14:50:35] [debug] [Backend] - disconnect_from_emu
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_disconnect_from_emu
    [2021-Feb-04 14:50:35] [debug] [Backend] - is_connected_to_device
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_IsConnected()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.017ms returns TRUE  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_is_debug_region_powered
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.479ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x01)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0xF0000040
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.400ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [Backend] - Disable trace before closing connection.
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_write_u32
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_WriteU32_64(0xE000EDFC, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Debug reg: DEMCR
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU is running
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] CPU_WriteMem(4 bytes @ 0xE000EDFC)
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 1.122ms returns 0 (0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_is_debug_region_powered
    [2021-Feb-04 14:50:35] [ info] [Backend] - Shortcut, lock is on and debug region is powered.
    [2021-Feb-04 14:50:35] [debug] [Backend] - unpower_debug_and_system_regions
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_write_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.371ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x01, 0x00000000)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.311ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_is_debug_region_powered
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_read_debug_port_register
    [2021-Feb-04 14:50:35] [debug] [Backend] - ---just_select_debug_port_register
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x01)  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] Value=0x00000040
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.411ms returns 0  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_HasError()  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] - 0.019ms  
    [2021-Feb-04 14:50:35] [ info] [  JLink] - [Info    ] [JLink     ] JLINK_Close()  
    [2021-Feb-04 14:50:35] [debug] [Backend] - Segger Backend closed.
    [2021-Feb-04 14:50:35] [debug] [nRF520x0] - nRF family DLL closed
    

Children
  • Hi,

    I am sorry for the delay.

    It looks like the difference then is whether you use a relative or an absolute path. I suspect that this may be an issue with using Windows Subsystem for Linux in combination with the Windows version of nrfjprog (.exe). Have you tried the Linux version of nRF Command Line Tools, when you run it from WSL?

    Also what version of nrfjprog is this? Have you tried with the latest version?

    Regards,
    Terje

  • I am sorry for the delay.

    No worries friend, I'm in no hurry and am just here to learn and have fun. Nerd

    What version of nrfjprog is this? Have you tried with the latest version?

    I am using the newest version of nrfjprog (10.12.1) 64-bit Windows version. You can see the version number in the top of the log.log file. This is why I needed to add the ".exe" to the command call, but I've seen people use something called a Linux Symbolic Link to make the system recognise only nrfjprog instead of nrfjprog.exe, but I haven't learned to use that just yet. 

    I am basically still a beginner when it comes to WSL2... and it seems to me WSL2 doesn't support USB though I'm not 100% sure but that is what my quick Google searches seem to show :)

    Have you tried the Linux version of nRF Command Line Tools, when you run it from WSL?

    I've tried and installed nrfjprog directly inside my WSL /opt/ directory and had difficulties using J-link to flash, it's not connecting to the debugger. It seems I must use the Windows version of nrfjprog to use Windows version of J-link. Then the debugger connects as normal.

    After spending more time on this.... this worked:

    nrfjprog.exe --family NRF52 --log --program C:/NordicSemiconductor/nRF5SDK/nRF5_SDK_17.0.2_d674dde/components/softdevice/s132/hex/s132_nrf52_7.2.0_softdevice.hex --snr 682436173

    added a C:/ before the hex file path instead of /mnt/c/ I can only guess the Windows version of nrfjprog is not designed to handle something like /mnt/c/

  • Hi,

    Gudni said:
    I can only guess the Windows version of nrfjprog is not designed to handle something like /mnt/c/

    Correct. The Windows version of nrjprog expects paths to work as they normally do on Windows.

    Note that when running the command from a WSL terminal, the first path (to nrfjprog.exe, the executable) is interpreted by the shell. The path sent as argument, however, is interpreted by nrfjprog.exe.

    We have this now in our internal issue tracker, but it is a bit unclear how it should be handled and what is the expected behaviour for this kind of program invocation. Mixing native Windows command line tools with GNU/Linux tools is an area where conventions, assumptions, etc. quickly can become very messy...

    Maybe not intuitive at first glance, but the more I think about it, passing "Windows style" paths to a Windows command line application does sound reasonable, maybe even totally expected, even if invoked from a WSL command line.

    Regards,
    Terje

Related