XIAO nRF54L15 SenseでZephyrのHello Worldをしてみました。
NordicのツールのnRF Connectを使わずにテストしてみました。
ZephyrのWestを使ったビルドした内容を紹介します。
XIAO nRF54L15 Senseの始め方(westでのビルド編)
Seeedが販売している人気のXIAOシリーズでもnRF54L15が販売されました。
筆者もXIAO nRF54L15 Senseを購入しました。
Seeedの公式ガイドは下記になります。(初心者向けにも丁寧に書かれています)
下記手順ではNordicのツールのnRF Connectでテストする手順が紹介しています。
まずはこの手順に従いテストすることをおススメします。

ただし、Zephyr公式のドキュメントでも既に記載されています。
最新のZephyrにはXIAO nRF54L15のボードファイルもデフォルトで入っています。
この記事ではZephyrの標準コマンドのwestを使って、テストをします。
nRF54L15の評価ボード
過去にnRF54L15の評価ボード・カスタムボードの両方でテストした内容も紹介しています。
よろしければ一緒にご確認ください。
基板設計のコンペ(Board Designer Competition)に参加した件

Zephyrを公式通りに環境構築
Windowsで公式の手順をcmd(コマンドプロンプト)でインストールします。
公式手順を守ってインストールします。下記を参考ください。
参考までに動画でも紹介しています。
OpenPCDをインストール
nRF54L15には直接のUSBのピンが無いため、uf2は(現時点では)使えません。
OpenOCD経由でプログラムをダウンロードします。
下記Seeed公式手順をPowershellで管理者で実行して、インストールします。

