This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM625:AM62B-P1 EVM 可以't 运行 rpmsg_char_simplet 测试

Guru**** 2390735 points
Other Parts Discussed in Thread: SK-AM62B

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1499710/am625-am62b-p1-evm-can-t-run-rpmsg_char_simple-test

器件型号:AM625
主题中讨论的其他器件:SK-AM62B

工具/软件:

尊敬的专家:

我使用 AM62B-P1 EVM 进行以下测试、结果将失败、 我正在使用 SDK10.1预编译的二进制文件。 PLS 帮助识别错误。

root@am62xx-evm:~# rpmsg_char_simply -r 9 -n 5.
rpmsg_char_find_rproc:5000000.m4fss 未探测或未探测 remoteproc!
无法创建端点设备:无此类文件或目录
测试状态:失败

BR、

Biao

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的专家:

    /sys/class/remoteproc 中没有远程 proc:

    root@am62xx-EVM:/sys/class/remoteproc ls -l
    总计0

    但在 AM62Q-LP 电路板上:

    Root@am62xx-LP-EVM:/sys/class/remoteproc ls
    remoteproc0 remoteproc1.

    BR、

    Biao

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Nick、

    您可以尝试使用 EVM 吗?

    BR、

    Biao  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Biao、

    这块板会发生什么情况?  

    首先、看起来 Remoteproc 驱动器甚至没有被探测到。 请通过读取日志或使用类似的命令进行检查来仔细检查您的引导日志以查看
    # dmesg | grep remoteproc

    如果 remoteproc 在引导期间返回错误、请发布这些错误(或带有 insert > code 的完整引导日志)。

    确保您使用的是正确的文件系统

    请确认您正在使用的文件系统。 您希望使用 tisdk-default-image-am62xx。

    您将在其他 EVM 板的文件系统映像上看到不同的名称- am62xxsip 用于 SIP EVM、am62xx-LP 用于 LP SK EVM。 我尚未测试在错误的 EVM 上运行错误的文件系统、但处理器可能无法正常工作。

    如果您从 SDK 中的 filesystems/am62xx-EVM 下获取文件系统、请注意、base-image、thinlinux-image 和 tiny-initramfs 中不会包含 RPMsg 二进制文件。 您希望使用默认映像来运行开箱即用演示。

    此致、

    Nick

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    有关引导远程内核和运行开箱即用 IPC 演示的更多信息、请参阅 AM62x Academy:

    Linux >引导远程核心
    https://dev.ti.com/tirex/explore/node?node=A__AckaMLLzyxszvNaSLSFIQg__AM62-ACADEMY__uiYMDcq__LATEST

    Linux > IPC 示例
    https://dev.ti.com/tirex/explore/node?node=A__AXINfJJ0T8V7CR5pTK41ww__AM62-ACADEMY__uiYMDcq__LATEST

    准备好开始自己的 MCU+和 Linux 开发后、请将其指向 AM62x Academy 的多核模块:
    https://dev.ti.com/tirex/explore/node?node=A__AJa64F6ctzZNbb.TYx4mCA__AM62-ACADEMY__uiYMDcq__LATEST

    此致、

    Nick

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Nick、  

    感谢您的支持、但我正在为 AM62B EVM 使用预构建的默认 SDK、您能帮您试用一下并分享结果吗?

    BR、

    Biao

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我使用 的是 tisdk-default-image-am62xx。 你也可以试一下吗?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Biao、

    请按照上述要求附加您的终端输出。

    是的、我在 Linux SDK 10.1默认映像上尝试了此映像、但在 SK-AM62B 上按预期运行、未进行修改。 我将在此处包含我的终端输出、以便您可以看到我要找的结果。

    // M4F getting initialized
    [    9.865557] remoteproc remoteproc0: 5000000.m4fss is available
    [    9.903123] OF: graph: no port node found in /bus@f0000/dss@30200000/oldi-txes/oldi@0/ports
    [    9.914207] OF: graph: no port node found in /bus@f0000/dss@30200000/oldi-txes/oldi@1/ports
    [    9.929117] OF: graph: no port node found in /bus@f0000/dss@30200000/oldi-txes/oldi@0/ports
    [    9.936184] remoteproc remoteproc0: powering up 5000000.m4fss
    [    9.942269] OF: graph: no port node found in /bus@f0000/dss@30200000/oldi-txes/oldi@1/ports
    [    9.947520] remoteproc remoteproc0: Booting fw image am62-mcu-m4f0_0-fw, size 496356
    [    9.972182] rproc-virtio rproc-virtio.1.auto: assigned reserved memory node m4f-dma-memory@9cb00000
    [    9.972289] OF: graph: no port node found in /bus@f0000/dss@30200000/oldi-txes/oldi@0/ports
    [    9.986895] virtio_rpmsg_bus virtio0: rpmsg host is online
    [    9.989113] virtio_rpmsg_bus virtio0: creating channel ti.ipc4.ping-pong addr 0xd
    [    9.989397] virtio_rpmsg_bus virtio0: creating channel rpmsg_chrdev addr 0xe
    [    9.999555] OF: graph: no port node found in /bus@f0000/dss@30200000/oldi-txes/oldi@1/ports
    [   10.003163] rproc-virtio rproc-virtio.1.auto: registered virtio0 (type 7)
    [   10.017510] OF: graph: no port node found in /bus@f0000/dss@30200000/oldi-txes/oldi@0/ports
    [   10.019948] remoteproc remoteproc0: remote processor 5000000.m4fss is now up
    ...
    
    // DM R5F is already running, so Linux just attaches
    [   10.200483] platform 78000000.r5f: R5F core may have been powered on by a different host, programmed state (0) != actual state (1)
    [   10.204955] OF: graph: no port node found in /bus@f0000/dss@30200000/oldi-txes/oldi@1/ports
             Starting User Runtime Directory /run/user/1000...
    [   10.290389] platform 78000000.r5f: configured R5F for IPC-only mode
    [   10.294408] sii902x 1-003b: supply iovcc not found, using dummy regulator
    [   10.297095] platform 78000000.r5f: assigned reserved memory node r5f-dma-memory@9da00000
    [   10.304055] sii902x 1-003b: supply cvcc12 not found, using dummy regulator
    [   10.314569] remoteproc remoteproc1: 78000000.r5f is available
    [   10.325185] remoteproc remoteproc1: attaching to 78000000.r5f
    [   10.326717] i2c i2c-1: Added multiplexed i2c bus 3
    [   10.332339] rproc-virtio rproc-virtio.4.auto: assigned reserved memory node r5f-dma-memory@9da00000
    [   10.337536] OF: graph: no port node found in /bus@f0000/dss@30200000/oldi-txes/oldi@0/ports
    [   10.345924] virtio_rpmsg_bus virtio1: rpmsg host is online
    [   10.350597] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.ping-pong addr 0xd
    [   10.350864] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0xe
    [   10.353543] OF: graph: no port node found in /bus@f0000/dss@30200000/oldi-txes/oldi@1/ports
    [   10.359168] rproc-virtio rproc-virtio.4.auto: registered virtio1 (type 7)
    [   10.380250] [drm] Initialized tidss 1.0.0 20180215 for 30200000.dss on minor 0
    [   10.381931] remoteproc remoteproc1: remote processor 78000000.r5f is now attached
    ...
    
    // check Linux version
    root@am62xx-evm:~# uname -a
    Linux am62xx-evm 6.6.58-ti-01497-ga7758da17c28-dirty #1 SMP PREEMPT Wed Nov 27 13:23:15 UTC 2024 aarch64 GNU/Linux
    
    // test M4
    root@am62xx-evm:~# rpmsg_char_simple -r 9 -n 3
    Created endpt device rpmsg-char-9-1267, fd = 4 port = 1025
    Exchanging 3 messages with rpmsg device rpmsg-char-9-1267 on rproc id 9 ...
    
    Sending message #0: hello there 0!
    Received message #0: round trip delay(usecs) = 133755
    hello there 0!
    Sending message #1: hello there 1!
    Received message #1: round trip delay(usecs) = 60155
    hello there 1!
    Sending message #2: hello there 2!
    Received message #2: round trip delay(usecs) = 53720
    hello there 2!
    
    Communicated 3 messages successfully on rpmsg-char-9-1267
    
    TEST STATUS: PASSED
    
    // test DM R5F
    root@am62xx-evm:~# rpmsg_char_simple -r 15 -n 1
    Created endpt device rpmsg-char-15-1269, fd = 4 port = 1025
    Exchanging 1 messages with rpmsg device rpmsg-char-15-1269 on rproc id 15 ...
    
    Sending message #0: hello there 0!
    Received message #0: round trip delay(usecs) = 154510
    hello there 0!
    
    Communicated 1 messages successfully on rpmsg-char-15-1269
    
    TEST STATUS: PASSED
    

    此致、

    Nick

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Nick、  

    感谢您的支持、我将默认预编译的二进制文件重新刷写到 SD 卡中、它也可以正常工作。

    在原始问题 EVM 上、我运行命令  dmesg | grep remoteproc、没有输出、因为没有与 remoteproc 相关的日志打印。 下面是引导日志和 dmesg 日志、感谢您的支持、我尝试返回更改以查看导致此问题的原因。

    e2e.ti.com/.../bootlog_5F00_dmesg

    BR、

    Biao

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Biao、

    很高兴听到您能够看到代码在预构建的 SD 卡映像上正常工作。

    让我们看看我们能否使您构建的代码正常运行  

    根据您的启动日志、您似乎正在启动已编译的 Linux 内核:

    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [    0.000000] Linux version 6.6.58-ga7758da17c28-dirty (biao@biao) (aarch64-oe-linux-gcc (GCC) 13.3.0, GNU ld (GNU Binutils) 2.42.0.20240723) #1 SMP PREEMPT Fri Mar 28 16:32:53 CST 2025
    

    如果您将引导日志中的打印语句与默认 SD 卡映像中的打印语句进行比较、您将看到 SD 卡映像的打印输出比您生成的代码要多得多。

    导致这种情况的一个原因可能是 Linux 内核找不到任何与 Linux 内核的编译版本匹配的内核模块。

    首先、请确保按照《Linux 内核用户指南》的每个步骤操作。 它应引导您完成整个过程:
    https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/10_01_10_04/exports/docs/linux/Foundational_Components_Kernel_Users_Guide.html

    (只需跳过"创建内核 fitImage"一节、直接从"编译源代码"转到"安装内核")

    您是否确保安装内核模块和内核映像?

    在文件系统上、您应该能够访问/lib/modules 并看到一个与您正在引导的内核映像名称匹配的文件夹。 复制新的内核映像和内核模块之前、它在默认文件系统上的外观如下所示:

    // let's look at the specific build name of the kernel image that is booting
    // from the boot logs:
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
    [    0.000000] Linux version 6.6.58-ti-01497-ga7758da17c28-dirty (oe-user@oe-host) (aarch64-oe-linux-gcc (GCC)
    
    // do we have kernel modules that match?
    root@am62xx-evm:~# ls -al /boot/
    total 28820
    drwxr-xr-x  4 root root     4096 Mar  9  2018 .
    drwxr-xr-x 18 root root     4096 Jan  1 00:00 ..
    drwxr-xr-x  3 root root     4096 Mar  9  2018 EFI
    lrwxrwxrwx  1 root root       41 Mar  9  2018 Image -> Image-6.6.58-ti-01497-ga7758da17c28-dirty
    -rw-r--r--  1 root root 21029376 Mar  9  2018 Image-6.6.58-ti-01497-ga7758da17c28-dirty
    drwxr-xr-x  3 root root     4096 Mar  9  2018 dtb
    lrwxrwxrwx  1 root root       44 Mar  9  2018 fitImage -> fitImage-6.6.58-ti-01497-ga7758da17c28-dirty
    -rw-r--r--  1 root root  9700382 Mar  9  2018 fitImage-6.6.58-ti-01497-ga7758da17c28-dirty
    root@am62xx-evm:~# ls /lib/modules
    6.6.58-ti-01497-ga7758da17c28-dirty

    此致、

    Nick