Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
Zephyr培训资源 以下是一些资源,帮助您更好地了解Zephyr: 本篇 恩智浦 Zephyr 入门教程将通过 MCUXpresso for VS Code 和 MCUXpresso Installer 向您介绍所有 Zephyr 环境设置步骤,帮助您构建并运行第一个 Zephyr 应用程序。 本分步实验室指南(来自恩智浦技术日培训)从 " Hello,World " 开始,然后引导您完成有关 Kconfig、设备树和调试方法的有用教程: 实践研讨会:在 Visual Studio Code 中使用 Zephyr™ 操作系统进行开发 本教程展示了 Zephyr 强大的便携性。演示了将 FRDM-MCXN947 的 LVGL 演示移植到 FRDM-RW612 的简单步骤: 恩智浦 Zephyr 显示器便携性演示 想了解更多?访问我们 Zephyr 登录页面的 “培训” 部分,查找恩智浦在线研讨会和在线培训 ——只需点击页面顶部的 “培训” 选项卡即可 返回 Zephyr 知识中心
View full article
KW38 - 使用 OTAP 客户端软件对 KW38 设备进行重新编程 简介 空中编程(OTAP)是NXP提供的一项基于蓝牙低功耗(Bluetooth LE)的定制服务,提供升级微控制器中运行的软件的解决方案。本文件指导用户通过空中编程(OTAP)Bluetooth LE服务,将新的软件镜像加载到KW38设备中。。 软件要求 MCUXpresso IDE 或 IAR Embedded Workbench IDE。 FRDM-KW38 SDK。 IoT Toolbox 应用程序,适用于 Android 和 iOS 系统。你也可以从以下帖子下载 IoT Toolbox 应用程序的 APK 文件:Android 版 IoT Toolbox 硬件要求 FRDM-KW38板。 带有 IoT Toolbox 应用程序的智能手机。 OTAP 客户端软件在更新过程中使用的 KW38 闪存 默认情况下,512KB KW38 闪存被分区为: 一个 256KB 的程序闪存阵列 (P-Flash),分为 2KB 的扇区,闪存地址范围从 0x0000_0000 到 0x0003_FFFF。 一个256KB的FlexNVM数组,分为2KB的扇区,地址范围从0x1000_0000到0x1003_FFFF。 别名内存 (Alias memory),地址范围从 0x0004_0000 到 0x0007_FFFF。对别名内存的写入或读取操作分别会修改或返回 FlexNVM 的内容。换句话说,别名内存是使用不同地址来访问 FlexNVM 内存的另一种方式。 以下几点将简化说明 OTAP 服务的工作原理:   OTAP 应用程序由两个独立的部分组成,即 OTAP 引导加载程序和 OTAP 客户端。OTAP 引导加载程序会验证 OTAP 客户端中是否有可用的新镜像,以对设备进行重新编程。另一方面,OTAP 客户端软件提供了所需的蓝牙低功耗自定义服务,使 OTAP 客户端设备(待重新编程的设备)能够与 OTAP 服务器设备(包含用于重新编程 OTAP 客户端设备的镜像的设备)进行通信。因此,首次准备软件时,需要对 OTAP 客户端设备进行两次编程,首先是 OTAP 引导加载程序,然后是 OTAP 客户端软件。使两个不同的软件能够在同一设备中共存的机制是将它们分别存储在不同的内存区域。这是通过在链接器文件中为每个软件指定不同的内存区域来实现的。对于 KW38 设备,OTAP 引导加载程序预留了一个从 0x0000_0000 到 0x0000_1FFF 的 8KB 存储空间,因此,内存的其余部分除其他用途外,由 OTAP 客户端软件预留。     为 OTAP 客户端设备生成新的镜像文件时,我们需要在链接器文件中指定代码将以 8KB 的偏移量进行放置(就像 OTAP 客户端软件所做的那样),因为必须保留这些地址范围以避免覆盖 OTAP 引导加载程序。新应用程序还应在相应的地址包含引导加载程序标志,以确保其正常工作(稍后我们将回到这一点)。     当 OTAP 客户端设备和 OTAP 服务器设备连接且正在进行下载时,OTAP 服务器设备通过蓝牙低功耗将镜像数据包(称为块)发送到 OTAP 客户端设备。OTAP 客户端设备可以将这些块存储在外部 SPI 闪存(FRDM-KW38 开发板上已预装)或片上 FlexNVM 区域中。这些块的存储目的地可在 OTAP 客户端软件中选择(本文将提供修改存储目的地的说明)。     当镜像传输完成且所有块都已从 OTAP 服务器设备发送到 OTAP 客户端设备后,OTAP 客户端软件会将诸如软件更新源(外部闪存或 FlexNVM)之类的信息写入称为引导加载程序标志的内存部分。然后,OTAP 客户端对微控制器(MCU)执行软件复位,以执行 OTAP 引导加载程序代码。接着,OTAP 引导加载程序代码读取引导加载程序标志,以获取使用新应用程序对设备进行重新编程所需的信息。请参见以下流程图,该图解释了这两个应用程序的流程。   由于新应用程序是按 8KB 的偏移量构建的,因此 OTAP 引导加载程序从 0x0000_2000 地址开始对设备进行编程,因此,OTAP 客户端应用程序会被新镜像覆盖。然后,OTAP 引导加载程序转移应用程序的流程,开始执行新代码。     实际上,如第 3 点所述,当启用 FlexNVM 存储时,OTAP 客户端软件和软件更新之间的边界并非恰好位于 P-Flash 和 FlexNVM 内存区域的边界上,此外,这些值可能会根据你的链接器设置而变化。要了解边界的位置,你应该检查项目中的实际内存地址。       在 IAR Embedded Workbench IDE 中配置和编程 OTAP 客户端软件 如最后一节所述,要完成 OTAP 实现所需的软件,需要在 FRDM-KW38 开发板上编程两个软件,即 OTAP 引导加载程序和 OTAP 客户端。本节将指导你使用 IAR Embedded Workbench IDE 进行编程,并配置设置以在外部存储和内部存储之间进行选择。 1- 第一步是在 KW38 中编程 OTAP 引导加载程序。解压 SDK,然后在以下路径中找到 OTAP 引导加载程序软件: \boards\frdmkw38\wireless_examples\framework\bootloader_otap\bm\iar\bootloader_otap.eww 2- 点击 “Download and Debug” 图标 (Ctrl + D),在开发板上编程 OTAP 引导加载程序项目。 KW38 编程完成并开始调试会话后,中止会话 (Ctrl + Caps Lock + D) ,以安全地停止 MCU。 3- 此时,您已将OTAP引导程序编程到您的KW38中。接下来是编程和配置 OTAP 客户端软件。请在以下路径找到 OTAP 客户端软件: FreeRTOS项目版本: \boards\frdmkw38\wireless_examples\bluetooth\otac_att\freertos\iar\otap_client_att_freertos.eww 裸机 (Baremetal) 项目版本: \boards\frdmkw38\wireless_examples\bluetooth\otac_att\bm\iar\otap_client_att_bm.eww 4- 然后,配置 OTAP 客户端以选择外部存储或内部存储。 要选择外部存储,请按照以下步骤操作(这是 SDK 项目中的默认配置): 4.1- 在工作区的源文件夹中找到 “app_preinclude.h” 头文件。搜索 “gEepromType_d” 定义,并将其值设置为 “gEepromDevice_AT45DB041E_c”。 /* Specifies the type of EEPROM available on the target board */ #define gEepromType_d gEepromDevice_AT45DB041E_c 4.2- 打开项目选项窗口 (Alt + F7)。在 “Linker->Config” 窗口中,设置 “gUseInternalStorageLink_d=0”。   要选择内部存储,请按照以下步骤操作: 4.1 - 在工作区的源文件夹中找到 “app_preinclude.h” 头文件。搜索 “gEepromType_d” 定义,并将其值设置为 “gEepromDevice_InternalFlash_c”。 /* Specifies the type of EEPROM available on the target board */ #define gEepromType_d gEepromDevice_InternalFlash_c 4.2- 打开项目选项窗口 (Alt + F7)。在 “Linker->Config” 窗口中,设置 “gUseInternalStorageLink_d=1”。   5- 配置好存储设置后,保存项目中的更改。然后点击 “Download and Debug” 图标(Ctrl + D) ,在开发板上编程软件。KW38 编程完成并开始调试会话后,中止会话 (Ctrl + Caps Lock + D) ,以安全地停止 MCU。 在 IAR Embedded Workbench IDE 中创建用于更新 OTAP 客户端软件的 SREC 镜像 本节将展示如何以无线示例为起点,创建与 OTAP 兼容的镜像,以使用 IAR Embedded Workbench IDE 对 KW38 OTAP 客户端进行重新编程。 1- 从 SDK 包的 Bluetooth 文件夹中选择任意示例,使用 IAR IDE 打开。Bluetooth 示例位于以下路径: \boards\frdmkw38\wireless_examples\bluetooth  在本示例中,我们将使用葡萄糖传感器项目: \boards\frdmkw38\wireless_examples\bluetooth\glucose_s\freertos\iar\glucose_sensor_freertos.eww 2- 打开 IAR 中的项目选项窗口 (Alt + F7)。在 “Linker->Config” 窗口中,编辑选项以包含 “gUseBootloaderLink_d=1” 标志,并更新 “gEraseNVMLink_d=0” 标志。当 gUseBootloaderLink_d 标志为 true 时,它向链接器文件指示镜像必须在第一个闪存扇区之后寻址,以避免覆盖 OTAP 引导加载程序软件(如我们之前所述)。另一方面,gEraseNVMLink_d 符号用于用 0xFF 模式填充未使用的 NVM 闪存区域。禁用此标志后,我们的软件镜像将不包含此模式,因此,镜像的总大小会减小,并提高 OTAP 下载速度和内存使用率。 3- 进入 “Output Converter” 窗口。取消选中 “Override default” 复选框,然后展开 “Output format” 下拉框,选择 “Motorola S-records” 格式。点击 “OK” 按钮完成设置。 4- 构建项目。 5- 在以下路径中找到 S-Record 文件 (.srec),并将其保存到智能手机上的已知位置。 \boards\frdmkw38\wireless_examples\bluetooth\glucose_s\freertos\iar\debug\glucose_sensor_freertos.srec 在 MCUXpresso IDE 中配置和编程 OTAP 客户端软件 如前文所述,为了完成OTAP实现,您需要在FRDM-KW38上编写两个软件:OTAP引导加载程序和OTAP客户端。本节将指导您使用MCUXpresso IDE对设置进行编程和配置,以选择外部存储或内部存储。 1- 打开 MCUXpresso IDE。在"快速入门面板"中点击"导入SDK示例"。 2- 选择 FRDM-KW38 图标,然后点击 “Next>”。 3- 导入 OTAP 引导加载程序项目。它位于 “wireless_examples -> framework -> bootloader_otap -> bm -> bootloader_otap”。点击 “Finish” 按钮。 4- 点击 “Debug” 图标 ,在开发板上编程 OTAP 引导加载程序项目。KW38 编程完成并开始调试会话后,中止会话 (Ctrl + F2),以安全地停止 MCU。 5- 重复步骤 1 到 3,在 MCUXpresso IDE 中导入 OTAP 客户端软件。对于 FreeRTOS 版本,它位于 “wireless_examples -> bluetooth -> otac_att -> freertos -> otap_client_att_freertos”;如果你更喜欢裸机版本,则位于 “wireless_examples -> bluetooth -> otac_att -> bm -> otap_client_bm_freertos”。。 6- 然后,配置 OTAP 客户端以选择外部存储或内部存储。 要选择外部存储,请按照以下步骤操作(这是 SDK 项目中的默认配置): 6.1- 在工作区的源文件夹下找到 “app_preinclude.h” 文件。搜索 “gEepromType_d” 定义,并将其值设置为 “gEepromDevice_AT45DB041E_c”。 /* Specifies the type of EEPROM available on the target board */ #define gEepromType_d gEepromDevice_AT45DB041E_c 6.2- 导航至 “Project -> Properties -> C/C++ Build -> MCU settings -> Memory details”。按照下图所示编辑 Flash 字段,保持 RAM 不变。 要选择内部存储,请按照以下步骤操作: 6.1- 在工作区的源文件夹下找到 “app_preinclude.h” 文件。搜索 “gEepromType_d” 定义,并将其值设置为 “gEepromDevice_InternalFlash_c”。 /* Specifies the type of EEPROM available on the target board */ #define gEepromType_d gEepromDevice_InternalFlash_c 6.2- 导航至 “Project -> Properties -> C/C++ Build -> MCU settings -> Memory details”。按照下图所示编辑 Flash 字段,保持 RAM 不变。 7- 配置好存储设置后,保存项目中的更改。然后点击 “Debug” 图标 ,在开发板上编程软件。KW38 编程完成并开始调试会话后,中止会话 (Ctrl + F2),以安全地停止 MCU。 在 MCUXpresso IDE 中创建 SREC 镜像以更新 OTAP 客户端中的软件 本节将展示如何以无线示例为起点,创建与 OTAP 兼容的镜像,以使用 MCUXpresso IDE 对 KW38 OTAP 客户端进行重新编程。 1- 如前所述,从 SDK 包的 Bluetooth 文件夹中导入任意示例。在 SDK 导入向导中,Bluetooth 示例位于 “wireless_examples -> bluetooth” 文件夹中。本示例将使用 “wireless_examples -> bluetooth -> glucose_s -> freertos -> glucose_sensor_freertos” 中的葡萄糖传感器项目。见下图。 2- 导航至 “Project -> Properties -> C/C++ Build -> MCU settings -> Memory details”。按照下图所示编辑 Flash 字段,保持 RAM 不变。最后几个字段向链接器文件指示镜像必须在第一个闪存扇区之后寻址,以避免覆盖 OTAP 引导加载程序软件,如我们在本文简介中所述。 3- 解压 KW38 SDK 包。将 “main_text_section.ldt” 链接脚本从以下路径拖放到工作区的 “linkscripts” 文件夹中。结果应与下图类似。 \middleware\wireless\framework\Common\devices\MKW38A4\mcux\linkscript_bootloader\main_text_section.ldt 4- 在 MCUXpresso IDE 中打开位于 linkscripts 文件夹中的 “end_text.ldt” 链接脚本文件。找到下图所示的部分,并删除 “FILL” 和 “BYTE” 语句。BYTE 和 FILL 行用于用 0xFF 模式填充未使用的 NVM 闪存区域。删除此代码后,我们的软件镜像将不包含此模式,因此,镜像的总大小会减小,并提高 OTAP 下载速度和内存使用率。 5- 打开 “app_preinclude.h” 文件,将 “gEepromType_d” 定义为内部存储。这是一个必要的虚拟定义,用于将引导加载程序标志放置在正确的地址,因此,这不会影响你之前在 MCU 中编程 OTAP 客户端和 OTAP 引导加载程序软件时选择的存储方法。 /* Specifies the type of EEPROM available on the target board */ #define gEepromType_d gEepromDevice_InternalFlash_c 6- 在项目的 “framework” 文件夹中包含 “OtaSupport” 文件夹及其文件。同时在项目的 “framework -> Flash” 文件夹中包含 “External” 文件夹及其文件。“OtaSupport” 和 “External” 文件夹可在 SDK 中找到。你可以轻松地从 SDK 下载路径中拖动这些文件夹并将其放入 MCUXpresso 的工作区中。“OtaSupport” 和 “External” 文件夹位于: OtaSupport middleware\wireless\framework\OtaSupport External 中间件\无线\框架\Flash\External 结果应如以下图所示:  7- 依次进入 “Project -> Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU C Compiler -> Includes”。点击 “Include paths” 旁边的图标(见下图)。会弹出一个新窗口,然后点击 “Workspace” 按钮。 8- 在 “Folder selection” 窗口中展开项目目录,然后选择 “framework -> Flash -> External -> interface”(框架 -> 闪存 -> 外部 -> 接口)和 “framework -> OtaSupport -> interface” 文件夹。点击 “OK”按钮保存更改。 9- 确保 “OtaSupport” 和 “External” 文件夹已导入 “Include paths” 窗口中。然后点击 “Apply and Close” 按钮保存更改。 10- 点击此图标 保存并构建项目。然后,展开项目中的 “Binaries” 图标。右键点击 “.axf” 文件,选择 “Binary Utilities -> Create S-Record” 选项。生成的 S 记录文件将以 “.s19” 为扩展名保存在工作区的 Debug 文件夹中。将该 S 记录文件保存到智能手机上的已知位置。 使用 IoT Toolbox 应用程序测试 OTAP 客户端 本节介绍如何使用 IoT Toolbox 应用测试 OTAP 客户端软件。 1- 在你的智能手机上打开 IoT Toolbox 应用。选择 OTAP,然后点击 “SCAN” 以开始扫描合适的 OTAP 客户端设备。  2- 按下 FRDM-KW38 开发板上的 ADV 按钮 (SW2) 以开始广播。 3- 当你的智能手机找到 FRDM-KW38 开发板后,该设备将显示为 “NXP_OTAA”。将你的智能手机与此设备连接。随后,智能手机上会显示一个新窗口。  4- 点击 “Open” 按钮,查找 SREC 软件更新文件。 5- 点击 “Upload” 开始传输。等待下载完成。更新成功后,会显示确认消息。  6- 等待几秒钟,直到软件更新被编程到你的 MCU 中。新代码将自动开始运行。 如果对本主题有任何问题,请告知我。 BLE软件 千瓦 回复:KW38 - 使用 OTAP 客户端软件对 KW38 设备进行重新编程 嗨,EdgarLomeli   很多人无法使用 Google 应用商店,你能提供 IoT Toolbox 的最新 apk 安装包吗?  非常感谢。
View full article
Unable to debug i.MXRT1064 custom board. Hi,       I'm getting "Break at address "0x20d102" with no debug information available" message while trying to run my code in debug mode.       I'm using i.MXRT1064 custom board and programming it using, LinkServer LPC-Link2.       This board was working earlier without issue but now all of a sudden, this message appears.        I'm tried Release mode. I can successfully flash my board with the release code but then it seems the program doesn't run. I don't see any output, either from serial terminal or from display.       I also tried programming this board using Secure Provisioning Tool but it still doesn't work.         Can anyone help on where to focus or any leads for this issue? Re: Unable to debug i.MXRT1064 custom board. Hi MayLiu,        Thanks for your response.         Earlier, I did try that setting as suggested by you, but the IDE prompted an error (Failed to execute MI command: -target-download) when try to debug. I have attached a snapshot of that error for your reference.         Going back to the previous message, I wish to add that when I checked the address of where the current program is executing, it was showing that the code is in ROM region (address 0x20E35A). So somehow the code is unable to reach/start application code and is struck in ROM. Is my assumption correct? Can there be such a scenario? Re: Unable to debug i.MXRT1064 custom board. Hi @nxpsachve , Thank you so much for your interest in our products and for using our community. 1: Please try select Link application to RAM, then debug again. If your application can run successfully from RAM, please set the board as Serial Downloader mode, and then use the Secure Provisioning Tool to program your board by UART1 or USB1.   If your application  fails to run, I suggest you using an oscilloscope to check your board the power‑on sequence.   Wish it helps you. Best Regards MayLiu Re: Unable to debug i.MXRT1064 custom board. Hi @nxpsachve , I do not think MCUXpresso IDE  change BOOT configuration,  Boot behavior on NXP RT is determined by hardware boot config and boot mode pins.  Since the target can be detected in Serial Downloader mode, this indicates that the ROM is still running correctly. As a next step, you could: Perform a full chip erase, Switch the board to Internal Boot mode, and Try reconnecting with MCUXpresso IDE for debugging. Alternatively, you may also use the MCUXpresso Secure Provisioning Tool to program the application image. Best Regards MayLiu Re: Unable to debug i.MXRT1064 custom board. Hi MayLiu, Thanks for your suggestion. I would like to check if there are any such setting/configuration within MCUXpresso that can alter or impact the BOOT Conf? Just to rule out the IDE. The link server is able to detect the target when in serial download mode. Re: Unable to debug i.MXRT1064 custom board. Hi @nxpsachve , Thanks for your updated information. Based on the information you provided, it is possible that the CPU is currently executing code from the Boot ROM rather than your application code.   I would suggest checking the BOOT CFG and BOOT mode pin settings, ensuring that the device is configured to boot from user flash.   You may also try to set your board as serial downloader mode and then connecting via J-Link to confirm whether the debugger can  detect and communicate with the target.   Best Regards MatLiu
View full article
[Beginner's Guide] How to Build Yocto Linux BSP - i.MX FRDM Board Edition (Japanese Blog) This guide will show you how to build Yocto Linux using the i.MX FRDM board as a base. This article uses the FRDM-IMX93 as an example, but the same procedure can be used to build on other i.MX FRDM boards. The Yocto Linux BSP is described using "Linux 6.12.49_2.2.0 ( Yocto 5.2 “Walnascar” )" as an example. Q: What is an i.MX FRDM board? A: The i.MX FRDM board is a development board designed to be more affordable and compact compared to NXP's full-featured EVK board, with fewer features. Its purpose is to allow for easy basic evaluation and prototyping. 1. Environment & Preparation 1.1. environment Major items Minor item Content remarks Document - IMX_YOCTO_PROJECT_USERS_GUIDE.pdf (This is the primary method used. It describes the procedure for building the BSP .) i.MX Linux ® Release Notes (You can view a list of support features.) i.MX Porting Guide (Summary of points to note when actually implementing) Download general Yocto Linux documentation here. Hardware FRDM board FRDM-IMX8MPLUS FRDM-IMX91S FRDM-IMX91 FRDM-IMX93 FRDM-IMX95 (Coming Soon) This chapter will use the FRDM-IMX93 as a basis for explanation. Try PC Ubuntu environment ・VMWare/Virtual Box etc. (on Windows) Native Linux one of the following Recommended: Ubuntu 22.04 or later SD card + reader/writer 16GB or more recommended   Hardware (Option) MIPI-Camera (Option) BSP-compatible MIPI camera (See i.MX Linux ® Release Notes) A USB camera can be used as an alternative (though this may result in latency). Display (Option) Display   USB Device (Option) USB mouse, USB memory stick   Headphone (Option) 3.5mm earphones Earphones with a microphone (such as the earphones that came with older iPhones) are better. Software Yocto environment Linux BSP (This time, we used Linux 6.12.49_2.2.0 ( Yocto 5.2 “Walnascar” )) This article explains the installation process, including how to install the software. 1.2. Legend Legend for the Command Prompt =>           u-bootプロンプト $            BSPがインストールされているLinux PCのプロンプト 2. Host machine Ubuntu 22.04 Desktop is recommended. For practical use, a host machine with at least 8 threads and 16GB of RAM is recommended for a reasonably comfortable experience. The required storage will vary depending on the target recipe, but it will be around 50GB for small projects and 500GB for larger ones. 2.1. Packages required for Yocto Please install the necessary packages using the following steps. $ sudo apt-get install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3- jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xzutils zstd efitools curl Note: In addition to the information in IMX_YOCTO_PROJECT_USERS_GUIDE.pdf, curl has been added. 2.2. Configuring the swap file Here's an example of setting up a 32GB swap file. $ sudo fallocate -l 32G /swapfile $ sudo chmod 600 /swapfile $ sudo mkswap /swapfile $ sudo swapon /swapfile Note: If /swapfile already exists, the command on the first line will fail. If you want to change the size, execute the following and then run the command above again. $ sudo swapoff /swapfile $ sudo rm /swapfile To automatically mount the swap file when the host machine starts up, add the following line to /etc/fstab : /swapfile none swap sw 0 0 3. Yocto Linux BSP From the Embedded Linux for i.MX Applications Processors section on nxp.jp, select the required Linux BSP version and obtain the i.MX Yocto Project User's Guide. Create the image following the steps in "4 Yocto Project Setup" of the i.MX Yocto Project User's Guide (IMXLXYOCTOUG). This document is written assuming the following settings are used to generate the image. DISTRO = fsl-imx-xwayland MACHINE = imx93-11x11-lpddr4x-frdm 3.1. Setting up and building Yocto BSP For host machine setup, please refer to 2. Host Machine. 3.1.1. Installing the repo utility $ mkdir ~/bin $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo 3.1.2. Add the repository to your PATH Add the following line to $HOME/.bashrc : export PATH=~/bin:$PATH 3.1.3. Git Setup $ git config --global user.name "Your Name" $ git config --global user.email "Your Email" $ git config --list 3.1.4. Yocto BSP Setup $ mkdir imx-yocto-bsp $ cd imx-yocto-bsp $ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-walnascar -m imx-6.12.49-2.2.0.xml $ repo sync 3.1.5. Set build target, build $ MACHINE=imx93-11x11-lpddr4x-frdm DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b build $ bitbake imx-image-full *Once the build is complete, a Linux image will be generated. * For instructions on how to write the generated image, please refer to steps 1 and 2 of the Start Guide for your specific FRDM board. FRDM-IMX8MPLUS Start Guide FRDM-IMX91 Start Guide FRDM-IMX91S Start Guide FRDM-IMX93 Start Guide Note: If you want to build a Linux BSP for other FRDM boards, replace the " MACHINE= " part of the command above with the following name. imx8mp-lpddr4-frdm (FRDM-IMX8MPLUS) imx91-11x11-lpddr4-frdm (FRDM-IMX91) imx91-11x11-lpddr4-frdm-imx91s (FRDM-IMX91S) imx93-11x11-lpddr4x-frdm (FRDM-IMX93) imx95-15x15-lpddr4x-frdm (FRDM-IMX95) Note: For graphics functionality, you can also select the distribution using the " DISTRO = " part of the command above. fsl-imx-wayland (Wayland) fsl-imx-xwayland (Not compatible with X11 apps that use Wayland & X11 *EGL) Note: The setup using the imx-setup-release.sh script should only be done once per project. Doing so on an existing project will generate new files such as conf/local.conf , and your previous settings will be lost. If you wish to reuse an existing project... 3.3.1. See "Resuming work from an existing build directory". Note: Depending on the host machine's specifications, the build process may take several tens of hours. Also, expect it to consume 400-500GB of storage. Note: When building on a multi-core, multi-threaded host machine, swapping occurs if there is insufficient memory for the number of threads. Limiting the number of threads is covered in section 3.4.2. See Limiting the number of threads that run during the build process. Note: In the initial state of Ubuntu 22.04, swap may not be configured, which can cause extreme slowness or crashes. The swap file configuration is as follows: 2.2. Please refer to the section on configuring swap files. *The following information is for reference only. 3.2. Building and Installing the Toolchain You can build and install toolchains such as cross-compilers. By using the scripts generated here, you can avoid problems that often occur during cross-compilation, such as not being able to find include files or libraries to link. 3.2.1. Toolchain build $ bitbake imx-image-full -c populate_sdk 3.2.2. install $ tmp/deploy/sdk/fsl-imx-xwayland-glibc-x86_64-imx-image-full-armv8a-imx93-11x11-lpddr4x-pf0900-evk-toolchain-6.12-walnascar.sh We will not explain how to use the toolchain here. 3.3. Frequently used Yocto bitbake commands and settings 3.3.1. Resume work from the existing build directory. $ cd /path/to/imx-yocto-bsp $ source ./setup-environment build Note: The paths and directories mentioned here are from section 3.1.4. Yocto BSP setup, 3.1.5. The build target settings were configured during the build process. Below, we will give some command examples using linux-imx as an example. You can do the same thing for each package by changing " linux-imx " to a different package name. 3.3.2. Rebuilding the package $ bitbake -c compile linux-imx -f $ bitbake -c install linux-imx $ bitbake -c deploy linux-imx If you do not include the note -f , the steps may be skipped. Note - Some packages may show an error when deploying using `-c deploy` , but in most cases this is simply because the `do_deploy` command is not available, so you can ignore the error. 3.3.3. Deleting Packages If an error occurs with a package that shouldn't normally happen, try deleting the package using the following command and trying again. This may resolve the error. (This is because packages may be corrupted during download, or junk data may remain if the build process is terminated prematurely.) $ bitbake -c cleansstate linux-imx Note: The extracted source code will be deleted, so please be careful if you have any files you are currently editing. 3.3.4. Package Extraction If you only want to extract the package and do not want to compile it yet $ bitbake -c patch linux-imx 3.3.5. Apply changes to the config file. If you want to change a config file (such as arch/arm64/configs/imx_v8_defconfig ) and have those changes reflected: $ bitbake -c configure linux-imx $ bitbake -c compile linux-imx -f 3.3.6. Run linux-imx menuconfig When changing the build options for the Linux kernel $ bitbake -c menuconfig linux-imx A window like this will pop up, so make the necessary changes and save. (Use the arrow keys to select the item and the spacebar to confirm.) For tips on building, please also refer to the following article. Yocto Linux BSP Build Tips - i.MX 8M Plus Edition ========================= 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 an inquiry. (If you are already an NXP distributor or have a relationship with NXP, you may ask your representative directly.) This guide will show you how to build a Linux BSP using the FRDM (Freedom) board, which allows you to start using embedded Linux in a compact and affordable way. This article uses the FRDM-IMX93 as an example, but the same procedure can be used to build on other i.MX FRDM boards. The Yocto Linux BSP is described using "Linux 6.12.49_2.2.0 (Yocto 5.0.4)" as an example. i.MX Processors SW | Downloads Japanese Blog
View full article
Example S32K144 FlexCAN Pretended Networking STOP mode test S32DS.ARM.2.2 ********************************************************************************  Detailed Description:  Example shows how to use FlexCAN 0 Pretended networking mode to allow FlexCAN  module to wake up MCU from STOP mode.  Wake up by Timeout and wake up by Match events are enabled.  Also pin interrupt can be used to exit STOP mode.  So MCU enters STOP mode by pressing SW3 button.  MCU exits STOP mode when one of following happens:  - no CAN message comes in 8sec (CAN PN timeout event)  - message with standard ID 0x554 or 0x555 comes (CAN PN match event)  - SW2 button is pressed (PTC12 interrupt)  In run mode blue LED is dimming and the rate is different for each wakeup event  ------------------------------------------------------------------------------  Test HW: S32K144 EVB-Q100  MCU: FS32K144UAVLL 0N57U  Fsys: 160MHz  Debugger: Lauterbach, OpenSDA  Target: internal_FLASH ******************************************************************************** General
View full article
CAN FDとCAN(動作していません) NXPコミュニティの皆様、こんにちは。 現在、CAN 構成に関する問題が発生しています。CAN 通信には基本設定を使用していますが、 PEAK CAN ViewerでCAN-FD モードを使用する場合にのみ機能します。ただし、標準のClassical CAN (非 FD) を試しても、応答がありません。 参考までに私のプロジェクトを添付しました。どなたか親切にレビューして、不足している構成や設定が見落とされているかどうか教えていただけませんか? 要約すると: CAN-FD + PEAK CAN Viewer :期待通りに動作 標準CAN + PEAK CANビューア:ボードからの応答なし ご提案やご指導をいただければ幸いです。 お手数ですが、よろしくお願いいたします。 よろしくお願いします、 ガネーシュ・バグワット Re: CAN FD and CAN(not Working) こんにちは、ジュリアン ご返信ありがとうございます。 最初はソフトウェアの構成の問題を疑ったので、ここに投稿しました。しかし、それは TJA1443 トランシーバ接続に関するハードウェア関連の問題であることが判明しました。フローティング ピンのため、通常の CAN では CAN メッセージを受信または送信できませんでしたが、FD ではなぜ動作していたのかはわかりません。 ハードウェアの問題を解決した後、すべてが期待どおりに動作するようになりました。 ご返信いただき、また、役に立つコミュニティ投稿を紹介していただき、改めて感謝申し上げます。 よろしくお願いします、 ガネーシャ Re: CAN FD and CAN(not Working) こんにちは@GaneshBhagwat PCAN-View ツールは、モード、ボーレート、サンプリング ポイントに対して正しく構成されていますか? バス上で表示されている内容を共有することは可能ですか?(ロジックアナライザまたはオシロスコープを使用して)フレームが正しく送信されているかどうかを確認するだけです。また、「機能していない」とはどういう意味か詳しく説明してください。受付時にコールバックを入力できますか?問題があるのはトランスミッションだけですか? CANInit 関数で、ID 0x80000 が受け入れ用に設定されていることがわかります。これが CAN アナライザーでも設定されているかどうかを確認してください。 このコミュニティ投稿を CAN 構成のガイダンスとして使用できます:例: S32K358 FlexCAN TXRX ISR S32DS35 RTD400/500 - NXPコミュニティ。 よろしくお願いします、 ジュリアン
View full article
S32M2xx - MOSFET switching adjustment for Motor control examples This article is applicable to all motor control application SWs as described in the following article. S32M2xx - Motor control use cases - NXP Community It has been found that on some of S32M24xEVBs an overheating of the power MOSFETs may occur. This will be addressed in the new release of the Motor control example SW and will be carried out in Motor control example SW for S32M24xEVB, S32M27xEVB and S32M276SFFRD. As a solution in the current release, the following settings are recommended. Extend deadtime: For S32M24xEVB, for FTM3, set Dead Time to 50 (corresponds to 625 nanoseconds): For S32M27xEVB and S32M276SFFRD, for LCU outputs channels 0 - 5, set LUT rise filter to 75 (corresponds to 625 nanoseconds): Set faster slew rates: Common for all EVBs:
View full article
Freescale Yocto Project main page Yoctoproject Framework Installing any Needed Package Using Yocto and i.MX Boards Testing Yocto for i.MX6 i.MX53 QSB - Quick Start Board i.MX6 Sabre Lite Board Build the image SDCard Image Yoctoproject Framework Yoctoproject is a framework for creating Linux distributions for embedded devices. Its layering mechanism makes it easy to add Linux to new target devices highly customized for a particular platform; it can include custom start-up scripts, software packages built with a high degree of optimization for a particular architecture, and different user interfaces from full Gnome desktop to a simple a serial console. Yocto has 2 basic layers: board support packages layer and core layer. In the BSP layer is where all the custom software and configuration tweaks for a particular platform are included, while the core layer provides the common software stack to provide from a simple command line interface to Sato desktop interface (Matchbox based and Gnome mobile software stack). A third layer could be added to provide additional user interfaces LXDE, XFCE, and more; YP is quite flexible&emdash;one of it major strengths. Installing any Needed Package Go to Yocto Project Quick Start and double check that you have all the necessary packages installed for your machine. For example, if building machine was an Ubuntu machine: $ sudo apt-get install gawk wget git-core diffstat unzip texinfo  build-essential chrpath libsdl1.2-dev xterm curl Using Yocto and i.MX Boards Please, go to project's README file in order to see the recommended instructions to download the source code. Testing Yocto for i.MX6 How to test Yocto for i.MX 6 i.MX53 QSB - Quick Start Board Edit conf/local.conf user config file and set imx53 Quick start board machine and enable parallel build features. MACHINE ?= "imx53qsb" BB_NUMBER_THREADS = "4" PARALLEL_MAKE = "-j 4" i.MX6 Sabre Lite Board Edit conf/local.conf user config file and set i.MX6 Sabrelite board machine and enable parallel build features MACHINE ?= "imx6qsabrelite" BB_NUMBER_THREADS = "4" PARALLEL_MAKE = "-j 4" if you've been facing problems to get yocto's images working on your i.MX Sabre Lite board, please take a look on this comment Re: The kernel sometins hang  in L3.0.35_4.0.0_130424 release Build the image some example of available image: image name description core-image-minimal A small image just capable of allowing a device to boot. core-image-base A console-only image that fully supports the target device hardware. core-image-sato Image with sato, a mobile environment and visual style for mobile devices.  The image supports X11 with a Sato theme, Pimlico applications and contains terminal, editor and file manager. fsl-image-test Builds contents core-image-base plus Freescale test applications and multimedia components. fsl-image-gui Builds contents of core-image-sato with Freescale test applications and multimedia with hardware accelerated X11 To build the image: $ bitbake Build using Dash instead can bring some problems. You can check what your system uses typing: "ls -l /bin/sh". On Ubuntu you can change it using "dpkg-reconfigure bash". Some Ubuntu releases you must use "dpkg-reconfigure dash" and choose Bash Built images are located in cd tmp/deploy/images SDCard Image sudo dd if=core-image-minimal-imx6qsabrelite.sdcard of=/dev/sdb i.MX Yocto Project: Frequently Asked Questions Yocto Project Re: Freescale Yocto Project main page All, we're closing this document for any further comments.  If you have a comment about this document or if you have an issue doing what the document describes, please start a new discussion.  Thanks. Re: Freescale Yocto Project main page Hello community, have an urgent need for input on touch screen integration. Please help! We're developing a project which requires touch screen function. The processor we use is i.MX6 dual light. Source code is Yocto 1.5. The LCD is working. We integrated the touch screen driver and can see on the computer that is connected to the board through serial port that touch screen reports coordinates for touches which indicates that touch screen does work. However, the system doesn't respond to touches. No icon displayed on the LCD is touched and the mouse arrow doesn't move with a finger touching the screen. Any advice where to look to see which part is broken? Thanks! Re: Freescale Yocto Project main page There's an error in the document, the part about dash.  You can check what your system uses typing: "ln -s /bin/sh" should probably be "ls -l /bin/sh" since "ln -s /bin/sh" would simply create a symbolic link in the current directory pointing to /bin/sh. Re: Freescale Yocto Project main page Please, LeonardoSandovalGonzalez, hkh and OtavioSalvador, create a new topic in imx.community. Please, remind to add all log available. With kernel version, MM version and branch name. It´s very difficult to us, hkh to provide support when the DOC has several comments on it. It´s much easier to start with a new and clear thread, with all the text futures it has in it (like quote, mark a answer as helpfull, as so on). Thanks in advance, Re: Freescale Yocto Project main page hkh, the issue you found regarding 'mesa' has been fixed in OE-Core and Poky yesterday. You can drop this change from meta-fsl-arm and it will work just fine. I am not a good person to help with GStreamer stuff. LeonardoSandovalGonzalez, can you take a look here? Re: Freescale Yocto Project main page Hello, I am using a Boundarydevices Nitrogen6x with a iMX6 Solo processor. I followed Daiane’s instruction to build my Yocto Dora image. I was able to build core-image-base, but had a problem with fsl-image-test. I found the following issue and applied the change manually (it must not be in the branch since sync was not retrieving the patch): https://lists.yoctoproject.org/pipermail/meta-freescale/2014-April/008057.html Also, I used menuconfig to disable ov5642 and enable ov5640. I can build the images, but can’t use gstreamer. I keep getting this error: ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0 VIDIOC_DQBUF failed. ERROR: v4l2 capture: VIDIOC_QBUF: buffer already queued VIDIOC_QBUF failed I know my hardware works because with the Timesys demo SD Card that came with the board I can use the following command to display the MIPI camera image on the LCD: $ gst-launch mfw_v4lsrc capture-mode=5 ! mfw_v4lsink disp-width=1280 disp-height=800 I have tried many gstreamer commands, and they all fail with the same error. One example is: $ gst-launch mfw_v4lsrc ! mfw_v4lsink I tried adding capture-mode=4 to the above command, and I get the same error. Are you aware of any issue with the latest Yocto Image that would cause this problem (something similar to the patch above that I had to apply)? What else can I try? Here is the complete snapshot of the error I am getting: root@nitrogen6x:~# gst-launch mfw_v4lsrc ! mfw_v4lsink MFW_GST_V4LSRC_PLUGIN 3.0.9 build on Apr 16 2014 09:57:53. pwm_config: pwm freq = 22000000, clk_select=1 clock_rate=66000000 ov5640_mipi_camera_powerdown: powerdown=0, power_gp=0xa9 MFW_GST_V4LSINK_PLUGIN 3.0.9 build on Apr 16 2014 09:57:39. Setting pipeline to PAUSED … pwm_config: pwm freq = 22000000, clk_select=1 clock_rate=66000000 ov5640_mipi_camera_powerdown: powerdown=0, power_gp=0xa9 Pipeline is live and does not need PREROLL … Setting pipeline to PLAYING … New clock: GstSystemClock ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0 ERROR: from element /GstPipeline:pipeline0/MFWGstV4LSrc:mfwgstv4lsrc0: Internal data flow error. Additional debug info: /yocto/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline0/MFWGstV4LSrc:mfwgstv4lsrc0: streaming task paused, reason error (-5) Execution ended after 10004586509 ns. Setting pipeline to PAUSED … Setting pipeline to READY … Setting pipeline to NULL … Total rendered:0 Freeing pipeline … [—>FINALIZE v4l_sink root@nitrogen6x:~# ov5640_mipi_camera_powerdown: powerdown=1, power_gp=0xa9 root@nitrogen6x:~# Thanks, Re: Freescale Yocto Project main page look under "sources" you will see "sources/meta-fsl-arm" "sources/meta-fsl-demos" "sources/poky" Re: Freescale Yocto Project main page Hi All, I want to know where exactly the actual source code will reside after "repo sync", since I see only bitbake, patch and *.inc files under source directory. Please let me know. Thank you, Gautham Re: Freescale Yocto Project main page After: $ source setup-environment build the local.conf file will be placed inside /build/conf/local.conf Re: Freescale Yocto Project main page Thanks DaianeAngolini Please let me know where can i find local.conf file, in fsl-community-bsp Folder tree after repo and clone fsl-community-bsp -> sources--------------------------------- > base                                 README                                  meta-fsl-arm                                 setup-environment                      meta-fsl-arm-extra                                                                                  meta-fsl-demos                                                                                  meta-openembedded                                                                                  poky Thanks Ram Re: Freescale Yocto Project main page The only difference would be the machine name to place in local.conf. Re: Freescale Yocto Project main page Hi All, I want to boot my Imx6q Sabre AI board with Yocto, can I follow the same steps suggested in this post, if not please suggest a thread/link that i can follow to achieve this. Thanks Ram Re: Freescale Yocto Project main page if you got  a custom board, why are you using a mx53qsb machine? unless the board is the same, you need to create your own board layer with proper changes. Leo Re: Freescale Yocto Project main page got a fsl-image-gui to compile for mx53qsb. I have a customboard with an attached LVDS lcd, but both vga as lcd remain black on boot. I attached a serial cable but only get gibberish over this (non-ascii characters). Does anyone know 1) where to find info on how to configure LVDS lcd and 2) where to configure tty/console so i can check my settings and actually see what's happening when I try the image Re: Freescale Yocto Project main page BrianEdmond, what branch are you using? The default distribution used on yocto (and meta-fsl-arm) is poky.conf. And by default X11 is selected. If you´re using master, you can override your DISTRO_FEATURES and remove X11. Take a look on poky.conf file under source Re: Freescale Yocto Project main page I did a build of fsl-image-test and it boots but I still seem to have an OpenGL ES environment which required X11.  In other builds I had a libGAL and libgal-fb which had the fbGetDisplayByIndex calls so I could run with fbdev.  Is there a configuration option I am missing? Brian Re: Freescale Yocto Project main page Thanks Nick. I have corrected the verbatim, adding the curl package. Leo Re: Freescale Yocto Project main page Ok if both packages are prerequisites then please change the text for the Ubuntu command in the section above entitled "Installing any Needed Package" to: $ sudo apt-get install gawk wget git-core diffstat unzip texinfo \   build-essential chrpath libsdl1.2-dev xterm curl This would help new users who need to be able to follow the instructions verbatim Nick Re: Freescale Yocto Project main page You can use both for downloading the repo app. Both packages are requisites. Leo Re: Freescale Yocto Project main page In the prerequisites for an Ubuntu Machine there is sudo apt-get install wget but in the fsl-community-bsp-platform/README there is $: curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo Should this instead be $: wget https://dl-ssl.google.com/dl/googlesource/git-repo/repo -O ~/bin/repo or should curl be added as a prerequisite? Re: Freescale Yocto Project main page All ugly hacks. He might use: sed after every sync (as he did) use local_manifests.xml use gitconfig 'insteadOf' configuration all hacks! better to fix the firewall. Re: Freescale Yocto Project main page OtavioSalvador, any other workaround you know to avoid the issue that Nick found? Leo Re: Freescale Yocto Project main page It seems that to change the repo from using the git protocol to using the http prtocol can be achieved as follows: $ sed -i 's/git:/http:/g' .repo/manifest.xml $ sed -i 's|yoctoproject.org|yoctoproject.org/git|g' .repo/manifest.xml I hope this helps others who are experiencing problems when following the supported BSP installation process from behind firewalls that do not support git Re: Freescale Yocto Project main page Further investigation reveals that the url http://git.yoctoproject.org/git/meta-fsl-arm works Re: Freescale Yocto Project main page No idea Nick. You need to talk to the admin guy Re: Freescale Yocto Project main page Yes a 'git clone http://git.yoctoproject.org/meta-fsl-arm' confirms that the meta-fsl-arm committers are not running git update-server-info so http access does not work. Until this is fixed I will use a zip archive Re: Freescale Yocto Project main page Might use 'git clone' to check git command. Re: Freescale Yocto Project main page Thank you for the information on how to get started with the new Yocto based Freescale BSPs. Could you please assist me with a problem fetching the repositories? It appears that protocols/ports other than HTTP are blocked by the corporate firewall. Changing to HTTP though results in errors finding the info subdirectory. Can you please suggest a resolution to this problem? The output from repo is as follows: $ ./repo sync fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out fatal: unable to connect to git.yoctoproject.org: git.yoctoproject.org[0: 140.211.169.56]: errno=Connection timed out fatal: unable to connect to git.yoctoproject.org: git.yoctoproject.org[0: 140.211.169.56]: errno=Connection timed out fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out error: Cannot fetch meta-fsl-arm error: Cannot fetch meta-fsl-arm-extra error: Cannot fetch meta-fsl-demos error: Cannot fetch fsl-community-bsp-base fatal: unable to connect to git.openembedded.org: git.openembedded.org[0: 140.211.169.152]: errno=Connection timed out fatal: unable to connect to git.openembedded.org: git.openembedded.org[0: 140.211.169.152]: errno=Connection timed out error: Cannot fetch meta-openembedded error: Exited sync due to fetch errors $ sed -i 's/git:/http:/g' .repo/manifest.xml $ ./repo sync Fetching projects:  16% (1/6)  fatal: http://git.yoctoproject.org/meta-fsl-arm/info/refs not found: did you run git update-server-info on the server? Fetching projects:  66% (4/6)  fatal: http://git.yoctoproject.org/poky/info/refs not found: did you run git update-server-info on the server? fatal: http://git.yoctoproject.org/meta-fsl-arm/info/refs not found: did you run git update-server-info on the server? fatal: http://git.yoctoproject.org/poky/info/refs not found: did you run git update-server-info on the server? error: Cannot fetch meta-fsl-arm error: Cannot fetch poky error: Exited sync due to fetch errors $ Re: Freescale Yocto Project main page Hi Thomas, sorry for the confusion but this document should not be used to build Freescale Yocto layers, please refer to this document How to test yocto for imx6 Repeat the steps, and try to build the same core image. If error persists, please send the description/log to the meta-freescale distribution list. Re: Freescale Yocto Project main page Hi Leonardo Sandoval Gonzalez, Met same error as Eduardo Gorio in busybox,. So, Freescale will support repo way for our build only? Either or customize build for our own board? BR Thomas Re: Freescale Yocto Project main page Hi gorio, please post your question on the meta-freescale mailing list. Check this document for instructions. Re: Freescale Yocto Project main page What does it wrong ? I did step by step from this tutorial.. gorio@ubuntu:/opt/poky/build$ bitbake core-image-minimal Loading cache: 100% |############################################################| ETA:  00:00:00 Loaded 1600 entries from dependency cache. Build Configuration: BB_VERSION        = "1.17.1" BUILD_SYS         = "x86_64-linux" NATIVELSBSTRING   = "Ubuntu-10.04" TARGET_SYS        = "arm-poky-linux-gnueabi" MACHINE           = "imx53qsb" DISTRO            = "poky" DISTRO_VERSION    = "1.3+snapshot-20130308" TUNE_FEATURES     = "armv7a vfp neon" TARGET_FPU        = "vfp-neon" meta              meta-yocto        = "master:d823759b4594143d522eae0b2a2498436a6dcb1e" meta-oe           = "master:6c9ac38e8b998e6739383ba91e0c4e0c0ed0094b" meta-fsl-arm      = "master:a502be66bef33f2016b43f8c7129b18f92d6e337" NOTE: Resolving any missing task queue dependencies NOTE: Preparing runqueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: Function failed: do_configure (see /opt/poky/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/busybox/1.20.2-r6/temp/log.do_configure.23360 for further information) ERROR: Logfile of failure stored in: /opt/poky/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/busybox/1.20.2-r6/temp/log.do_configure.23360 Log data follows: | DEBUG: Executing python function sysroot_cleansstate | DEBUG: Python function sysroot_cleansstate finished | DEBUG: Executing shell function do_configure | trap: 80: SIGHUP: bad trap | ERROR: Function failed: do_configure (see /opt/poky/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/busybox/1.20.2-r6/temp/log.do_configure.23360 for further information) ERROR: Task 914 (/opt/poky/meta/recipes-core/busybox/busybox_1.20.2.bb, do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 1030 tasks of which 1026 didn't need to be rerun and 1 failed. Waiting for 0 running tasks to finish: Summary: 1 task failed:   /opt/poky/meta/recipes-core/busybox/busybox_1.20.2.bb, do_configure Summary: There was 1 ERROR message shown, returning a non-zero exit code. gorio@ubuntu:/opt/poky/build$ Re: Freescale Yocto Project main page Please refer to the bellow link to check the community supported way to build Freescale Yocto layers How to test yocto for imx6 Re: Freescale Yocto Project main page I'll update the page above soon. Meanwhile, I suggest you to use the instructions located at: Freescale/fsl-community-bsp-platform · GitHub For i.MX53 platform, use the denzil branch, for i.MX6, use the master branch. Rgds Rogerio Re: Freescale Yocto Project main page Hi Thanks a lot for the information. I tried to use the instruction above to build image for iMX6q SabreLite, but I've got a error below when I try to do "bitbake core-image-minimal" ================================= Summary: There were 2 WARNING messages shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code. WARNING: Host distribution "Ubuntu 10.10" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution. Loading cache: 100% |###########################################| ETA:  00:00:00 Loaded 1160 entries from dependency cache. ERROR: No recipes available for:   /home/its/poky/meta-fsl-arm/recipes-core/udev/udev_173.bbappend ERROR: Command execution failed: Exited with 1 ===================================== Anybody can help? I am very new to Yocto/bitbake, we used to build image by using ltib, Thanks a lot.
View full article
【新手指南】如何构建 Yocto Linux BSP - i.MX FRDM 开发板版(日语博客) 本指南将向您展示如何使用 i.MX FRDM 板作为基础构建 Yocto Linux。 本文以 FRDM-IMX93 为例,但同样的步骤也可用于在其他 i.MX FRDM 板上进行构建。 本文以“Linux 6.12.49_2.2.0 ( Yocto 5.2 “Walnascar” )”为例,描述了 Yocto Linux BSP。 问:i.MX FRDM 板是什么? 答:i.MX FRDM 开发板是一款价格更实惠、体积更小的开发板,相比恩智浦功能齐全的 EVK 开发板,它的功能有所减少。其目的是方便用户进行基本的评估和原型设计。 1. 环境与准备 1.1.环境 大项目 小项目 内容 备注 文档 - IMX_YOCTO_PROJECT_USERS_GUIDE.pdf (这是主要方法。它描述了构建 BSP 的步骤。) i.MX Linux ®发行说明 (您可以查看支持功能列表。) i.MX 移植指南 (实际实施时需要注意的要点总结) 点击此处下载Yocto Linux 通用文档。 硬件 FRDM板 FRDM-IMX8MPLUS FRDM-IMX91S FRDM-IMX91 FRDM-IMX93 FRDM-IMX95(即将推出) 本章将以 FRDM-IMX93 为基础进行解释。 主机 PC Ubuntu 环境 ・VMware/Virtual Box 等(在 Windows 上) ・Native Linux 以下选项之一 推荐版本:Ubuntu 22.04 或更高版本 SD卡+读卡器/写入器 建议使用 16GB 或更多内存   硬件 (选项) MIPI 摄像头 (选项) 兼容BSP的MIPI相机 (参见 i.MX Linux ®发行说明) USB摄像头也可以替代(可能会出现延迟) 显示 (选项) 展示   USB 设备 (选项) USB鼠标、USB存储器   耳机 (选项) 3.5mm 耳机 带麦克风的耳机(例如老款 iPhone 附带的耳机)更好。 软件 Yocto 环境 Linux BSP (这次我们使用了 Linux 6.12.49_2.2.0( Yocto 5.2 “Walnascar” )) 本文将介绍安装过程,包括安装方法。 1.2.图例 命令提示符图例 =>           u-bootプロンプト $            BSPがインストールされているLinux PCのプロンプト 2. 主机 推荐使用 Ubuntu 22.04 桌面版。为了获得较为流畅的使用体验,建议使用至少配备 8 个线程和 16GB 内存的主机。所需的存储空间会根据具体项目而有所不同,小型项目大约需要 50GB,大型项目则需要 500GB。 2.1。Yocto 所需的软件包 请按照以下步骤安装所需的软件包。 $ sudo apt-get install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3- jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xzutils zstd efitools curl 注意:除了 IMX_YOCTO_PROJECT_USERS_GUIDE.pdf 中的信息外,还添加了curl 。 2.2. 设置交换文件 以下是设置 32GB 交换文件的示例。 $ sudo fallocate -l 32G /swapfile $ sudo chmod 600 /swapfile $ sudo mkswap /swapfile $ sudo swapon /swapfile 注意:如果/swapfile 目录已存在,则第一行命令将失败。如果要更改其大小,请执行以下命令,然后再运行上面的命令。 $ sudo swapoff /swapfile $ sudo rm /swapfile 要在主机启动时自动挂载交换文件,请将以下行添加到/etc/fstab文件中: /swapfile none swap sw 0 0 3. Yocto Linux BSP 从 nxp.jp 网站的“i.MX 应用处理器的嵌入式 Linux”部分,选择所需的 Linux BSP 版本,并获取 i.MX Yocto 项目用户指南。 按照 i.MX Yocto 项目用户指南 (IMXLXYOCTOUG) 中的“4 Yocto 项目设置”部分的步骤创建映像。 本文档假设使用以下设置生成图像。 发行版 = fsl-imx-xwayland 机器 = imx93-11x11-lpddr4x-frdm 3.1. 设置和构建 Yocto BSP 有关主机设置,请参阅 2. 主机。 3.1.1.安装仓库实用程序 $ mkdir ~/bin $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo 3.1.2. 将存储库添加到您的 PATH 环境变量中 将以下行添加到$HOME/.bashrc文件中: export PATH=~/bin:$PATH 3.1.3.Git 设置 $ git config --global user.name "Your Name" $ git config --global user.email "Your Email" $ git config --list 3.1.4.Yocto BSP 设置 $ mkdir imx-yocto-bsp $ cd imx-yocto-bsp $ repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-walnascar -m imx-6.12.49-2.2.0.xml $ repo sync 3.1.5.设置构建目标,构建 $ MACHINE=imx93-11x11-lpddr4x-frdm DISTRO=fsl-imx-xwayland source ./imx-setup-release.sh -b build $ bitbake imx-image-full *构建完成后,将生成一个 Linux 镜像。 * 有关如何写入生成的映像的说明,请参阅您的特定 FRDM 板的入门指南中的步骤 1 和 2。 FRDM-IMX8MPLUS 入门指南 FRDM-IMX91 入门指南 FRDM-IMX91S 入门指南 FRDM-IMX93 入门指南 注意:如果您想为其他 FRDM 板构建 Linux BSP,请将上述命令中的“ MACHINE= ”部分替换为以下名称。 imx8mp-lpddr4-frdm (FRDM-IMX8MPLUS) imx91-11x11-lpddr4-frdm (FRDM-IMX91) imx91-11x11-lpddr4-frdm-imx91s (FRDM-IMX91S) imx93-11x11-lpddr4x-frdm (FRDM-IMX93) imx95-15x15-lpddr4x-frdm (FRDM-IMX95) 注意:对于图形功能,您还可以使用上述命令中的“ DISTRO = ”部分选择发行版。 fsl-imx-wayland (Wayland) fsl-imx-xwayland (与使用 Wayland 和 X11 *EGL 的 X11 应用程序不兼容) 注意:每个项目只能使用imx-setup-release.sh脚本进行一次设置。如果对现有项目执行此操作,将会生成诸如conf/local.conf之类的新文件,并且您之前的设置将会丢失。如果您希望重用现有项目……3.3.1.请参阅“从现有构建目录恢复工作”。 注意:根据主机配置的不同,构建过程可能需要数十小时。此外,预计会占用 400-500GB 的存储空间。 注意:在多核多线程主机上构建时,如果内存不足以支持所有线程,则会发生内存交换。限制线程数的方法将在 3.4.2 节中介绍。请参阅“限制构建过程中运行的线程数”。 注意:Ubuntu 22.04 初始状态下可能未配置交换分区,这会导致系统运行极其缓慢甚至崩溃。交换分区文件配置如下:2.2.请参阅有关配置交换文件的章节。 以下信息仅供参考。 3.2 构建和安装工具链 您可以构建和安装交叉编译器等工具链。通过使用此处生成的脚本,您可以避免交叉编译过程中经常出现的问题,例如找不到要链接的包含文件或库。 3.2.1.工具链的构建 $ bitbake imx-image-full -c populate_sdk 3.2.2.安装 $ tmp/deploy/sdk/fsl-imx-xwayland-glibc-x86_64-imx-image-full-armv8a-imx93-11x11-lpddr4x-pf0900-evk-toolchain-6.12-walnascar.sh 这里我们就不解释如何使用该工具链了。 3.3.常用的 Yocto bitbake 命令和设置 3.3.1.从现有构建目录继续工作。 $ cd /path/to/imx-yocto-bsp $ source ./setup-environment build 注意:这里提到的路径和目录来自 3.1.4 节。Yocto BSP 设置,3.1.5。构建目标设置在构建过程中已配置。 下面我们将以 linux-imx 为例,给出一些命令示例。您可以将“ linux-imx ”替换为其他软件包名称,对每个软件包执行相同的操作。 3.3.2. 软件包的重新构建 $ bitbake -c compile linux-imx -f $ bitbake -c install linux-imx $ bitbake -c deploy linux-imx 如果不添加注释-f ,则可以跳过这些步骤。 注意 - 某些软件包在使用 `-c deploy` 进行部署时可能会显示错误,但在大多数情况下,这仅仅是因为 `do_deploy` 命令不可用,因此您可以忽略该错误。 3.3.3 删除软件包 如果某个软件包出现不应发生的错误,请尝试使用以下命令删除该软件包,然后重试。这或许可以解决错误。(这是因为软件包可能在下载过程中损坏,或者如果构建过程过早终止,则可能残留一些垃圾数据。) $ bitbake -c cleansstate linux-imx 注意:提取出的所有源代码都将被删除,因此如果您正在编辑任何文件,请务必小心。 3.3.4. 软件包提取 如果您只想提取软件包而不想编译它 $ bitbake -c patch linux-imx 3.3.5. 将更改应用到配置文件 如果您想更改配置文件(例如arch/arm64/configs/imx_v8_defconfig )并希望这些更改生效: $ bitbake -c configure linux-imx $ bitbake -c compile linux-imx -f 3.3.6. 运行 linux-imx menuconfig 更改 Linux 内核的构建选项时 $ bitbake -c menuconfig linux-imx 此时会弹出一个类似这样的窗口,请进行必要的更改并保存(使用十字光标键选择所需项目,然后按空格键确认)。 有关建造方面的技巧,请参考以下文章。 Yocto Linux BSP 构建技巧 - i.MX 8M Plus 版 ========================= 即使您在本文的“评论”栏留言,我们目前也无法回复。 给您带来不便,我们深感抱歉。请在询问时参阅“NXP技术问题-联系方式(日本博客)”。 (如果您已经是NXP的代理商或与其有合作关系,可以直接向负责人咨询。) 本指南将向您展示如何使用 FRDM(Freedom)板构建 Linux BSP,使您能够以紧凑且经济实惠的方式开始使用嵌入式 Linux。 本文以 FRDM-IMX93 为例,但同样的步骤也可用于在其他 i.MX FRDM 板上进行构建。 本文以“Linux 6.12.49_2.2.0 (Yocto 5.0.4)”为例,对 Yocto Linux BSP 进行了描述。 i.MX 处理器 SW | 下载 日本博客
View full article
System Controller Firmware 101-はじめに 評価キットを使用する際には、BSPに含まれるSystem Controller Firmware(SCFW)バイナリが提供されます。このscfwバイナリはそのボード専用に調整されており、ご使用のハードウェアに合わせてボード依存部分を変更する必要がある場合があります。 本書ではSCFWのポーティング手順の概要を説明します。詳細についてはSystem Controller Porting guide(sc_fw_port.pdf)を参照してください。 システムを設定する SCFWはLinuxホスト上でビルドされます。システムをセットアップする手順は次のとおりです: GNU ARM Embedded Toolchain: 6-2017-q2-update June 28, 2017をARM websiteからダウンロードします: ファイルを展開するディレクトリを選択します。例: mkdir ~/gcc_toolchain cp ~/Downloads/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 ~/gcc_toolchain/ cd ~/gcc_toolchain/ tar xvjf gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ ツールチェーンを含むディレクトリ(上記例では"~/gcc_toolchain")を指すようTOOLS環境変数を設定します。.bash_profileを編集してこの環境変数をexportすることもできます: export TOOLS=~/gcc_toolchain/ srec_catもビルドに必要です。これは通常srecordパッケージに含まれており、ubuntuでは次のように実行します: sudo apt-get update sudo apt-get install srecord これでポーティングキットのディレクトリ(例:scfw_export_mx8qm)に移動し、scfwをビルドできます。 System Controller Firmwareポーティングキット SCFW 移植キットには、SCFW をお客様のボードで動作するように変更できるソースファイルとオブジェクトファイルが含まれています。 最新のSystem Controller Firmwareポーティングキットは i.MX Software and development webpageから入手できます: ポーティングキットを入手したら展開します: tar xvzf imx-scfw-porting-kit-1.1.tar.gz‍ 次のようなファイル構成が表示されます: ポーティングキットはpackages以下に含まれており、READMEに展開手順が記載されています。基本的には: cd packages/ chmod a+x imx-scfw-porting-kit-1.1.bin ./imx-scfw-porting-kit-1.1.bin‍‍‍ エンドユーザーライセンス契約の同意を求められます: 同意するとポーティングキットは新しいフォルダに展開されます。フォルダ構成は次のとおりです: SCFWに関するドキュメントはdoc/pdfにあるか、html形式で提供されています。sc_fw_port.pdfに目を通すことを推奨します。 異なるSoCバリアント(QM A0、QM B0、QXP B0)のポーティングキットはsrcにtar.gzとして格納されています。その他のファイルはLinux、QNX、FreeRTOS、U-boot、ARM Trusted Firmwareなど向けのSCFWライブラリです。 複数のSoCバリアント(QXPとQMの両方など)で作業する場合は、すべてのポーティングキットを1つのディレクトリに展開することを推奨します。これにより、そのディレクトリから任意のバリアント向けにビルドできます。実行コマンドは次のとおりです: cd imx-scfw-porting-kit-1.1/ cd src/ find scfw_export_mx8*.gz -exec tar --strip-components 1 --one-top-level=scfw_export_mx8 -xzvf {} \;‍‍‍ scfw_export_mx8フォルダが作成され、ここからサポートされている任意のバリアント向けにSCFWをビルドできます。または、目的のバリアントのパッケージだけを展開して使用することもできます。 cd scfw_export_mx8/‍ すべてのビルドフォルダーには、SCFWのビルド結果が含まれており、プラットフォームにはSCFWのソースが保存されています。 ボード固有のコードはすべて「platform/board/mx8_」にあります。ここでderivativeはQXPやQMなどのi.MX8シリコンファミリ、board_nameはSCFWパッケージの対象ボード名です。 SCFWをお使いのボードにポーティングする最初のステップは、i.MX8のderivativeとボード用のフォルダを作成することです。既存のボード例をコピーしてフォルダ名を変更すると、すぐに開始できるプロジェクトが得られます。例: cp -r platform/board/mx8qm_val/ platform/board/mx8qm_myBoard/‍‍‍‍‍‍‍‍‍‍ この例のボードは「myBoard」と呼ばれ、i.MX8QM B0 デバイス用です。このボード用の SCFW を構築するには、単に次のコマンドを呼び出してください。 make qm R=B0 B=myBoard‍‍‍‍‍‍‍‍‍‍‍‍ ターゲットがi.MX8QXPの場合は、このデバイスをベースにしたボードを選び、「make qx」を実行するだけです。 ビルドオプションや詳細なブート情報などの追加情報はSCFWポーティングガイド(sc_fw_port.pdf)に記載されています。本書の第2章はポーティングプロセスの優れた入門です。 概要と有用な情報 PMICの設定概要およびboard.c一般的な修正 変更が必要な主なファイル(場合によっては唯一)は「board.c」で、場所は「platform/board/mx8X_board/」です。board.cファイルにはSCU UARTポート、PMIC初期化ルーチン、PMIC温度アラーム設定などボード関連情報のほとんどが含まれており、LDO電圧を設定したりPMICと通信するように変更することもできます。board.c内のすべての関数はSCU自身によって実行されるため、PMICとの通信に使用されるI2Cインターフェースにアクセスできます。 外部電源(たとえばPMIC LDO)で駆動されるSoCリソース(APコアやGPUなど)はboard_set_power_modeによってオン/オフされ、リソースを特定のPMIC電源にマッピングする処理はboard_get_pmic_infoで行われます。例としてi.MX8QMバリデーションボードでは、A53サブシステムがPF100 PMICカードの3番目のPMIC(PMIC_2_ADDR、アドレスはPMIC_0から開始)のSW2とPF8100 PMICカードの1番目のPMIC(PMIC_0_ADDR)のSW5により給電されます。 case SC_SUBSYS_A53: pmic_init(); if (pmic_card == PF100) { pmic_id[0] = PMIC_2_ADDR; pmic_reg[0] = SW2; *num_regs = 1; } else {/* PF8100_dual Card */ pmic_id[0] = PMIC_0_ADDR; pmic_reg[0] = PF8100_SW5; *num_regs = 1; } break; ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 外部電源で駆動されるSoCリソース(APコア、GPUなど)の電圧はboard.c内のboard_set_voltageで管理されます。リソースと電源のマッピングは前述のとおりboard_get_pmic_infoで行われます。 8個の「ボードリソース」(SC_R_BOARD_R0〜SC_R_BOARD_R7)が利用可能で、これらを用いてSCUが管理できるボード上のコンポーネントを定義できます。たとえばPMICのLDOの1つで駆動されるセンサをボードリソースにマッピングし、board.cを変更してセンサの電源オン/オフや電圧変更を行えます。 ボードリソースの電圧変更は、board_trans_resource_powerで電圧を設定するか、実行時に電圧を変更する必要がある場合はboard_set_controlを修正して、Miscellaneous Service 101で説明されているミスレニアスコールがそのリソースに対して発行されるたびに電圧を変更します。たとえばSC_R_BOARD_R7の電圧を変更する場合、board_set_controlに以下のcaseを追加します: case SC_R_BOARD_R7: if (ctrl == SC_C_VOLTAGE) { /* Example only PMIC_X_ADDR and PMIC_SUPPLY need to match an actual device */ pmic_interface.pmic_set_voltage(PMIC_X_ADDR, PMIC_SUPPLY, val, step); } else return SC_ERR_PARM; break;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 上記のcaseはアプリケーションが次の関数を呼び出すたびにSCUによって実行されます。 sc_misc_set_control( ipc, SC_R_BOARD_R7, SC_C_VOLTAGE, voltage_val);‍‍‍‍‍‍‍‍ ボードリソースの電源オン/オフはboard.c内のboard_trans_resource_powerで行われます。例えばNXPのバリデーションボードでは、ボード上のPTN5150はボードリソース0で管理され、電源のオン/オフは次のように制御されます: case BRD_R_BOARD_R0 : /* PTN5150 (use SC_R_BOARD_R0) */ if (pmic_ver.device_id == PF100_DEV_ID) { if (to_mode > SC_PM_PW_MODE_OFF) { pmic_interface.pmic_set_voltage(PMIC_2_ADDR, VGEN6, 3300, SW_RUN_MODE); pmic_interface.pmic_set_mode(PMIC_2_ADDR, VGEN6, VGEN_MODE_ON); } else { pmic_interface.pmic_set_mode(PMIC_2_ADDR, VGEN6, VGEN_MODE_OFF); } } else {/* PF8100_dual Card */ if (to_mode > SC_PM_PW_MODE_OFF) { pmic_interface.pmic_set_voltage(PMIC_1_ADDR, PF8100_LDO1, 3300, REG_RUN_MODE); pmic_interface.pmic_set_mode(PMIC_1_ADDR, PF8100_LDO1, RUN_EN_STBY_EN); } else { pmic_interface.pmic_set_mode(PMIC_1_ADDR, PF8100_LDO1, RUN_OFF_STBY_OFF); } } break;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ アプリケーション側で以下の関数が呼び出されるたびに、SCUは上記のコードを実行します: sc_pm_set_resource_power_mode(ipc, SC_R_BOARD_R0, SC_PM_PW_MODE_ON/OFF);‍‍‍‍‍‍‍‍ board_config_scは、I2CモジュールやPMICとの通信に使用されるパッドなど、SCUが必要とするリソースをマーキングするために使用します。board.cの関数が動作するために必要なリソースは、本関数で移動不可に設定する必要があります。例えばSCUのI2Cモジュールを保持するには、次の行を追加します: rm_set_resource_movable(pt_sc, SC_R_SC_I2C, SC_R_SC_I2C, false);‍‍‍‍‍‍‍‍‍ 以下のパッドはSCUに属しており、アプリケーションからはアクセスできません: - SC_P_SCU_PMIC_MEMC_ON - SC_P_SCU_WDOG_OUT - SC_P_PMIC_EARLY_WARNING - SC_P_PMIC_INT_B - SC_P_SCU_BOOT_MODE0〜SC_P_SCU_BOOT_MODE5 board_system_configは初期リソース管理を行う関数で、イメージ内でalt_configフラグが設定されている場合にのみ呼び出され、パーティションを作成してリソースを割り当てることができます。詳細はResource Management Service 101を参照してください。 board_get_pcie_clk_srcはPCIeが使用するクロックを定義し、BOARD_PCIE_PLL_EXTERNALまたはBOARD_PCIE_PLL_INTERNALのいずれかを指定できます。 board_printは変更内容のデバッグに非常に便利で、構文は次のとおりです: board_print(3, "Debug printout %d\n", val);‍‍‍‍‍‍‍ 最初のパラメータがデバッグレベルで、それ以降は標準printfと同様に動作します。出力はSCUが対応するデバッグレベルでビルドされている場合にのみSCUのデバッグ出力で確認できます。上記の例では出力を表示するためにSCFWを次のようにビルドする必要があります: make qm B=myBoard‍‍‍‍ DL=3 or higher (debug level goes from 0 to 5)‍‍‍‍‍‍‍ 使用例 以下のユーティリティはSystem Controller Firmwareリクエストの方法を示し、QNXとLinuxの両方でコマンドラインからリクエストを行う手段を提供します。 System Controller Firmware Command Line Utility for Linux and QNX System Controller Firmware 101 i.MX 8ファミリ | i.MX 8QuadMax (8QM) | 8QuadPlus
View full article
通过 LPC 54018 中的 USB 通信在挂机中读写 如何在 LPC 54018 中通过 USB 通信写入和读取 Pendriver。 我使用的是 USB1 主机? LPC54xxx Re: read and write in pendriver through USB communication in lpc 54018 微控制器必须在 USB 主机模式下工作,因为笔式驱动器是 USB 大容量存储类 (MSC) 设备。 LPC54018 支持USB 2.0 全速主机,足以满足标准笔式驱动器的需求。 实施概述: 硬件要求 USB Type-A 接口 笔式硬盘的外部5V VBUS 电源 正确的 D+ 和 D- 连接 建议使用 VBUS 检测 USB 主机堆栈 使用恩智浦 MCUXpresso SDK 启用 USB 主机 + MSC 类驱动程序 使用FATFS处理文件系统 列举 插入时,USB 主机会枚举笔式驱动器 该设备被识别为大容量存储设备 大容量传输用于数据传输 文件系统访问 大多数笔式硬盘的格式为FAT32 挂载后,可执行标准文件操作 使用 f_open()、f_read() 和 f_write() 等应用程序接口 用例示例 这种 USB 存储访问通常用于嵌入式系统,以存储日志、媒体文件或缓存数据。 例如,嵌入式媒体播放器可从以下平台流式传输内容 HDOBOX等平台流式传输内容的嵌入式媒体播放器,就可以使用这种方法将配置文件、字幕或播放日志存储在 USB 闪存盘上。 重要说明 默认情况下不支持 exFAT 和 NTFS USB 主机 + FATFS 需要足够的内存 安装前在设备连接后添加延迟 Re: read and write in pendriver through USB communication in lpc 54018 观影应用程序 HDO Box 电影 我使用这种方法进行管理,效果很好、 Re: read and write in pendriver through USB communication in lpc 54018 Pendriver 中的 USB 通信相当难用。 Re: read and write in pendriver through USB communication in lpc 54018 你好,@Arularasan、 为了再次确认,能否请您检查一下 USB1 端口是否正常工作?你可以尝试像使用其中一个 USB 示例的设备一样使用它。 另外,能否请您检查一下您的硬盘?将磁盘驱动器输入计算机时,计算机会检测到它吗?你能不能试试用另一个 pendrive 或 USB 设备的 USB 主机示例? 最后,能否请您用挂盘测试另一个 USB 主机示例?使用以下示例进行尝试可能会有所帮助:usb_host_cdc和/或usb_host_msd_command。 致以最诚挚的问候,劳尔。 Re: read and write in pendriver through USB communication in lpc 54018 你需要一个 JTAG 调试器来上市和调试在恩智浦 LPC54018 板上运行的代码。FreeRTOS 使用 OM40006 物联网模块进行了测试。有关支持的调试器的更多信息,请参阅 《恩智浦 LPC54018 物联网模块用户手册 》,该手册可从以下网站获取 OM40007 LPC54018 物联网模块 产品页面。 如果您使用的是 OM40006 物联网模块调试器,请使用变流器电缆将调试器的 20 针连接器连接到恩智浦物联网模块上的 10 针连接器。 使用迷你 USB 转 USB 电缆将恩智浦 LPC54018 和 OM40006 物联网模块调试器连接到计算机的 USB 端口。   filmplus 应用程序 Re: read and write in pendriver through USB communication in lpc 54018 @RaRo感谢您的回复。 SDK 示例代码下的 USB HOST 演示 ("host_msd_fatfs_bm") 我已下载,但无法使用! 我 想通过 USB 通讯读写笔式驱动器,我使用的是 USB1。 请帮助我@RaRo Re: read and write in pendriver through USB communication in lpc 54018 你好,@Arularasan、 您试过 host_msd_fatfs_bm 示例吗?该示例似乎使用了 f_write() 和 f_read(),它们用于通过 FATFS 和 USB 进行写入和读取。 您能否查看以下参考手册,了解有关 USB + FATFS 应用程序的更多信息? MSDFATFSAPIRM、飞思卡尔 MSD FATFS API-参考手册和 USBHOSTAPIRM,飞思卡尔 USB 堆栈主机 API-参考手册。 致以最诚挚的问候,劳尔。 Re: read and write in pendriver through USB communication in lpc 54018 @RaRo是的,我已经在MCUXpresso IDE的帮助下完成了 lpc 54018 中的所有程序。 MCUXpresso IDE 生成的示例代码。没有创建读写功能,请帮助我通过 USB 通信在 lpc 54018(我使用的是 USB1 主机)中读写 Pendriver 的步骤。 Re: read and write in pendriver through USB communication in lpc 54018 你好,@Arularasan、 能否请您查看以下有类似问题的主题?已解决:我想使用 USB 连接从笔读取文件...- 恩智浦社区 此外,您还可以尝试使用 LPC54018 SDK 中的 USB 示例,如果使用的是 MCUXpresso IDE,请单击 "导入 SDK 示例... "并搜索 USB。您可以通过集成开发环境或以下链接下载 SDK:MCUXpresso SDK Builder。 [MCUXpresso IDE 快速启动面板和 SDK 导入向导] 可能需要定义您要使用的 USB:USB1 或 USB0。 致以最诚挚的问候,劳尔。
View full article
Clock Measuring using the Signal Frequency Analyzer (SFA) module for KW45/KW47/MCXW71/MCXW72 Using the Signal Frequency Analyzer (SFA) to Measure the FRO 6M Frequency Overview The Signal Frequency Analyzer (SFA) is a specialized hardware peripheral available in NXP’s KW45, MCXW71, KW47, and MCXW72 microcontrollers. It is designed to provide precise, real-time measurement and analysis of digital signal characteristics, including frequency, period, and timing intervals. This makes it a valuable tool for applications requiring accurate timing diagnostics, signal validation, and system debugging. By utilizing internal 32-bit counters and configurable trigger mechanisms, the SFA enables high-resolution capture of signal transitions, supporting robust system monitoring and fault detection. Functional Capabilities of the SFA The SFA module supports the following measurements: Clock signal frequency of a Clock Under Test (CUT) Clock signal period It operates using two 32-bit counters: One for the Reference Clock (REF) One for the Clock Under Test (CUT) Measurement is performed by comparing the counts of both clocks until predefined target values are reached. FRO 6M Frequency Failure Scenarios The 6 MHz Free Running Oscillator (FRO6M) may occasionally output an incorrect frequency under certain conditions: When the device exits reset When the device wakes from low-power modes To mitigate potential issues caused by incorrect FRO6M output, it is the application developer’s responsibility to verify the oscillator’s frequency and apply corrective measures as needed. Monitoring the FRO 6M Using the SFA To monitor the FRO6M signal, the following configuration is recommended: SFA Configuration Parameters Reference Clock (REF): CPU Clock (e.g., 96 MHz) Clock Under Test (CUT): FRO6M routed via CLKOUT Interrupt Mode: Enabled for asynchronous measurement completion Code Implementation The presented functions are meant to be implemented in users application, the inner functions are part of the implementations of the SFA driver from the NXP’s SDK. It can be used on MCXW71, MCXW72, KW45, kKW47, just make sure SFA Peripheral Initialization  void init_SFA_peripheral(void) { /* Enable SFA interrupt. */ EnableIRQ(SFA_IRQn); /* Set SFA interrupt priority. */ NVIC_SetPriority(SFA_IRQn, 1); SFA_Init(DEMO_SFA_BASEADDR); SFA_InstallCallback(DEMO_SFA_BASEADDR, EXAMPLE_SFA_CALLBACK); } SFA Callback Function void EXAMPLE_SFA_CALLBACK(status_t status) { if (status == kStatus_SFA_MeasurementCompleted) { SfaMeasureFinished = true; } sfa_callback_status = status; } Frequency Measurement Function This function sets up the measurement of the FRO6M signal using the CPU clock as the reference. uint8_t SFA_freq_measurement_6M_FRO(void) { uint8_t ratio = 0; uint32_t freq = 0UL; sfa_config_t config; CLOCK_SetClkOutSel(kClockClkoutSelSirc); //set clokout to SIRC SFA_GetDefaultConfig(&config); //Get SFA default config config.mode = kSFA_FrequencyMeasurement0; config.refSelect = kSFA_REFSelect1; //Set CPU clk as ref clk config.cutSelect = kSFA_CUTSelect1; //Set clkout as CUT config.refTarget = 0xFFFFFFUL; config.cutTarget = 0xFFFFUL; config.enableCUTPin = true; freq = get_ref_freq_value(CPU_CLK); SFA_SetMeasureConfig(DEMO_SFA_BASEADDR, &config); SFA_MeasureNonBlocking(DEMO_SFA_BASEADDR); while (1) { if (SfaMeasureFinished) { SfaMeasureFinished = false; if(kStatus_SFA_MeasurementCompleted == sfa_callback_status) { freq = SFA_CalculateFrequencyOrPeriod(DEMO_SFA_BASEADDR, freq);//Calculate the FRO freq if(FREQ_6MHZ + TOLERANCE <= freq ) { ratio = 1; } else { if(FREQ_3MHZ + TOLERANCE <= freq) { ratio = 2; } else { if(FREQ_2MHZ + TOLERANCE <= freq) { ratio = 3; } else { ratio = 4; } } } break; } } else { __WFI(); } } return ratio; } Result Interpretation and Usage To test the FRO 6M after adding the above functions the FRO can be tested after executing: init_SFA_peripheral(); SFA_freq_measurement_6M_FRO(); The measured FRO6M frequency ratio is returned by the function SFA_freq_measurement_6M_FRO(), with the ratio you can know the current frequency output of the 6M FRO, ration 1 means 6M are being output by the FRO, ratio 2 means the frequency output of the FRO it's being cut in half meaning the FRO is outputting 3 Mhz, ration 3 means the FRO output frequency is being cut by a third part, this results in 2MHz frequency output. With this information you can: Adapt peripheral clocking if the FRO6M frequency is incorrect (This can be achieve by modifying the peripheral dividers if dividers are being used). Trigger corrective actions such as  switching to an alternate clock source Steps to Reconfigure Peripheral Clocking When FRO6M output frequency is lower Detect the Faulty FRO6M Output Use the SFA measurement as described earlier to determine if the FRO6M is operating below its expected frequency (6 MHz). If the result is significantly lower, proceed to reconfigure. Choose an Alternative Clock Source Most NXP MCUs offer multiple internal and external clock sources. Common alternatives include: FRO 192M OSC RF 32M Sys OSC RTC OSC Choose one that is: Stable Available in your current power mode Compatible with the peripheral’s timing requirements You can add more clock divers if needed to make a higher frequency clock reach a certain lower frequency. Reconfigure the Peripheral Clock Source Use the SDK’s CLOCK_Set... APIs to change the clock source. You may also need to: Adjust dividers to match the required baud rate or timing Reinitialize the peripheral with the new clock settings Example Scenario: Measuring the FRO and Adjusting UART Based on Frequency Ratio Imagine your application relies on the 6 MHz Free Running Oscillator (FRO), and its accuracy directly affects UART communication. To ensure reliable operation, you can use the System Frequency Adjustment (SFA) feature to monitor the FRO output and dynamically adjust the UART configuration. After measuring the 6 MHz FRO using the recommended method, the system returns a frequency ratio value. This value ranges from 1 to 4, where: 1 indicates the frequency is within expected limits (no issues), 2 to 4 represent varying degrees of deviation from the expected frequency. Using this ratio, you can initialize and configure the UART peripheral and its driver to compensate for any frequency variation, ensuring stable and accurate communication. */ int main(void) { BOARD_InitHardware(); uint8_t ch = 0; uint8_t FRO_ratio = 0; init_SFA_peripheral(); /*Measure FRO6M output frequency*/ FRO_ratio = SFA_freq_measurment_6M_FRO(); /*Init debug console and compensate in case a different frequency is output */ if(0 == FRO_ratio) { assert(0);//this user defined return value means something went wrong while measuring 6Mz FRO } uint32_t uartClkSrcFreq = BOARD_DEBUG_UART_CLK_FREQ/FRO_ratio;//Compensate the src frequency set for uart module CLOCK_EnableClock(kCLOCK_Lpuart1); CLOCK_SetIpSrc(kCLOCK_Lpuart1, kCLOCK_IpSrcFro6M); DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, uartClkSrcFreq); ...... } SDK 25.0.00 Enhancements for FRO6M Calibration To address known reliability issues with the 6 MHz Free Running Oscillator (FRO6M), particularly during transitions from low-power modes, SDK version 25.06.00 introduces a set of software enhancements aimed at improving oscillator validation and calibration. Key Features Introduced FRO6M Calibration API Two new functions have been added to facilitate runtime verification of the FRO6M frequency: PLATFORM_StartFro6MCalibration() Initializes the calibration process by enabling the cycle counter, capturing a timestamp, and preparing the system to measure elapsed time using both the CPU and the FRO6M-based timestamp counter. PLATFORM_EndFro6MCalibration() Completes the calibration by comparing the time measured via CPU cycles and the FRO6M timestamp counter. This comparison determines whether the oscillator is operating at the expected 6 MHz or has erroneously locked to a lower frequency (e.g., 2 MHz). The result is stored in a global ratio variable (fwk_platform_FRO6MHz_ratio) for use by the system. These functions provide a lightweight and efficient mechanism to detect and respond to oscillator misbehavior, ensuring system stability and timing accuracy. Configuration Macro gPlatformEnableFro6MCalLowpower_d This macro enables automatic FRO6M frequency verification upon exiting low-power modes. When defined, the system will invoke the calibration functions to validate the oscillator before resuming normal operation. Default Integration The calibration mechanism is enabled by default in the SDK configuration file fwk_config.h, ensuring that all applications benefit from this safeguard without requiring manual setup. Use Case and Benefits These enhancements are particularly valuable in applications where: Precise timing is critical (e.g., wireless communication, sensor sampling). The system frequently enters and exits low-power states. Clock source integrity must be guaranteed to avoid peripheral misbehavior or timing faults. By integrating these calibration routines, developers can proactively detect and correct FRO6M frequency anomalies, improving overall system robustness and reducing the risk of runtime errors due to clock instability.
View full article
TCP Client & Server Implementation on MCUXrpesso SDK --- part I--using LwIP Netconn API Introduction TCP Client & Server establishes a two-way connection between a server and a client. It is the most common communication model used by applications such as HTTP, Telnet, FTP, SSH and others LwIP is a free light-weight TCP/IP stack in MCUXpresso SDK. It has three application programming interfaces (API): RAW API:  it is the native API of LwIP. It enables the development of applications using event callbacks. Netconn API:  it is a high level sequential API that requires the services of a real-time system (RTOS), The Netconn API enables multi-threaded operations BSD Socket API: it is developed on top of the Netconn API. In this article, I will introduce how to implement a TCP client & Server demo with LwIP Netconn API.  One EVK-RT1060 acts as TCP server, and others boards act as TCP clients.  They are connected through an Ethernet router.  They communicate via TCP protocol. If you press SW8 on the client board, it will toggle a LED on the Server board. This article is for beginners to understand the Netconn API on NXP MCUXpresso SDK. 2. Hardware configuration PHY settings: In this demo, we use phyksz8081, that is the default PHY in EVK-RT1060 board.  ENET port 0. /*! @brief The ENET PHY address. */ #define BOARD_ENET0_PHY_ADDRESS (0x02U) /* Phy address of enet port 0. */ /* Address of PHY interface. */ #define EXAMPLE_PHY_ADDRESS BOARD_ENET0_PHY_ADDRESS /* MDIO operations. */ #define EXAMPLE_MDIO_OPS enet_ops /* PHY operations. */ #define EXAMPLE_PHY_OPS phyksz8081_ops /* ENET clock frequency. */ #define EXAMPLE_CLOCK_FREQ CLOCK_GetFreq(kCLOCK_IpgClk) Configure the external PHY, pull up the ENET_INT before RESET.     GPIO_PinInit(GPIO1, 9, &gpio_config);     GPIO_PinInit(GPIO1, 10, &gpio_config);     /* pull up the ENET_INT before RESET. */     GPIO_WritePinOutput(GPIO1, 10, 1);     GPIO_WritePinOutput(GPIO1, 9, 0);     delay();     GPIO_WritePinOutput(GPIO1, 9, 1); MAC settings: In this demo, MAC address is defined in Macro configMAC_ADDR /* MAC address configuration. */ #define configMAC_ADDR                     \     {                                      \         0x02, 0x12, 0x13, 0x10, 0x15, 0x11 \     }  3. Starting a network interface To create a new network interface, the user allocates space for a new struct netif (but does not initialize any part of it) and calls netifapi_netif_add:     IP4_ADDR(&fsl_netif0_ipaddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3);     IP4_ADDR(&fsl_netif0_netmask, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3); IP4_ADDR(&fsl_netif0_gw, configGW_ADDR0, configGW_ADDR1, configGW_ADDR2, configGW_ADDR3);     netifapi_netif_add(&fsl_netif0, &fsl_netif0_ipaddr, &fsl_netif0_netmask, &fsl_netif0_gw, &fsl_enet_config0,                        ethernetif0_init, tcpip_input); Pass tcpip_input API to netif_add API as input callback function that is called to pass ingress packets up in the protocol layer stack next we need to bring the interface up An interface that is “up” is available to your application for input and output, and “down” is the opposite state. Therefore, before you can use the interface, you must bring it up. This can be accomplished depending on how the interface gets its IP address.  We can use static IP address  or DHCP. Set the network interface as the default network interface netifapi_netif_set_default(&fsl_netif0); Bring the interface up, available for processing     netifapi_netif_set_up(&fsl_netif0); 4. LwIP Initialization Call tcpip_init to create a tcpip_thread, this thread has exclusive access to LwIP core functions. Other threads communicate with this thread using message boxes. It also starts all the timers to make sure they are running in the right thread context. tcpip_init(NULL, NULL); 5. TCP Client & Server Implementation For TCP communications, one host listens for incoming connection requests. When a request arrives, the server accepts it and data is transferred between the server and the client. The sequence of function calls for the client and a server participating in a TCP connection is show in below picture. The steps for establishing a TCP connection on the client side are the following: Create a netconn using the netconn_new() function. Connect the connection to the address of the server using the netconn_connect() function. Send and receive data by means of the netconn_recv() and netconn_send() functions. Close the connection by means of the netconn_close() function. The steps in establishing a TCP connection on the server side are as follows Create a connection with netconn_new() function; Bind the connection to an address using the netconn_bind() function. Listen for connections with the netconn_listen() function. Accept a connection with the netconn_accept() function, this blocks until a client connects. Send and receive data by means of netconn_send() and netconn_recv(). Close the connection by means of the netconn_close() function. 5.1 TCP SERVER IMPLEMENTATION netconn_new() is used to create a new connection.   conn = netconn_new(NETCONN_TCP); netconn_bind() binds a connection to a local IP address and port.   netconn_bind(conn, IP_ADDR_ANY, TCP_CUSTOM_PORT); netconn_listen() function sets a TCP connection into a listening TCP connection.   /* Tell connection to go into listening mode. */   netconn_listen(conn); netconn_accept() function accepts an incoming connection on a listening TCP connection.    err = netconn_accept(conn, &newconn); netconn_recv() function receives a message from a netconn. netconn_send() function sends data to the currently connected remote IP/Port. In this demo, if server board receives a ‘TOGGLE’ message from the client board, it will toggle a LED. (GPIO1/3,  need to connect a LED manually)           while ((err = netconn_recv(newconn, &buf)) == ERR_OK) {         PRINTF("Received  %s\n", buf->p->payload);         do {              netbuf_data(buf, &data, &len);              tcp_rx_buf = (void *)data;              if (tcp_rx_buf[0] == 'T')              {                  PRINTF("LED was toggled from client\r\n");                 GPIO_PortToggle(EXAMPLE_LED_GPIO, 1u << EXAMPLE_LED_GPIO_PIN);                 netconn_write(newconn, TcpReply, sizeof(TcpReply) , NETCONN_COPY );              }         } while (netbuf_next(buf) >= 0);         netbuf_delete(buf);       } //end of while(( err   5.2 TCP CLIENT IMPLEMENTATION For the client side, the netconn structure is created:   conn = netconn_new(NETCONN_TCP); netconn_connect():  when a user issues a connect command, the stack creates a connection with another host. Before connect can instruct the stack to establish a connection, the user must pass a netconn and a sockaddr_in structure containing the destination IP address and port. In TCP, the handshaking packets will be exchanged.   memset(&server_addr, 0, sizeof(server_addr));   server_addr.sin_family = AF_INET;   server_addr.sin_port = PP_HTONS(TCP_CUSTOM_PORT);   server_addr.sin_addr.s_addr = server_ip_addr.addr;   err = connect(client_sock, (struct sockaddr *)&server_addr, sizeof(server_addr));   LWIP_ASSERT("connect fail, please start TCP server first !  ",  err == 0); In this demo, a GPIO is initialized and interrupt is enabled. When SW8 is pressed, the client board will send ‘Toggle’ command to the TCP server.   while (1)   {       if (g_InputSignal)       {           delay();           if (1 == GPIO_PinRead(EXAMPLE_SW_GPIO, EXAMPLE_SW_GPIO_PIN))           {               PRINTF("%s is turned on.\r\n", EXAMPLE_SW_NAME);               err = send(server_sock, Sendtext, sizeof(Sendtext) / sizeof(Sendtext[0]), 0);           }           /* Reset state of switch. */           g_InputSignal = false;       }  //end of if (g_InputSignal)   }  
View full article
MIMXRT1170-EVKBでJ-Linkを使用する 注:類似のEVKについては、以下を参照してください。 MIMXRT1060-EVKBまたはMIMXRT1040-EVKでJ-Linkを使用します MIMXRT1060-EVK または MIMXRT1064-EVK で J-Link を使用する MIMXRT1160-EVK または MIMXRT1170-EVK で J-Link を使用する この記事では、この EVK で J-Link デバッグプローブを使用する方法の詳細を説明します。  2つの方法があります:オンボードの MCU-Link デバッグプローブを Segger J-Link ファームウェアで更新する方法と、外部の J-Link デバッグプローブを EVK に接続する方法です。  他のデバッグプローブは必要ないので、オンボードデバッグ回路を使用すると便利です。  この記事では、J-Link を使用する2つの手順を詳しく説明します。 MIMXRT1170-EVKB jumper locationsMIMXRT1170-EVKB ジャンパの位置 外部J-Linkデバッグ・プローブを使用する セガーはいくつかの J-Linkプローブ オプションを提供しています。これらのプローブのいずれかをこれらのEVKで使用するには、EVKを次の設定で構成してください。 JP5 にジャンパを取り付け、SWD 信号をオンボードデバッグ回路から切り離してください。  このジャンパはデフォルトでは開いています。 EVK の電源を入れるには、デフォルトのオプションとして、電源をバレルジャック J43 に接続し、電源スイッチ SW5 をオン位置(3-6)に設定します。EVK が適切に電源供給されると、SW5 の隣にある緑色の LED D16 が点灯します。 J-Linkプローブを、J1、20ピン、2列0.1インチ・ヘッダーに接続します。 J-Link ファームウェアで更新してオンボード MCU-Link を使用 ドライバおよびファームウェア更新ツール用のMCU-Link インストーラをインストール EVKからUSBケーブルをすべて取り外します EVK の電源を入れるには、デフォルトのオプションとして、電源をバレルジャック J43 に接続し、電源スイッチ SW5 をオン位置(3-6)に設定します。EVK が適切に電源供給されると、SW5 の隣にある緑色の LED D16 が点灯します。 JP3 にジャンパを取り付け、ISP モードを MCU-Link に強制する USB ケーブルを J86 に、また MCU-Link デバッガに接続 MCU-Link ソフトウェアパッケージのインストール先のスクリプトディレクトリに移動し、program_JLINK.cmd(Windowsの場合)またはprogram_JLINK(Linux/MacOSの場合)のスクリプトをダブルクリックして実行します。画面上の指示に従います。Windowsでは、このスクリプトは通常C:\nxp\MCU-LINK_installer_3.122\scripts\program_JLINK.cmdにインストールされます。 J86 の USB ケーブルを取り外します JP3 のジャンパを取り外します USB ケーブルを J86 に接続し直します。  これで MCU-Link デバッガは JLink として起動するはずです。 ジャンパ JP5 を取り外し、MCU-Link デバッガの SWD 信号を接続します。このジャンパはデフォルトでは開いています。
View full article
S32K5 RTD configuration does not allow to set initial value in some pins Hello, Some pins as the ones listed below don't allow to set the initial value when being configured. Is there a reason for that? Regards RTD Re: S32K5 RTD configuration does not allow to set initial value in some pins Hi @nxp52415, As I said, with pins that you selected, they are not supported this function. So, the "the initial value" is not necessary for these pins. Default, RTD driver disabled "the initial value" on "pins were not supported RCVR", and these pins will be generated "the initial value" as 0. Even when driver allow user configures RCVR for these pins, then it doesn't have any effection because it has not support RCVR. Best regards, Dan Re: S32K5 RTD configuration does not allow to set initial value in some pins Hi Dan, I was talking about the initial value and not the RCVR. Can you explain why the initial value cannot be set in these pins? Regards  Re: S32K5 RTD configuration does not allow to set initial value in some pins Hi @nxp52415, This is the information about "Receiver Select" bit in S32K5 RM: You can find the pins support the RCVR in the "IO Signal Table" sheet in the S32K56x_IOMUX.xlsx (attached file in S32K5RM). And based on this files, pins that you showed as not support RCVR. Best regards, Dan
View full article
ICODE SLI 标签在执行 write_single_block 命令时返回 64 01 错误 我使用的是 Windows 11 笔记本电脑和 ACS ACR1552 阅读器。 我正在使用 ACS 脚本工具(v5.02)向恩智浦 ICODE SLI 标签发送 APDU。 我正在创建一个透明会话,将协议设置为 15693/Layer3,然后使用透明交换封装向标签发送 APDU。 GET_SYSTEM_INFO 和 READ_SINGLE_BLOCK 似乎工作正常。 WRITE_SINGLE_BLOCK 返回"64 01" 错误,但似乎确实写入了数据。 我没有找到任何关于 64 01 响应的含义或原因的信息。 有谁能对此提供一些信息? 以下是我正在处理的 APDU 序列。 APDU #4 读取数据块 0 的数据为 11 22 33 44 APDU #5 将数据块 0 的数据写入 12 34 56 78 - 但收到 64 01 错误 APDU #6 读取的 0 号数据块数据为 12 34 56 78 --这说明之前的写入实际上起了作用? ; (1) 建立透明会话 < FF C2 00 00 02 81 00 00 > C0 03 00 90 00 90 00 ; (2) 透明交换 - 将协议切换到 SwitchProtocolRf::ISO15693 SwitchProtocolLayer::PART3 < FF C2 00 02 04 8F 02 02 03 > C0 03 00 90 00 8F 01 00 90 00 ; (3) get sys info < FF C2 00 01 04 95 02 02 2B 00 > C0 03 00 90 00 92 01 00 96 02 00 00 97 0F 00 0F 2E 98 5C 8A 00 01 04 E0 00 00 1B 03 01 90 00 ; (4) 读取具有安全状态的用户屏蔽 0 < FF C2 00 01 05 95 03 42 20 00 00 > C0 03 00 90 00 92 01 00 92 01 00 96 02 00 00 97 06 00 00 00 00 97 06 00 00 00 11 22 33 90 00 ; (5) 用 12 34 56 78 < FF C2 00 01 09 95 07 02 21 0012 34 56 7800 > C0 03 01 64 01 90 00 ; (6) 读取具有网络安全状态的用户屏蔽 0 < FF C2 00 01 05 95 03 42 20 00 00 > C0 03 00 90 00 92 01 00 92 01 00 96 02 00 00 97 06 00 00 97 06 00 00 12 34 56 78 90 00 ; (7) 结束透明会话 < FF C2 00 00 02 82 00 00 > C0 03 00 90 00 90 00 Re: ICODE SLI tag returns a 64 01 error for a write_single_block command 我在读取/写入 icode SLIX/SLIX2 标签时也遇到了同样的问题,写入正常,但出现了 64 01 超时。 我通过在写入的同一事务中加入计时器选项,调整命令的超时时间,从而解决了这个问题。 例如将"00 01 02 03" 写入 0 号区块 > FF C2 00 01 10 5F 46 04 40 42 0F 00 95 07 02 21 00 01 02 0300 透明命令 命令 大小(0x10 = 接下来是 16 字节) 超时 命令 到 设备 可以看出,现在答案是正确的。 该命令与原作者问题中的命令基本相同,只是增加了绿色部分,根据文档,该部分设置了 1 秒超时(可能过长)。 5f 46 = 计时器数据对象 04 = 长度 40 42 0f 00 = 1,000,000(微秒,LSB 优先),即 000f4240h = 1,000,000 可能太晚了,对最初的发帖人没用,但也许这能帮其他人省下我花费的两三个小时。 Re: ICODE SLI tag returns a 64 01 error for a write_single_block command 谢谢@jimmychan。 是的,我见过错误代码和描述列表,包括 6401。 鉴于我在原帖中提供的 APDU 序列,我想弄明白是什么原因导致该错误。   您知道标签不响应向用户内存写入单块命令的原因吗? 我想过的一个例子是,写入操作可能比读者等待的时间更长。 我曾尝试配置阅读器,让它等待更长的时间,但到目前为止,我还没能解决这个问题。 另外,我在 SLI 或 DNA 规格表中没有看到任何参考,所以我怀疑这是问题所在。   如果您能帮助我们了解标签为何没有反应,我们将再次不胜感激。   谢谢 - 德鲁 Re: ICODE SLI tag returns a 64 01 error for a write_single_block command 你可以查看参考手册 ref-ACR1552U-Series-1.06.pdf。第 43 页。 Re: ICODE SLI tag returns a 64 01 error for a write_single_block command 你好@jimmychan- 我已经阅读了阅读器的文档,这就是我使用的命令语法。据我所知,我的命令语法是正确的。你是说 6401 错误来自读卡器?您有什么具体的文件需要我查看吗? 感谢您的帮助。 德鲁 Re: ICODE SLI tag returns a 64 01 error for a write_single_block command 请阅读读者文件。 ACR1552U - USB NFC 阅读器 IV | ACS
View full article
如何将 i.MX93 Cortex-M33 板和 SDK 导入 MCUXpresso IDE? 📌 背景: 我想开始使用 MCUXpresso IDE 在 i.MX93 Cortex-M33 (MCIMX93-EVK) 板上进行开发。我已经从恩智浦网站下载了SDK ZIP,但我无法成功导入板或使用其示例。 🛠️ 我做了什么? 从 mcuxpresso.nxp.com 下载 SDK ZIP: SDK_25_03_00_MCIMX93-EVK.zip 已打开MCUXpresso 集成开发环境(版本:请在此注明) 去了 已安装的 SDK> Import → 选择 ZIP 文件 SDK 出现在集成开发环境的已安装 SDK 下。 但是,当我进入 “导入SDK示例” 时,没有任何显示,或者我无法创建导入的项目的版本。 ❓ 我的问题: 将 i.MX93 Cortex-M33 板和 SDK 导入 MCUXpresso IDE 的正确和完整程序是什么,这样我就可以: 查看支持的板 访问演示/示例应用程序(如 hello_world) 无错误地版本和调试项目 🔍 其他说明: 我的目标是 i.MX93 的Cortex-M33 内核 我只想使用MCUXpresso 集成开发环境(而不是 IAR 或 VS Code)。 🧪 预期成果: 能够使用 MCUXpresso IDE 在 MCIMX93-EVK 板上导入和版本 cm33_core0 的 hello_world 或 led_blinky 等示例项目。 如果需要其他工具或配置,请告诉我。预先表示感谢! i.MX93EVK#i.mx93 cortex-m33i.MX93#MCUXpressoIDE ##MCUXpressoSDK Re: How to Import i.MX93 Cortex-M33 Board and SDK into MCUXpresso IDE? 你好@Manjunathb 我目前也在使用i.MX93 Cortex-M33。我安装了 MCUXpresso 集成开发环境,但在将 SDK 压缩文件下放到已安装的 SDK 视图时遇到了错误(根据指南)。 了解到您也在研究相同的 M33 核心,您是否介意与我们分享任何信息以及您目前的进展情况?我还应该为 VS 代码使用 MCUXpresso 吗? 如果您能分享一些关于如何开始 M33 开发的指南或程序,我将不胜感激。谢谢。 Re: How to Import i.MX93 Cortex-M33 Board and SDK into MCUXpresso IDE? 你好 Chavira, 我目前正在使用 i.MX93 Cortex-M33 内核,我知道这款设备不支持 MCUXpresso IDE,但推荐使用适用于 VS Code 的 MCUXpresso IDE。 我已经安装了:适用于 VS Code 扩展 的 mcuxPresso i.MX93 SDK 包 ARM GCC 工具链 而且我正在使用 J-Link 调试器。 请就以下几点为我提供指导: 如何将 i.MX93 Cortex-M33 SDK 正确导入 VS 代码?SDK 文件应放在哪里,扩展程序如何检测它们? 如何创建或打开 Cortex-M33 演示或模板项目(如 hello_world 或 led_blinky)? 如何配置版本设置(编译器、链接器路径等),以便使用 MCUXpresso VS Code 环境成功编译? 使用 J-Link 探头或 remoteproc(如果使用 Linux)闪存和调试已编译应用程序的正确方法是什么? 在使用 MCUXpresso for VS Code 时,是否有 i.MX93 特有的已知限制或额外步骤? 如果能提供完整的分步说明或相关文档链接,我将不胜感激。预先感谢您的支持! 最崇高的敬意, Manjunath Badiger Re: How to Import i.MX93 Cortex-M33 Board and SDK into MCUXpresso IDE? 好的 👍 感谢您的回复 Re: How to Import i.MX93 Cortex-M33 Board and SDK into MCUXpresso IDE? 嗨,@Manjunathb! 感谢您联系恩智浦支持中心! 遗憾的是,MCUXpresso IDE 与这种情况不兼容。不过,您也可以使用 MCUXpresso for VS Code,它支持并提供类似的功能。 致以最崇高的敬意, Chavira
View full article
安装 Zephyr SDK 版本 Zephyr SDK 是一套用于构建 Zephyr 应用程序的构建工具。它包含 GCC 和 CMake,并且每个 Zephyr 版本都与特定的 Zephyr SDK 版本相关联。此版本已在 Zephyr 存储库的 SDK_VERSION 文件中注明。使用推荐的 Zephyr SDK 版本非常重要——版本不匹配可能导致构建错误。 例如,Zephyr v4.1指定Zephyr SDK v0.17.0。如果在 Zephyr v4.1 中使用 Zephyr SDK v0.17.2(用于 Zephyr v4.2),会遇到版本错误。如果您需要为 Zephyr v4.1 版本应用程序,请安装Zephyr SDK v0.17.0。 您可以安装多个 Zephyr SDK 版本,并在构建时进行切换(请参阅下方说明)。 完整安装与最小安装。 完全安装:包括每个支持的 SoC 架构的所有工具链。建议初学者使用,但需要更多磁盘空间和下载时间。 最小安装:允许您仅选择所需的工具链。节省空间和时间。 对于最小化安装,运行 setup.cmd 脚本选择要安装的工具。在恩智浦板上,选择: 注册 Zephyr SDK CMake 软件包 安装主机工具 aarch64-zephyr-elf (64 位 ARM) arm-zephyr-eabi (32 位 ARM,包括 NXP 微控制器) 可选 xtensa-nxp… (Cadence Tensilica DSP 内核) 安装 Zephyr SDK 这些步骤包括使用 MCUXpresso 安装程序安装 Zephyr SDK、从 CLI 安装 West 或手动下载。 使用 MCUXpresso 安装程序进行安装 MCUXpresso 安装程序从 Zephyr v4.2 开始支持 Zephyr 软件包。每个软件包都会安装相应的 Zephyr SDK 版本(例如,v4.2 软件包会安装 SDK v0.17.2)。此选项安装了面向恩智浦开发的最小工具集。 MCUXpresso 安装程序不支持更早版本的 Zephyr SDK。对于 v0.17.1 或更早版本,请使用 West 或手动安装。 使用 West CLI 进行安装 Zephyr 项目已将 Zephyr SDK 安装添加到 West。 对于命令行界面 (CLI),请激活Python 虚拟环境,然后运行: west sdk install --version 0.17.0   如果省略 --version ,West 将使用 Zephyr 仓库的 SDK_VERSION 文件中的版本。 默认情况下,安装完整软件包。如需最小化,请添加 -i 。 通过手动下载安装 从 https://github.com/zephyrproject-rtos/sdk-ng/releases 下载 Zephyr SDK。 请根据您的主机操作系统选择完整版或精简版。 解压到您的用户文件夹(West 和 MCUXpresso 的默认位置): Windows: C:\Users\ \zephyr-sdk-0.17.0 Ubuntu: /home/ /zephyr-sdk-0.17.0 选择 Zephyr SDK 版本 多个 Zephyr SDK 版本可以共存。West 默认使用最新版本,但你可以将其覆盖: VS Code:导入示例时,在向导中选择 Zephyr SDK 版本。 CLI:在构建前设置环境变量 ZEPHYR_SDK_INSTALL_DIR 。此命令在 Ubuntu 中设置该变量: 导出 ZEPHYR_SDK_INSTALL_DIR="/home/ /zephyr-sdk-0.17.0" 或者在 Windows 中: set ZEPHYR_SDK_INSTALL_DIR= C:\Users\ \ zephyr-sdk-0.17.0   返回 Zephyr 知识中心    
View full article
S32K14x SRAM ECC注入示例 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ******************************************************************************** 详细描述: 此示例显示了 SRAM ECC 注入。 默认情况下,在对 SRAM_U 区域中的位置进行读取访问时会注入双位 ECC 错误。 这可以通过 SRAM_U 和 DOUBLE_BIT 宏来改变。 ERM 和 MCM 模块都可以检测到错误,并可以调用相应的中断。 虽然只需要 ERM,但为了演示目的,MCM 中断也启用了 其优先级低于 ERM 中断。 首次调用的 ERM 中断会禁用注入机制 这样在堆栈读取访问期间就无法检测到后续错误。 默认的 S32 Design Studio start_up 文件将向量表复制到 SRAM_L 区域。 为了能够在此 SRAM 区域注入 ECC 错误并调用中断, 复制被 __flash_vector_table__ 符号禁用 在start_up.h中声明文件并在S32K144_64_flash链接器文件中定义。 -------------------------------------------------------------------------------------------- 测试硬件:S32K144EVB-Q100 单片机:S32K144 0N57U 调试器:S32DSR1 目标:internal_FLASH ********************************************************************************
View full article
[RTD600 MCAL] S32K3X4EVB-T172 RTC API Wake-up This example project will show user how to use and configure the basic functionalities of WKPU + GPT RTC API.  ------------------------------------------------------------------------------ * Test HW: S32K3X4EVB-T172 (SCH-53148 REV B2) or S32K344MINI-EVB * MCU: S32K344 * IDE: S32DS3.5 & S32DS3.6 * SDK release: RTD 6.0.0 * Debugger: PE Micro * Target: internal_FLASH  ------------------------------------------------------------------------------ This example routine configures the WKPU & RTC units for wake-up. The RTC is present in always ON domain, hence available in RUN mode as well as in STANDBY mode. The chip contains one instance of RTC (Real Time Clock) timer and API (Autonomous Periodic Interrupt) timer, where both can perform 32-bit comparisons. Both RTC and API timers can generate interrupts as well as wake-up from low power modes. The following figure highlights the path for RTC API wake-up. Please refer to Chapter 69.3.2 API functional description from the S32K3XX reference manual (Rev. 12) for further information. The routine waits for SW5 to be pressed, then: Turns off the green LED Switches CORE_CLK to Option C - Boot Standby mode (CORE_CLK @ 24 MHz). Initializes the ICU driver. Configures RTC_API channel (WKPU0) Initializes GPT module. Starts timer and sets RTC_API_TIME. Enters standby. After the period defined, RTC API generates an interruption and MCU wakes up. After wake-up, MCU resets and polls for SW5 to be pressed again. The RTC API value can be changed with RTC_API_TIME definition. This example is provided as is with no guarantees and no support.
View full article