ZephyrのHello Worldをしてみた
nRF54L15にはARM_M33とRISC-Vのコアが両方入っています。
両方ビルド⇒テストして、問題なく動作することを確認しました。
参考までに、両方のビルドと書き込みしたログを残しておきます。
ARM_M33のビルド
下記のようにwestでビルドします。
west build -p always -b xiao_nrf54l15/nrf54l15/cpuapp samples/hello_world
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
(.venv) C:\Users\ioten\zephyrproject\zephyr>west build -p always -b xiao_nrf54l15/nrf54l15/cpuapp samples/hello_world -- west build: making build dir C:\Users\ioten\zephyrproject\zephyr\build pristine -- west build: generating a build system Loading Zephyr default modules (Zephyr base). -- Application: C:/Users/ioten/zephyrproject/zephyr/samples/hello_world -- CMake version: 4.1.0 -- Found Python3: C:/Users/ioten/zephyrproject/.venv/Scripts/python.exe (found suitable version "3.13.5", minimum required is "3.10") found components: Interpreter -- Cache files will be written to: C:/Users/ioten/zephyrproject/zephyr/.cache -- Zephyr version: 4.2.99 (C:/Users/ioten/zephyrproject/zephyr) -- Found west (found suitable version "1.4.0", minimum required is "0.14.0") -- Board: xiao_nrf54l15, qualifiers: nrf54l15/cpuapp -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK -- Found host-tools: zephyr 0.17.2 (C:/Users/ioten/zephyr-sdk-0.17.2) -- Found toolchain: zephyr 0.17.2 (C:/Users/ioten/zephyr-sdk-0.17.2) -- Found Dtc: C:/Users/ioten/AppData/Local/Microsoft/WinGet/Packages/oss-winget.dtc_Microsoft.Winget.Source_8wekyb3d8bbwe/usr/bin/dtc.exe (found suitable version "1.6.1", minimum required is "1.4.6") -- Found BOARD.dts: C:/Users/ioten/zephyrproject/zephyr/boards/seeed/xiao_nrf54l15/xiao_nrf54l15_nrf54l15_cpuapp.dts -- Generated zephyr.dts: C:/Users/ioten/zephyrproject/zephyr/build/zephyr/zephyr.dts -- Generated pickled edt: C:/Users/ioten/zephyrproject/zephyr/build/zephyr/edt.pickle -- Generated devicetree_generated.h: C:/Users/ioten/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/devicetree_generated.h Parsing C:/Users/ioten/zephyrproject/zephyr/Kconfig Loaded configuration 'C:/Users/ioten/zephyrproject/zephyr/boards/seeed/xiao_nrf54l15/xiao_nrf54l15_nrf54l15_cpuapp_defconfig' Merged configuration 'C:/Users/ioten/zephyrproject/zephyr/samples/hello_world/prj.conf' Configuration saved to 'C:/Users/ioten/zephyrproject/zephyr/build/zephyr/.config' Kconfig header saved to 'C:/Users/ioten/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/autoconf.h' -- Found GnuLd: c:/users/ioten/zephyr-sdk-0.17.2/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- The ASM compiler identification is GNU -- Found assembler: C:/Users/ioten/zephyr-sdk-0.17.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe -- Found gen_kobject_list: C:/Users/ioten/zephyrproject/zephyr/scripts/build/gen_kobject_list.py -- Configuring done (9.9s) -- Generating done (0.4s) -- Build files have been written to: C:/Users/ioten/zephyrproject/zephyr/build -- west build: building application [1/153] Generating include/generated/zephyr/version.h -- Zephyr version: 4.2.99 (C:/Users/ioten/zephyrproject/zephyr), build: v4.2.0-1468-gbfdab166e3d4 [153/153] Linking C executable zephyr\zephyr.elf Memory region Used Size Region Size %age Used FLASH: 27192 B 1428 KB 1.86% RAM: 4736 B 188 KB 2.46% IDT_LIST: 0 GB 32 KB 0.00% Generating files from C:/Users/ioten/zephyrproject/zephyr/build/zephyr/zephyr.elf for board: xiao_nrf54l15 |
書き込んだログが下記です。USBでXIAO nRF54L15に書き込めます。
west flash
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
(.venv) C:\Users\ioten\zephyrproject\zephyr>west flash -- west flash: rebuilding ninja: no work to do. -- west flash: using runner openocd -- runners.openocd: Flashing file: C:/Users/ioten/zephyrproject/zephyr/build/zephyr/zephyr.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 nrf54l-load Info : Using CMSIS-DAPv2 interface with VID:PID=0x2886:0x0066, serial=474FEA6F Info : CMSIS-DAP: SWD supported Info : CMSIS-DAP: FW Version = 2.0.0 Info : CMSIS-DAP: Serial# = 474FEA6F 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: 0x0002d1a0 msp: 0x20011678 24860 bytes written at address 0x00000000 2328 bytes written at address 0x00006120 downloaded 27188 bytes in 0.586871s (45.241 KiB/s) shutdown command invoked |
実際にUSBからのシリアルメッセージです。
無事Hello Worldが出来ました。
1 2 |
*** Booting Zephyr OS build v4.2.0-1468-gbfdab166e3d4 *** Hello World! xiao_nrf54l15/nrf54l15/cpuapp |
RISC-Vでのビルド
RISC-Vでもビルド出来きます。
west build -p always -b xiao_nrf54l15/nrf54l15/cpuflpr samples/hello_world
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
(.venv) C:\Users\ioten\zephyrproject\zephyr>west build -p always -b xiao_nrf54l15/nrf54l15/cpuflpr samples/hello_world -- west build: making build dir C:\Users\ioten\zephyrproject\zephyr\build pristine -- west build: generating a build system Loading Zephyr default modules (Zephyr base). -- Application: C:/Users/ioten/zephyrproject/zephyr/samples/hello_world -- CMake version: 4.1.0 -- Found Python3: C:/Users/ioten/zephyrproject/.venv/Scripts/python.exe (found suitable version "3.13.5", minimum required is "3.10") found components: Interpreter -- Cache files will be written to: C:/Users/ioten/zephyrproject/zephyr/.cache -- Zephyr version: 4.2.99 (C:/Users/ioten/zephyrproject/zephyr) -- Found west (found suitable version "1.4.0", minimum required is "0.14.0") -- Board: xiao_nrf54l15, qualifiers: nrf54l15/cpuflpr -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK -- Found host-tools: zephyr 0.17.2 (C:/Users/ioten/zephyr-sdk-0.17.2) -- Found toolchain: zephyr 0.17.2 (C:/Users/ioten/zephyr-sdk-0.17.2) -- Found Dtc: C:/Users/ioten/AppData/Local/Microsoft/WinGet/Packages/oss-winget.dtc_Microsoft.Winget.Source_8wekyb3d8bbwe/usr/bin/dtc.exe (found suitable version "1.6.1", minimum required is "1.4.6") -- Found BOARD.dts: C:/Users/ioten/zephyrproject/zephyr/boards/seeed/xiao_nrf54l15/xiao_nrf54l15_nrf54l15_cpuflpr.dts unit address and first address in 'reg' (0x20028000) don't match for /soc/memory@2002f000 -- Generated zephyr.dts: C:/Users/ioten/zephyrproject/zephyr/build/zephyr/zephyr.dts -- Generated pickled edt: C:/Users/ioten/zephyrproject/zephyr/build/zephyr/edt.pickle -- Generated devicetree_generated.h: C:/Users/ioten/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/devicetree_generated.h C:/Users/ioten/zephyrproject/zephyr/build/zephyr/zephyr.dts:1105.33-1112.5: Warning (simple_bus_reg): /soc/memory@2002f000: simple-bus unit address format error, expected "20028000" warning: The choice symbol CLOCK_CONTROL_NRF_K32SRC_RC (defined at drivers/clock_control/Kconfig.nrf:37) was selected (set =y), but no symbol ended up as the choice selection. See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC and/or look up CLOCK_CONTROL_NRF_K32SRC_RC in the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too. Parsing C:/Users/ioten/zephyrproject/zephyr/Kconfig Loaded configuration 'C:/Users/ioten/zephyrproject/zephyr/boards/seeed/xiao_nrf54l15/xiao_nrf54l15_nrf54l15_cpuflpr_defconfig' Merged configuration 'C:/Users/ioten/zephyrproject/zephyr/samples/hello_world/prj.conf' Configuration saved to 'C:/Users/ioten/zephyrproject/zephyr/build/zephyr/.config' Kconfig header saved to 'C:/Users/ioten/zephyrproject/zephyr/build/zephyr/include/generated/zephyr/autoconf.h' -- Found GnuLd: c:/users/ioten/zephyr-sdk-0.17.2/riscv64-zephyr-elf/riscv64-zephyr-elf/bin/ld.bfd.exe (found version "2.38") -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- The ASM compiler identification is GNU -- Found assembler: C:/Users/ioten/zephyr-sdk-0.17.2/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gcc.exe -- Found gen_kobject_list: C:/Users/ioten/zephyrproject/zephyr/scripts/build/gen_kobject_list.py -- Configuring done (47.6s) -- Generating done (0.4s) -- Build files have been written to: C:/Users/ioten/zephyrproject/zephyr/build -- west build: building application [1/121] Generating include/generated/zephyr/version.h -- Zephyr version: 4.2.99 (C:/Users/ioten/zephyrproject/zephyr), build: v4.2.0-1468-gbfdab166e3d4 [121/121] Linking C executable zephyr\zephyr.elf Memory region Used Size Region Size %age Used RAM: 23116 B 96 KB 23.51% IDT_LIST: 0 GB 4 KB 0.00% Generating files from C:/Users/ioten/zephyrproject/zephyr/build/zephyr/zephyr.elf for board: xiao_nrf54l15 |
書き込むアドレス箇所を見ると、ARM_M33と変わっていることが分かります。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
(.venv) C:\Users\ioten\zephyrproject\zephyr>west flash -- west flash: rebuilding ninja: no work to do. -- west flash: using runner openocd -- runners.openocd: Flashing file: C:/Users/ioten/zephyrproject/zephyr/build/zephyr/zephyr.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 nrf54l-load Info : Using CMSIS-DAPv2 interface with VID:PID=0x2886:0x0066, serial=474FEA6F Info : CMSIS-DAP: SWD supported Info : CMSIS-DAP: FW Version = 2.0.0 Info : CMSIS-DAP: Serial# = 474FEA6F 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: 0x00000ec0 msp: 0x20001280 1862 bytes written at address 0x00165000 12830 bytes written at address 0x00165748 3968 bytes written at address 0x00168968 156 bytes written at address 0x0016a9b0 downloaded 18816 bytes in 0.402744s (45.625 KiB/s) shutdown command invoked |
まとめ
XIAO nRF54L15 SenseでZephyrのHello Worldをしてみました。
NordicのツールのnRF Connectを使わずにテストしてみました。
ZephyrのWestを使ったビルドした内容を紹介します。
コメント