個人的な上手くできなかった忘備録メモです。
Xiao nRF54L15でRISC-VとIPC通信できなかった件を雑にメモ残しています。
Xiao nRF54L15でRISC-VとIPC通信できなかった件
個人的な上手くできなかった忘備録メモです。
Xiao nRF54L15でRISC-VとIPC通信できなかった件を雑にメモ残しています。
nRF54L15-DKではOK
Nordicの評価ボードであるnRF54L15DKでは問題なく動作します。
zephyr/samples/subsys/ipc/ipc_service/icmsg at main · zephyrproject-rtos/zephyr
Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple...
上記を改造したIPCメッセージの4Byteが送受信できています
|
1 2 3 4 5 6 7 8 9 10 11 12 |
*** Booting nRF Connect SDK v3.2.1-d8887f6f32df *** *** Using Zephyr OS v4.2.99-ec78104f1569 *** [00:00:00.007,455] <inf> host: IPC-service HOST demo started [00:00:00.007,460] <inf> host: 1 [00:00:00.007,466] <inf> host: 2 [00:00:00.007,486] <inf> host: 3 [00:00:00.016,056] <inf> host: Ep bounded [00:00:00.016,093] <inf> host: 4 [00:00:00.016,218] <inf> host: Sent 4 [Bytes] [00:00:00.016,224] <inf> host: Waiting for message... [00:00:00.016,229] <inf> host: Received 4 [Bytes] in total [00:00:00.016,235] <inf> host: IPC-service HOST demo ended |
Xiao nRF54L15ではNG
最初にXiao nRF54L!5のdtsにはRISC-VにUARTが無いので、prj,confを弄る必要があった。
エラーが出たため、変にLOGメッセージが表示させないようにした。
CONFIG_PRINTK=n
CONFIG_LOG=n
|
1 2 3 4 5 6 7 8 |
CONFIG_PRINTK=n CONFIG_IPC_SERVICE=y CONFIG_IPC_SERVICE_BACKEND_ICMSG=y CONFIG_MBOX=y CONFIG_LOG=n CONFIG_ASSERT=y |
最初のIPCのハンドシェイクは上手くいっている様子だが、その後が?状態。
M33コアのログは下記のように止まってしまう
|
1 2 3 4 5 6 7 8 9 10 |
*** Booting nRF Connect SDK v3.2.1-d8887f6f32df *** *** Using Zephyr OS v4.2.99-ec78104f1569 *** [00:00:00.012,565] <inf> host: IPC-service HOST demo started [00:00:00.012,569] <inf> host: 1 [00:00:00.012,575] <inf> host: 2 [00:00:00.012,594] <inf> host: 3 [00:00:00.012,639] <inf> host: Ep bounded [00:00:00.012,665] <inf> host: 4 [00:00:00.012,778] <inf> host: Sent 4 [Bytes] [00:00:00.012,783] <inf> host: Waiting for message... |
west attach -d remote でRISC-Vコアを見てみたが、止まっている。
|
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 |
PS C:\boards\test\icmsg_13\build_1> west attach -d remote -- west attach: rebuilding ninja: no work to do. -- west attach: using runner openocd -- runners.openocd: OpenOCD GDB server running on port 3333; no thread info available GNU gdb (Zephyr SDK 0.17.0) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-host_w64-mingw32 --target=riscv64-zephyr-elf". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://github.com/zephyrproject-rtos/sdk-ng/issues>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from remote/zephyr/zephyr.elf... Remote debugging using :3333 warning: while parsing target description (at line 4): Target description specified unknown architecture "arm" warning: Could not load XML target description; ignoring 0x61000000 in ?? () (gdb) bt #0 0x61000000 in ?? () |
|
1 2 3 4 5 6 7 8 9 10 11 12 |
(gdb) list 100 .received = ep_recv, 101 }, 102 }; 103 104 int main(void) 105 { 106 const struct device *ipc0_instance; 107 struct ipc_ept ep; 108 int ret; 109 (gdb) |
止まっている箇所を弄ってみたが上手く動かず。
nrf54L15-DKとのdtsの差分を見たが、XIAOの方はRISC-Vのメモリを違った切り方をしている。
これが原因なのか追ってみたがちょっと分からず
c:\ncs\v3.2.1\zephyr\boards\nordic\nrf54l15dk\nrf54l15dk_nrf54l15_cpuflpr.dts
|
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 |
/dts-v1/; #include <nordic/nrf54l15_cpuflpr.dtsi> #include "nrf54l15dk_common.dtsi" /delete-node/ &cpuflpr_sram; / { model = "Nordic nRF54L15 DK nRF54L15 FLPR MCU"; compatible = "nordic,nrf54l15dk_nrf54l15-cpuflpr"; chosen { zephyr,console = &uart30; zephyr,shell-uart = &uart30; zephyr,code-partition = &cpuflpr_code_partition; zephyr,flash = &cpuflpr_rram; zephyr,sram = &cpuflpr_sram; }; cpuflpr_sram: memory@20028000 { compatible = "mmio-sram"; /* Size must be increased due to booting from SRAM */ reg = <0x20028000 DT_SIZE_K(96)>; #address-cells = <1>; #size-cells = <1>; ranges = <0x0 0x20028000 0x18000>; status = "okay"; }; }; |
c:\ncs\v3.2.1\zephyr\boards\seeed\xiao_nrf54l15\xiao_nrf54l15_nrf54l15_cpuflpr.dts
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
/dts-v1/; #include <nordic/nrf54l15_cpuflpr.dtsi> #include "xiao_nrf54l15_common.dtsi" / { model = "Seeed XIAO nRF54L15"; compatible = "seeed,xiao-nrf54l15-cpuflpr"; chosen { zephyr,code-partition = &cpuflpr_code_partition; zephyr,flash = &cpuflpr_rram; zephyr,sram = &cpuflpr_sram; }; }; &cpuflpr_sram { status = "okay"; /* size must be increased due to booting from SRAM */ reg = <0x20028000 DT_SIZE_K(96)>; ranges = <0x0 0x20028000 0x18000>; }; |
まとめ
個人的な上手くできなかった忘備録メモです。
Xiao nRF54L15でRISC-VとIPC通信できなかった件を雑にメモ残しています。

コメント