Multi Source Translation Content

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Multi Source Translation Content

讨论

排序依据:
为 i.mx8MQ 创建 Jailhouse 虚拟机监控器 Inmate cell 时出现问题 亲爱的先生, 正在尝试通过 Jailhouse 在 NXP i.MX 8MQ EVK 板中创建自定义(e-Call)Inmate linux 演示单元。 所有操作步骤均已添加到所附的 "NXP_Jailhouse_Ticket.txt "中。锉刀 面临的问题:- 我们面临编译问题, 如何编译 linux-inmate-demo.c文件并生成 .o和 .cell文件? 如何创建正确的 .bb文件,用于编译 linux-inmate-demo.c文件并生成 .o和 .cell文件并添加到最终图像中。? 请向我们提供您在创建自定义监狱囚犯牢房时有的任何应用笔记, 或者 是否有任何指向以前具有相同解决方案的恩智浦社区门票的链接? 还请纠正上述步骤并提供解决方案。 i.MX8ULP Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 关于如何设置网络以允许囚犯访问互联网,请参阅下文,您需要更新设置以使用 USB 网或以太网。 如何使用网络为第 2 版 Linux 设置网络 首次启动 linux 后 sysctl -w net.ipv4.ip_forward=1 sysctl -p /etc/sysctl.conf 启用根细胞后 iptables -A FORWARD -i eth1 -j ACCEPT iptables -A FORWARD -o eth1 -j ACCEPT iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 第二次启动 linux 后 ifconfig eth1 或 2 192.168.1.4第 1 个 Linux 根单元 ifconfig eth0 192.168.1.5为第二个 Linux 囚犯牢房 "ip route add default via 192.168.1.4dev eth0" for the 2nd linux " ip route add 10.193.100.0/24通过 192.168.1.4dev eth0" 用于第二个 linux 现在,您可以"mount -t nfs 10.193.108.xx:/home/xxx/nfs/mnt" 在步骤 3 和 4 中,根据您的网络将 10.193.xx.xx 更新为您的网络 此致 Peng 开始标志。 Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 嗨,彭、 非常感谢你们的支持,我们可以将 "scp "从根单元复制到囚犯单元。 基本上,我们希望在囚犯手机上保留带有 MQTT 的电子呼叫应用程序。 我们可以共享从根节点到囚犯单元的读/写共享内存。此外,我们还可以按照您的建议,为 root/inmate 单元提供静态 IP。 现在,我们需要在囚犯牢房上建立互联网连接,以便将接收到的数据从根牢房传输到云端。 我们通过 USB 端口将 Quectel EC25 模块连接到恩智浦 i.MX8MQ 板。 根单元数据的 IFCONFIG: ” ifconfig eth0: flags=-28669 mtu 1500 ether 00:04:9f:05:a5:9c txqueuelen 1000(以太网) RX 数据包 0 字节 0 (0.0 B) RX 错误 0 丢失 0 超限 0 帧 0 TX 数据包 0 字节 0 (0.0 B) TX 错误 0 丢失 0 超出 0 载波 0 碰撞 0 eth1: flags=-28605 mtu 16384 inet 192.168.0.3 netmask 255.255.255.0 广播 192.168.0.255 inet6 fe80::88f0:a7ff:fe40:2407 prefixlen 64 scopeid 0x20 ether 8a:f0:a7:40:24:07 txqueuelen 1000(以太网) RX 数据包 41 字节 7030 (6.8 KiB) RX 错误 0 丢失 0 超限 0 帧 0 TX 数据包 71 字节 18812 (18.3 KiB) TX 错误 0 丢失 0 超出 0 载波 0 碰撞 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000(本地环回) RX 数据包 103 字节 9268 (9.0 KiB) RX 错误 0 丢失 0 超限 0 帧 0 TX 数据包 103 字节 9268 (9.0 KiB) TX 错误 0 丢失 0 超出 0 载波 0 碰撞 0 usb0: flags=-28605 mtu 1500 inet 192.168.225.39 净掩码 255.255.255.0 广播 192.168.225.255 inet6 2401:4900:4bb5:e7a7:609f:c3ff:fe2c:903b prefixlen 64 scopeid 0x0 inet6 fe80::609f:c3ff:fe2c:903b prefixlen 64 scopeid 0x20 ether 62:9f:c3:2c:90:3b txqueuelen 1000(以太网) RX 数据包 84 字节 7614 (7.4 KiB) RX 错误 0 丢失 0 超限 0 帧 0 TX 数据包 117 字节 13860 (13.5 KiB) TX 错误 0 丢失 0 超出 0 载波 0 碰撞 0 " 可以看到,互联网连接已在 ROOT 手机端建立。 以下是 PING 命令的输出结果 ” root@imx8mqevk:/home ping 8.8.8.8 PING 8.8.8 (8.8.8.8) 56 (84) 字节的数据。 来自 8.8.8.8 的 64 字节:icmp_seq=1 ttl=114 时间=193 毫秒 来自 8.8.8.8 的 64 字节:icmp_seq=2 ttl=114 时间=68.9毫秒 来自 8.8.8.8 的 64 字节:icmp_seq=3 ttl=114 时间=62.8毫秒 来自 8.8.8.8 的 64 字节:icmp_seq=4 ttl=114 时间=68.5 毫秒 来自 8.8.8.8 的 64 字节:icmp_seq=5 ttl=114 时间=66.5 毫秒 来自 8.8.8.8 的 64 字节:icmp_seq=6 ttl=114 时间=78.6 毫秒 来自 8.8.8.8 的 64 字节:icmp_seq=7 ttl=114 时间=71.0毫秒 ” 现在我在囚犯牢房遇到了网络问题,下面是 IFCONFIG 日志: ” root@imx8mqevk:~ ifconfig eth0 Link encap:Ethernet HWaddr 6E:58:98:59:01:A0 inet addr:192.168.0.4 Bcast:192.168.0.255 掩码:255.255.255.0 inet6 addr: fe80::6c58:98ff:fe59:1a0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:16384 Metric:1 RX 数据包:184 错误:0 丢弃:0 超限:0 帧:0 TX 数据包:65 错误:0 丢弃:0 超限:0 载波:0 碰撞:0 txqueuelen:1000 RX 字节:78814 (76.9 KiB) TX 字节:14002 (13.6 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 掩码:255.0.0.0 inet6 地址:::1/128 范围:主机 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX 数据包:22 错误:0 丢弃:0 超限:0 帧:0 TX 数据包:22 错误:0 丢弃:0 超限:0 载波:0 碰撞:0 txqueuelen:1000 RX 字节:3897 (3.8 KiB) TX 字节:3897 (3.8 KiB) ” 此外,我们还尝试在 ROOT 手机端进行 IP 转发: 允许囚犯牢房接入外部网络: 根细胞中 echo 1> /proc/sys/net/ipv4/ip_forward iptables -A FORWARD -i eth1 -o usb0 -j ACCEPT iptables -A FORWARD -i usb0 -o eth1 -j ACCEPT iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE ” 当我运行上述命令时,得到以下日志: ” root@imx8mqevk:/home iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE [ 1869.738194] audit: type=1325 audit(1755848821.593:11):table=nat 系列=2 entries=7 op=xt_replace pid=713 comm="iptables" root@imx8mqevk:/home [ 1869.749806] audit: type=1300 audit(1755848821.593:11):arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=0 a2=40 a3=aaaafd66a400 items=0 ppid=607 pid=713 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttymxc0 ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null) [ 1869.779649] audit: type=1327 audit(1755848821.593:11):proctitle=69707461626C6573002D74006E6174002D4100504F5354524F5554494E47002D6F0075736230002D6A004D415351554552414445" ” 还将 Dmesg 日志放入根单元 ” [ 71.141601]创建了监狱牢房"ecall-linux-inmate-demo" [ 77.822386]IPv6:ADDRCONF(NETDEV_CHANGE):ETH1:链路就绪 [ 206.451703]audit: type=1325 audit(1755847158.198:4):table=nat 系列=2 个条目=0 op=xt_register pid=651 comm="iptables" [ 206.463131]audit: type=1300 audit(1755847158.198:4):arch=c00000b7 syscall=209 success=yes exit=0 a0=4 a1=0 a2=40 a3=ffffe78d01c0 items=0 ppid=607 pid=651 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttymxc0 ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null) [ 206.493176]audit: type=1327 audit(1755847158.198:4):proctitle=69707461626C6573002D74006E6174002D4100504F5354524F5554494E47002D6F0065746830002D6A004D415351554552414445 [ 206.508268]audit: type=1325 audit(1755847158.202:5):table=nat 系列=2 entries=5 op=xt_replace pid=651 comm="iptables" [ 206.519201]audit: type=1300 audit(1755847158.202:5):arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=0 a2=40 a3=aaaabb51c230 items=0 ppid=607 pid=651 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttymxc0 ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null) [ 206.547353]audit: type=1327 audit(1755847158.202:5):proctitle=69707461626C6573002D74006E6174002D4100504F5354524F5554494E47002D6F0065746830002D6A004D415351554552414445 [ 217.506636]audit: type=1325 audit(1755847169.257:6):table=nat 系列=2 个条目=6 op=xt_replace pid=657 comm= " iptables " [ 217.517791]audit: type=1300 audit(1755847169.257:6):arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=0 a2=40 a3=aaaaec783230 items=0 ppid=607 pid=657 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttymxc0 ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null) [ 217.547639]audit: type=1327 audit(1755847169.257:6):proctitle=69707461626C6573002D74006E6174002D4100504F5354524F5554494E47002D6F0075736230002D6A004D415351554552414445 [ 294.389911]audit: type=1325 audit(1755847246.146:7):table=filter 系列=2 entries=0 op=xt_register pid=659 comm="iptables" [ 294.401564]audit: type=1300 audit(1755847246.146:7):arch=c00000b7 syscall=209 success=yes exit=0 a0=4 a1=0 a2=40 a3=fffff5707410 items=0 ppid=607 pid=659 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttymxc0 ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null) [ 294.431369]audit: type=1327 audit(1755847246.146:7):proctitle=69707461626C6573002D4100464F5257415244002D690065746831002D6F0075736230002D6A00414343455054 [ 294.445250]audit: type=1325 audit(1755847246.150:8):table=filter 系列=2 entries=4 op=xt_replace pid=659 comm="iptables" [ 294.456430]audit: type=1300 audit(1755847246.150:8):arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=0 a2=40 a3=aaaaeb8d3950 items=0 ppid=607 pid=659 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttymxc0 ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null) [ 294.484541]audit: type=1327 audit(1755847246.150:8):proctitle=69707461626C6573002D4100464F5257415244002D690065746831002D6F0075736230002D6A00414343455054 [ 314.598783]audit: type=1325 audit(1755847266.267:9):table=filter 系列=2 entries=5 op=xt_replace pid=662 comm="iptables" [ 314.610726]audit: type=1300 audit(1755847266.267:9):arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=0 a2=40 a3=aaaac05eaac0 items=0 ppid=607 pid=662 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttymxc0 ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null) [ 314.640305]audit: type=1327 audit(1755847266.267:9):proctitle=69707461626C6573002D4100464F5257415244002D690075736230002D6F0065746831002D6A00414343455054 [ 849.488680]audit: type=1006 audit(1755847801.267:10):pid=671 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=3 res=1 [ 849.501588]audit: type=1300 audit(1755847801.267:10):arch=c00000b7 syscall=64 success=yes exit=1 a0=3 a1=ffffc0aa76a0 a2=1 a3=ffff83653020 items=0 ppid=238 pid=671 auid=0uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="crond" exe="/usr/sbin/crond" key=(null) [ 849.527425]audit: type=1327 audit(1755847801.267:10):proctitle=2F7573722F7362696E2F63726F6E64002D6E [ 1869.738194] audit: type=1325 audit(1755848821.593:11):table=nat 系列=2 entries=7 op=xt_replace pid=713 comm="iptables" [ 1869.749806] audit: type=1300 audit(1755848821.593:11):arch=c00000b7 syscall=208 success=yes exit=0 a0=4 a1=0 a2=40 a3=aaaafd66a400 items=0 ppid=607 pid=713 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttymxc0 ses=4294967295 comm="iptables" exe="/usr/sbin/xtables-legacy-multi" key=(null) [ 1869.779649] audit: type=1327 audit(1755848821.593:11):proctitle=69707461626C6573002D74006E6174002D4100504F5354524F5554494E47002D6F0075736230002D6A004D415351554552414445 " 您能帮助我们解决囚犯牢房的上述网络问题吗? Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 在 linux 中执行你的 “root” 或 “犯人” 将触发信号分段故障。 要在两个 linux 之间测试 ivshmem,可以按以下方法进行: 在根单元中: ivshmem-demo -d /dev/uio0 -t 2 在囚犯牢房中: ivshmem-demo -d /dev/uio0 -t 0 然后,你就会看到两个细胞之间的交流。 ivshmem-demo 的源代码位于 imx-jailhouse/tools/demos/ivshmem-demo.c 中。 关于如何在囚犯 Linux 启动后将文件复制到囚犯牢房、 在囚犯牢房: ifconfig eth0 192.168.0.4 在根单元中: ifconfig eth0 192.168.0.3 然后,你可以使用 scp 将文件从 root 复制到犯人。 也可以在根牢房配置 IP 转发,让囚犯访问外部网络。 Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 嗨,彭, 非常感谢你的回复,现在我们可以编译 cell.c 了。代码和生成的 .cell锉刀 " 自定义 ecall-inmate-linux-demo 单元创建成功,ecall-inmate-linux-demo 客户端启动并运行。 Linux主机 root imx8mqevk:~jailhouse 牢房列表 ID 名称 状态 已分配 CPU 故障 CPU 0 imx8mq 运行中 0-1 1 ecall-inmate-linux-demo 运行 2-3 ecall-inmate-linux-demo guest " 我们正在使用 /dev/uio0 设备节点进行通信。 尝试了一些 python 代码,根单元格的写入/发送成功。同时,也无法接收到任何关于 Linux 的演示。 之后,我们转入 C 语言编程代码,并附加了 "ivshmem_common.h"、'ivshmem_inmate.c'、'ivshmem_root.c',以及 Makefile。 使用以下命令生成二进制文件 源 /opt/fsl-imx-wayland/5.15-kirkstone/environment-setup-armv8a-参考发行版、系统开发套件。 export cross_compile=aarch64-参考发行版、系统开发套件。-linux-make kird=/home/automotive/yocto_imx_linux/版本/tmp/work-shared/imx/kernel-版本-Artifacts c= " aarch64-参考发行版、系统开发套件。-linux x-gcc--sysroot=$sdktargetsysRoot " arch=arm64 cross_compile=aarch64-参考发行版、系统开发套件。-Linux-aarch64-参考发行版、系统开发套件。-linux-gcc--sysroot=/opt/fsl-imx-wayland/5.15-kirkstone/sysroots/armv8a-参考发行版、系统开发套件。-l inux-Wall-O2-o 根目录 ivshmem_root.c 我们在桌面端使用 imx8mq 工具链和上述命令进行编译。 我们想将生成的二进制文件复制到 Linux 囚犯演示单元。 我们已成功复制到根单元,但不知道在 Inmate Linux 演示单元上复制或编译的步骤? ,您能提供相同的操作方法吗? 我指的是恩智浦文档 "UG10163",名称为 "iMX_Linux_user_guide_LF6.12.20_2.0.0"。 我需要一些有效的示例代码和用户指南来使用这个 Linux 演示囚犯牢房,因此从根单元传输(一些捆绑的数据,例如 JSON 或字符串/二进制)数据,反之亦然,从 Linux Inmate 演示单元接收。 谢谢, Sumit Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 所以,我的理解是,你遇到了投诉问题。 恩智浦有一个仓库:https://github.com/nxp-imx/imx-jailhouse 我不明白你为什么要尝试版本单元文件。仅使用make即可版本监狱和所有单元文件非常简单。即使你使用的是 Simense 仓库,该文档也说: make [KDIR=/path/to/kernel/objects] 还有我版本所有内容的命令: . /opt/fsl-imx-internal-xwayland/6.12-styhead/environment-setup-armv8a-参考发行版、系统开发套件。-linux 导出 cross_compile=aarch64-参考发行版、系统开发套件。-Linux- 取消设置 CFLAGS unset LDFLAGS make kdir=$HOME/linux/linux-LTS-NXP CC= " aarch64-poky-linux-gcc--sysroot=$sdktargetsysroot " arch=arm64 cross_compile=aarch64-POKY-LINUX-LINUX-GCC arch=arm6 Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 亲爱的 PENG、 非常感谢你们的建议。 我们仍面临一些问题,详情如下: 创建 .cell 的流程文件(Jailhouse Inmate 二进制文件)、SDK 编译命令: 工具链环境设置: 来源 /opt/fsl-imx-wayland/5.15-kirkstone/environment-setup-armv8a-参考发行版、系统开发套件。-linux PATH bash:/opt/fsl-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/bin: /opt/fsl-imx-wayland/5.15-kirkstone/sysroots/x86_64-kirkstone/sysroots/x86_64-kirkstone/sysroots/sbin: /opt/fs l-imx-wayland/5.15-kirkstone/sysroots/x86_64-kirkstone/sysrox86_64-pokysdk-linux/bin: /opt/fsl-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/sbin: /opt/fsl-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/bin/.../x86_64-pokysdk-linux/bin: /opt/fsl-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-pokysdk-linux/bin/aarch64-pokysdk-linux: /opt/fsl-imx-wayland/5.15-kirkstone/sysroots/x86_64-pokysdk-linux/bin/aarch64-pokysdk-linux/bin/apoky-linux-musl: /home/automotive/.local/bin: /home/automotive/bin: /usr/local/sbin: /usr/bin: /usr/bin: /bin: /bin: /usr/bin: /bin: /usr/bin: /usr/bin: /bin: /usr/bin: /usr/bin: /usr/bin: /bin: /usr/bin: /usr/bin: /usr/bin: /bin: /usr/bin: /usr/bin: /usr/bin: /bin: /usr/b-c-i/HOME/Automotive/Jailhouse/Hypervisor/include-i/home/Automotive/Jailhouse/Hypervisor/arch/ arm64/include-i 汽车/监狱/include-nostdlib-nostartfiles-ffreestanding ecall-inux-demo.c-o ecall-inux-demo.c-o ecall-inumate-inmate-inmate-inmate-inmate-inmat 注意:-Jailhouse 头文件不是工具链的一部分,因此我们从 Seimens 的 Jailhouse 文件夹中单独下载(github 版本)。我们使用头文件 inmate-linux-demo.cell 进行编译。 我们没有对 .c锉刀 第 1 步:链接 .o 生成平面 ELF aarch64-poky-linux-ld\-ttext=0x0\-nostdlib\-o ecall-inux-demo.elf\ ecall-inux-demo.elf\ ecall-inumate-linux-demo.o -ttext=0x0 放置 .text 地址为 0x0 的部分,用于平面二进制布局。 -nostdlib阻止链接标准 C 库(队友不需要它)。 第 2 步:将 ELF 转换为原始二进制 .cell aarch64-poky-linux-objcopy\-O 二进制\ ecall-inimate-linux-demo.elf\ ecall-inumate-linux-demo.cell 验证结果:文件 ecall-inumate-linux -demo.cell 验证结果:文件 ecall-inux-demo. 打印信息: ecall-inmate-linux-demo.cell: data 删除默认的 imx8mq.cell 和 imx8mq-linux-demo.cell 生成 "imx8mq.cell 和 imx8mq-linux-demo.cell文件被推送到目标文件夹:"/usr/share/jailhouse/cells 之后,使用生成的 imx8mq.cell 启用 Jailhouse,并面临以下错误 / jailhouse enable /usr/share/jailhouse/cells/imx8mq.cell [ 2533.385877] jailhouse:不是系统配置 JAILHOUSE_ENABLE:无效参数 请提供指导,如果可能的话,请提供一些用户指南/应用笔记或 Makefile/Proper GCC 命令来解决问题。 附上 makefile(它包含所有命令,如上所述) 编译,制 作 aarch64-poky-linux-gcc-nostdlib-nostartfiles-ffreestanding-i/home/automotive/Jailhouse/Hypervisor/include-i-i/home/jailhouse/Hypervisor/include-i-home/automotive/Jailhouse/Hypervisor/include-i-home/automotive/Jailhouse/Hyp-imx8mq.o aarch64-poky-linux-ld-ttext=0x0-nostdlib-o imx8mq.elf imx8mq.elf imx8mq.elf imx8mq.o aarch64-poky-linux-ld: 警告 :找不到入口符号 _start;默认为 0000000000000000 aarch64-poky-linux-objcopy -O 二进制 imx8mq.elf imx8mq.cell 它生成了 .elf.cell 和 .o. 使用以下命令验证文件格式: 文件 imx8mq.elf imx8mq.elf:ELF 64 位 LSB 可执行文件,ARM aarch64,版本 1 (SYSV),静态链接,未删除文件 imx8mq.o imx8mq.o:ELF 64 位 LSB 可重定位,ARM aarch64,版本 1 (SYSV),未删除 文件 imx8mq.cell imx8mq.cell:数据 感谢您的支持。 苏米特 Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ BTW: 这是不对的 "敲击 export pythonpath=/HOME/automotive/yocto_imx_linux/版本/tmp/work/x86_64-linux/jailhouse-native/0.12-r0/image/USR/Share/Jailhouse/Tools export c_include_path=/HOME/Automotive/yocto_imx_linux/版本/tmp/work/x86_64-linux/jailhouse-native/0.12-r0/image/USR/Include/Jailhouse      /home/automotive/yocto_imx_linux/版本/tmp/work/x86_64-linux/jailhouse-native/0.12-r0/image/usr/bin/jailhouse-cell-linux \      /home/automotive/yocto_imx_linux/版本/tmp/work/armv8a-参考发行版、系统开发套件。-linux/jailhouse-ecall/1.0-r0/ecall-inmate-linux-demo.c \ -o ecall-inmate-linux-demo.cell 单元格是由 GCC 编译出来的,而不是 jailhouse-cell-linux 编译出来的。 Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 我对 Yocto 的东西知之甚少。只需分享我的版本命令即可: . /opt/fsl-imx-internal-xwayland/6.12-styhead/environment-setup-armv8a-参考发行版、系统开发套件。-linux make kdir=$HOME/linux/linux-LTS-NXP CC= " aarch64-poky-linux-gcc--sysroot=$sdktargetsysroot " arch=arm64 cross_compile=aarch64-POKY-LINUX-V=1 然后将版本牢房。 5.10 也应类似。 也请分享您编译出来的单元格文件,让我看看 jailhouse-cell-linux 为什么会在单元格上报错。 Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 亲爱的彭凡 感谢您就 i.MX 8MQ 上 Jailhouse 的 IVSHMEM 内存区域提供的宝贵指导,您在回复中提供了有关状态表、RW 部分和输入/输出部分的信息。我们已经将你的建议纳入了我们的牢房配置,但是当我们尝试在i.MX 8MQ EVK板上使用Yocto 5.15 Kirkstone(Linux 5.15.71-2.2.0)创建自定义的E-Call囚犯单元时,仍然面临持续的编译错误。以下是该问题的详细摘要、我们为解决该问题所做的努力以及目前的状况。如果您能提供任何具体的参考、应用笔记或进一步的指导,以帮助我们解决这个问题,我们将不胜感激。 问题摘要 我们正在尝试编译一个自定义的 E-Call 囚犯单元配置(最初基于 `imx8mq-linux-demo.c`、现在使用简化的 "ecall-inmate-linux-demo.c"),使用 "jailhouse-cell-linux "工具。在 "jailhouse-ecall.bb "的 "do_compile "任务中编译失败配方出现以下错误: " 错误:jailhouse-ecall-1.0-r0do_compile:执行错误('/home/automotive/yocto_imx_linux/版本/tmp/work/armv8a-参考发行版、系统开发套件。-linux/jailhouse-ecall/1.0-r0/temp/run.do_compile.225085 ',1,无,无)日志数据如下:调试:执行 shell 函数 do_compile 不是单元配置:/home/automotive/yocto_im_imbild x_linux/版本/tmp/work/armv8a-参考发行版、系统开发套件。-linux/jailhouse-ecall/1.0-r0/imx8mq-linux-demo.c 警告:从 shell 命令中退出代码 1。 错误:任务(/home/automotive/yocto_imx_linux/sources/meta-ecall/recipes-jailhouse/jailhouse-cells/jailhouse-cells/jailhouse-call/jailhouse-cells/jailhouse-call.bb: " 该错误表明 `jailhouse-cell-linux` 无法识别单元配置文件。尽管多次尝试解决,但问题依然存在。 尝试解决的详细信息根据社区反馈和反复试验, 我们对Yocto配方、细胞配置和环境进行了多次更新。以下是主要工作的摘要: 1.初始设置和错误: - 以 `jailhouse-ecall.bb` 开始使用 `imx8mq-linux-demo.c`.和 `jailhouse-native.bb`基于西门子 Jailhouse fork (`git://github.com/siemens/jailhouse.git;branch=master;SRCREV=e57d1eff`)。 - 遇到与缺少`pyjailhouse`模块和不正确的`jailhouse-cell-linux`命令语法有关的错误(例如,将`-I`误解为`CELLCONFIG`)。 2。配方更新: -jailhouse-native.bb: -最初缺少标题安装(`jailhouse/types.h`,jailhouse/cell-config.h`)。更新为包含: " bitbake install -d${D}${includedir} /jailhouse cp -r${S}/include/jailhouse/*.h${D}${includedir} /jailhouse/ " - 切换到 NXP Jailhouse fork (`git://source.codeaurora.org/external/imx/imx-jailhouse.git;branch=imx_5.4.47_2.2.0;SRCREV=8bbe203`),与 `jailhouse_0.12.bb` 看齐,以兼容 i.MX 8MQ。 - 确保 `pyjailhouse_0.12.bb` 与 `jailhouse_0.12.bb` 兼容。 - jailhouse-ecall.bb: - 更正了 "jailhouse-cell-linux "命令,删除了无效的"/dev/null "参数,并使用正确的语法: " bitbake ${STAGING_BINDIR_NATIVE} /jailhouse-cell-linux \ ${S} /ecall-inmate-linux-demo.c\ -o${S}/ecall-inmate-linux-demo.cell " - 更新了 'SRC_URI',以使用 `ecall-inmate-linux-demo.c` 而非 `imx8mq-linux-demo.c`,从而专注于 E-Call 用例。 - 添加了 'export C_INCLUDE_PATH' 和 'PYTHONPATH',以确保找到头文件和 Python 模块。 3.单元配置更新: - 基于 "imx8mq-linux-demo.c "简化了 "ecall-inmate-linux-demo.c"。以及您的 IVSHMEM 指南: - 状态表:0xbfdf0000`,4 KB,只读。 - RW 部分:`0xbfdf1000`,64 KB,读/写。 - 根输出:`0xbfdfa000`, 8 KB, 读/写。 - 根输入:0xbfdfc000`,8 KB,只读。 - 包括 UART1(`0x30860000`)、RAM(`0xc0000000`,256 MB)和通信区域(`0x80000000`)。 - 删除了复杂宏(如 `JAILHOUSE_SHMEM_NET_REGIONS`),以避免解析问题。 - 配置示例片段: " .c .mem_regions= { /* IVSHMEM 状态表 */ { .phys_start= 0xbfdf0000, .virt_start= 0xbfdf0000, .size= 0x1000, .flags= JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED, }, /* IVSHMEM RW 部分 */ { .phys_start= 0xbfdf1000, .virt_start= 0xbfdf1000, .size= 0x10000, .flags= JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_ROOTSHARED, }, /* IVSHMEM 根输出 */ { .phys_start= 0xbfdfa000, .virt_start= 0xbfdfa000, .size= 0x2000, .flags= JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE | JAILHOUSE_MEM_ROOTSHARED, }, /* IVSHMEM 根输入 */ { .phys_start= 0xbfdfc000, .virt_start= 0xbfdfc000, .size= 0x2000, .flags= jailhouse_mem_read | jailhouse_mem_rootshared, }, ... } " 4。依赖关系和层配置: -在 bblayers.conf 中添加了 `meta-ecall` 和 `meta-freescale`。 - 更新了 `local.conf`: "conf IMAGE_INSTALL:append =" jailhouse jailhouse-ecall python3" DISTRO_FEATURES:append =" jailhouse virtualization" " - 验证过的 `jailhouse_0.12.bb` 使用 NXP fork 进行目标部署。 - 确保 `python3-native`、`pyjailhouse` 和头文件安装在本地系统根 (`${STAGING_DIR_NATIVE}/usr/share/jailhouse/tools/pyjailhouse/`, `${STAGING_DIR_NATIVE}/usr/include/jailhouse/`)。 5。手动测试: -手动测试的 “jailhouse-cell-linux”:" bash export pythonpath=/HOME/automotive/yocto_imx_linux/版本/tmp/work/x86_64-Linux/jailhouse-native/jailhouse-native/jailhouse-native/jailhouse-native/jailhouse-native/jailhouse-native/jailhouse-native/0.12-r0/imx/imx/版本/tmp/work/x86_64-linux/Jailhouse-native/0.12-r0/image/usr/include/jailhouse /home/automotive/yocto_imx_linux/版本e/tmp/work/x86_64-linux/jailhouse-native/jailhouse-native/jailhouse-linux/版本e/tmp/work/x86_64-linux/jailhouse-native/imx_linux/ 版本/tmp/ work/armv8a-参考发行版、系统开发套件。-linux/jailhouse-ecall/1.0-r0/ecall/inmate-linux-demo.c\ -o ecall-inmate-linux-demo.cell " - 同样的错误:`Not a cell configuration`。 - 已验证系统根内容:存在`pyjailhouse`模块、头文件和`jailhouse-cell-linux`。 当前状态 - 尽管: - 错误 `Not a cell configuration` 仍然存在。 - 简化单元配置。 - 将 `jailhouse-native.bb` 与 NXP fork 对齐。 - 确保已安装头文件和 `pyjailhouse`。 -其他配方(“jailhouse-native”、“jailhouse”)成功编译,这表明问题特定于 “jailhouse-ecall.bb” 和单元配置解析。 问题和指导请求 1.错误可能是由于恩智浦 Jailhouse fork (`imx_5.4.47_2.2.0`)和我们的电池配置之间的版本不匹配造成的吗?这个分叉中对 “jailhouse-cell-linux” 有具体要求吗? 2。有没有关于使用 Yocto 5.15 Kirkstone 在 i.MX 8MQ 上创建自定义监狱囚室的应用笔记或用户指南?我们找不到该平台的详细文档。 3.jailhouse-cell-linux "在解析复杂配置(如 IVSHMEM 区域)时是否存在已知问题?我们应该进一步简化配置吗? 4。你能不能提供参考 `jailhouse-ecall.bb`为 i.MX 8MQ 编译 `.cell` 文件的配方或示例? 5。我们可能缺少 i.MX 8MQ 上的 Jailhouse 所需的特定的 U-启动 或内核配置吗? 6。如何解决自定义配方/bb层的监狱依赖关系问题? 附加文件(供参考) -`jailhouse-ecall.bb`:更新了电子呼叫手机的配方。 -`jailhouse-native.bb`: - `ecall-inmate-linux-demo.c`:简化了 IVSHMEM 区域的配置。 - imx8mq-linux-demo.c`:原始配置(供参考)。 -详细的编译日志(如果需要,请确认如何共享)。 我们迫切希望解决这个问题,以便继续部署 E-Call 囚犯单元和测试共享内存通信。如果对我们的方法有任何见解、引用或更正,我们将不胜感激。 感谢您的支持! 致以最崇高的敬意, Sumit 注:-如果需要帮助改进响应或生成详细日志,请告诉我! Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 您好,Bio_TICFSL, 在您的 github 链接中,我们找到了 5.15 Kirkstone 的一些链接: https://github.com/NXP/meta-nxp-harpoon/blob/imx-linux-kirkstone/recipes-extended/jailhouse/jailhouse_%25.bbappend https://github.com/NXP/meta-nxp-harpoon/tree/imx-linux-kirkstone 这对我们的恩智浦i.mx8MQ板有帮助吗? 谢谢、 苏米特 Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 让我给大家支几招: 1.Documentation/inter-cell-communication.md 描述了内存的排列方式。 每个单元的 ivshmem 都需要以下区域: - 用于保存状态表的只读区域,一般为一页大小 - 所有对等点都可读写的一个区域 - 每个对等点都有一个输出区域,仅其中一个可读写 2.至 i.MX8MQ /* 00:00.0 的 IVHSMEM 共享内存区域*/ { .phys_start= 0xbfdf0000, .virt_start= 0xbfdf0000, .size= 0x1000, .flags= JAILHOUSE_MEM_READ, ===> 这是状态表。 }, { .phys_start= 0xbfdf1000, .virt_start= 0xbfdf1000, .size= 0x9000, .flags= JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE , ===> 这是 RW 部分。您可以用它来进行交流。或者把这个放大。 }, { .phys_start= 0xbfdfa000, .virt_start= 0xbfdfa000, .size= 0x2000, .flags= JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE , ==> 这是根输入/输出 }, { .phys_start= 0xbfdfc000, .virt_start= 0xbfdfc000, .size= 0x2000, .flags= JAILHOUSE_MEM_READ, ==> 这是根目录输入 }, { .phys_start= 0xbfdfe000, .virt_start= 0xbfdfe000, .size= 0x2000, .flags= JAILHOUSE_MEM_READ, ==> 这是根目录输入信息 这与 imx8mq-inmate-linux.c 中的布局相似。 您可以配置 RW 和 INPUT/OUTPUT 部分,但不要触碰状态部分。 对于 INPUT/OUTPUT,如果定义了多个区域,则每个区域的大小应相同。 此致 Peng 开始标志。 Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 你好 MX8MQ 没有监狱,但是可以以 github 或 6.6.36 为基础的 MX8M 系列是同一个系列BSP。 此致 Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 你好,Bio_TICFSL 非常感谢你的快速回复。 由于我们使用的是 i.MX NXP 8MQ EVK 板 'i.MX 8MQuad',部件号为 " TDA6637 "。 目前,我已经闪存了 Linux Yocto 5.15 Kirkstone'5.15.71-2.2.0'。 但是在你回复 “ NXP Harpoon Jailhouse integration” 时,我们需要 “i.MX Linux Yocto Project 电路板支持包 6.6.36-2.1.0 Harpoon v3 版本”,。 对于 i.MX 8MQ 板它在 5.15 之前支持 Kirkstone Image,在你的 Harpoon 用户指南中 “UG10170” 和 Github 链接为 “https://github.com/NXP/meta-nxp-harpoon/tree/imx-linux-scarthgap” 在此版本中测试了以下板: 恩智浦 i.MX 8MMini LPDDR4 EVK (imx8mm-lpddr4-evk) 恩智浦 i.MX 8MNano LPDDR4 EVK (imx8mn-lpddr4-evk) 恩智浦 i.MX 8MPlus LPDDR4 EVK (imx8mp-lpddr4-evk) 更不用说了 i.MX 8MQ 了,你能否为我们的板提供具体的监狱解决方案,或者提出其他建造囚犯牢房的可能性? 非常感谢你们的支持。 谢谢, Sumit Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ 你好 你可以通过bbappend的配方遵循与恩智浦鱼叉监狱整合类似的方法。 参见示例:meta-nxp-harpoon/配方-extended/jailhouse/jailhouse-imx_%.bbappend 在 imx-linux-scarthgap · nxp/ Me... 用户指南: https://www.nxp.com/docs/en/user-guide/Harpoon_USERS_GUIDE.pdf 此致 Re: Issue with Jailhouse hypervisor Inmate cell Creation for i.MX8MQ @Peng [email protected] 请就我们面临的自定义监牢创建问题(如上述票单中所述)提出一些解决方案? 感谢您的支持。 请与我们联系,了解任何需要的更多细节。
查看全文
使用 i.MX28 添加对新型 NAND 的支持——NAND 分析 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 本页介绍如何确定 NAND 驱动程序中使用的 NAND 时序参数。这与可能使用的任何操作系统无关。 分析NAND数据表 我们使用电子表格来捕获和分析 NAND 特性。该电子表格[附加到此 wiki 页面|使用 i.MX28 添加对新 NAND 的支持 - Nand 分析^nand_analysis_template.xls]。 我们分析一个 NAND,如下所述。 我们必须有 NAND 数据表才能进行分析。 将*分析电子表格*复制到一个新文件名,其中包含正在分析的 NAND 的确切零件编号。 填写分析电子表格的第 1 页(“封面”)。 接下来处理第 3 张表: 基本特征。 其他表。 如果 NAND 是数据表中列出的某个系列之一,则使用一个电子表格来分析整个系列。您可以使用“类似”行来查找家庭的其他成员。如果需要,添加更多行。 大多数 NAND 都有异步接口,因此不涉及简单的时钟频率。相反,存在各种设置时间、保持时间和输出延迟,这意味着 NAND 的 I/O 速率受到限制。电子表格比较了 NAND 的时序规格,以查看设置、保持和输出时间的总和是否短于最小读取周期或写入周期时间。该电子表格专门用于 STMP378x/i.MX233/i.mx28 中的 Nand 控制器芯片,因此电子表格执行时序计算,目的是得出这些 CPU 的时序参数 *TSU*、*TDS* 和 *TDH*。如果在计算完所有时间之后,TDS 和/或 TDH 量 {color:#ff0000} 变为红色{color},则计算出的 TDS 和/或 TDH 对于 NAND 的指定周期时间来说太短。在这种情况下: 您必须在软件中增加其中一个或两个。 在分析电子表格中的某处写下您选择的值的注释,但不要弄乱自动计算。 记录闪存如何表示工厂标记的坏块。(有些使用块的第一页,有些使用最后一页,等等)将其与此[当前坏块标记方法超集[ http://wiki.freescale.net/display/PSGSW/Storage+Media%2C+Flash+Bad+Block+Marks ]进行比较用于检测任何闪存工厂坏块。 实例分析 NAND 数据表和分析的示例可以在 [Hynix NAND 页面 | http://wiki.freescale.net/display/PSGSW/Hynix+NAND+Flash+Documents ] 上找到。 i.MX2x 回复:使用 i.MX28 添加对新 NAND 的支持–NAND 分析 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 你好,谢谢你的信息。由于某些原因,链接不起作用。您能否提供分析电子表格的新链接?谢谢,马克
查看全文
FIR滤波器套件 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 本内容最初由 Steve Sabram 贡献给 lpcware.com 该示例项目使用 LPC4350 演示板和 ARM CMSIS DSP 库实现了声学范围、有限无限响应 (FIR) 滤波器。科幻“电击枪”的声音资源从演示板的耳机插孔中播放出来。该声音样本非常适合演示,因为它在声学带中具有许多低频、中频和高频成分。您可以通过触摸演示板上的电容式触摸按钮来播放声音资源,如演示板 LCD 上显示的菜单所示。最好使用耳机或耳塞聆听声音。四个按钮分别播放相同的声音资源 不同之处: 1) Raw – 未处理的声音按照其格式播放(采样率为 44.1 kHz、16 位样本和单声道)。 2) 低通——通过低通巴特沃斯滤波器滤波,截止频率为 5 kHz,类似于普通模拟电话的带宽。播放时,请注意高音部分被移除,类似 通过电话听到的声音。 3) 高通——通过高通巴特沃斯滤波器滤波,低频截止频率为 8 kHz。请注意,由于仅播放高音谐波成分,因此音量较低。 4) 后向掩码——声音资源样本以相反的顺序播放。“Zap!”现在变成了“Zoup!”数字滤波器是使用广受欢迎的公共领域工具 WinFilter ( http://www.winfilter.20m.com/ ) 设计的。 伴随这个例子。随着 NXP 推出这款免费 DSP 设计工具,我希望它的作者能够扩展其功能。 用户内容
查看全文
フリースケール・カップ・ワールドワイド・ファイナル2015トレーニング・ハイライトをご覧ください <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> トレーニング・セッションについては、フリースケール・カップ・ワールドワイド・ファイナル2015のハイライト・ビデオをご覧ください。クレジット:Fraunhofer IIS (マイビデオで視聴) フリースケール・カップの内容
查看全文
通用更新工具 (UUU) <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 开始使用适用于 i.MX 系列的 UUU 工具。新型固件下载工具“通用更新工具”概述,该工具已取代原有制造工具。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 开始使用适用于 i.MX 系列的 UUU 工具。新型固件下载工具“通用更新工具”概述,该工具已取代原有制造工具。 i.MX 应用处理器
查看全文
[Zephyr ® Series] Part 4: Overview and Practical Applications of Kconfig and Device Trees (Japanese Blog)   From this point on, we'll be moving on to the advanced topics of Zephyr. This session will cover an overview of Kconfig and device trees, followed by hands-on programming exercises to help you utilize them effectively.   One of the key features of Zephyr RTOS, as mentioned previously, is its software scalability (reusability), which makes it easy to reuse software developed once in other projects or derivative products, enabling rapid development.   Furthermore, to support a wide range of hardware platforms, Zephyr employs a powerful configuration system called "Kconfig" and "Devicetree".   This allows you to port programs to different microcontroller boards simply by changing configuration files, without having to rewrite the source code in the same C/C++ language. This article explains the basic mechanisms of Kconfig and the device tree. As a practical application, we will modify the hardware-independent LED blinking program created in Part 3 to run on two different microcontroller boards: " FRDM-MCXA153 " and " FRDM-MCXN947 ".   To run the same application on different boards (microcontrollers and processors), we will explain practical programming methods using Kconfig and the device tree.     table of contents   Preparation Kconfig Basics Device tree fundamentals Best practices for improving software reusability Kconfig and the Device Tree in Practice Create a simple program (hands-on) 1. Program Specifications 2. Directory structure 3. Create Kconfig and prj.conf 4. Creating device tree overlays and board-specific settings 5. Hardware-independent common code (main.c) Create 6. Build and run summary Preparation   Hardware preparation   This article will primarily use the following boards to create and test programs. FRDM-MCXA153 (main use) Additionally, the following boards will be used as supplementary tools to verify the portability of the program you have created. FRDM-MCXN947   SW preparation   This guide assumes that you have already set up the Zephyr development environment (Zephyr SDK, West command, etc.). If you haven't set it up yet, please refer to the second article on environment setup. [Zephyr ® Series] Part 2: First Build and Testing (Japanese Blog)   We will be using the LED blinking program created in the third installment of the Zephyr series. If you haven't created it yet, we recommend creating it by referring to the previous article. [Zephyr ® Series] Part 3: First Steps in Blinking an LED and Software Reusability (Japanese Blog)   Kconfig Basics     Kconfig is a configuration system also used in the Linux kernel. In Zephyr, it is used to manage whether to "enable or disable" software features, or "what parameters to set," such as kernel functions, device drivers, subsystems, and application-specific settings. The following two files are important for Kconfig: The "Kconfig" file defines the selectable configuration items (symbols), their default values, and dependencies. "prj.conf" file *: This file is where application developers specify the values they want to set for items defined in "Kconfig" (such as enabling them with "y" or providing specific numerical values). Using Kconfig, you can exclude unnecessary code from compilation and optimize memory usage. Furthermore, the Kconfig and prj.conf files are all written in text format. How to enable the feature The prj.conf file enables features for the entire project. For example, the ADC, DAC, and OPAMP drivers are defined in Kconfig. When using the functions defined in Kconfig, you declare them by adding "CONFIG_" to the beginning of prj.conf. Kconfig:ADCの定義Kconfig: ADC definition prj.conf例prj.conf example   Device tree fundamentals   Devicetree例Example of a device tree   The device tree is a text file that describes what hardware (CPU, memory, peripherals, pin settings, etc.) a microcontroller supports, as well as the settings and configuration of that hardware. These settings and configurations are then expanded into macros.   Instead of directly writing hardware addresses into C code (hardcoding), information described in the device tree can be read through Zephyr macros, enabling hardware-independent programming. Nodes and Properties: Each element of hardware is represented as a "node" in a hierarchical structure, and register addresses, interrupt numbers, etc., are described as "properties." ".dts" and ".dtsi": Standard hardware configurations for each microcontroller and board are predefined within the Zephyr repository in ".dts" (Devicetree Source) and ".dtsi" (Include) files. dts: Described as the device tree of the board. dtsi: Describes the device tree of an SoC/microcontroller and is provided by the device manufacturer. ".overlay" file: This file is created when you want to override application-specific wiring (e.g., connecting an LED to a specific GPIO pin) or default settings.   Best practices for improving software reusability   To enhance software reusability in Zephyr, it is important to follow the following design principles: Separation of hardware-dependent and hardware-independent parts: C code (`main.c`) For example, avoid directly writing about specific microcontroller register operations or pin numbers. Leverage device tree aliases: Instead of directly referencing actual hardware nodes (e.g., `&red_led` or `&gpioa`), applications should reference abstract names defined in the `aliases` node (e.g., `led0`). This allows you to adapt to different boards simply by changing what the alias points to. Prepare a board-specific device tree (overlay) : When there are differences in some functions, such as in derivative products, you can overwrite (overlay) only the parts with hardware differences for each board. Switching features with Kconfig : Application behavior parameters and the on/off status of specific features are controlled using Kconfig symbols instead of C language "#define".   Kconfig and the Device Tree in Practice   From here, we will learn how to use Kconfig and the device tree by creating a simple program so that we can actually use them in practice .     Create a simple program (hands-on) The program will be created by modifying the LED blinking program we created last time, and will have the following specifications.   Here, as a practical exercise, we will create a common application that runs on both "FRDM-MCXA153" and "FRDM-MCXN947". 1. Program Specifications Source code : Use the code from "Part 3: Your First LED Blinking Program" and make the following modifications. LED blinking speed: The blinking interval can be set using Kconfig. Button Function (Enable/Disable): The button function can be enabled or disabled via Kconfig settings. When enabled, pressing the button will toggle between blinking and constant illumination of the LED. Outputting board name: At startup, the "device (board) name" configured in Kconfig will be output to standard output (terminal). 2. Directory structure   The project directory structure should be as follows:   Add the Kconfig file and boards folder to the "my_hello" folder of the LED blinking program you created last time. Any method of adding the files is fine. On Windows, use the PowerShell `ni` command or a text editor to create a new file and save it in the `my_hello` folder. In Linux, you can create a new, empty file using the `touch` command.   The files under "boards/" handle hardware differences and unique settings specific to each board.     my_hello/ ├── CMakeLists.txt ├── Kconfig <- 新規追加:アプリ独自のKconfig ├── prj.conf <- アプリの共通設定 ├── src/ │ └── main.c <- ハードウェア非依存の共通コード └── boards/ <- 新規作成フォルダ  ├── frdm_mcxa153.overlay <- 新規作成:FRDM-MCXA153用のデバイスツリー設定  ├── frdm_mcxa153.conf <- 新規作成:FRDM-MCXA153用のKconfig設定  ├── frdm_mcxn947_cpu0.overlay <- 新規作成:FRDM-MCXN947用のデバイスツリー設定  └── frdm_mcxn947_cpu0.conf <- 新規作成:FRDM-MCXN947用のKconfig設定   Note : By creating specific files within your application's directory, Zephyr's build system (West) will automatically recognize them and apply the settings. Adding Kconfig: You can add your own configuration symbols by placing a "Kconfig" file in your Applications folder. Board-specific settings ("boards/" directory): By creating a "boards" directory within your application and placing "[board name].overlay" or "[board name].conf" files there, the overlay and Kconfig overrides will be automatically applied only when building with that board as the target.   3. Create Kconfig and prj.conf First, create your own "Kconfig" in the application root directory and define application-specific parameters. my_hello/Kconfig   mainmenu "my LED blink" config CUSTOM_BLINK_RATE_MS int "LED blink rate in milliseconds" default 1000 help Set LED blink frequency. #LEDの点滅周期(ミリ秒)を設定します config ENABLE_BUTTON_TOGGLE bool "Enable button to toggle LED state" default y help Enable button to toggle LED state. # ボタン入力によるLEDの点滅/点灯状態>の切り替え機能を有効にします。 config BOARD_NAME_STRING string "Board Name String" default "Unknown Board" help Set board name for printf. # 標準出力に表示するボード名を設定します。 source "Kconfig.zephyr"     Next, as a common setting for the entire application, there is "prj.conf". This will be written. In this prj.conf file, use the Kconfig symbol you just created to configure it as follows: my_hello/prj.conf   # GPIOの有効化 CONFIG_GPIO=y # アプリケーションの共通設定 CONFIG_CUSTOM_BLINK_RATE_MS=500 CONFIG_ENABLE_BUTTON_TOGGLE=y   4. Creating device tree overlays and board-specific settings Create a directory called "boards" and prepare the necessary files for each board. Main board for FRDM-MCXA153     We map the button on the board (`sw2`) so that it can be accessed from the application using the standard alias `sw0`. `led0` is already in the board definition so it can be omitted here, but it can be explicitly overridden if needed.   my_hello/boards/frdm_mcxa153.overlay / { aliases { sw0 = &user_button_2; /* FRDM-MCXA153のユーザーボタン */ }; };   my_hello/boards/frdm_mcxa153.conf   CONFIG_BOARD_NAME_STRING="FRDM-MCXA153 Board"   By referencing the symbols in this .conf (board-specific Kconfig) within the application (main.c), it becomes possible to output the board name to standard output using the printf function. For FRDM-MCXN947 Similarly, we define "sw0" in the FRDM-MCXN947. This handles any differences in the hardware names of the buttons.   In fact, if the hardware names (which differ depending on the peripheral or instance) vary across boards, you assign the actual hardware to the alias node in the device tree. my_hello/boards/frdm_mcxn947_cpu0.overlay   / { aliases { sw0 = &user_button_3; /* FRDM-MCXN947のユーザーボタン */ }; };   my_hello/ boards/frdm_mcxn947_cpu0.conf   I'll try overriding the LED blinking speed to 250ms only when building with MCXN947.   CONFIG_BOARD_NAME_STRING="FRDM-MCXN947 Board" CONFIG_CUSTOM_BLINK_RATE_MS=250 The application code is the same for FRDM-MCXA153 and FRDM-MCXN947, but you can configure the blinking behavior of the LED separately here. 5. Hardware-independent common code (main.c) Create Write the following in "my_hello/src/main.c":   The LED control section reuses the hardware-independent code (using the "led0" alias) created in the previous article, and incorporates Kconfig and button control into it. my_hello/ src/main.c   #include #include #include /* Devicetreeのエイリアスを参照する */ /* どのボードでも、一番目のLEDは通常 "led0" と定義されています */ #define LED0_NODE DT_ALIAS(led0) #define SW0_NODE DT_ALIAS(sw0) /* エイリアスからGPIO仕様(ポート、ピン、フラグ)を取得 */ static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios); /* ボタン機能がKconfigで有効化されている場合のみコンパイルされる部分 */ #ifdef CONFIG_ENABLE_BUTTON_TOGGLE static const struct gpio_dt_spec sw = GPIO_DT_SPEC_GET(SW0_NODE, gpios); static struct gpio_callback button_cb_data; static bool is_blinking = true; void button_pressed(const struct device *dev, struct gpio_callback *cb, uint32_t pins) { is_blinking = !is_blinking; if (!is_blinking) { /* 点滅オフ時はLEDを点灯させた状態にする */ gpio_pin_set_dt(&led, 1); } } #endif //CONFIG_ENABLE_BUTTON_TOGGLE int main(void) { int ret; /* Kconfigで設定されたボード名を出力 */ printf("Starting application on %s\n", CONFIG_BOARD_NAME_STRING); /* デバイスの準備確認 */ if (!gpio_is_ready_dt(&led)) { return -1; } /* ピンの設定 (Devicetreeで定義された初期状態などを考慮して設定) */ ret = gpio_pin_configure_dt(&led, GPIO_OUTPUT_ACTIVE); if (ret < 0) { return -1; } #ifdef CONFIG_ENABLE_BUTTON_TOGGLE if (!gpio_is_ready_dt(&sw)) { return -1; } ret = gpio_pin_configure_dt(&sw, GPIO_INPUT); if (ret < 0) { return -1; } ret = gpio_pin_interrupt_configure_dt(&sw, GPIO_INT_EDGE_TO_ACTIVE); if (ret < 0) { return -1; } gpio_init_callback(&button_cb_data, button_pressed, BIT(sw.pin)); gpio_add_callback(sw.port, &button_cb_data); #endif //CONFIG_ENABLE_BUTTON_TOGGLE while (1) { #ifdef CONFIG_ENABLE_BUTTON_TOGGLE if (is_blinking) { ret = gpio_pin_toggle_dt(&led); } #else /* ピンの状態を反転 (ボタン機能が無効な場合は常に点滅) */ ret = gpio_pin_toggle_dt(&led); #endif //CONFIG_ENABLE_BUTTON_TOGGLE /* Kconfigで設定された点滅間隔で待機 */ k_msleep(CONFIG_CUSTOM_BLINK_RATE_MS); } return 0; }     6. Build and run Now, let's actually test its functionality. Please refer to the previous article for instructions on setting up the build environment and enabling the west command. First, navigate to the directory of your installed zephyrproject repository as shown in the command instructions below, enable west, and then proceed. Operation confirmed with FRDM-MCXA153 (main) Build using the following command and write it to the FRDM-MCXA153.   ## ホームディレクトリからZephyrprojectディレクトリに移動 cd ~/zephyrproject ## west環境を有効化 source .venv/bin/activate ## zephyr v4.3をチェックアウトしていない場合は、前回(第3回 初めてのLチカとソフトウェアの再利用性)を参考にv4.3をチェックアウトしてください。 west build -b frdm_mcxa153 my_hello west flash     Execution result   コンソール出力Console output   LED点滅、点灯モード切り替えLED flashing and steady light mode switching   The message "Starting application on FRDM-MCXA153 Board" will appear in the terminal. The LED blinks at 500ms intervals ("prj.conf"). (Settings). Pressing SW2 ("custom-sw") will turn it on, and pressing it again will return it to blinking. Operation confirmed with FRDM-MCXN947 We'll build the project using the exact same C source code, only changing the board specification.   # -pオプションを使用し、frdm_mcxa153のビルド情報をクリーンしてビルドします。 west build -p -b frdm_mcxn947//cpu0 my_hello west flash   Execution result   The contents of "boards/frdm_mcxn947_cpu0.conf" will be automatically applied, and the terminal will display "Starting application on FRDM-MCXN947 Board". The LED blinks rapidly at 250ms intervals (configured in "prj.conf"). Pressing SW3 (the button mapped to "user_button_3" on the MCXN947) will similarly switch between LED illumination and blinking. While the FRDM-MCXA153 and FRDM-MCXN947 use different GPIOs for controlling LEDs and switch buttons, the device tree effectively absorbs these differences, demonstrating how cleanly the application program and hardware are separated.   summary     In this session, we learned the basics of Kconfig and device trees in Zephyr, and practiced techniques to separate hardware-dependent parts from C code by utilizing them.   I believe you've experienced a powerful mechanism for reusing the same source code across multiple different boards, where hardware settings are absorbed by the device tree overlay (".overlay"), application parameters can be flexibly changed and features can be easily enabled or disabled using board-specific Kconfig files (".conf").   ========================== We are currently unable to respond to comments left in the "Comment" section of this post. We apologize for the inconvenience, but please refer to "Technical Questions to NXP - How to Contact Us (Japanese Blog)" when making inquiries. (If you are already an NXP distributor or have a relationship with NXP, you may ask your representative directly.) This document provides an overview of the device tree and Kconfig, features designed to enhance Zephyr's software reusability. It then outlines the steps required to utilize these features in practice. After reading through this Zephyr series, from the first installment to the fourth, you will be able to write programs using the Zephyr RTOS. General Purpose Microcontrollers MCX Japanese Blog
查看全文
EdgeLock SE050/SE051 功能查询(适用于基于 Ed25519/X25519 的物联网设备) 您好,NXP团队, 我们正在评估 EdgeLock SE050/SE051 系列产品,以用于基于 Raspberry Pi 的物联网设备,希望您能指导我们选择最合适的零件编号。 我们的主要需求是安全存储和硬件执行加密操作。 该设备是树莓派 4,运行树莓派操作系统(Linux)。 我们希望就以下几点得到澄清: 1. 密钥存储 - SE050/SE051 能否安全地存储不可导出的私钥? - 证书和公钥可以存储在安全元件中吗? 2. 密钥生成 安全元件能否在内部生成密钥对? - 具体来说,它是否支持在安全元件内生成 Ed25519 和 X25519 密钥对? 3. Ed25519 操作 - 安全元件内部是否可以支持 Ed25519 签名和签名验证? 4. X25519 操作 - 能否使用不可导出的私钥在安全元件内部执行 X25519 密钥协商(ECDH 共享秘密计算)? 5. AES 操作 - 该安全元件是否支持 AES 加密和解密操作? - 如果支持,支持哪些AES模式?   6. 存储读/写 - 存储/删除/访问类似WiFi密码的文件? 7. Linux/Raspberry Pi 集成 - 是否有适用于 Raspberry Pi OS 的 SDK 或中间件? - 是否有示例应用程序演示上述操作? 8. 产品选择 - 对于上述要求,您会推荐哪款 EdgeLock SE050/SE051 型号? - 推荐的几种方案之间主要有哪些区别? - 是否有更新的 EdgeLock 产品更符合这些要求? 我们的预期用途是: - Ed25519 用于设备认证/JWT 生成签名 - X25519 移动设备配置密钥协议 - 使用派生会话密钥进行 AES 加密/解密 - 存储和处理安全文件,例如 Wi-Fi 密码等。 - 物联网设备的大规模部署 如果可以,我们也希望您能提供以下任何链接: - 相关数据表 - 应用说明 - SDK 文档 - 评估板 - Linux/Raspberry Pi 示例 谢谢你的帮助。 此致, 萨希尔·派 Re: EdgeLock SE050/SE051 Capability Inquiry for Ed25519/X25519-Based IoT Device 嗨@SahilPai , 请允许我发表以下意见: 1. 密钥存储 - SE050/SE051 能否安全地存储不可导出的私钥?//是的,SE05x 上私钥不可导出。 - 证书和公钥可以存储在安全元件中吗?// 是的,证书以二进制文件的形式存储在 SE 中,公钥可以单独存储,也可以与私钥一起存储在 SE05x 中。 2. 密钥生成 - 安全元件能否在内部生成密钥对?// 是的,它支持。 具体来说,它是否支持在安全元件内部生成 Ed25519 和 X25519 密钥对?是的,支持 Ed25519 和 X25519 密钥对。 3. Ed25519 操作 - 安全元件内部是否支持 Ed25519 签名和签名验证?//是的,SE05x 支持 Ed25519 签名和签名验证。 4. X25519 操作 - 能否使用不可导出的私钥在安全元件内部执行 X25519 密钥协商(ECDH 共享秘密计算)?//是的,ECDH 可以使用 SE05x 内部的私钥和也可以存储在 SE05x 中的外部公钥执行。 5. AES 操作 - 该安全元件是否支持 AES 加密和解密操作?//是的, 如果支持,那么支持哪些AES模式?支持 AES 模式:密码块链接(CBC)、ECB、CTR、GCM、CCM。   6. 存储读/写 - 存储/删除/访问文件,例如 WiFi 密码?//是的,SE050/SE051 可以在其安全对象存储中存储二进制对象,包括Wi-Fi 凭证。 7. Linux/Raspberry Pi 集成 - 是否有适用于 Raspberry Pi OS 的 SDK 或中间件?// 是的,详情请参阅https://www.nxp.com/webapp/Download?colCode=SE05x-PLUG-TRUST-MW&appType=license 。 - 是否有示例应用程序演示上述操作?//有。 8. 产品选择 - 对于上述要求,您会推荐哪款 EdgeLock SE050/SE051 型号?//SE050E2 或 SE051C2 均可使用。 - 推荐的几种方案之间主要有哪些区别?//它们都拥有最新的小程序版本,但 SE051 支持小程序升级,而 SE050 不支持。 - 是否有更新的EdgeLock产品更符合这些要求?//没有但目前为止是这样。   更多详情请参阅https://www.nxp.com/products/SE050和https://www.nxp.com/products/SE051 。   希望对您有所帮助。   祝你有美好的一天, 坎 ------------------------------------------------------------------------------- 笔记: - 如果此回复解答了您的问题,请点击“标记为正确答案”按钮。谢谢你! - 我们会持续关注帖子,从最后一条回复发出后持续7周,之后的回复将被忽略。 如果您之后有相关问题,请另开新帖并引用已关闭的帖子。 -------------------------------------------------------------------------------
查看全文
MPC5647 闪存无法访问 我们使用的是 MPC5647 设备。 我们使用Trace32,将一个应用程序编程写入了内部闪存区域。编程过程刚开始(或刚一完成),目标硬件的电源就被切断了。 此事件发生后,便无法再访问应用区域中的闪存。通过Trace32访问Flash时,内存内容显示为"????????" ,或者"FFFFFFFF" 。我们怀疑是在Flash编程操作尚未完全结束之前就切断了电源。 在此情况下,应用闪存区域将无法使用,且只能通过执行 AN4521_MPC56xx C90FL Flash Recovery.pdf 中所述的出厂恢复程序来恢复闪存。执行恢复操作后,闪存即可再次使用。 我们希望了解以下内容: 是什么原因导致了这种现象? 为什么在闪存编程过程中发生意外断电会导致无法访问该闪存块? 为什么不能直接对闪存进行重新编程呢? 为什么在重新对闪存进行编程之前,必须先执行恢复/出厂初始化操作? 这是否与无效的 ECC 状态、不完整的擦除操作,还是其他闪存控制器内部状况有关? 如果能对Flash的内部工作原理进行详细说明,我们将不胜感激。 Re: MPC5647 Flash Inaccessibility 你好 此事件发生后,便无法再访问应用区域中的闪存。通过Trace32访问Flash时,内存内容显示为"????????" ,或者"FFFFFFFF" 。我们怀疑是在Flash编程操作尚未完全结束之前就切断了电源。 这表明闪存可能已损坏。 在此情况下,应用闪存区域将无法使用,且只能通过执行 AN4521_MPC56xx C90FL Flash Recovery.pdf 中所述的出厂恢复程序来恢复闪存。执行恢复操作后,闪存即可再次使用。 这肯定是编程过程中因断电导致的闪存损坏。闪存中存在大量ECC错误,这就是为什么你在跟踪信息中看到“?????”的原因。 为什么在闪存编程过程中发生意外断电会导致无法访问该闪存块? 简而言之,如果您未完成编程或进行了擦除,闪存数据将出现不匹配,并伴随ECC症状。 为什么在重新对闪存进行编程之前,必须先执行恢复/出厂初始化操作? 标准程序命令期望获得一个已彻底擦除的块 中断后: 控制器检测到无效状态 → 拒绝命令 因此: 擦除/编程序列始终无法正确启动 访问可能被阻止或返回虚假数据 这是否与无效的 ECC 状态、不完整的擦除操作,还是其他闪存控制器内部状况有关? 因电源中断而进入ECC状态。 顺祝商祺! Peter
查看全文
PN76xx - ULPCD Checklist As described in ES_PN7642 and AN15028 , the IC might rarely enter into a non-responsive state during ultra low-power card detection (ULPCD).  If there is a suspicion that the IC enters this state, NXP has provided a checklist to verify and confirm it. See the checklist in the attachment.  NFC Controller Solutions
查看全文
HSE_b: RSAキーをRAMにインポートすることは許可されていません 1024ビットのRSA公開鍵を1つRAMカタログにインポートして鍵インポートサービスを使用する方法を理解しようとしていますが、サーバーからHSE_SRV_RSP_NOT_ALLOWEDという応答が返されます。 私のテストアプリケーションは、RAMキーカタログを次のようにフォーマットします。 { { muMask = HSE_MU0_MASK | HSE_MU1_MASK, groupOwner = HSE_KEY_OWNER_ANY, keyType = HSE_KEY_TYPE_RSA_PUB, numOfKeySlots = 2, maxKeyBitLen = HSE_KEY1024_BITS, }, { muMask = HSE_MU0_MASK | HSE_MU1_MASK, groupOwner = HSE_KEY_OWNER_ANY, keyType = HSE_KEY_TYPE_ECC_PUB_EXT, numOfKeySlots = 2, maxKeyBitLen = HSE_KEY256_BITS, }, { muMask = 0, groupOwner = 0, keyType = 0, numOfKeySlots = 0, maxKeyBitLen = 0 }, } そして、サーバーからの応答としてHSE_SRV_RSP_OKを受け取りました。 次に、以下のキー情報を使用してRSAキーをインポートしようとします。 { keyFlags = HSE_KF_USAGE_VERIFY, keyBitLen = HSE_KEY1024_BITS, keyCounter = 0x0, smrFlags = 0x0, keyType = HSE_KEY_TYPE_RSA_PUB, specific = { pubExponentSize = 4, } } 私の要望は以下のとおりです。 { targetKeyHandle = 0x20000, pKeyInfo = 0x20401f74, pKey = { 0x210034b4, 0x21003534, 0x0}, keyLen = { 0x80, 0x4, 0x0}, } . HSE_RAM_PUB_KEY_IMPORT_POLICY_ATTR_ID を HSE_KM_POLICY_ALLOW_RAM_PUB_KEY_IMPORT に設定し、読み戻した結果も同じでした。 LC属性は0x04、HSEエラーフラグは0x0000、HSEステータスフラグは0x0B60です。ファームウェアバージョンは、0x0F SoC ID 0x0000 FWタイプ 0x02 メジャー 0x32 マイナー 0x00 パッチと読み取られます。 Re: HSE_b: Not allowed to import RSA key to RAM こんにちは、 @Emma_G-gbgさん パラメータは正しく設定されています。特に問題は見当たりません。スーパーユーザー権限を持っている場合は、その属性を設定する必要すらありません。 昨日、これと非常によく似たことをテストしていたので、1024ビットのRSA公開鍵と4バイトの公開指数をインポートするようにコードを少し更新しました。見た目はこんな感じです。 RSA公開鍵をインポートする際には、pubExponentSizeを設定する必要がないことに注意してください。HSEはこのパラメータを無視します。代わりにkeyLen[1]を使用します。 パラメータ pubExponentSize は、サービス HSE_SRV_ID_GET_KEY_INFO によって keyInfo を読み取る際に使用されます。そのキーのkeyInfoを読み取った結果は以下のとおりです。 それは単なるデータキャッシュの問題ではないでしょうか?データキャッシュを無効にして、違いが出るかどうか試していただけますか? よろしくお願いいたします。 ルーカス Re: HSE_b: Not allowed to import RSA key to RAM ありがとうございます。暗号鍵と認証鍵のハンドル情報の入力を忘れていました。確認していなかったので、HSE_INVALID_KEY_HANDLE はゼロになると思っていました。 現在は、キャッシュメモリ内の少なくとも一部の値を使用して動作しており、サービス呼び出しの前後にキャッシュメンテナンス操作が行われています。既存のプロジェクトにHSEサービスを追加しているため、キャッシュ構造を変更することはできませんが、共有メモリに実際に書き込まれていることを確認する限り、これまでのところすべて正常に動作しています。ただし、関連するメモリのキャッシュを無効にしてみましたが、違いはありませんでした。
查看全文
ENEDC(S32K3)に関する質問 こんにちはチーム K3のENEDCについてお伺いしてもよろしいでしょうか? 顧客は RTD 付きの MCAL を使用します。 しかし、ENEDC に関する RTD の情報は見つかりませんでした。 MSCM からは、ISR コア割り当て構成のみが表示されます。 RTD(MCAL) を使用して ENEDC を有効にする方法を教えてください。 ありがとう。 SAFETY_SW 出典: 直接顧客 出典: NXP社内 Re: Question about ENEDC(S32K3) ご説明ありがとうございます! Re: Question about ENEDC(S32K3) こんにちは@Luke_Chun 、 RM の説明から私が理解したところによると、ガスケットから FCCU へのレポート パスをアクティブにしたい場合は、これらのビットを有効にする必要があります。 このため、sCheck はこれらのビットを有効にします。そうしないと、レポート パスをテストできなくなります。 これは必須の設定であること、そしておそらく多くの K3 お客様がこの設定に気付いていない (関連する FCCU チャネルを有効にするだけで、これらのビットは有効にしない) ことには同意します。 敬具、 ラドスラフ Re: Question about ENEDC(S32K3) こんにちは@RadoslavB ご説明ありがとうございます。しかし、ENEDC の提案についてはよく分かりません。 私の理解を確認していただけますか? ENEDC では「TEST」のみを使用する必要がありますか? または セーフティアプリケーションを有効にする必要はありますか?(たとえば、ユーザーが eDMA 読み取りのチェックを使用したい場合は、ENEDC のビット 2 を FCCU 構成で手動で「設定」します。) ありがとう。 Re: Question about ENEDC(S32K3) こんにちは@Luke_Chun 、 SAF で MSCM ペリフェラルレジスタを構成する要求はありません。 sCheck テストは、関連する EDC ガスケットの潜在的な障害をテストするときにこれらのレジスタを内部的に有効にしますが、アプリケーションに対してこれらのビットを有効にすることはどの NXP SW でもカバーされていません。 したがって、お客様はこれらのレジスタを手動で有効にする必要があります。 S32K5 の場合、これらのレジスタをイネーブルメントの sBoot チェックが定義されていますが、繰り返しますが、私の知る限り、構成はどの NXP SW の範囲にも含まれていません。 敬具、 ラドスラフ Re: Question about ENEDC(S32K3) こんにちは@Luke_Chun 、 セーフティドライバーに関連する問題はサポートしていません。彼らにサポートを依頼するには、投稿で「RTD」ラベルを削除し、「Safety_SW」ラベルのみを残す必要があります。または、Safety_SW のみに新しい投稿を作成することもできます。 よろしくお願いいたします。 ダン Re: Question about ENEDC(S32K3) こんにちは@DanNguyenDuy 更新情報をありがとうございます。 セーフティドライブも確認しましたが、どれがENEDCに関係するのかわかりませんでした... どうやって確認すればいいのでしょうか? よろしくお願いします。 Re: Question about ENEDC(S32K3) こんにちは@Luke_Chun 、 RTD ドライバーは ENEDC の構成ではサポートされていません。私の観点からすると、このレジスタは FCCU に関連しているため、セーフティドライバのモジュールでこの機能を確認する必要があります。 よろしくお願いいたします。 ダン Re: Question about ENEDC(S32K3) K3 HW セーフティマニュアルからの抜粋を追加します: したがって、現時点ではこの AoU に従うかどうかはお客様の責任です。構成とチェックは現時点では NXP ではサポートされていません。 敬具、 ラドスラフ Re: Question about ENEDC(S32K3) こんにちは@Luke_Chun 、 INTM ペリフェラルの構成がサポートされており、RTD プラットフォーム プラグイン - 割り込みモニターで見つけることができます。 SAF 側では、sCheck は INTM 潜在的障害テストを備えていますが、sBoot は INTM 構成レジスタをチェックしません。私の意見では、割り込みがセーフティ関連の障害の検出/反応メカニズムである場合、SM1.INT_MON はアクティブである必要があり、顧客は SM4.INT_CHK を満たす必要があり、sBoot はそのような構成を再確認する必要があります。 敬具、 ラドスラフ Re: Question about ENEDC(S32K3) こんにちは@RadoslavB もう1つ質問してもよろしいでしょうか? INTM_MMはどうでしょうか? これは ENEDC でも同じですか? (RTD または SAF は INTM_MM 有効構成をサポートしていません。ユーザーはユーザー コードによって INTM_MM の構成を行う必要があります。 ありがとう。  
查看全文
HSE data reflected in memory only after multiple soft resets Steps followed: 1. Provide the HSE ELF file (containing HSE data bytes programmed at HSE memory locations) to Cyclone image creator 2. Create a Cyclone .sap file to enable and program HSE. 3. Flash the .sap file on the S32K312 board using the Cyclone debugger via JTAG. 4. Perform a power cycle. 5. Load the workspace and verify HSE data in memory. 6. Perform multiple soft resets via the debugger. Observed behavior: • After the initial power cycle, the HSE data is not immediately reflected in memory. • The HSE data becomes visible in memory only after multiple soft resets. (Issue) • Also tried allowing with delay, still the same behavior Question: • Why are multiple soft resets required for the HSE data to be reflected in memory? • Is there a recommended workaround (e.g.,reset sequence, or configuration change)? Re: HSE data reflected in memory only after multiple soft resets Hi @abdul_rahiman_csg  First of all, could you please explain what do you mean by "Provide the HSE ELF file (containing HSE data bytes programmed at HSE memory locations)"?  When HSE firmware is installed, only HSE has exclusive access rights to HSE secure memory (HSE firmware, HSE data). Secure memory is removed from memory map and user can't access it at all.  Regards, Lukas Re: HSE data reflected in memory only after multiple soft resets This ELF contains HSE data programmed in the address ranges 0x004D2000–0x004D2060 and 0x1B000000–0x1B000360 Re: HSE data reflected in memory only after multiple soft resets Hi @abdul_rahiman_csg  This does not make sense from microcontroller point of view. It seems to be related to tools. Could you try to discuss this with Pemicro directly? https://www.pemicro.com/support/index.cfm Regards, Lukas
查看全文
FreeMASTER を S32K3、Simulink MBDT、Segger JLink で使用すると問題が発生する こんにちは、 当社では、S32K311 を使用する独自設計のハードウェアを保有しています。 Segger JLink (Ver 7.98d) を使用して、Simulink 自体からターゲットをビルドしてフラッシュすることができました。 データ ストア メモリ変数を監視/変更するための FreeMASTER プロジェクトを作成しました。Segger JLink との通信ウィザードを設定し、接続が成功することを確認しました。 FreeMASTER で「GO」ボタンを押すと、ターゲットがフリーズ状態になるように見えます。たとえば、このモデルでは、Alive LED が点滅していますが、「GO」ボタンを押すと停止します。後で「STOP」を押しても何も変わりません。 電源をリセットすると、プログラムはデフォルトに戻り、変更した変数値も取得されませんでした。 FreeMASTER Config ブロックを使用する必要がありますか (接続タイプは Serial/CAN と記載されていますが)?モデル内で FreeMASTER Config ブロックを使用せずに変数を監視/変更することは可能ですか? 何が足りないのか教えてください。 Re: Running into issues using FreeMASTER with S32K3, Simulink MBDT, Segger JLink こんにちは、 @beginner100さん FreeMASTERプロジェクトで変数を監視するには、 FreeMASTER Configブロックが必須です。現在の進捗状況についてお知らせいただけますか?また、可能であれば、FreeMASTERの設定に関する追加情報もご提供いただけますでしょうか? 最新の S32K3 Toolbox バージョン1.8.0 (NXP Model-Based Design Toolbox for S32K3 バージョン 1.8.0 - 製品リリース発表) をインストールすることもお勧めします。 よろしくお願いいたします。 ドラゴス
查看全文
HSE_ReadAdkp 返回 HSE_SRV_RSP_INVALID_ADDR 你好,团队、 我正在尝试为 S32K314 平台设置 ADKP。 虽然我可以使用以下功能确认 HSE 标记已启用和 HSE FW 版本: HSEFwFlg = checkHseFwFeatureFlagEnabled();   (void)HSE_GetVersion_Example(&gHseFwVersion);   在调用 HSE_ReadAdkp() 的 check_DebugPasswordProgrammed_Status() 函数中,我检测到 HSE_SRV_RSP_INVALID_ADDR (0x55A5A26AUL)。我猜 ADKP 未编程时的预期响应是 HSE_SRV_RSP_NOT_ALLOWED。   请为我指点迷津。   谢谢!   布尚 Re: HSE_ReadAdkp returning HSE_SRV_RSP_INVALID_ADDR 你好@Bhushan1312 是的,我确认 当 ADKP 尚未编程时,读取 HSE_APP_DEBUG_KEY_ATTR_ID 将返回错误代码 HSE_SRV_RSP_NOT_ALLOWED。 尝试禁用数据缓存,看看是否会有影响。用于与 HSE 通信的所有数据对象都必须强制使用非高速缓存内存,这是一个相当常见的根本原因。 还注意到 HSE 无法看到位于 0x2000_0000 的 DTCM 内存。该地址范围只对核心可见。HSE 只能看到 0x2100_0000 的 DTCM 后门地址。我的建议是只使用普通 RAM 与 HSE 通信,而不是 DTCM。 Autosar Crypto 驱动程序中有一个启用 DTCM 支持的选项。然后,驱动程序会检查所有使用过的地址,并在必要时添加相应的偏移量。如果不使用 Crypto 驱动程序,则由用户自行决定。最好的选择是:不使用 DTCM 与 HSE 通信。 此致, Lukas Re: HSE_ReadAdkp returning HSE_SRV_RSP_INVALID_ADDR 感谢@lukaszadrapa... 我将与 HSE 相关的数据变量移到了非高速缓存 SRAM 中,结果成功了。
查看全文
iMX6ULLコンソールUARTがRS-485を使用する他のUARTに干渉する カーネル lf-6.6.52-2.2.1 を搭載した iMX6ULL システム。コンソールは、ttymxc3 上の RS-485 シリアル ポートである ttymxc0 に設定されています。トランシーバ「Drive Enable」は SNVS_TAMPER7 にコネクテッドであり、次の DTS があります。 &iomuxc_snvs { pinctrl_rs485_snvs: rs485grp_snvs { fsl,pins = < MX6ULL_PAD_SNVS_TAMPER7__GPIO5_IO07 0x1b0b1 /* RS485.DE as RTS */ >; }; }; &uart4 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_rs485>, <&pinctrl_rs485_snvs>; fsl,dte-mode; rts-gpios = <&gpio5 7 GPIO_ACTIVE_HIGH>; linux,rs485-enabled-at-boot-time; status = "okay"; label = "rs485"; }; データがコンソールに出力されると、RS-485 シリアル ポートに干渉が発生することに気付きました。RTS/DE 信号が 5 ~ 10 ミリ秒遅延することがあります。これは 9600 bps で 3.5 文字より長いため、ホストがまだバスを駆動しているため、デバイスからの応答が文字化けすることになります。これは次のようにCANできます: while true;do echo xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >/dev/kmsg;done これは既知の問題ですか? i.MX6UL ソフトウェア不具合の疑い Yocto Project Re: iMX6ULL console UART interferes with other UART using RS-485 こんにちは@astrand これは Linux カーネルではよくある問題のようです。こちらは LWN.NET での議論です。printk/console は遅いデバイスです。大量のログが発生した場合、カーネルはメッセージをコンソールに同期的に書き込む必要があります。このプロセス中、関連するロックが保持され、CPU 時間が消費され、他のタスクのスケジュールと割り込み処理が遅延されます。コンソールが RS-485 シリアル ポートと異なる場合でも、システム全体のスケジュール/ソフト割り込み/タスク キューは依然として遅くなります。これにより、UART 送信完了イベント情報がドライバに到達し、その後 DE ビットをプルダウンするまでの時間が遅延されます。詳細については、そのディスカッションを参照してください。 https://lwn.net/Articles/909980/ 実行時にCAN、コンソールのログレベルを低く設定するか、 rs485-rts-dts の遅延。 echo "4 4 1 7" > /proc/sys/kernel/printk よろしくお願いします、 志明
查看全文
s32k312 hse ab-swap 重启方法? 恩智浦专家,你好、 1.我使用的是 s32k312,HSE 版本为 1.13.0、2.40.0。 2.我正在实现 OTA 功能。 OTA 完成后,我需要致电 HSE 交换 ab,然后重启以运行新的应用程序。 我的问题是,我编写了一个演示程序,并调用" HSE_SRV_ID_ACTIVATE_PASSIVE_BLOCK" 服务。在不带任何参数的情况下,使用"IP_MC_ME" perphieral 重启单片机,但只起一次作用,然后单片机就无法运行了,可能是出现了一些硬故障。 那么,但是通过RESET引脚重启是可以的。 我的重启密码是 剧透 (高亮部分可供阅读) IP_MC_ME->MODE_CONF = mc_me_mode_conf_func_rst(1); IP_MC_ME->MODE_UPD = MC_ME_MODE_UPD_MODE_UPD(1); IP_MC_ME->CTL_KEY = mc_me_ctl_key_key(0x5AF0); IP_MC_ME->CTL_KEY = mc_me_ctl_key_key(0xA50F); IP_MC_ME->MODE_CONF = MC_ME_MODE_CONF_FUNC_RST(1); IP_MC_ME->MODE_UPD = MC_ME_MODE_UPD_MODE_UPD(1); IP_MC_ME->CTL_KEY = MC_ME_CTL_KEY_KEY(0x5AF0); IP_MC_ME->CTL_KEY = MC_ME_CTL_KEY_KEY(0xA50F); 这个重启代码可以吗?还是我需要使用其他方法重启微控制器,使 ab 交换功能生效并运行新程序? 谢谢。 Re: s32k312 hse ab-swap reboot method? 原则上是正确的,但请务必查看以下演示示例,您可以在其中详细调换程序 首先,我们提供了 Secure 启动 应用笔记,其中包括详细解释所有步骤的演示项目。可从以下网址下载 https://www.nxp.com/products/processors-and-microcontrollers/s32-automotive-platform/s32k-auto-general-purpose-mcus/s32k3-microcontrollers-for-automotive-general-purpose:S32K3 应用笔记可以在这里找到: 文档-> 安全文件-> 安全启动应用笔记 v0.1.1.0(AN744511) 相关演示项目可在此处下载: 设计资源 -> 软件 -> 安全文件 -> SecureBootAppNoteDemo (SW745310)
查看全文
LS1046A RDB: LinuxのGPIO割り込み処理パフォーマンスをテストするためのGPIO こんにちは、 私は LS1046ARDB を使用しており、割り込みレイテンシを測定したいと考えています。私の目標は、外部信号発生器 (入力 GPIO) を介して割り込みをトリガーし、それに応じて別のピン (出力 GPIO) を切り替えて、オシロスコープで遅延を測定することです。 GPIO として多重化できるボード ヘッダー上のアクセス可能なピンを探しています。 私のアイデアは、IEEE-1588 ヘッダー (J11) を使用することですが、これが機能するかどうか、また何をしなければならないかはわかりません。 リファレンス・マニュアルには、EC2 ピンは RCW (EC2 = 1) を介して GPIO3 として設定できると記載されています。 RCW で EC2=1 を設定すると、これらの信号は J11 にルーティングされますか? LS1046A RDB には、これに使用できる他の簡単にアクセスできるピンはありますか? ご協力いただきありがとうございます QorIQ LS1デバイス Re: LS1046A RDB: GPIOs for testing gpio interrupt handling performance of linux ご協力いただきありがとうございます!これで動作するはずです。GPIO_2[1]、GPIO_2[2]、GPIO_2[3]はTP14、TP13、TP11に対応していることがわかりました。 Re: LS1046A RDB: GPIOs for testing gpio interrupt handling performance of linux SPI 信号と多重化されたGPIOを使用できます。 GPIO_2[1]、GPIO_2[2]、GPIO_2[3] SPIインターフェースはRDBでは使用されず、テストポイントに終端されます。 「表3-8」を参照してください。詳細については、LS1046ARM の「SPI 信号構成」を参照してください。
查看全文
EB 客户许可证管理员 我使用的是 Tresos Studio 29.2。此前,在使用 MPC574xB 时,注册是成功的,一切运行正常。但是,既然我们已经切换到 S32K314 平台并尝试使用相应的激活码将其激活,则出现了以下错误: 错误:flxactappActivationSend (50040,41147,10248) 该激活请求不产量获得许可证的权利。 与 FlexNet Operations Server 的连接失败。 请问问题出在哪里,EB 真的只支持一个平台吗? 电源 Re: EB ClientLicenseAdministrator 你好、 请检查您的账户,获取新的激活代码。此外,还存在可用许可证数量的问题。我已经联系了许可证管理部门来解决这个问题。 Re: EB ClientLicenseAdministrator 我通过下面的网站重新获取了最新的激活代码,但发现还是以前的激活代码,无法成功激活。接下来我该怎么办? 设计 :产品下载 :文件
查看全文
PN7160 PN7220 Android 15 Porting to i.MX8MN EVK Introduction We have an official PN7160/PN7220 Android 15 porting guide (PN7160/PN7220 – Android 15 porting guide). But the patches only for Android 15 AOSP r1 (android-15.0.0_r1). If customer want to porting to the newer release of AOSP, there will have many errors during the source code compiling. This document is for customer reference to solve the error one by one.  NOTE :  All the modifications are just for reference. They are NOT a NXP official patches for the newer release of AOSP porting. So the modifications may not be the best solution. Customer please base on their needs to modify the AOSP source code.  Hardware boards: i.MX8MN EVK PN7160 EVK PN7220 EVK Build the Android for i.MX8MN EVK The i.MX Android BSP that I used is Android 15.0.0_2.0.0 (L6.12.20_2.0.0 BSP). It could be downloaded from here: Android OS for i.MX Applications Processors | NXP Semiconductors 1. Download the "Documentation" and the "Install Source Package".  2. Follow the Android User's Guide to build the Android BSP for i.MX8MN EVK first.  According to the android_build/.repo/manifests/aosp-android-15.0.0_2.0.0.xml, you will see the AOSP version is android-15.0.0_r32. Now, follow the PN7160/PN7220 – Android 15 porting guide to porting the NFC to i.MX Android BSP.  1. Kernel Driver : To establish connection with the PN7220 or PN7160, the Android stack uses the nxpnfc kernel driver.  You could download the driver from github below: nfcandroid_platform_drivers/drivers at br_ar_16_comm_infra_dev · nxp-nfc-infra/nfcandroid_platform_drivers · GitHub git clone "https://github.com/nxp-nfc-infra/nfcandroid_platform_drivers.git" -b br_ar_16_comm_infra_dev There is driver for Kernel 6.6 and 6.12. So, please download the correct one for your porting. For example, the kernel in i.MX Android BSP Android 15.0.0_2.0.0 is 6.12. So I will use the 6.12 driver for my porting. In your porting, make sure the PATH in Makefile and Kconfig files are setting properly.  For example in my porting: android_build/vendor/nxp-opensource/kernel_imx/drivers/nfc$ tree . ├── Kconfig ├── Makefile └── pn7160         ├── common.c         ├── common.h         ├── i2c_drv.c         ├── i2c_drv.h         ├── Kbuild         ├── Kconfig         ├── Makefile         ├── spi_drv.c         └── spi_drv.h 1 directory, 11 files android_build/vendor/nxp-opensource/kernel_imx/drivers/nfc$ cat Makefile # # Makefile for the kernel nfc device drivers. # obj-y += pn7160/ android_build/vendor/nxp-opensource/kernel_imx/drivers/nfc$ cat Kconfig source "drivers/nfc/pn7160/Kconfig" 2. Adding the "nxpnfc" to the i.MX8MN EVK device tree file. Show the connections table on the board. Show the pictures &i2c3 { clock-frequency = <100000>; pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c3>; pinctrl-1 = <&pinctrl_i2c3_gpio>; scl-gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>; sda-gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>; status = "okay"; nxpnfc@28{ compatible = "nxp,nxpnfc"; reg = <0x28>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_nfc>; nxp,nxpnfc-irq = <&gpio3 22 0>; nxp,nxpnfc-ven = <&gpio3 20 0>; nxp,nxpnfc-fw-dwnld = <&gpio3 21 0>; }; &iomuxc {         pinctrl_nfc: nfcgrp {                 fsl,pins = <                         MX8MN_IOMUX_SAI5_RXC_GPIO3_IO20                 0X19  // VEN                         MX8MN_IOMUX_SAI5_RXD0_GPIO3_IO21                0X19  // FW-DWNLD                         MX8MN_IOMUX_SAI5_RXD1_GPIO3_IO22                0X19  // IRQ                 >;         }; Show the schematic.  3. Modify the imx8mn_gki.fragment nano vendor/nxp-opensource/kernel_imx/arch/arm64/configs/imx8mn_gki.fragment Add the CONFIG_NXP_NFC_I2C=m 4. Go to the device/nxp/imx8m/evk_8mn/  Modify the BoardConfig.mk. # selinux permissive +BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive BOARD_SEPOLICY_DIRS := \        $(CONFIG_REPO_PATH)/imx8m/sepolicy \        $(IMX_DEVICE_PATH)/sepolicy  \ +       vendor/nxp/nfc/sepolicy \ +       vendor/nxp/nfc/sepolicy/nfc ShareBoardConfig.mk     $(KERNEL_OUT)/drivers/net/phy/realtek.ko \     $(KERNEL_OUT)/drivers/pps/pps_core.ko \     $(KERNEL_OUT)/drivers/ptp/ptp.ko \     $(KERNEL_OUT)/drivers/net/ethernet/freescale/fec.ko +    $(KERNEL_OUT)/drivers/nfc/nfc/nxpnfc-i2c.ko endif     $(KERNEL_OUT)/drivers/trusty/trusty-core.ko \     $(KERNEL_OUT)/drivers/trusty/trusty-log.ko \     $(KERNEL_OUT)/drivers/trusty/trusty-ipc.ko \     $(KERNEL_OUT)/drivers/trusty/trusty-virtio.ko \ +    $(KERNEL_OUT)/drivers/nfc/nfc/nxpnfc-i2c.ko else BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \     $(KERNEL_OUT)/drivers/input/touchscreen/goodix_ts.ko \     $(KERNEL_OUT)/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_i2c.ko Endif Compatibility_matrix.xml             netutils-wrapper         1.0                 android.hardware.emvco         1                      IEmvco             default             device_framework_matrix.xml             nxp.hardware.secureime         1                     ISecureIME             default                         nxp.hardware.imx_dek_extractor         1                     IDek_Extractor             default                         vendor.nxp.nxpnfc         2.0                     INxpNfc             default                         android.hardware.emvco         1                     IEmvco             default             evk_8mn.mk # -------@block_bluetooth------- # Bluetooth HAL PRODUCT_PACKAGES += \     android.hardware.bluetooth \     android.hardware.bluetooth-service.default.nxp # NXP 8987 Bluetooth vendor config PRODUCT_PACKAGES += \     bt_vendor.conf # ------nfc------- $(call inherit-product, vendor/nxp/nfc/device-nfc.mk) $(call inherit-product, vendor/nxp/emvco/device-emvco.mk) PRODUCT_PACKAGES += \         android.hardware.nfc-service.nxp PRODUCT_PACKAGES += \         com.nxp.emvco \         com.nxp.nfc \         nfc_nci_nxp_pn72xx # -------@block_usb------- Init.rc on post-fs && property:vendor.skip.charger_not_need=0     # Swap in only 1 page at a time     write /proc/sys/vm/page-cluster 0     # Grant permission for fetching available_pages info of statsd     chown system system /proc/pagetypeinfo     chmod 0440 /proc/pagetypeinfo     exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d \     /vendor/lib/modules nxpnfc_i2c     write /sys/power/wake_lock nosleep on post-fs-data && property:vendor.skip.charger_not_need=0     setprop vold.post_fs_data_done 1 ueventd.nxp.rc /sys/devices/virtual/thermal/thermal_zone* trip_point_0_hyst 0660 system system /sys/devices/virtual/thermal/thermal_zone* trip_point_1_hyst 0660 system system /dev/dmabuf_imx           0664   system     system /sys/class/backlight/* brightness 0660 system system /dev/ttymxc1              0666   nfc   nfc /dev/ttymxc2              0666   nfc   nfc /dev/nxpnfc               0666   nfc   nfc # for libcamera /dev/media* 0660 system camera /dev/v4l-subdev* 0660 system camera 5.  hardware/interfaces/compatibility_matrices/compatibility_matrix.202404.xml             android.hardware.wifi.hostapd         1                     IHostapd             default                         android.hardware.wifi.supplicant         2                     ISupplicant             default                         nxp.hardware.imx_dek_extractor         1                     IDek_Extractor             default                         vendor.nxp.nxpnfc         2.0                     INxpNfc             default                         vendor.nxp.emvco         1                     INxpEmvco             default             6.  android_build/vendor/nxp/nfc/device-nfc.mk android_build/vendor/nxp/emvco/device-emvco.mk Two approach. 1. NXP NFC Patch to Android AOSP and then build. If the Android release is too new, It will be a lot of errors, 2. Copy the R1 files to R30 first, then run NXP NFC patch. Then build. I use the second. Download the AOSP R1 source code. Copy the R1 replace the folders below. Apply the patches. build the code. Here is the error list and the reference solution.
查看全文
S32K3xx FEE初期化時間 こんにちは、チームの皆さん この FEE の動作についてフィードバックを提供していただけますか? Fee_Init 実行時間はレコードごとに約 1.9 ミリ秒増加すると予想されますか?これはかなりの遅延のようです。 Fee_Example_S32K344 では、初期化ルーチンに MEMIF_IDLE を待機する while ループが含まれています。書き込みとリセットのサイクルを繰り返すと、このルーチンに必要な時間が著しく増加します。 例: 1 回の書き込みとリセット後、初期化には約 1.9 ミリ秒かかります。 100 回の書き込み/リセット サイクル後、遅延は約 190 ミリ秒に増加します。 すべてのデータが正常に保存されるように、FEE への書き込みにはブロッキング操作を使用しています。 簡略化したシナリオは次のようになります。 初期化ルーチン FEEへの書き込み(ブロッキング操作) アプリケーションタスクを実行する リセット リセット後、初期化ルーチンにかかる時間が長くなります。 RTDバージョン3.0.0を使用していますパッチはインストールされていません。 ありがとうございました。 BR、ダニエル RTD Re: S32K3xx FEE initialization time こんにちは@danielmartynek 、 それは正常です。Fee ドライバーは、ユーザー データを仮想ブロックの形式で Fls メモリに保存することによって機能します。Fls への書き込みタスクごとに、レコード (ブロック ヘッダー + ユーザー データ + ステータス有効/無効ブロック) が作成されます。つまり、書き込みサイクルが増えると、より多くのレコードが作成されることになります。リセット後、Fee が初期化されます (Fee_Init + fee_mainfunction + MemAcc_mainfunction)。これは、Fls_memory 内のすべてのレコードをスキャンしてブロック ステータス テーブルを再構築することから構成されます。SO、書き込みサイクルの数が多く、初期化をスキャンする必要があり、レコード/ブロックの検証が大きくなります。 よろしくお願いいたします。 ニ Re: S32K3xx FEE initialization time こんにちは@Nhi_Nguyen 、 あなたの言いたいことは分かりますが、レコードあたり 2 ミリ秒というのはかなり長いように思えます。 品質レポートのプロファイリング レポートには、実際にはマイクロ秒単位でタイミングが表示されます。 よろしくお願いいたします。 ダニエル Re: S32K3xx FEE initialization time こんにちは@danielmartynek 、 実際、Fee_Init() は、いくつかのグローバル変数といくつかのレジスタを設定し、fls のステータスをチェックするだけですが、初期化タスクには {MemAcc_Init()、Fee_Init()、(Fee_Mainfunction()、MemAcc_Mainfunction()、fls がアイドル状態になるまで待機する Getstatus) のループが含まれます}。 クラスター ヘッダー、ブロック ヘッダー、データ ブロックの書き込み、ブロックのフラグ ステータスの書き込みをスキャンするループ。 または、Fee_Write() はグローバル変数を設定するだけですが、書き込みタスクには {Fee_Write(), loop of (Fee_mainfunction(), MemAcc_MainFunction(), GetStatus)} が含まれます。 これらのタスクの実行時間は、ページ サイズ、頻度、キャッシュ、仮想ブロックのサイズなどの構成によって異なります。 パッケージに添付されていた Fee の例で、データが 4 バイトの書き込みタスクを実行してみました。約 1,133 ミリ秒かかりました。 プロファイリング レポートは、タスクではなく各関数の実行時間のみを対象としています。 よろしくお願いいたします。 ニ
查看全文