So for the Beginner crew on here, Check out this guys video, itās a basic how too, using the West Flash and in m_y Test environment the openocd is a preinstalled windows version, so I had to provide the path to it in the previous step, before in order to flash.
heās a little dry but it gets the point across, flash without debugger or SWD hardware connections just USB.
this issue,
FATAL ERROR: required program openocd not found; install it or add its location to PATH
D:\Nordic\myapps\workspace\blinky_1> west build -- -DOPENOCD="C:/openocd/bin/openocd.exe" -DOPENOCD_SCRIPTS="C:/openocd/share/openocd/scripts"
gave me this
nrf54l-load
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2886:0x0066, serial=E4E44CBA
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2886:0x0066, serial=E4E44CBA
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Serial# = E4E44CBA
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x6ba02477
Info : [nrf54l.cpu] Cortex-M33 r1p0 processor detected
Info : [nrf54l.cpu] target has 8 breakpoints, 4 watchpoints
Info : [nrf54l.cpu] Examination succeed
Info : [nrf54l.aux] Examination succeed
Info : [nrf54l.cpu] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
Info : [nrf54l.aux] gdb port disabled
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* nrf54l.cpu cortex_m little nrf54l.cpu unknown
1 nrf54l.aux mem_ap little nrf54l.cpu unknown
[nrf54l.cpu] halted due to breakpoint, current mode: Thread
xPSR: 0xf9000000 pc: 0x00000d7c msp: 0x200019d0
36668 bytes written at address 0x00000000
6380 bytes written at address 0x00008f40
downloaded 43048 bytes in 0.627356s (67.010 KiB/s)
shutdown command invoked
I was able to duplicate his examples , for both videoās the GPIO one also.
Here is Another known youtuber that covers the MAC users perspective,
He also covers a few key observations in the process of building and flashing, a few incites into the new dev environment
So More of an OpenOCD question to the groupā¦
Here is my OpenOCD log when I flash
Open On-Chip Debugger 0.12.0 (2023-01-14-23:37)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
nrf54l-load
Info : Using CMSIS-DAPv2 interface with VID:PID=0x2886:0x0066, serial=E4E44CBA
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Serial# = E4E44CBA
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x6ba02477
Info : [nrf54l.cpu] Cortex-M33 r1p0 processor detected
Info : [nrf54l.cpu] target has 8 breakpoints, 4 watchpoints
Info : starting gdb server for nrf54l.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : gdb port disabled
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* nrf54l.cpu cortex_m little nrf54l.cpu running
1 nrf54l.aux mem_ap little nrf54l.cpu running
[nrf54l.cpu] halted due to debug-request, current mode: Thread
xPSR: 0xf9000000 pc: 0x0000435c msp: 0x2000da30
572176 bytes written at address 0x00000000
downloaded 572176 bytes in 10.586416s (52.781 KiB/s)
hereās the contents of the .overlay I use to compile channel sounding for the xiao:
&radio {
status = "okay";
bt_hci_sdc: bt_hci_sdc {
compatible = "nordic,bt-hci-sdc";
status = "okay";
};
};
/ {
chosen {
zephyr,bt-c2h-uart = &uart20;
};
};
// can't have two devices on the 20 id at the same time as per documentation.
&pdm20 {
status = "disabled";
};
&cpuapp_sram {
reg = <0x20000000 DT_SIZE_K(256)>;
ranges = <0x0 0x20000000 0x40000>;
};
but so far the results are⦠unsatisfactory as this device is 200mm from the reflector not 2180,
Estimated distance to reflector:
- Round-Trip Timing method: 7.494811 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.183756 meters (derived from 36 samples)
Not enough memory to store step data. (533 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 7.494811 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.183756 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 7.494811 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.183756 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 7.494811 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.183756 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 7.494811 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.183756 meters (derived from 36 samples)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (545 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (518 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (515 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (518 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (515 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (515 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (515 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (545 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (548 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (545 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (515 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (515 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (533 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Not enough memory to store step data. (530 > 512)
Estimated distance to reflector:
- Round-Trip Timing method: 6.520485 meters (derived from 8 samples)
- Phase-Based Ranging method: 2.289868 meters (derived from 36 samples)
Hi. I have 2 Xiao devices (nRF54L15) attached, how do I use āwest flashā to specify which one I want to flash? āādeviceā doesnāt seem to work.
āFATAL ERROR: runner openocd received unknown arguments: [āādeviceā, ā6Axxxxxxā]ā
So sounds like you have some com port issues, using the wrong option on the wrong runner.
āFATAL ERROR: runner openocd received unknown arguments: [āādeviceā, ā6Axxxxxxā]ā
--device is not a valid option for the openocd runner, so this is not really a COM-port issue yet. The error is coming from west argument parsing before it even reaches the board.
Try:
west flash -H
west flash -H -r openocd
That will show the options supported by your current runner.
If you want to select a specific attached probe by serial number, that is usually done with a runner that supports --dev-id (for example J-Link MY favorite tool ), not with --device. If your board/build is defaulting to openocd, you may need to switch runners or pass raw OpenOCD-specific options instead.
Have you tried using the --serial suffix to flash a specific device with āwestā?
You would need to get the serial number somehow. I just use openocd āresetā command to get the serial number - but with only one device connected at a time.
Eg west flash -r openocd -v
Look for Info : CMSIS-DAP: Serial# =xxxxxx
openocd doesnāt seem to support the ādevice flag. Iāve tried swiching to to jlink (it is available) but
> west -v flash --runner jlink
ā¦
J-Link Command File read successfully.
Processing script fileā¦
J-Link>ExitOnError 1
J-Link Commander will now exit on Error
J-Link>r
J-Link connection not established yet but required for command.
Connecting to J-Link via USBā¦FAILED: Failed to open DLL
When I perform a āwest flashā it shows me the serial number so I copied it from there:
PS C:\nordic\blinky\build\blinky> west flash ā west flash: using runner openocd ... nrf54l-load Info : Using CMSIS-DAPv2 interface with VID:PID=0x2886:0x0066, serial=C2A1XXXX
openocd options: āserial SERIAL if given, selects FTDI instance by its serial number, defaults to empty
PS C:\nordic\blinky\build\blinky> west flash --serial C2xxxxxx ā west flash: using runner openocd ā runners.openocd: Flashing file: C:/nordic/blinky/build/merged.hex Open On-Chip Debugger 0.12.0 (2023-01-14-23:37) Licensed under GNU GPL v2 For bug reports, read ``http://openocd.org/doc/doxygen/bugs.html C2A166E9 nrf54l-load Info : Using CMSIS-DAPv2 interface with VID:PID=0x2886:0x0066, serial=6Axxxxxx ā¦
So I donāt really understand this. With both devices flagged (serial 1: C2xxxxxx, serial device 2: 6Axxxxxx), I execute the command with serial of device 1, and the serial number of device 1 is shown as a single line in the output (3rd line from the bottom) but the last line shows the serial=6Axxxxxx is used to flash the device. So like the flag is completely ignored.
I donāt have any more XIAO NRF54L15 to test this option but the command should be something like west flash --runner openocd --openocd-opt "--serial <YOUR_SERIAL_NUMBER>"