🤠 nRF54L15 Xiao USB West Flash How to;

Hi there,

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.

HTH
GL :slight_smile: PJ :v:

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.

HTH
GL :slight_smile: PJ :v:

Hi there,

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

HTH
GL :slight_smile: PJ :v:

1 Like

Hi there,

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)

What does yours look like…?

HTH
GL :slight_smile: PJ :v:

Depends what I’m flashing, but only 1 line really varies, essentially where it says NRF 54l.cpu halted due to breakpoint,

Otherwise I get something pretty much identical to what you show. I actually got channel sounding running earlier on the Xiao nrf54L15. Mostly…

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)
2 Likes

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’]ā€

Hi there,

And Welcome here…

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 :backhand_index_pointing_left: :face_with_open_eyes_and_hand_over_mouth: 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.

HTH
GL :slight_smile: PJ :v:

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

Have you tried using the --serial suffix to flash a specific device with ā€œwestā€

I’ve tried with serial, but seems like it’s ignored as it always flashes the same device even when I specify the serial parameter.

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


How did you find the serial number?

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

1 Like

And what was the command you used (with the serial number) to try flash the device?

I’ve used ā€œā€“serialā€ flag:

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>"