Multi Source Translation Content

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multi Source Translation Content

Discussions

Sort by:
S32K144 CAN通讯异常 各位大佬:   我发现个异常的现象,我基于S32K144的CAN通讯DEMO整改了一下,在DEMO板可以正常外发报文通讯,我的CAN模块的时钟使用的内部48M的,移植到自制板子通讯也正常,但是我们我把时钟源切换到外部晶振,一旦倍频数值大于28,CAN通讯外发报文功能就消失了,不是特别理解原因,有什么需要特别注意的地方么?   回复: S32K144 CAN通讯异常 我的IDE是S32 for platform 3.5,SDK是4.0.1,我同事的是S32 for ARM 2.2,SDK是4.0.1,SDK是3.0.0,他修改clockout也没有用 你如果倍频输配置到28可以么?工程传不上来,一直加载 回复: S32K144 CAN通讯异常 仅供参考 回复: S32K144 CAN通讯异常 Hi@NanMo 我没看懂,你能详细的解释下嘛 回复: S32K144 CAN通讯异常 更新状态,发现通过S32K144配置时钟树选择配置一下clockout这一路的配置后状态就正常了,大家小心工具,痛并快乐着......   Re: S32K144 CAN通讯异常 Hi@NanMo 我复现了该问题,我也没在数据手册中看到有这样的限制要求,所以我创建了一个内部帖子等待设计团队的人给我一个回复,请你耐心等待。 回复: S32K144 CAN通讯异常 原理未知,可靠性未知,望答复 回复: S32K144 CAN通讯异常 红色框图部分原来我没有修改,默认状态下去生成代码后CAN功能在我使用不同时钟源的状态下功能不一致,后面把这两个选择点开配置成spll sclock,编译烧录发现通讯正常了,再把这里的配置依照印象改回去(不一定和原来一模一样奥),编译烧录发现通讯一直正常,我想知道为啥,折磨了我两天半了 回复: S32K144 CAN通讯异常 Hi@NanMo1 你可以分享这些第三方代码给我,我可以看看。 这个问题我已经在和内部的设计团队进行确认了,这个需要点时间。如果你的项目有需求,你现在FLEXCAN完全可以使用外部的晶振时钟,这个应该是没有问题的。 回复: S32K144 CAN通讯异常 这个账号是我使用公司邮箱注册的账号,这个问题还在困扰着我,但是我发现有部分第三方代码可以实相同配置下的CAN通讯,这个具体原因是什么? 回复: S32K144 CAN通讯异常 Hi@NanMo 我测试将PLL倍频设置为40是工作不OK的,我已经提交了case至设计团队来询问时钟的限制,因为我在数据手册中没看到有这样的限制要求。 其次你说了改了CLKOUT又可以,但是我改了也没用,你要是有成功的例程,你可以发送给我测试一下。 回复: S32K144 CAN通讯异常 Hi@NanMo 如果PLL倍频设置为40,PE时钟选择为外设时钟,我的CAN通信也异常。 回复: S32K144 CAN通讯异常 仅供参考 回复: S32K144 CAN通讯异常 Hi@NanMo1 你提供的工程所使用的时钟是外部晶振时钟,这个有什么问题?这和你的问题不一样吧 回复: S32K144 CAN通讯异常 CAN的PE模块一直都是用的外部时钟,发现如果系统使用外部倍频的时钟有时候CAN不正常,而且在不同板子上现象不一样。 回复: S32K144 CAN通讯异常 我第一次上传的例程就是 回复: S32K144 CAN通讯异常 Hi@NanMo1 上传你的demo 回复: S32K144 CAN通讯异常 我的demo板是100pin的,我的自制板子是64pin的,我在100PIN的基础上直接切换成64PIN会有问题,但是如果切换完后删掉所有的配置重新走配置流程功能就正常了 Re: S32K144 CAN通讯异常 谢谢您的答复。我现在明白了问题的原因。 Re: S32K144 CAN通讯异常 Hi@NanMo 抱歉,让您久等了。 这是 S32 DS IDE 的一个错误。 我发现这是 S32 DS 工具中的一个错误,我录制了一个视频供你参考。 问题在于,我们修改 SPLL 因子后,并没有更新生成的代码,从而导致 FLEXCAN 配置错误。 在"clock_config.c" 中,"SCG_SPLL_CLOCK_MULTIPLY_BY_28" 不会改变,即使我们尝试改变 修改 SPLL 因子。 .spllConfig = { .initialize = true, .monitorMode = SCG_SPLL_MONITOR_DISABLE,/* Monitor disabled */ .locked = false, /* unlocked */ .prediv = (uint8_t)SCG_SPLL_CLOCK_PREDIV_BY_1,/* Divided by 1 */ .mult = (uint8_t)SCG_SPLL_CLOCK_MULTIPLY_BY_28,/* Multiply Factor is 28 */ .src=0U, .div1 = SCG_ASYNC_CLOCK_DIV_BY_2, /* System PLL Clock Divider 1: divided by 2 */ .div2 = SCG_ASYNC_CLOCK_DIV_BY_4, /* System PLL Clock Divider 3: divided by 4 */ }, 1.直接修改底层配置代码。 2.我发现先将运行模式切换到 HSRUN,然后再切换回 RUN,并在此过程中修改 SPLL 因子,这样就能正常生成代码。
View full article
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.
View full article
访问 nxp.com 您好。 如果不使用VPN,就无法访问nxp.com功能域的所有站点。 我收到了错误信息: Access Denied You don't have permission to access "http://mcuxpresso.nxp.com/en/dashboard" on this server. Reference #18.977a7b5c.1754475329.7d13ec17 https://errors.edgesuite.net/18.977a7b5c.1754475329.7d13ec17 也许这些都是按 IP 地址设置停止列表的错误。 恩智浦公司有谁能解决这个问题? Re: Access to nxp.com   同样的问题 您没有权限访问该服务器上的"http://www.nxp.com/" 。 参考 #18.633c655f.1754500173.c79a737 https://errors.edgesuite.net/18.633c655f.1754500173.c79a737
View full article
PN7220 配备一个主机,用于 EMVCo 轮询和 NFC Forum 轮询 大家好, 我计划使用带有 PN7220 的主机 SoC 来支持 EMVCo 和 NFC Forum 轮询。我不确定是否应该使用 I2C、SPI 接口或两者来实现此功能。 读取符合 EMVCo 标准的 MasterCard/Visa 卡是否需要 SPI? 虽然我不需要 PCI 认证,但我确实需要通过万事达卡/维萨卡作为虚拟 POS 接受付款。我可以仅使用 I2C 接口进行 EMVCo 和 NFC 操作吗? 或者,考虑到我的硬件中只有一个运行 Android 的 SoC,我是否应该使用单独的接口,使用 SPI 进行 EMVCo 轮询,使用 I2C 进行 NFC? 您能否建议将 PN7220 连接到基于 Android 的主机的最佳方法?我是否应该动态切换 MODE 引脚以同时支持 EMVCo 和 NFC Forum?我是否需要同时使用 SPI 和 I2C 接口? 谢谢! 回复:PN7220 配备一个主机,用于 EMVCo 轮询和 NFC 论坛轮询 你好@mcihangir ,祝你有个愉快的一天! 非常感谢您对我们的产品感兴趣。 关于使用 PN7220 支持 EMVCo 和 NFC Forum 技术,考虑到您的设置中只有一个 Android 主主机,您可能只使用 PN7220 HIF1 来实现 I2C 通信,因为在单主机模式下 PN7220 支持使用这两种技术,只需切换Mode_Switch_GPI 即可选择这两种技术。 请参阅PN722X NFC 控制器用户手册第 4 节,以深入了解单主机模式的通信流程,并考虑查看表 8。同一文档中的 PN722X GPI 使用情况,以了解Mode_Switch_GPI 的信号处理。 谨致问候, 丹尼尔。
View full article
i.MX95 上の dm-eiq-genai-flow-demonstrator に必要な BSP バージョン こんにちは、チーム 私は、Yocto 環境内で動作する i.MX95 プラットフォーム上の dm-eiq-genai-flow-demonstrator (GenAI Flow) を調査しています。以下を明確にしていただけますか: 1.デモをエンドツーエンドで実行するために最低限必要な BSP バージョン (例: L6.12.20_2.0.0) は何ですか? 2.この BSP には、LLM 推論 (RAG) をサポートするために必要なすべての要素 (更新された Neutron デリゲート、TFLite ランタイム、ツールなど) が含まれていますか? 3.このデモに推奨される追加の Yocto メタレイヤーまたはイメージレシピ (たとえば、meta-eiq-genai) はありますか? ご意見をよろしくお願いします! よろしくお願いします、 ヴァルシル・ガンジー Re: BSP Version Required for dm-eiq-genai-flow-demonstrator on i.MX95 こんにちは、ヴァルシルさん。 ご質問ありがとうございます。 それらの質問に答えてみたいと思います。 1. このパッケージは当初、i.MX95 rev Ax の Q1 BSP L6.12.3-1.0.0 用に作成されました。 2. このQ1 BSPには、LLM推論でNeutronを活用するために必要な機能が直接含まれていません。そのため、このパッケージはメタレイヤーを提供しています。 3. この meta-eiq-genai-flow メタレイヤーは、Neutron 上の LLM 操作を高速化し、CPU リソースの一部を解放するための Onnxruntime Neutron 実行プロバイダーを追加する可能性を提供します。これにはカーネルと Neutron Fw 用の関連パッチ/ファイルが含まれます。なお、このプロジェクトでは TF Lite ではなく onnxruntime を使用しています。 とはいえ、 Q2 BSP (例:L6.12.20_2.0.0)が本日リリースされます。i.MX95のB0リビジョンをサポートしていますが、NeutronのLLMアクセラレーションが利用できないため、CPUモードのみで動作します。 ありがとう、そしてよろしく。 ピエール  
View full article
无法安装S32K3xx开发包和FreeMASTER串行通信驱动程序版本1.3.0 我已经收到了S32K3X4EVB-T172。 问题 1 :当我尝试安装 S32DS 3.5.9 时,我无法通过SW32_S32DS_3.5.9_D2312.zip安装S32K3xx 开发包,仅显示S32 Design Studio 平台包和S32 Design Studio 平台工具包。 2.获取软件:2.2 安装S32K3xx开发包 打开关于 S32 平台的 S32 设计工作室对话框(菜单 → 帮助 → 关于 S32 平台的 S32 设计工作室)显示以下内容: 面向 S32 平台的 S32 设计工作室 版本:3.5 版本号:231219(更新 9) 问题 2 :我已经在步骤“2.4获取运行时调试工具”,但我无法在S32DS 扩展和更新对话框(菜单 → 帮助 → S32DS 扩展和更新)上安装“FreeMASTER 串行通信驱动程序版本 1.3.0”。 错误信息如下: 操作详情 正在安装的软件:com.nxp.s32ds.s32k3.sdk.freemaster.feature.feature.group 1.3.0.202312191400缺少要求:com.nxp.s32ds.s32k3.sdk.freemaster.feature.feature.group 1.3.0.202312191400 需要“org.eclipse.equinox.p2.iu;com.nxp.s32ds.s32k3.dev.feature.feature.group 1.0.0”但找不到。 安装详情: 软件包:适用于 Arm 嵌入式处理器 12.1 Build 1702 的 GDB 客户端;版本:1702;构建 ID:202309251304 软件包:S32 Design Studio 平台软件包;版本:3.5.9;版本号:202312191958 软件包:S32K3 RTD AUTOSAR R21-11 版本 3.0.0;版本:3.0.0;版本号:202303311831 软件包:S32K3.P01 RTD AUTOSAR R21-11 版本 3.0.0;版本:3.0.0;版本号:202304031555 软件包:GNU ARM PEMicro 接口调试支持;版本:5.1.7;版本号:202112141853 软件包:S32 Design Studio 平台工具包;版本:3.5.9;版本号:202312191958 软件包:NXP GCC for Arm Embedded Processors Build 1620;版本:1620;版本号:202005201521 软件包:S32 Design Studio Debugger Core;版本:3.5.9;版本号:202312191723 回复:无法安装S32K3xx开发包和FreeMASTER串行通信驱动程序版本1.3 我已经安装了FreeMASTER 1.3.0 RTM (FMASTERSW32.exe),之后我从 SW32K3xx_S32DS_3.5.0_D2303.zip 安装了 S32K3xx 开发包(从以前的版本 S32DS 3.5.3 上传)。
View full article
为 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] 请就我们面临的自定义监牢创建问题(如上述票单中所述)提出一些解决方案? 感谢您的支持。 请与我们联系,了解任何需要的更多细节。
View full article
使用 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" /> 你好,谢谢你的信息。由于某些原因,链接不起作用。您能否提供分析电子表格的新链接?谢谢,马克
View full article
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 设计工具,我希望它的作者能够扩展其功能。 用户内容
View full article
フリースケール・カップ・ワールドワイド・ファイナル2015トレーニング・ハイライトをご覧ください <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> トレーニング・セッションについては、フリースケール・カップ・ワールドワイド・ファイナル2015のハイライト・ビデオをご覧ください。クレジット:Fraunhofer IIS (マイビデオで視聴) フリースケール・カップの内容
View full article
通用更新工具 (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 应用处理器
View full article
i.MX95 Triple display Linux Patch i.MX95 Triple Display Patches for LF-6.6.52-2.2.0 BSP. iMX95 19x19 EVK. qiang_limpu_se_0-1739859470230.png   Patches files: 0001-iMX95-EVK-IT6263-LVDS-to-HDMI-bridge-chip-combine-it.patch Combine IT6263 with simple panel driver, no EDID is needed, 720P and 1080P display mode had been added as two examples.   0002-IT6263-Always-reported-connected-for-force-output.patch Let IT6263 always report cable connected to force output HDMI signals.   0003-iMX95-EVK-add-LVDS-clone-mode-based-on-IT6263.patch LVDS clone mode is supported on two LVDS ports, they output same content and same timing from one DPU display engine (1920*1080@60fps).   0004-iMX95-EVK-add-dual-LVDS-interleaver-mode-based-on-IT.patch LVDS interleave mode is supported on two LVDS ports, they output different content and same timing from one DPU display engine (3840*1080@60fps).   0005-iMX95-EVK-add-triple-display-support.patch Triple display is supported, 1 MIPI DSI + 2 LVDS.  imx95-19x19-evk-triple-display-lvds-clone.dtb: the two LVDS is in clone mode. imx95-19x19-evk-triple-display-lvds-interleaver.dtb: the two LVDS is in interleave mode.   For 1 MIPI DSI + 2 LVDS display clone mode: qiang_limpu_se_0-1739858854733.png For 1 MIPI DSI + 2 LVDS Interleave mode: qiang_limpu_se_2-1739859096402.png Know issues:  Due to bridge numbers (3) and DPU engine/Pixel link/Pixel Interleaver number (2) is not aligned, during kernel boot up, there will be followed link error log, but there is no real function impact.   [    3.178741] imx95-ldb 4b0c0000.syscon:ldb@4: Failed to create device link (0x180) with 4b010000.syscon:bridge@8 ... [    4.209299] imx95-pixel-interleaver 4b0d0000.bridge: Failed to create device link (0x180) with 4b400000.display-controller [    4.220355] imx95-pixel-interleaver 4b0d0000.bridge: Failed to create device link (0x180) with 4b400000.display-controller ...     2025-8-19 update: Add the patch for L6.12.20_2.0.0 BSP. lf-6.12.20-2.0.0_triple_display_patches.zip   2026-9-7 update: Add patch for L6.18.37_2.1.0 BSP based on FRDM-IMX95.   BL: Auto BL: non-Auto
View full article
[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
View full article
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周,之后的回复将被忽略。 如果您之后有相关问题,请另开新帖并引用已关闭的帖子。 -------------------------------------------------------------------------------
View full article
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
View full article
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
View full article
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 中,结果成功了。
View full article
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 よろしくお願いします、 志明
View full article
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)
View full article
EB 客户许可证管理员 我使用的是 Tresos Studio 29.2。此前,在使用 MPC574xB 时,注册是成功的,一切运行正常。但是,既然我们已经切换到 S32K314 平台并尝试使用相应的激活码将其激活,则出现了以下错误: 错误:flxactappActivationSend (50040,41147,10248) 该激活请求不产量获得许可证的权利。 与 FlexNet Operations Server 的连接失败。 请问问题出在哪里,EB 真的只支持一个平台吗? 电源 Re: EB ClientLicenseAdministrator 你好、 请检查您的账户,获取新的激活代码。此外,还存在可用许可证数量的问题。我已经联系了许可证管理部门来解决这个问题。 Re: EB ClientLicenseAdministrator 我通过下面的网站重新获取了最新的激活代码,但发现还是以前的激活代码,无法成功激活。接下来我该怎么办? 设计 :产品下载 :文件
View full article