Hardware:
nrf52840 Seeed Xiao BLE Sense connected to a segger J-link probe
Host OS: Ubuntu 20.04 LTS
Connect SDK setup is done. I am able to build firmware files and also upload them using other methods such as the DFU bootloader and using OpenOCD.
I can also connect to the target using the Jlink using j-flash and i was able to erase and reflash the board.
But the problem is that the board does not show up in the connected devices panel in VS code.
I changed the device provider in the extension settings to nrfjprog from the default nrfutil. After this the jlink serial number is showing up but I'm unabe to flash the target.
I just get this error message with no other details
Then I tried using the nrfjprog command line to flash the board, which is giving me the following error :
As you can see the j-link probe is detected by the system.
nrfjprog --ids --expand gives me this:
---------- Emulators ---------- serial number: 4294967295 connection type: USB -------------------------------
but nrfjprog --com gives me no output.
Im running the latest stable versions of all software as far I am aware of.
west flash gives me the following:
-- west flash: rebuilding ninja: no work to do. -- west flash: using runner nrfjprog Using board 4294967295 -- runners.nrfjprog: Flashing file: /home/raider0ne/projects/hello_world_app/build/zephyr/zephyr.hex Traceback (most recent call last): File "/home/raider0ne/ncs/toolchains/1f9b40e71a/usr/local/bin/west", line 8, in <module> sys.exit(main()) File "/home/raider0ne/ncs/toolchains/1f9b40e71a/usr/local/lib/python3.8/site-packages/west/app/main.py", line 866, in main app.run(argv or sys.argv[1:]) File "/home/raider0ne/ncs/toolchains/1f9b40e71a/usr/local/lib/python3.8/site-packages/west/app/main.py", line 111, in run self.run_command(argv) File "/home/raider0ne/ncs/toolchains/1f9b40e71a/usr/local/lib/python3.8/site-packages/west/app/main.py", line 385, in run_command self.run_extension(args.command, argv) File "/home/raider0ne/ncs/toolchains/1f9b40e71a/usr/local/lib/python3.8/site-packages/west/app/main.py", line 467, in run_extension self.cmd.run(args, unknown, self.topdir, manifest=self.manifest, File "/home/raider0ne/ncs/toolchains/1f9b40e71a/usr/local/lib/python3.8/site-packages/west/commands.py", line 194, in run self.do_run(args, unknown) File "/home/raider0ne/ncs/v2.4.2/zephyr/scripts/west_commands/flash.py", line 32, in do_run do_run_common(self, my_args, runner_args, domains=domains) File "/home/raider0ne/ncs/v2.4.2/zephyr/scripts/west_commands/run_common.py", line 174, in do_run_common do_run_common_image(command, user_args, user_runner_args, d.build_dir) File "/home/raider0ne/ncs/v2.4.2/zephyr/scripts/west_commands/run_common.py", line 250, in do_run_common_image runner.run(command_name) File "/home/raider0ne/ncs/v2.4.2/zephyr/scripts/west_commands/runners/core.py", line 611, in run self.do_run(command, **kwargs) File "/home/raider0ne/ncs/v2.4.2/zephyr/scripts/west_commands/runners/nrf_common.py", line 398, in do_run self.program_hex() File "/home/raider0ne/ncs/v2.4.2/zephyr/scripts/west_commands/runners/nrf_common.py", line 260, in program_hex self.flush(force=False) File "/home/raider0ne/ncs/v2.4.2/zephyr/scripts/west_commands/runners/nrf_common.py", line 188, in flush self.flush_ops(force=force) File "/home/raider0ne/ncs/v2.4.2/zephyr/scripts/west_commands/runners/nrf_common.py", line 375, in flush_ops self.do_exec_op(self.ops.popleft(), force) File "/home/raider0ne/ncs/v2.4.2/zephyr/scripts/west_commands/runners/nrfjprog.py", line 91, in do_exec_op self.check_call(cmd + ['-f', families[self.family]] + core_opt + KeyError: 'NRF52'
Log file content after I run nrfjprog --deviceversion --log
[2023-Sept-19 22:05:16] [debug] -------------------------------------------------------------------------------- [2023-Sept-19 22:05:16] [debug] nrfjprog --deviceversion --log [2023-Sept-19 22:05:16] [debug] nrfjprog version 10.23.0 external [2023-Sept-19 22:05:16] [debug] -------------------------------------------------------------------------------- [2023-Sept-19 22:05:16] [ info] Load library at /opt/nrf-command-line-tools/lib/libnrfjprogdll.so. [2023-Sept-19 22:05:16] [ info] Library loaded, loading member functions. [2023-Sept-19 22:05:16] [ info] Member functions succesfully loaded. [2023-Sept-19 22:05:17] [debug] [ Client] - open [2023-Sept-19 22:05:17] [debug] [ Client] - start [2023-Sept-19 22:05:17] [ info] [ Client] - stdout: Jlinkarm nRF Worker ready. Handling sequence 6b1b6f90-5b24-4b55-895d-9bbcc38c01b4. [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - Logger sink registered in Segger backend logger [2023-Sept-19 22:05:17] [debug] [ JLink] - Logger sink registered in JLink logger [2023-Sept-19 22:05:17] [debug] [ nRFXX] - open [2023-Sept-19 22:05:17] [debug] [ nRFXX] - just_check_family [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - open_dll [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect. [2023-Sept-19 22:05:17] [trace] [ Client] - Command open executed for 8 milliseconds with result 0 [2023-Sept-19 22:05:17] [debug] [ Client] - config [2023-Sept-19 22:05:17] [trace] [ Client] - Command config executed for 4 milliseconds with result 0 [2023-Sept-19 22:05:17] [debug] [ Client] - enum_emu_snr [2023-Sept-19 22:05:17] [ info] [SeggerBackend] - Load library at /opt/SEGGER/JLink/libjlinkarm.so. [2023-Sept-19 22:05:17] [ info] [SeggerBackend] - Library loaded, loading member functions. [2023-Sept-19 22:05:17] [ info] [SeggerBackend] - Member functions succesfully loaded. [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - Set batch mode [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - dll_version [2023-Sept-19 22:05:17] [ info] [SeggerBackend] - Segger dll version 7.92.e loaded. [2023-Sept-19 22:05:17] [trace] [ Worker] - Command open executed for 6 milliseconds with result 0 [2023-Sept-19 22:05:17] [debug] [ nRFXX] - config [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - enum_emu_snr [2023-Sept-19 22:05:17] [trace] [ Worker] - Command config executed for 2 milliseconds with result 0 [2023-Sept-19 22:05:17] [debug] [ nRFXX] - enum_emu_con_info [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - is_connected_to_emu [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - enum_emu_con_info [2023-Sept-19 22:05:17] [trace] [ Client] - Command enum_emu_con_info executed for 109 milliseconds with result 0 [2023-Sept-19 22:05:17] [debug] [ Client] - select_family [2023-Sept-19 22:05:17] [trace] [ Client] - Command select_family executed for 0 milliseconds with result 0 [2023-Sept-19 22:05:17] [debug] [ Client] - connect_to_emu_with_snr [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - is_connected_to_emu [2023-Sept-19 22:05:17] [trace] [ Worker] - Command enum_emu_con_info executed for 109 milliseconds with result 0 [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - set_core_data [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - Set core data: [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - Device ID: Cortex-M4 [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - Expected core: 4294967295 [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - Existing Expected core: 4294967295 [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - Coprocessor: APPLICATION [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - AHB AP index: 0 [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - Core base address: 4294967295 [2023-Sept-19 22:05:17] [trace] [ Worker] - Command select_family executed for 0 milliseconds with result 0 [2023-Sept-19 22:05:17] [debug] [ nRFXX] - connect_to_emu_with_snr [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - is_connected_to_emu [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - connect_to_emu_with_snr [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - is_connected_to_emu [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - ---just_enum_emu_snr [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - ---just_get_num_emus [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - ---just_connect_to_emu_with_snr [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - ---just_connect_to_emu_without_snr [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - Segger logging enabled. [2023-Sept-19 22:05:17] [trace] [ JLink] - Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46 [2023-Sept-19 22:05:17] [trace] [ JLink] - Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46 [2023-Sept-19 22:05:17] [trace] [ JLink] - Hardware: V8.00 [2023-Sept-19 22:05:17] [trace] [ JLink] - S/N: 4294967295 [2023-Sept-19 22:05:17] [trace] [ JLink] - OEM: SEGGER [2023-Sept-19 22:05:17] [trace] [ JLink] - Feature(s): RDI,FlashDL,FlashBP,JFlash,GDB [2023-Sept-19 22:05:17] [trace] [ JLink] - Bootloader: (Could not read) [2023-Sept-19 22:05:17] [trace] [ JLink] - TELNET listener socket opened on port 19021 [2023-Sept-19 22:05:17] [trace] [ JLink] - WEBSRV WEBSRV_Init(): Starting webserver thread(s) [2023-Sept-19 22:05:17] [trace] [ JLink] - WEBSRV Webserver running on local port 19080 [2023-Sept-19 22:05:17] [trace] [ JLink] - Looking for J-Link GUI Server exe at: /opt/SEGGER/JLink/JLinkGUIServerExe [2023-Sept-19 22:05:17] [trace] [ JLink] - Forking J-Link GUI Server: /opt/SEGGER/JLink/JLinkGUIServerExe [2023-Sept-19 22:05:17] [trace] [ JLink] - J-Link GUI Server info: "J-Link GUI server V7.92e " [2023-Sept-19 22:05:17] [trace] [ JLink] - - 20.114ms returns "O.K." [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_Lock() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_ExecCommand("SetRestartOnClose = 0", ...). [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.003ms returns 0x01 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_ExecCommand("DisableFlashDL", ...). [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.001ms returns 0x00 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...). [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.000ms returns 0x00 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_SetHookUnsecureDialog [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_SetHookUnsecureDialog(...) [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.004ms returns 0 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_TIF_Select(JLINKARM_TIF_SWD) [2023-Sept-19 22:05:17] [trace] [ JLink] - - 4.354ms returns 0x00 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_GetSpeedInfo() [2023-Sept-19 22:05:17] [trace] [ JLink] - 4000000 Hz / n, n >= 1 [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.004ms [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - Connected emulator supports SWD speeds up to 4000kHz [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_SetSpeed(2000) [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.300ms [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_GetSpeed() [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.001ms returns 2000 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [debug] [SeggerBackend] - SWD clock set to 2000kHz [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_GetSN() [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.002ms returns -1 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_GetSN() [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.001ms returns -1 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_GetSN() [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.001ms returns -1 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_GetSN() [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.001ms returns -1 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_GetSN() [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.001ms returns -1 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_GetSN() [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.001ms returns -1 [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_HasError() [2023-Sept-19 22:05:17] [trace] [ JLink] - - 0.007ms [2023-Sept-19 22:05:17] [trace] [ JLink] - JLINK_Close() [2023-Sept-19 22:05:17] [error] [ Client] - Encountered error -102: Command connect_to_emu_with_snr executed for 363 milliseconds with result -102