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

Newer versions of nrfjprog crash when communication fails

Testing on windows 7 SP1 64-bit with 32-bit nrfjprog 10.5.0 JLinkARM.dll version 6.54c. I do not know the version I had previously but with the old version if you ran an nrfjprog command with no device connected, you would get an error output whereas now the nrfjprog utility crashes. The same thing happens if you have a device connected but for whatever reason it isn't responding to the JLink.

Parents
  • Hi Jamie, 

    can you use the -vvvv and -log option to capture a log file when this issue occurs? Then I can pass this on to the PC tools team. 

    Best regards

    Bjørn

  • Hi Bjørn,

    Have tried adding -v, -vvvv and -log out.log separately and all of them give invalid argument errors.

    Thanks,
    Jamie

  • Hi Jamie, 

    Sorry, I mixed up nrfutil and nrfjprog. There is no verbosity option for nrfjprog so you only need to capture a log, this is done by appending the --log option without passing a log file name. The log file will be log.log and will be placed in the same folder where you called nrfjprog from. 

    Best regards

    Bjørn

  • 5460.log.log

    Hi Bjørn,

    Captured and uploaded, I think this shows clearly what the error is, I had to stop the first try as it didn't crash and the log filesize kept growing over 60MB... So I tried again for a much shorter time and ended up with a 3MB log file which I've manually truncated.

    Thanks,
    Jamie

  • Thank you. So this issue happens when you issue a nrfjprog command and there is no device connected to the jlink probe or if the device connected to the Jlink probe is not responding?

  • Hi Bjørn,

    Correct, here I have attached a log from a previous version of nrfjprog whereby it emits this error and does not crash: "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.

    2019-Dec-16 13:55:10  --------------------------------------------------------------------------------
    2019-Dec-16 13:55:10  nrfjprog -f NRF52 --eraseall --log
    2019-Dec-16 13:55:10  nrfjprog version 9.8.1
    2019-Dec-16 13:55:10  --------------------------------------------------------------------------------
    2019-Dec-16 13:55:10  nRF_open_dll
    2019-Dec-16 13:55:10  . nRF52_open_dll
    2019-Dec-16 13:55:10  . . nRF52_dll_version
    2019-Dec-16 13:55:10  nRF_enum_emu_snr
    2019-Dec-16 13:55:10  . nRF52_enum_emu_snr
    2019-Dec-16 13:55:10  . . nRF52_enum_emu_snr
    2019-Dec-16 13:55:10  nRF_enum_emu_snr
    2019-Dec-16 13:55:10  . nRF52_enum_emu_snr
    2019-Dec-16 13:55:10  . . nRF52_enum_emu_snr
    2019-Dec-16 13:55:10  nRF_connect_to_emu_with_snr
    2019-Dec-16 13:55:10  . nRF52_connect_to_emu_with_snr
    2019-Dec-16 13:55:10  . . nRF52_is_connected_to_emu
    2019-Dec-16 13:55:10  . . nRF52_enum_emu_snr
    2019-Dec-16 13:55:10  . . nRF52_connect_to_emu_with_snr
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	Firmware: J-Link OB-SAM3U128 V1 compiled Aug 22 2019 17:29:26
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	Hardware: V1.00
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	S/N: 480053808
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	OEM: SEGGER
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	Feature(s): None
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	TELNET listener socket opened on port 19021
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV Starting webserver
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	WEBSRV Webserver running on local port 19080
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	- 16.556ms returns "O.K."  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_GetHWStatus(...)  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	- 0.387ms returns 0x00  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.
    
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("Device = NRF52832_xxAA", ...).   
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml 
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully. 
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	Device "NRF52832_XXAA" selected.
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	- 70.253ms returns 0x00  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetRestartOnClose = 0", ...).   
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	- 0.007ms returns 0x01  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("DisableFlashDL", ...).   
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	- 0.007ms returns 0x00  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("SetDbgPowerDownOnClose = 1", ...).   
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	- 0.010ms returns 0x01  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).   
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	- 0.010ms returns 0x00  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_TIF_Select(JLINKARM_TIF_SWD)  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	- 0.728ms returns 0x00  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	JLINK_SetSpeed(2000)  
    2019-Dec-16 13:55:11  . . . nRF52_connect_to_emu_without_snr:	JLink:	- 0.318ms  
    2019-Dec-16 13:55:11  nRF_read_device_version
    2019-Dec-16 13:55:11  . nRF52_read_device_version
    2019-Dec-16 13:55:11  . . nRF52_is_connected_to_emu
    2019-Dec-16 13:55:11  . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()  
    2019-Dec-16 13:55:11  . . nRF52_is_connected_to_emu:	JLink:	- 0.152ms returns 0x01  
    2019-Dec-16 13:55:11  . . nRF52_is_connected_to_device
    2019-Dec-16 13:55:11  . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()  
    2019-Dec-16 13:55:11  . . nRF52_is_connected_to_device:	JLink:	- 0.167ms returns FALSE  
    2019-Dec-16 13:55:11  . . nRF52_readback_status
    2019-Dec-16 13:55:11  . . . nRF52_is_ctrl_ap_available
    2019-Dec-16 13:55:11  . . . . nRF52_read_access_port_register
    2019-Dec-16 13:55:11  . . . . . nRF52_coresight_configure
    2019-Dec-16 13:55:11  . . . . . nRF52_coresight_configure:	JLink:	JLINK_CORESIGHT_Configure()  
    2019-Dec-16 13:55:12  . . . . . nRF52_coresight_configure:	JLink:	- 100.574ms returns 0  
    2019-Dec-16 13:55:12  . . . . . nRF52_power_debug_and_system_regions
    2019-Dec-16 13:55:12  . . . . . . nRF52_write_debug_port_register
    2019-Dec-16 13:55:12  . . . . . . nRF52_write_debug_port_register:	JLink:	JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)  
    2019-Dec-16 13:55:12  . . . . . . nRF52_write_debug_port_register:	JLink:	- 0.986ms returns -1  
    2019-Dec-16 13:55:12  . . . . . . nRF52_write_debug_port_register:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
    
    2019-Dec-16 13:55:12  . . . . . nRF52_power_debug_and_system_regions:	JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.
    
    2019-Dec-16 13:55:12  nRF_close_dll
    2019-Dec-16 13:55:12  . nRF52_close_dll
    2019-Dec-16 13:55:12  . . nRF52_is_connected_to_emu
    2019-Dec-16 13:55:12  . . nRF52_is_connected_to_emu:	JLink:	JLINK_IsOpen()  
    2019-Dec-16 13:55:12  . . nRF52_is_connected_to_emu:	JLink:	- 0.219ms returns 0x01  
    2019-Dec-16 13:55:12  . . nRF52_disconnect_from_emu
    2019-Dec-16 13:55:12  . . . nRF52_is_connected_to_device
    2019-Dec-16 13:55:12  . . . nRF52_is_connected_to_device:	JLink:	JLINK_IsConnected()  
    2019-Dec-16 13:55:12  . . . nRF52_is_connected_to_device:	JLink:	- 0.212ms returns FALSE  
    2019-Dec-16 13:55:12  . . . nRF52_unpower_debug_and_system_regions
    2019-Dec-16 13:55:12  . . nRF52_disconnect_from_emu:	JLink:	JLINK_Close()  
    
    "

    Thanks,
    Jamie

  • Hi Jami, thanks for the logs. I have created an issue in our internal bug tracking database and the logs have been passed on to the PC tools team. Will let you know when they have looked into it. 

    Best regards

    Bjørn 

Reply Children
Related