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

Reload Thingy hex file once erased with new executable.

I am using a Mac with SES installed.  I created a DFU example and downloaded it to the Thingy 52 to see how it works.  That all went fine.  Unfortunately, it has disabled the Thingy 52 from doing it's normal function.  I would like to refresh the device with a good executable.  Looks like that is available somewhere on Nordic's site thingy_v2.1.0.HW_1.0.hex, but I can't find it.  Please provide me a link to this file.  My plan is to load it using my existing JLink SWD  connection to my Mac.  I am assuming I can do that through SES.

Parents Reply Children
  • Yes, and when I run the command given in the example;  

    nrfjprog -f NRF52 --program file.hex –-chiperase

    I get the following error message.

    ERROR: An invalid argument was provided. Use --help for a list of valid

    Of course, --help tells me these are correct arguments

    I have tried single and double quotes, in case the file name contains special characters not recognized and used the complete path name to the hex file.  All to no avail.

    I could use some guidance here.

  • rods said:
    ERROR: An invalid argument was provided. Use --help for a list of valid

     That looks like a correct call to me, are you able to connect to the onboard nRF device on the DK?

  • There is no DK, only the Thingy.  I did cd right into the source directory and tried to execute the command from there.  I also changed the name of the file so it would not have any special characters.  Got the following error message.  Note that I tried to create a log file, but that too failed as in the error message. 

    Rods-MacBook-Air-2:Nordic-Thingy52-FW-master rsheffield$ nrfjprog -f NRF52 --program Thingy52v1-0-0.hex --chiperase --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.

  • I actually found the log file!  Here's what it put out.

    2019-Aug-27 09:30:41 --------------------------------------------------------------------------------
    2019-Aug-27 09:30:41 nrfjprog -f NRF52 --program Thingy52v1-0-0.hex --chiperase --log
    2019-Aug-27 09:30:41 nrfjprog version 10.3.0
    2019-Aug-27 09:30:41 --------------------------------------------------------------------------------
    2019-Aug-27 09:30:41 nRF_logger_open
    2019-Aug-27 09:30:41 nRF_logger_open: nRFJProg logger opened to callback at address 0X109348760
    2019-Aug-27 09:30:41 nRF_open_dll
    2019-Aug-27 09:30:41 nRF_open_dll: Load library at "/Applications/Nordic Semiconductor/nrfjprog/libjlinkarm_nrf52_nrfjprogdll.dylib".

    2019-Aug-27 09:30:41 . nRF52_logger_open
    2019-Aug-27 09:30:41 . nRF52_logger_open: nRFJProg logger opened to callback at address 0X1093B84F0
    2019-Aug-27 09:30:41 . nRF52_open_dll
    2019-Aug-27 09:30:41 . . nRF52_dll_version
    2019-Aug-27 09:30:41 nRF_enum_emu_snr
    2019-Aug-27 09:30:41 . nRF52_enum_emu_snr
    2019-Aug-27 09:30:41 . . nRF52_enum_emu_snr
    2019-Aug-27 09:30:41 nRF_enum_emu_snr
    2019-Aug-27 09:30:41 . nRF52_enum_emu_snr
    2019-Aug-27 09:30:41 . . nRF52_enum_emu_snr
    2019-Aug-27 09:30:41 nRF_connect_to_emu_with_snr
    2019-Aug-27 09:30:41 . nRF52_connect_to_emu_with_snr
    2019-Aug-27 09:30:41 . . nRF52_enum_emu_snr
    2019-Aug-27 09:30:41 . . . nRF52_enum_emu_snr
    2019-Aug-27 09:30:41 . . nRF52_enum_emu_snr
    2019-Aug-27 09:30:41 . . . nRF52_enum_emu_snr
    2019-Aug-27 09:30:41 . . nRF52_connect_to_emu_with_snr
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: Segger logging enabled with callback at 0x4450142128.

    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO Hardware: V8.00
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO S/N: 58010527
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO Feature(s): GDB
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO TELNET listener socket opened on port 19021
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO WEBSRV Starting webserver
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0097ms, 0110ms total)
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO WEBSRV Webserver running on local port 19080
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0098ms, 0111ms total)
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO returns O.K.
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0099ms, 0112ms total)
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO JLINK_GetHWStatus(...)
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO returns 0x00
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0002ms, 0115ms total)
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: There is no generic nRF52 device in J-Link, so we select NRF52832_xxAA.

    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO JLINK_ExecCommand("Device = NRF52832_xxAA", ...).
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO XML file found at: /Applications/SEGGER/JLink/JLinkDevices.xml
    2019-Aug-27 09:30:41 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0001ms, 0118ms total)
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO /Applications/SEGGER/JLink/JLinkDevices.xml evaluated successfully.
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO Device "NRF52832_XXAA" selected.
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO returns 0x00
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0082ms, 0199ms total)
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO JLINK_ExecCommand("SetRestartOnClose = 0", ...).
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO returns 0x01
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0001ms, 0201ms total)
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO JLINK_ExecCommand("DisableFlashDL", ...).
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO returns 0x00
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0000ms, 0202ms total)
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO returns 0x00
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0001ms, 0204ms total)
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO JLINK_TIF_Select(JLINKARM_TIF_SWD)
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO returns 0x00
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0002ms, 0206ms total)
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO JLINK_SetSpeed(2000)
    2019-Aug-27 09:30:42 . . . nRF52_connect_to_emu_without_snr: JLink INFO (0000ms, 0207ms total)
    2019-Aug-27 09:30:42 nRF_read_device_version
    2019-Aug-27 09:30:42 . nRF52_read_device_version
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_emu
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_emu: JLink INFO JLINK_IsOpen()
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_emu: JLink INFO returns 0x01
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_emu: JLink INFO (0002ms, 0210ms total)
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_device
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_device: JLink INFO JLINK_IsConnected()
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_device: JLink INFO returns FALSE
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_device: JLink INFO (0001ms, 0211ms total)
    2019-Aug-27 09:30:42 . . nRF52_readback_status
    2019-Aug-27 09:30:42 . . . nRF52_is_ctrl_ap_available
    2019-Aug-27 09:30:42 . . . . nRF52_read_access_port_register
    2019-Aug-27 09:30:42 . . . . . nRF52_coresight_configure
    2019-Aug-27 09:30:42 . . . . . nRF52_coresight_configure: JLink INFO JLINK_CORESIGHT_Configure()
    2019-Aug-27 09:30:42 . . . . . nRF52_coresight_configure: JLink INFO >0x10B TIF>
    2019-Aug-27 09:30:42 . . . . . nRF52_coresight_configure: JLink INFO >0x10F TIF>
    2019-Aug-27 09:30:42 . . . . . nRF52_coresight_configure: JLink INFO >0x0D TIF>
    2019-Aug-27 09:30:42 . . . . . nRF52_coresight_configure: JLink INFO >0x0D TIF>
    2019-Aug-27 09:30:42 . . . . . nRF52_coresight_configure: JLink INFO returns 0
    2019-Aug-27 09:30:42 . . . . . nRF52_coresight_configure: JLink INFO (0005ms, 0216ms total)
    2019-Aug-27 09:30:42 . . . . . nRF52_is_debug_and_system_regions_powered
    2019-Aug-27 09:30:42 . . . . . . nRF52_read_debug_port_register
    2019-Aug-27 09:30:42 . . . . . . nRF52_read_debug_port_register: JLink INFO JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
    2019-Aug-27 09:30:42 . . . . . . nRF52_read_debug_port_register: JLink INFO >0x0D TIF>
    2019-Aug-27 09:30:42 . . . . . . nRF52_read_debug_port_register: JLink INFO returns -1
    2019-Aug-27 09:30:42 . . . . . . nRF52_read_debug_port_register: JLink INFO (0002ms, 0219ms total)
    2019-Aug-27 09:30:42 . . . . . . nRF52_read_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

    2019-Aug-27 09:30:42 nRF_close_dll
    2019-Aug-27 09:30:42 . nRF52_close_dll
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_emu
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_emu: JLink INFO JLINK_IsOpen()
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_emu: JLink INFO returns 0x01
    2019-Aug-27 09:30:42 . . nRF52_is_connected_to_emu: JLink INFO (0001ms, 0221ms total)
    2019-Aug-27 09:30:42 . . nRF52_disconnect_from_emu
    2019-Aug-27 09:30:42 . . . nRF52_is_connected_to_device
    2019-Aug-27 09:30:42 . . . nRF52_is_connected_to_device: JLink INFO JLINK_IsConnected()
    2019-Aug-27 09:30:42 . . . nRF52_is_connected_to_device: JLink INFO returns FALSE
    2019-Aug-27 09:30:42 . . . nRF52_is_connected_to_device: JLink INFO (0001ms, 0223ms total)
    2019-Aug-27 09:30:42 . . . nRF52_is_debug_and_system_regions_powered
    2019-Aug-27 09:30:42 . . . . nRF52_read_debug_port_register
    2019-Aug-27 09:30:42 . . . . nRF52_read_debug_port_register: JLink INFO JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
    2019-Aug-27 09:30:42 . . . . nRF52_read_debug_port_register: JLink INFO >0x0D TIF>
    2019-Aug-27 09:30:42 . . . . nRF52_read_debug_port_register: JLink INFO returns -1
    2019-Aug-27 09:30:42 . . . . nRF52_read_debug_port_register: JLink INFO (0002ms, 0226ms total)
    2019-Aug-27 09:30:42 . . . . nRF52_read_debug_port_register: JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.

    2019-Aug-27 09:30:42 . . nRF52_disconnect_from_emu: JLink INFO JLINK_Close()
    2019-Aug-27 09:30:42 . nRF52_close_dll: Freeing Library.

    2019-Aug-27 09:30:42 nRF_close_dll: Freeing Library.

Related