Multi Source Translation Content

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

Multi Source Translation Content

讨论

排序依据:
INS-N1981 Wireless MCU Overview As the Smart Home starts to gather momentum, a number of competing Wireless Communication standards are fighting for dominance. With ZigBee® now becoming dominant in the low-power networking market, there is no surprise that two new low power technology Thread and Bluetooth® Low Energy with the new Mesh capability are both trying to enter this market to get a piece of the cake. Moreover competing IoT platforms from the Thread Group (Google/Nest), Allseen Alliance (Qualcomm), Apple's Homekit, the Open Interconnect Consortium (Intel) and many others are creating even more confusion. So in this confusing array of Wireless Communication standards and Iot platforms, what are the main features of each and what does it means for NXP? This session will provide an overview of these Wireless connectivity standards and IoT platforms, their capabilities, and their implication for NXP IoT. Watch Video Presentation As the Smart Home starts to gather momentum, a number of competing Wireless Communication standards are fighting for dominance. With ZigBee® now becoming dominant in the low-power networking market, there is no surprise that two new low power technology Thread and Bluetooth® Low Energy with the new Mesh capability are both trying to enter this market to get a piece of the cake. Moreover competing IoT platforms from the Thread Group (Google/Nest), Allseen Alliance (Qualcomm), Apple's Homekit, the Open Interconnect Consortium (Intel) and many others are creating even more confusion. So in this confusing array of Wireless Communication standards and Iot platforms, what are the main features of each and what does it means for NXP? This session will provide an overview of these Wireless connectivity standards and IoT platforms, their capabilities, and their implication for NXP IoT. Watch Video Presentation Insight & Innovation
查看全文
无线充电让您摆脱电线的束缚! <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 如果您的智能手机、平板电脑或数字智能手表的电池可能会没电,或者您的床头柜或办公桌上的充电线可能缠绕不住您,那么无线充电器的简便性将使您的梦想成真!但无线充电器需要很多技术,而且并不是都一样。NXP 的发射器和接收器组件系列为 Qi 和 Rezence 标准提供解决方案。我们对这两者进行了研究,并提供了一些实用的硬件解决方案来切断这种联系。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 如果您的智能手机、平板电脑或数字智能手表的电池可能会没电,或者您的床头柜或办公桌上的充电线可能缠绕不住您,那么无线充电器的简便性将使您的梦想成真!但无线充电器需要很多技术,而且并不是都一样。NXP 的发射器和接收器组件系列为 Qi 和 Rezence 标准提供解决方案。我们对这两者进行了研究,并提供了一些实用的硬件解决方案来切断这种联系。
查看全文
LPC177x_8x u-boot端口 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 该项目解释了如何使用 LPC177x_8x 设备为平台构建和部署 u-boot。要构建 u-boot,您需要运行 Linux 操作系统的系统、适用于 Linux 操作系统的最新 CodeSourcery GNU 工具、u-boot 源代码以及适用于 LPC1788 的 u-boot 补丁。 已实现的功能 -------------------------------------------------------------------------------- 支持带有 32 位 DRAM(32MB)的 EA1788 主板 支持EA1788板的NAND FLASH 支持LPC177x_8x内部FLASH 以太网支持 有限的 MPU 支持 u-boot 已知问题 -------------------------------------------------------------------------------- 问题:“重置”命令导致电路板崩溃 解决方法:改用“cmreset”命令 问题:“boot”命令导致主板崩溃 解决方法:使用环境变量和 go 命令编写脚本 问题:bootvx 命令导致主板崩溃 解决方法:无,但没有理由使用此命令 未实现的功能 -------------------------------------------------------------------------------- FLASH“保护”命令和功能未实现(易于实现) 未实现中断/NVIC 支持(易于实现) 可能的改进 -------------------------------------------------------------------------------- Systick 可以代替 LPC1788 匹配定时器 重定位代码已被“绕过”,并且未正确实施 针对设备特定 IRQ 的宏文件,即需要包含弱链接 在启动文件中(特定于架构的设备覆盖) 有一个基本的 MPU 驱动程序,似乎可以工作,但可以改进 以太网驱动程序和 PHY 设置是“特定于板的”,但可以移动 到驱动程序区域,可以使用通用 PHY 支持 u-boot 启动操作概述 -------------------------------------------------------------------------------- 以下是 u-boot 如何在 LPC1788 上启动的概述。 - LPC1788 启动 ROM 将控制权转移到内部 FLASH 中的 u-boot 代码 每个 CM3 启动过程的地址 0x0 - u-boot 代码首先设置 MPU - 引脚复用、时钟和 DRAM 均已初始化 - 代码和数据从 FLASH 迁移到 DRAM - DRAM 中的 BSS 段被清除 - 控制权转移到 DRAM 中的 u-boot 代码 - 调用 u-boot board_init_f() 进行初始 u-boot 设置 - board_init_r() 用于稍后的 u-boot 设置 - u-boot 在 DRAM 之外正常运行 移植文件的位置 -------------------------------------------------------------------------------- arch/arm/cpu/cortex-m3 - Cortex M3 特定文件(mpu、启动等) arch/arm/cpu/cortex-m3/lpc1788 - LPC1788 特定文件(计时器、串行等) arch/arm/include/asm/arch-cortex-m3 - Cortex M3 头文件 arch/arm/include/asm/arch-lpc17xx - LPC177x_8x 特定的头文件 board/nxp - 使用 NXP 设备的电路板专用区域 board/nxp/ea1788 - EA1788 板特定文件(设置、nand 等) include/configs/ea1788.h - EA1788 板特定配置文件
查看全文
An Overview on QorIQ Trust Features for Securing Embedded Systems EUF-NET-T1742 - This session provides an overview on the security technologies NXP offers to secure a system through two complementary technologies: 1) the Trust Architecture already present in QorIQ P- and T-series including Secure Boot and 2) the TrustZone® technology introduced in the ARM®-based QorIQ LS series processors. We will outline the motivations for offering these technologies in embedded processors and show how they can be complementary for making a final system “Trustable” in the sense it does what its users and suppliers expect it to do. EUF-NET-T1742 - This session provides an overview on the security technologies NXP offers to secure a system through two complementary technologies: 1) the Trust Architecture already present in QorIQ P- and T-series including Secure Boot and 2) the TrustZone® technology introduced in the ARM®-based QorIQ LS series processors. We will outline the motivations for offering these technologies in embedded processors and show how they can be complementary for making a final system “Trustable” in the sense it does what its users and suppliers expect it to do.
查看全文
FTF-IND-F1348 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 本课程基于 FRDM-K22F 开发板和多功能新型 Arduino 兼容 Shield,讨论如何实现:使用 Kinetis K2 和 LS Research 预认证的 Wi-Fi(TiWi-CW)和 BLE(SaBLE-x)无线模块的物联网应用。使用 TiWiConnect LIFT 软件协议流式传输到云端(大大简化了软件开发)。使用与 Freescale Freedom 板连接的第三方 Pmod 兼容(I2C 和 SPI)板进行传感器和 I/O 扩展。使用加速软件开发和预认证无线模块,加快您的物联网产品的上市时间。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 本课程基于 FRDM-K22F 开发板和多功能新型 Arduino 兼容 Shield,讨论如何实现:使用 Kinetis K2 和 LS Research 预认证的 Wi-Fi(TiWi-CW)和 BLE(SaBLE-x)无线模块的物联网应用。使用 TiWiConnect LIFT 软件协议流式传输到云端(大大简化了软件开发)。使用与 Freescale Freedom 板连接的第三方 Pmod 兼容(I2C 和 SPI)板进行传感器和 I/O 扩展。使用加速软件开发和预认证无线模块,加快您的物联网产品的上市时间。
查看全文
FreeRTOS 与 MQX RTOS 的快速概述 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> FreeRTOS 与 MQX RTOS 的快速概述 MQX实时操作系统是专为单处理器、多处理器和分布式处理器嵌入式实时系统设计的。飞思卡尔半导体公司在其微处理器中采用了该软件平台。这包括 Kinetis、Coldfire、PowerPC、ARC、ARM、StrongARM、xscale CPU。MQX RTOS 的主要特点是可扩展的大小、面向组件的架构和易于使用。 FreeRTOS 是一种流行的嵌入式设备实时操作系统内核,已移植到 35 种架构。它在 GPL 下分发,但有一个可选例外。FreeRTOS 占用空间非常小,开销很低,执行速度非常快。内核本身仅由三或四个 C 文件组成。最少 4-8k 字节闪存。 类似功能:[待完成] 任务、事件、信号量、互斥量、消息队列、空闲省电                                                                  Freertos 的独特功能: 1 任务通知:每个 RTOS 任务都有一个 32 位通知值,该值在创建 RTOS 任务时初始化为零。RTOS 任务通知是直接发送给任务的事件,可以解除对接收任务的阻塞,并可选择更新接收任务的通知值。 2 递归互斥锁:递归使用的互斥锁可以被所有者反复“获取”。直到所有者为每次成功的 xSemaphoreTakeRecursive() 请求调用 xSemaphoreGiveRecursive() 之后,互斥锁才会再次可用。例如,如果某个任务成功“获取”同一个互斥锁 5 次,则该互斥锁将无法供任何其他任务使用,直到该任务也将互斥锁“归还”5 次为止。 3 堆栈溢出钩子/通知:每个任务维护自己的堆栈。任务堆栈使用的内存在任务创建时自动分配,并由传递给 xTaskCreate() API 函数的参数确定大小。堆栈溢出是导致应用程序不稳定的一个常见原因。因此,FreeRTOS 提供了两种可选机制,可用于协助检测和纠正此类事件 4 延迟中断处理:从应用程序中断服务程序中使用,将功能的执行延迟到 RTOS 守护进程任务。提供了一种机制,允许中断直接返回到随后将执行挂起功能的任务。这使得回调函数能够与中断连续执行 - 就像回调在中断本身中执行一样 5 多个对象上的阻塞:队列集是 FreeRTOS 的一项功能,它使 RTOS 任务能够在同时从多个队列和/或信号量接收时阻塞(挂起)。队列和信号量被分组为集合,然后,任务不再阻塞在单个队列或信号量上,而是阻塞在集合上。 MQX 的独特功能: 1 基于所有权的资源破坏:[待完成] 2 名称服务:任务可以将一个 32 位数字与一个字符串或符号名称关联起来。MQX RTOS 将这种关联存储在名称数据库中,该数据库中的所有任务 处理器可以使用。数据库避免使用全局变量。 3 处理器间通信:应用程序可以在多个处理器上同时运行,每个处理器上都有一个 MQX RTOS 的可执行映像。图像使用由内存或通过处理器间通信的通信链路传输的消息进行通信和协作。每个图像中的应用任务不必相同,而且实际上通常是不同的。 4 看门狗:看门狗是可选组件,可让用户检测任务级别的任务饥饿和死锁情况。 5 任务队列调度:您可以使用任务队列来显式调度任务,或创建更复杂的同步机制。由于任务队列提供的功能很少,因此速度很快。应用程序可以在创建任务队列时指定先进先出 (FIFO) 或循环 (Round Robin) 调度策略。
查看全文
Introducing eRPC This tutorial is introducing the eRPC (embedded remote procedure call) open-source project. The eRPC (Embedded Remote Procedure Call) is a Remote Procedure Call (RPC) system created by NXP. An RPC is a mechanism used to invoke a software routine on a remote system using a simple local function call. The remote system may be any CPU connected by an arbitrary communications channel: a server across a network, another CPU core in a multicore system, and so on. To the client, it is just like calling a function in a library built into the application. The only difference is any latency or unreliability introduced by the communications channel. Important links:  Everything related to the eRPC development is placed GitHub - eRPC base. The eRPC development is placed GitHub - eRPC development.  The eRPC releases are placed GitHub - eRPC Releases. The eRPC documentation is placed Github - eRPC wiki  The eRPC as Python Package on pypi  The eRPC is supporting multicore and multiprocessor types of applications.  Where to find eRPC examples Plenty of eRPC multicore and multiprocessor examples can be found in NXP MCUXpressoSDK packages. Visit https://mcuxpresso.nxp.com to configure, build and download these packages. To get the board list with multicore support (eRPC included) use filtering based on Middleware and search for 'multicore' string. Once the selected package with the multicore middleware is downloaded, see /boards/ /multicore_examples for eRPC multicore examples (RPMsg_Lite or Messaging Unit transports used) or /boards/ /multiprocessor_examples for eRPC multiprocessor examples (UART or SPI transports used). eRPC examples use the 'erpc_' name prefix. Another way of getting NXP MCUXpressoSDK eRPC multicore and multiprocessor examples is using the mcux-sdk Github repo. Follow the description how to use the West tool to clone and update the mcuxsdk repo in readme Overview section. Once done the armgcc eRPC examples can be found in mcuxsdk/examples/ /multicore_examples or in mcuxsdk/examples/ /multiprocessor_examples folders. You can use the evkmimxrt1170 as the board_name for instance. Similar to MCUXpressoSDK packages the eRPC examples use the 'erpc_' name prefix. Re: Introducing eRPC Hello Kunal, it seems your question is addressed here: Need Help-Step by Step procedure to implement eRPC in iMx6sx ? · Issue #5 · EmbeddedRPC/erpc-imx-demos · GitHub  Re: Introducing eRPC HI [email protected]‌, I don't know about official usage of eRPC on MPC5748G. Just the remind: eRPC depends on program language, OS, transport layer. There are not board specific files. So if there is used Freertos and C language you almost win, you need just port transport you want to use (if it is not already). Re: Introducing eRPC Hi Dusan,                    Has eRPC been ported to NXP MPC5748G ? Is there any example code I can reference? Best Regards, Alex Re: Introducing eRPC Hi [email protected], i didn't have big experience in this area. Recently we had to add some mutexes when multiple erpc calls were called from multiple taks. But i like your idea.  I quickly looked into source code. You need to specify your usecase. But i think it is imx Linux vs Mcore using RPSMG. In this case i think you can add mutexes as we did (which will serialize eRPC calls. you would need add them somewhere in performRequest function). The creating endpoints for each thread sounds good to me, but i see more issues which has to be solved. The smaller solution could looks like: transport init function will initialize more endpoints (based on number of tasks), eRPC rpmsg send/receive function on client side change to use unused undepoint to send and same endpoint for receive messages, eRPC rpmsg receive function on server need wait for message on all endpoints. I don't know if it is simple task or more complicated for you. But i am affraid that without modification to code you will be not able to have multithread calls. Re: Introducing eRPC Hi Dusan, I am working with Chandini here at Cubic. I just wanted to get extra info about eRPC when called from multiple threads. At the moment we are using a single end point and using this for one off calls that complete before making the next call. Now we'd potentially like to make multiple calls from multiple threads so we're wondering the best way to do this. In fact with my lack of knowledge here we've tried making other calls concurrently, well we didn't realise we were doing this until there was an issue. Now we see comms failure error codes coming back from the eRPC. Can a single end point be used for this i.e. should this be thread safe on the client side? If not should we use a separate end point for each thread, or should we be doing something else? Regards Lee Re: Introducing eRPC Hi [email protected]‌, Thank you to let us know. It is funny, i read about this today because of another project :smileygrin: Re: Introducing eRPC Hi Dusan, Thanks for the quick response. I could able to achieve better performance(response in microsec) in TCP by disabling the Nagel's algorithm using the below API call on both client and server socket connection. int result = setsockopt(sock,            /* socket affected */                         IPPROTO_TCP,     /* set option at TCP level */                         TCP_NODELAY,     /* name of option */                         (char *) &flag,  /* the cast is historical cruft */                         sizeof(int));    /* length of option value */ Reference : TCP_NODELAY: 2018 Best Practices for TCP Optimization | ExtraHop  Thanks, Sasidharan. Re: Introducing eRPC Hi [email protected]‌, Maybe you can ask guys on github (in same topic, or create new one). There are at least two guys who where doing something with TCP: github: GitHub - EmbeddedRPC/erpc: Embedded RPC  thread1:Server with TCP Transport handling multiple connections · Issue #32 · EmbeddedRPC/erpc · GitHub  thread2:TCP Example client / server code · Issue #39 · EmbeddedRPC/erpc · GitHub  Personaly i found this, but i don't know if this is your case and if it will help: linux - Low latency TCP settings on Ubuntu  Re: Introducing eRPC Hi Dusan, I want to port eRPC over TCP socket. I ran your example test code(test_arrays) over virtual serial(inside linux) and the response time taken for serial is less than 1ms. When I ran the same example code over TCP, the response time is taken for TCP is around 90ms. Is there a way to reduce the latency and increase the performance over TCP as like as serial? Thanks, Sasidharan. Re: Introducing eRPC Hi, Dusan. It helped. By the way it was mentioned in example in header file. The function call from A9 works fine and M4 returns data. But now the issue is when M4 calls function. The error is appears in A9 "Waiting MU transmit buffer empty timeout! ugh, imx_mu_rpmsg_send() failed: -5".  After this error data function call doesn't work in another side too: "rpmsg_multiept rpmsg0: virtqueue_add_outbuf failed: -5" What should I check? Thank you for your help. Re: Introducing eRPC Hi Vadim, Generally yes you need two tasks. One for client and one for server. Issue is also that output from erpc_arbitrated_client_init you have to put as a parameter to init server.  Re: Introducing eRPC Hi Dusan, Marek, community. I've made several applications with eRPC, M4(client)-A9(server) or M4(server)-A9(client) works fine, but I want to use client/server appl on each side. But now it doesn't work or function from one side only executes 1 time and appl hangs. I want to check the general structure of the code. What I do wrong? Should I use 2 separate FreeRTOS tasks for client and server on M4? M4 . . erpc_transport_t transport = erpc_transport_rpmsg_lite_rtos_remote_init(.....); erpc_mbf_t message_buffer_factory = erpc_mbf_rpmsg_init(transport); erpc_server_init(transport, message_buffer_factory); erpc_add_service_to_server(create_TEST_service()); erpc_arbitrated_client_init(transport, message_buffer_factory); while (true) { erpc_server_poll(); function1(....); } A9 . . erpc_transport_t transport = erpc_transport_rpmsg_linux_init(......); erpc_mbf_t message_buffer_factory = erpc_mbf_dynamic_init(); erpc_server_init(transport, message_buffer_factory); erpc_add_service_to_server(create_TEST_service()); erpc_arbitrated_client_init(transport, message_buffer_factory); while (true) { erpc_server_poll(); function2(....); } Re: Introducing eRPC Hi vadimfilippenko, if you are stilll interested in using python version you can look into this thread adding MPU patch to my kernel - I cannot see the new module · Issue #2 · EmbeddedRPC/erpc-imx-demos · GitHub . At least last two messages from mhanuel26 should be interesting for you because he was able to use python application. Re: Introducing eRPC Dusan, Marek, finally I successfully started modified eRPC example. But I use C on Linux side and erpc 1.5.0 with 6x parameters rpmsg init function in M4 (Dusan tips at github concerning 6th parameter). Thank you for help. Be ready for new questions) Re: Introducing eRPC You need to run M4 app befor the python app. Re: Introducing eRPC Hi Vadim, Please post here: ls /sys/class/rpmsg it looks like the nameservice was not sent from the M4 (is M4 running with the right firmware?). Because of this, a folder with dynamically announced channel from M4 was not created and therefore python cannot create rpmsg  transport... Please check your M4 core print-outs. Regards, Marek Re: Introducing eRPC Hi Vadim,  as you see in other comments, i am trying to answer as soon as possible. But this week (and maybe next) i am busy.  But from what i see in error you should compare init function in transport.py - class RpmsgTransport And here erpc-imx-demos/sysfs.py at master · EmbeddedRPC/erpc-imx-demos · GitHub   - class RpmsgEndpoint Be sure that GitHub - EmbeddedRPC/erpc-imx-demos: eRPC demos for i.MX devices  is up to date and and subrepos are checkout on commits as they are aligned with erpc-imx-demos. Maybe mareknovak‌ can help better here what is wrong.  Looks like  if self.id == -1: raise Exception() is returning -1 Re: Introducing eRPC Could anybody help me with follow ussue?: I'm using use eRPC demo example from erpc-imx-demos on iMX6COM board. Starting demo application on M4 side: "Hardware initialized eRPC intialized MatrixMultiply service added" adding driver in linux: "root@imx6sxea-com:~# modprobe -v rpmsg_multiept insmod /lib/modules/4.1.15-2.0.3+geb0b90b/kernel/drivers/rpmsg/rpmsg_multiept.ko" (Here are not any feedback from the system that rpmsg channel was created and rpmsg folder under sys/class/rpmsg is empty) Starting appl demo on linux: Traceback (most recent call last): File "example.py", line 111, in transport = erpc.transport.RpmsgTransport() File "build/bdist.linux-armv7l/egg/erpc/transport.py", line 199, in __init__ File "build/bdist.linux-armv7l/egg/rpmsg/sysfs.py", line 116, in __init__ Exception Exception TypeError: 'an integer is required' in > ignored P.S. I've built M4 eRPC demo appl. using cmake and also eclipse. M4 rpmsg demo appl works fine. Re: Introducing eRPC Hi Vakul, sorry i miss your comment. Currently we don't have any cryptographic transport supported. But because of eRPC is modular, i think you can easily add this feature to your eRPC project. Re: Introducing eRPC Hi Can eRPC communication be protected using some cryptographic transport (e.g. TLS)? Regards Vakul Re: Introducing eRPC Hi Evgeny, currently we have no estimation for that. But i think you can write/use your own allocator by writing your own implementation of erpc_malloc/erpc_free functions. Re: Introducing eRPC Hi Dusan, Are there plans to add more static memory allocation to additional parts, such as generated equivalents of erpcMatrixMultiply_shim? Where every input argument gets dynamically allocated before filling it up with data from the codec and then freed after the function invocation? Something like passing pre-allocated memory (statically by user app) to the framework? Thanks, Evgeny Re: Introducing eRPC Hi Evgeny, this looks like MCUExpresso project files/IDE issue. Top layer of folder names should be virtual directories, which will be not presented there in future. In your package on your disk should eRPC have similar directory structure as on github. Github directory structure is preferred.  Re: Introducing eRPC Hi Dusan, I see that the erpc uses a lot of dynamic memory allocation at run-time. Is there a plan to make it more embedded friendly and add a static memory allocation scheme? EDIT: I am sorry for the first question, i do see the erpc_setup_mbf_static.cpp in the repository. The thing is that i am basing  my code on the examples provided in the MCUXpresso SDK - frdmk66f_multiprocessor_examples_erpc_server_matrix_multiply_spi & frdmk66f_multiprocessor_examples_erpc_client_matrix_multiply_spi. Which have a very different directories structure from the code in the repository.  So my question is, again, should the SDK examples directories structure should be used or the repositories? ANd why are they so different? Thanks, Evgeny  Re: Introducing eRPC Hi Evgeny, first of all: Are you using smac.erpc from develop branch (and app built from that branch)? For me is this version working.  Right now version of erpcgen app and rest of eRPC code is connected. That means if you want use newer erpcgen app you built from github, you should and have to copy github erpc_c/* files from github into your example. After than you can regenerate code with newer erpcgen app, update application (erpc init + transport) functions and everything else should work. Otherwise if you will not update erpc_c files you have to use provided erpcgen app. Look at the bottom of this page: Getting Started · EmbeddedRPC/erpc Wiki · GitHub  Should be pretty up to date for newer erpcgen version. I am not sure but on newest commit spi could get changed so you can use older implementation instead. Re: Introducing eRPC Hey Dusan, When i use the erpcgen.exe that i built, i get the same error on the smac.erpc example: error: file smac.erpc:135:5: syntax error, unexpected identifier, expecting '}' The directory structure that i was referring to is the erpc_c from the repository and: From the SDK example. Which directory structure is the "right" one? Would it be safe to use the newly generated files (by me) with the SDK example code? Thanks, Evgeny Re: Introducing eRPC Hi evgenyerlihman‌, Prefered code is always on github on develop branch. Once this code will meet our requirements for new release we will merge it into master branch and we will provide also binaries of application. These updates on develop branch are more often than releases of Kinetis SDK. If some existing eRPC transport will not met version with transport used in Kinetis SDK you can compare old eRPC transport with newer one, or look on file changes in git repository. Re: Introducing eRPC Hey dusancervenka-b51352, Thank you for the quick reply! I cloned the dev branch. I see that the erpc_c directory structure is way different than the example provided with the Kinetis SDK. Which one is preferable? Thanks, Evgeny Re: Introducing eRPC Hi evgenyerlihman‌, Actually we are doing updates more frequently. You need switch to develop branch. GitHub - EmbeddedRPC/erpc at develop. Last code update was yesterday. But you need build erpcgen application there. With that smac IDL should works.  Re: Introducing eRPC Hi dusancervenka-b51352, I am considering using the erpc framework for a new product i am working on, that uses multiple nxp kinetis devices. I see that last updates to erpc github were made 6 months ago. My question is, is it still being maintained/fixed/developed? I tried the example from github: erpcgen.exe smac.erpc And it failed to generate the cpp source code with an error. The erpcgen executable is from the SDK for MCUXpresso. Thanks, Evgeny Re: Introducing eRPC Hi Chandini, It is ok. I was on long holiday too. I hope you enjoyed it well.  I sent you email through community messaging system (private message). We can discuss details through emails. Basically you ned create fork on github, checkout to develop branch, apply your changes, create commit, create pull request. We will review your changes, suggest changes and merge to develop branch. Re: Introducing eRPC Hi Dusan , Very sorry for late response , i was on long holiday . came back now . spoke with my everyone here .  could you please send me your email id so that we will forward stuff for you . according to our company we cant put anything directly to your github . Thank you Chandini  Re: Introducing eRPC Hi Dusan , Sure , i will talk to my seniors and create pull request  . currently i am on holiday .Sorry for the late reply. Thank you Chandini Re: Introducing eRPC Hi Chandini. We are glad you have succeeded. If i can have one special proposal for you, could you send pull request on develop branch on eRPC github with your newly created transport layer (on develop branch). Maybe there will be some work to get it working with newer eRPC. But if you not want updated it i can do that  With pull request on github you will be valuable contributor always seen in contributor's history. I hope eRPC will be good solution for you. And we are always here/ or on github for you Re: Introducing eRPC Hi dusancervenka-b51352 , b50844 , novakma7   Finally got it working , now demo working fine with my c++ code in Linux . Thanks a lot guys for answering all my questions. Special thanks to Dusan  Thank you Chandini Re: Introducing eRPC HI Dusan , As i was busy in some other task , Yesterday i could not try anything . today i will try and let you know . I think i have to change my functions little bit and need to try . because till now i was passing just char* to my send and receive functions. Come back to you soon. Thank you Chandini Re: Introducing eRPC Hi Chandini, yes that is correct. I was outside of company, so i didn't know exact names for functions. Is it working for you? Re: Introducing eRPC Hi Dusan Thank you for your reply : write(fd, message->getBuffer(), message->getUsed()😞 I can see getused function in  erpc/message_buffer.h at 9e18d069aeae19a6e80a5e8783903bc63bd9b567 · EmbeddedRPC/erpc · GitHub  but could not find getbuffer function. I think i have to use below function to get my buffer ? is that right ? /*! * @brief This function returns pointer to buffer to read/write. * * @return Pointer to buffer to read/write. */ uint8_t *get() { return m_buf; } so my functions becomes like this: send :erpc_status_t send(MessageBuffer *message) { write(fd, message->get, message->getUsed())};  Thank you chandini Re: Introducing eRPC Hi chanidi, well you need do it in diferent way 😕 You have to use transport.h. It will not work if you will not use that.  Maybe you can use ioctl commands as i mentioned above: erpc_status_t receive(MessageBuffer *message) {int fd = open("/dev/rpmsg_ept1024.1", O_RDWR);} send :erpc_status_t send(MessageBuffer *message) { write(fd, message->getBuffer(), message->getUsed())}; read: erpc_status_t receive(MessageBuffer *message){size_t size = read(fd, message->getBuffer(), 500); message->setUsed(size)}; novakma7 Can you confirm steps? Re: Introducing eRPC Dusan , Marek Ya i am referring those files as well , but i am using trasport.h to create my transport layer. but facing argument miss-match  problem send and receive functions in transport.h , take Messagebuffer as argument,          virtual erpc_status_t receive(MessageBuffer *message) = 0;          virtual erpc_status_t send(MessageBuffer *message) = 0; As per example.py i have created my RpmsgEndpoint class which need below arguments       RpmsgEndpoint::receive(int maxlen)       RpmsgEndpoint::send(char *buffer,int dst) As per my understanding, we are just need to read and write /dev/rpmsg_ept1024.1 device from Linux .   So i think instead of using transport.h , i think should i need to create my own transport.h version ,? Thank you guys Chandini Re: Introducing eRPC You are welcome. You can get inspirations in /erpc-imx-demos/middleware/erpc/transport/ folder. There is several transports. Re: Introducing eRPC Thanks a lot Dusan for quick reply , i will continue in the same path then and come back to u shortly .  Re: Introducing eRPC Hi Chandini. You are right. That are correct steps. You need create your class which is inheriting class from transport.h Re: Introducing eRPC Hi Marek I have question again . Currently my working status  : i got RpmsgEndpoint class in c++ I am working on how to make my client application working now. Python  example.py in erpc-imx-demos/MPU/example_erpc at master · EmbeddedRPC/erpc-imx-demos · GitHub  call  RpmsgTransport which inherited from Transport class. Question i have is , shall i use transport.h which is inside /erpc-imx-demos/middleware/erpc/erpc_c/infra  to make my application work. So that i can create my RpmsgTransport class and call it my client application . Am i thinking correctly ?  Thank you in advance Chandini Re: Introducing eRPC Yes, you are right. All the Python does are just IO operations on the files (read/write). This is doable in any language, including C/C++. Python was selected to show how it can be done due to its popularity in Linux user-space, but you can certainly port it to C. I think we are on the same wavelenght now, Good luck! Regards, Marek Re: Introducing eRPC Hi Marek Thank you for your reply , it cleared few of my doubts. We are not planning to use freeRTOS on both side. Our plan is   M4- FreeRTOS ----This we have it in your Demo A7-Linux -----Your Demo got python code , to make use of kernel RPMSG implemenation   All we need is instead of python either C or C++. I think  we can port  python code to C or C++ , easily right ? Thank you Chandini Re: Introducing eRPC Hi Chandini Indavara Basavaraju, RPMSg-Lite is implementation of RPMsg protocol and is intended only for the M4 side running FreeRTOS or baremetal. On the Linux/A7 side, you should be fine with the RPMsg implementation in kernel. (like here: GitHub - EmbeddedRPC/erpc-imx-demos: eRPC demos for i.MX devices  ) Or are you planning to run FreeRTOS on both M4 and A7 cores? In that case it would work, but this is not a standard use-case. It would require you to create a porting layer for the A core and to make FreeRTOS run there.  I hope this gives you some direction, Marek Re: Introducing eRPC Hi Marek Some how i have missed your message , sorry for that thanks a lot . i will try your new version soon. Could you please answer my last question regarding RPMSG transport layer ? Thank you  Chandini Re: Introducing eRPC Hi, i understand you.  You need create new one (and with pull request on github you can add it to our repository if you want). On Linux side you can use /dev/ttyRPMSG (if it is present in system).   for example create new transport here erpc_c/transports with: init can looks like:  int fd = open("/dev/ttyRPMSG", O_RDWR); send : write(fd, buffer, buffer_size); read: size_t size = read(fd, buffer, expected size); If there is no device named like this, you can be inspired from python code. RPMSG is not my cup of tea. I don't know how it should be used on Linux. I will forward your question to Marek. Re: Introducing eRPC Hi Dusan , Marek What i am planning : use rpmsg-lite on both M4(freertos) and A7(Linux) What i need: RPMSG C warrper (under erpc_c/setup) which can be use on both M4 and A7 side RPMSG Transport Layer (under erpc_c/transports) which can be use on both M4 and A7 side Questions i have: Could please tell me , Do you have any transport layer for that ?    or Do we need to refer rpmsg-python and write similar like that ?  Any suggestions will be so helpful Thank you guys Chandini Re: Introducing eRPC Hi, i am not sure if we have what you need (c transport for Linux side). But it should be easy to create new one. You can read and write from/to /dev/ttyRPMSG (if it is present in system). for example: init can looks like:  int fd = open("/dev/ttyRPMSG", O_RDWR); send : write(fd, buffer, buffer_size); read: size_t size = read(fd, buffer, expected size); mareknovak can brings more sun into this issue. Re: Introducing eRPC Hi Dusan , thank you for letting me know about update. I thiink now i am ok with erpc what i have shortly , once i got rpmsg Client application working then i can update erpc version as well. I was started looking rpmsg-lite , that got M4 platform files . i wonder do have anything for A7 platform ? or any information will be so helpful. my main aim is to get Client  Application using C with RPMSg as Transport layer Thank you Chandini Re: Introducing eRPC I am happy that you are progressing independently with your issue (for us it means it is not too much complicated for developers). Also mareknovak already updated his imx demo application inside the repository as he mentioned in few comments above. Your next step can be used that version because it is using new rpc features Re: Introducing eRPC Thank you for reply Dusan  that was the information i was looking for, i have created C wrapper for TCP  , after couple of fixes in erpc,  it works fine . My next step is to replace TCP layer with rpmsg . Thank you again Chandini Re: Introducing eRPC Hi Chandini Indavara Basavaraju, I have just updated the GitHub - EmbeddedRPC/erpc-imx-demos: eRPC demos for i.MX devices  repository to use eRPC 1.4.0 and RPMSg-Lite 1.1.0. You can download a pre-built erpcgen application, which is used for code generation here: Release v1.4 · EmbeddedRPC/erpc · GitHub  in the downloads section, just choose your architecture. Then you invoke it like this: ./erpcgen -gpy nameOfInterfaceDefinitionLanguageFile.erpc, this will generate Python serialization and deserialization shim code for you. If you omit -gpy or specify -gc, you will get C shim code. The ser/des shim code was also update in the latest commit in the erpc-imx-demos repository, so feel free to use it. Feel free to submit your changes in form of a pull-request, Regards and thank you for using eRPC & RPMsg-Lite! Marek Re: Introducing eRPC Hi, we don't have currently example on github repository. But we have C(c++) test there. If you are familiar with Linux or Mac you can use that as a example. Other options are as described above: 1. Download sdk for supported board -> multicore/multiprocessor c/python examples. 2. Read this article: Getting Started · EmbeddedRPC/erpc Wiki · GitHub  Re: Introducing eRPC Hi Dusan Could you please tell me , do u have any client application c example instead of python .? or Do you guys are planning to write one ?it will be so useful and helpful, if you have one already. Thank you in advance Chandini Re: Introducing eRPC Finally i got it working , thank a lot for you help   Dusan sorry i could not find attach option to attach my patch . so pasted below. From 7a5b152524a3c82b5bced4a72ed396f21860b666 Mon Sep 17 00:00:00 2001 Date: Mon, 8 May 2017 11:33:05 +0100 Subject: [PATCH] fix to run eRPC_demo --- erpc_c/infra/transport.h | 4 +- erpc_c/setup/erpc_server_setup.cpp | 36 ++++- erpc_c/setup/erpc_server_setup.h | 2 +- erpc_c/setup/erpc_setup_rpmsg_lite_rtos_remote.cpp | 54 +++++++ erpc_c/setup/erpc_transport_setup.h | 18 ++- erpc_c/transports/rpmsg_lite_rtos_transport.cpp | 158 ++++++++++++++++++ erpc_c/transports/rpmsg_lite_rtos_transport.h | 177 +++++++++++++++++++++ erpc_c/transports/rpmsg_rtos_transport.h | 147 +++++++++++++++++ erpc_python/erpc/transport.py | 21 +++ 9 files changed, 602 insertions(+), 15 deletions(-) create mode 100644 erpc_c/setup/erpc_setup_rpmsg_lite_rtos_remote.cpp create mode 100644 erpc_c/transports/rpmsg_lite_rtos_transport.cpp create mode 100644 erpc_c/transports/rpmsg_lite_rtos_transport.h create mode 100644 erpc_c/transports/rpmsg_rtos_transport.h diff --git a/erpc_c/infra/transport.h b/erpc_c/infra/transport.h index eb7ec71..fd4862a 100644 --- a/erpc_c/infra/transport.h +++ b/erpc_c/infra/transport.h @@ -48,7 +48,7 @@ //////////////////////////////////////////////////////////////////////////////// namespace erpc { - +class MessageBuffer; /*! * @brief Abstract interface for transport layer. * @@ -89,7 +89,7 @@ public: * * @return based on send implementation. */ - virtual erpc_status_t send(MessageBuffer *message) = 0; + virtual erpc_status_t send(const MessageBuffer *message) = 0; /*! * @brief Poll for an incoming message. diff --git a/erpc_c/setup/erpc_server_setup.cpp b/erpc_c/setup/erpc_server_setup.cpp index 51fa799..5cd4346 100644 --- a/erpc_c/setup/erpc_server_setup.cpp +++ b/erpc_c/setup/erpc_server_setup.cpp @@ -33,8 +33,10 @@ #include "basic_codec.h" #include "manually_constructed.h" #include "simple_server.h" -#include +#include "message_buffer.h" +#include "erpc_config_internal.h" #include +#include #if !(__embedded_cplusplus) using namespace std; @@ -43,6 +45,29 @@ using namespace std; using namespace erpc; //////////////////////////////////////////////////////////////////////////////// +// Classes +//////////////////////////////////////////////////////////////////////////////// + +class BasicMessageBufferFactory : public MessageBufferFactory +{ +public: + virtual MessageBuffer create() + { + uint8_t *buf = new (nothrow) uint8_t[ERPC_DEFAULT_BUFFER_SIZE]; + return MessageBuffer(buf, ERPC_DEFAULT_BUFFER_SIZE); + } + + virtual void dispose(MessageBuffer *buf) + { + assert(buf); + if (*buf) + { + delete[] buf->get(); + } + } +}; + +//////////////////////////////////////////////////////////////////////////////// // Variables //////////////////////////////////////////////////////////////////////////////// @@ -50,29 +75,32 @@ using namespace erpc; static ManuallyConstructed s_server; SimpleServer *g_server; +static ManuallyConstructed s_msgFactory; static ManuallyConstructed s_codecFactory; //////////////////////////////////////////////////////////////////////////////// // Code //////////////////////////////////////////////////////////////////////////////// -void erpc_server_init(erpc_transport_t transport, erpc_mbf_t message_buffer_factory) +void erpc_server_init(erpc_transport_t transport) { // Init factories. + s_msgFactory.construct(); s_codecFactory.construct(); // Init server with the provided transport. s_server.construct(); s_server->setTransport(reinterpret_cast (transport)); + s_server->setMessageBufferFactory(s_msgFactory); s_server->setCodecFactory(s_codecFactory); - s_server->setMessageBufferFactory(reinterpret_cast (message_buffer_factory)); g_server = s_server; } - void erpc_server_deinit() { + s_msgFactory.destroy(); s_codecFactory.destroy(); s_server.destroy(); + } void erpc_add_service_to_server(void *service) diff --git a/erpc_c/setup/erpc_server_setup.h b/erpc_c/setup/erpc_server_setup.h index 8e6a6ef..e4e9eaa 100644 --- a/erpc_c/setup/erpc_server_setup.h +++ b/erpc_c/setup/erpc_server_setup.h @@ -60,7 +60,7 @@ extern "C" { * * This function initializes server with all components necessary for running server. */ -void erpc_server_init(erpc_transport_t transport, erpc_mbf_t message_buffer_factory); +void erpc_server_init(erpc_transport_t transport); /*! * @brief This function de-initializes server. diff --git a/erpc_c/setup/erpc_setup_rpmsg_lite_rtos_remote.cpp b/erpc_c/setup/erpc_setup_rpmsg_lite_rtos_remote.cpp new file mode 100644 index 0000000..b480d42 --- /dev/null +++ b/erpc_c/setup/erpc_setup_rpmsg_lite_rtos_remote.cpp @@ -0,0 +1,54 @@ + /* + * Copyright (c) 2014-2016, Freescale Semiconductor, Inc. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "manually_constructed.h" +#include "rpmsg_lite_rtos_transport.h" +#include "erpc_transport_setup.h" + +using namespace erpc; + +//////////////////////////////////////////////////////////////////////////////// +// Variables +//////////////////////////////////////////////////////////////////////////////// + +static ManuallyConstructed s_transport; + +//////////////////////////////////////////////////////////////////////////////// +// Code +//////////////////////////////////////////////////////////////////////////////// + +erpc_transport_t erpc_transport_rpmsg_lite_rtos_remote_init( + unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, void (*ready_cb)(void), bool send_nameservice) +{ + s_transport.construct(); + s_transport->init(src_addr, dst_addr, start_address, rpmsg_link_id, ready_cb, send_nameservice); + return reinterpret_cast (s_transport.get()); +} + + diff --git a/erpc_c/setup/erpc_transport_setup.h b/erpc_c/setup/erpc_transport_setup.h index 798d92f..6c3959e 100644 --- a/erpc_c/setup/erpc_transport_setup.h +++ b/erpc_c/setup/erpc_transport_setup.h @@ -34,6 +34,7 @@ #include "erpc_version.h" #include +#include /*! * @addtogroup transport_setup @@ -48,7 +49,7 @@ //! @brief Opaque transport object type. typedef struct ErpcTransport *erpc_transport_t; //! @brief Ready callback object type for RPMsg-Lite transport. -typedef void (*rpmsg_ready_cb)(void); +//typedef void (*rpmsg_ready_cb)(void); //////////////////////////////////////////////////////////////////////////////// // API @@ -106,21 +107,21 @@ erpc_transport_t erpc_transport_rpmsg_lite_master_init(unsigned long src_addr, /*! * @brief Create an RPMsg-Lite zero copy transport. */ -erpc_transport_t erpc_transport_rpmsg_lite_zc_master_init(unsigned long src_addr, - unsigned long dst_addr, - int rpmsg_link_id); +//erpc_transport_t erpc_transport_rpmsg_lite_zc_master_init(unsigned long src_addr, +// unsigned long dst_addr, +// int rpmsg_link_id); /*! * @brief Create an RPMsg-Lite transport. */ erpc_transport_t erpc_transport_rpmsg_lite_remote_init( - unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready); + unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, void (*ready_cb)(void), bool send_nameservice); /*! * @brief Create an RPMsg-Lite zero copy transport. */ -erpc_transport_t erpc_transport_rpmsg_lite_zc_remote_init( - unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready); +//erpc_transport_t erpc_transport_rpmsg_lite_zc_remote_init( +// unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready); /*! * @brief Create an RPMsg-Lite RTOS transport. @@ -133,7 +134,8 @@ erpc_transport_t erpc_transport_rpmsg_lite_rtos_master_init(unsigned long src_ad * @brief Create an RPMsg-Lite RTOS transport. */ erpc_transport_t erpc_transport_rpmsg_lite_rtos_remote_init( - unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, rpmsg_ready_cb ready); + unsigned long src_addr, unsigned long dst_addr, void *start_address, int rpmsg_link_id, void (*ready_cb)(void), bool send_nameservice); + //@} diff --git a/erpc_c/transports/rpmsg_lite_rtos_transport.cpp b/erpc_c/transports/rpmsg_lite_rtos_transport.cpp new file mode 100644 index 0000000..e04ae91 --- /dev/null +++ b/erpc_c/transports/rpmsg_lite_rtos_transport.cpp @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "rpmsg_lite_rtos_transport.h" +#include + +#if !(__embedded_cplusplus) +using namespace std; +#endif + +using namespace erpc; + +//////////////////////////////////////////////////////////////////////////////// +// Variables +//////////////////////////////////////////////////////////////////////////////// +uint8_t RPMsgRTOSTransport::s_initialized = 0; +struct rpmsg_lite_instance *RPMsgRTOSTransport::s_rpmsg; + +//////////////////////////////////////////////////////////////////////////////// +// Code +//////////////////////////////////////////////////////////////////////////////// + +RPMsgRTOSTransport::RPMsgRTOSTransport() +: Transport() +, m_dst_addr(0) +{ +} + +RPMsgRTOSTransport::~RPMsgRTOSTransport() +{ + rpmsg_lite_deinit(s_rpmsg); + s_initialized = 0; +} + +erpc_status_t RPMsgRTOSTransport::init( + unsigned long src_addr, unsigned long dst_addr, void *base_address, unsigned long length, int rpmsg_link_id) +{ + if (!s_initialized) + { + s_rpmsg = rpmsg_lite_master_init(base_address, length, rpmsg_link_id, RL_NO_FLAGS); + s_initialized = 1; + } + + m_rpmsg_queue = rpmsg_queue_create(s_rpmsg); + m_rpmsg_ept = rpmsg_lite_create_ept(s_rpmsg, src_addr, rpmsg_queue_rx_cb, m_rpmsg_queue); + + m_dst_addr = dst_addr; + return m_rpmsg_ept == RL_NULL ? kErpcStatus_InitFailed : kErpcStatus_Success; +} + +erpc_status_t RPMsgRTOSTransport::init( + unsigned long src_addr, unsigned long dst_addr, void *base_address, int rpmsg_link_id, void (*ready_cb)(void), bool send_nameservice) +{ + if (!s_initialized) + { + s_rpmsg = rpmsg_lite_remote_init(base_address, rpmsg_link_id, RL_NO_FLAGS); + + /* Signal the other core we are ready */ + if (ready_cb != NULL) + { + ready_cb(); + } + + while (!rpmsg_lite_is_link_up(s_rpmsg)) + { + } + + s_initialized = 1; + } + + m_rpmsg_queue = rpmsg_queue_create(s_rpmsg); + m_rpmsg_ept = rpmsg_lite_create_ept(s_rpmsg, src_addr, rpmsg_queue_rx_cb, m_rpmsg_queue); + + if(send_nameservice) + { + rpmsg_ns_announce(s_rpmsg, m_rpmsg_ept, + "rpmsg-openamp-demo-channel", + 0); + } + + m_dst_addr = dst_addr; + return m_rpmsg_ept == RL_NULL ? kErpcStatus_InitFailed : kErpcStatus_Success; +} + +erpc_status_t RPMsgRTOSTransport::receive(MessageBuffer *message) +{ + int ret_val = rpmsg_queue_recv(s_rpmsg, m_rpmsg_queue, &m_dst_addr, (char *)message->get(), kRpmsgMessageBufferSize, + NULL, RL_BLOCK); + return ret_val != RL_SUCCESS ? kErpcStatus_ReceiveFailed : kErpcStatus_Success; +} + +erpc_status_t RPMsgRTOSTransport::send(const MessageBuffer *message) +{ + int ret_val = + rpmsg_lite_send(s_rpmsg, m_rpmsg_ept, m_dst_addr, (char *)message->get(), message->getUsed(), RL_BLOCK); + return ret_val != RL_SUCCESS ? kErpcStatus_SendFailed : kErpcStatus_Success; +} + +MessageBuffer RPMsgMessageBufferFactory::create() +{ + uint8_t idx = 0; + while (((m_freeBufferBitmap & idx) == 0) && (idx < kInitCountMessageBuffers)) + { + idx++; + } + + assert(idx < kInitCountMessageBuffers); + + m_freeBufferBitmap &= ~(1 << idx); + + uint8_t *buf; + buf = m_buffers[idx]; + + assert(NULL != buf); + return MessageBuffer(buf, kRpmsgMessageBufferSize); +} + +void RPMsgMessageBufferFactory::dispose(MessageBuffer *buf) +{ + assert(buf); + uint8_t *tmp = buf->get(); + + if (tmp) + { + uint8_t idx = 0; + while ((tmp != m_buffers[idx]) && (idx < kInitCountMessageBuffers)) + { + ++idx; + } + m_freeBufferBitmap |= 1 << idx; + } +} diff --git a/erpc_c/transports/rpmsg_lite_rtos_transport.h b/erpc_c/transports/rpmsg_lite_rtos_transport.h new file mode 100644 index 0000000..f1aec8a --- /dev/null +++ b/erpc_c/transports/rpmsg_lite_rtos_transport.h @@ -0,0 +1,177 @@ +/* + * Copyright (c) 2015-2016, Freescale Semiconductor, Inc. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _EMBEDDED_RPC__RPMSG_LITE_RTOS_TRANSPORT_H_ +#define _EMBEDDED_RPC__RPMSG_LITE_RTOS_TRANSPORT_H_ + +#include "transport.h" +#include "message_buffer.h" +#include "rpmsg_lite.h" +#include "rpmsg_queue.h" +#include "rpmsg_ns.h" + +/*! + * @addtogroup rpmsg_lite_rtos_transport + * @{ + * @file + */ + +//////////////////////////////////////////////////////////////////////////////// +// Definitions +//////////////////////////////////////////////////////////////////////////////// + +enum +{ + kRpmsgMessageBufferSize = RPMSG_BUFFER_SIZE, + kInitCountMessageBuffers = 2, +}; + +//////////////////////////////////////////////////////////////////////////////// +// Classes +//////////////////////////////////////////////////////////////////////////////// + +namespace erpc +{ +/*! + * @brief Transport that uses RPMsg RTOS API for interprocessor messaging. + * + * @ingroup rpmsg_lite_rtos_transport + */ +class RPMsgRTOSTransport : public Transport +{ +public: + /*! + * @brief Constructor. + * + * This function initializes object attributes. + */ + RPMsgRTOSTransport(); + + /*! + * @brief RPMsgRTOSTransport destructor + */ + virtual ~RPMsgRTOSTransport(); + + /*! + * @brief This function call RPMsg rtos init function - as RPMsg master + * + * @Param[in] src_addr Source address. + * @Param[in] dst_addr Destination address. + * @Param[in] base_address RPMsg base address in the shared memory. + * @Param[in] length RPMsg shared memory region length. + * @Param[in] rpmsg_link_id Selection between what cores the communication will occur. + * + * @retval kErpcStatus_Success When rpmsg init function was executed successfully. + * @retval kErpcStatus_InitFailed When rpmsg init function wasn't executed successfully. + */ + virtual erpc_status_t init( + unsigned long src_addr, unsigned long dst_addr, void *base_address, unsigned long length, int rpmsg_link_id); + + /*! + * @brief This function call RPMsg rtos init function - as RPMsg remote + * + * @Param[in] src_addr Source address. + * @Param[in] dst_addr Destination address. + * @Param[in] base_address RPMsg base address in the shared memory. + * @Param[in] rpmsg_link_id Selection between what cores the communication will occur. + * @Param[in] ready_cb Callback called after RPMsg init is done and the core is ready. + * @Param[in] send_nameservice If true, RPMsg master notified by nameservice. + * + * @retval kErpcStatus_Success When rpmsg init function was executed successfully. + * @retval kErpcStatus_InitFailed When rpmsg init function wasn't executed successfully. + */ + virtual erpc_status_t init( + unsigned long src_addr, unsigned long dst_addr, void *base_address, int rpmsg_link_id, void (*ready_cb)(void), bool send_nameservice); + + /*! + * @brief Store incoming message to message buffer. + * + * In loop while no message come. + * + * @Param[in] message Message buffer, to which will be stored incoming message. + * + * @retval kErpcStatus_ReceiveFailed Failed to receive message buffer. + * @retval kErpcStatus_Success Successfully received all data. + */ + virtual erpc_status_t receive(MessageBuffer *message); + + /*! + * @brief Function to send prepared message. + * + * @Param[in] message Pass message buffer to send. + * + * @retval kErpcStatus_SendFailed Failed to send message buffer. + * @retval kErpcStatus_Success Successfully sent all data. + */ + virtual erpc_status_t send(const MessageBuffer *message); + +protected: + /* Remote device */ + struct remote_device *m_rdev; /*!< Device which represent the second core. */ + struct rpmsg_channel *m_app_rp_chnl; /*!< Represent connection between two device (two cores). */ + unsigned long m_dst_addr; /*!< Destination address used by rpmsg. */ + rpmsg_queue_handle m_rpmsg_queue; /*!< Handle of RPMsg queue. */ + struct rpmsg_lite_endpoint *m_rpmsg_ept; /*!< Pointer to RPMsg Lite Endpoint structure. */ + + static struct rpmsg_lite_instance *s_rpmsg; /*!< Pointer to instance of RPMSG lite. */ + static uint8_t s_initialized; /*!< Represent information if the rpmsg-lite was initialized. */ +}; + +class RPMsgMessageBufferFactory : public MessageBufferFactory +{ + uint8_t m_freeBufferBitmap; + uint8_t m_buffers[kInitCountMessageBuffers][kRpmsgMessageBufferSize]; + +public: + /*! + * @brief Constructor. + */ + RPMsgMessageBufferFactory() + : m_freeBufferBitmap(0xFF) + { + } + /*! + * @brief RPMsgMessageBufferFactory destructor + */ + virtual ~RPMsgMessageBufferFactory() {} + /*! + * @brief This function create message buffer used for communication between devices. + */ + virtual MessageBuffer create(); + /*! + * @brief This function dispose message buffer used for communication between devices. + */ + virtual void dispose(MessageBuffer *buf); +}; + +} // namespace erpc + +/*! @} */ + +#endif // _EMBEDDED_RPC__RPMSG_LITE_RTOS_TRANSPORT_H_ diff --git a/erpc_c/transports/rpmsg_rtos_transport.h b/erpc_c/transports/rpmsg_rtos_transport.h new file mode 100644 index 0000000..ad1d229 --- /dev/null +++ b/erpc_c/transports/rpmsg_rtos_transport.h @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _EMBEDDED_RPC__RPMSG_RTOS_TRANSPORT_H_ +#define _EMBEDDED_RPC__RPMSG_RTOS_TRANSPORT_H_ + +#include "transport.h" +#include "message_buffer.h" + +extern "C" { +#include "rpmsg.h" +#include "rpmsg_rtos.h" +#include "rpmsg.h" +} + +/*! + * @addtogroup rpmsg_rtos_transport + * @{ + * @file + */ + +//////////////////////////////////////////////////////////////////////////////// +// Definitions +//////////////////////////////////////////////////////////////////////////////// + +enum +{ + kRpmsgMessageBufferSize = RPMSG_BUFFER_SIZE, +}; + +//////////////////////////////////////////////////////////////////////////////// +// Classes +//////////////////////////////////////////////////////////////////////////////// + +namespace erpc +{ +/*! + * @brief Transport that uses RPMsg RTOS API for interprocessor messaging. + * + * @ingroup rpmsg_rtos_transport + */ +class RPMsgRTOSTransport : public Transport +{ +public: + /*! + * @brief Constructor. + * + * This function initializes object attributes. + */ + RPMsgRTOSTransport(); + + /*! + * @brief RPMsgRTOSTransport destructor + */ + virtual ~RPMsgRTOSTransport(); + + /*! + * @brief This function call rpmsg rtos init function. + * + * @Param[in] dev_id Device id number. + * @Param[in] role Device role number. + * + * @retval kErpcStatus_Success When rpmsg init function was executed successfully. + * @retval kErpcStatus_InitFailed When rpmsg init function wasn't executed successfully. + */ + virtual erpc_status_t init(int dev_id, int role); + + /*! + * @brief Store incoming message to message buffer. + * + * In loop while no message come. + * + * @Param[in] message Message buffer, to which will be stored incoming message. + * + * @retval kErpcStatus_ReceiveFailed Failed to receive message buffer. + * @retval kErpcStatus_Success Successfully received all data. + */ + virtual erpc_status_t receive(MessageBuffer *message); + + /*! + * @brief Function to send prepared message. + * + * @Param[in] message Pass message buffer to send. + * + * @retval kErpcStatus_SendFailed Failed to send message buffer. + * @retval kErpcStatus_Success Successfully sent all data. + */ + virtual erpc_status_t send(const MessageBuffer *message); + +protected: + /* Remote device */ + static struct remote_device *m_rdev; /*!< Device which represent the second core. */ + static struct rpmsg_channel *m_app_rp_chnl; /*!< Represent connection between two device (two cores). */ +}; + +class RPMsgMessageBufferFactory : public MessageBufferFactory +{ +public: + /*! + * @brief Constructor. + */ + RPMsgMessageBufferFactory() {} + /*! + * @brief RPMsgMessageBufferFactory destructor + */ + virtual ~RPMsgMessageBufferFactory() {} + /*! + * @brief This function create message buffer used for communication between devices. + */ + virtual MessageBuffer create(); + /*! + * @brief This function dispose message buffer used for communication between devices. + */ + virtual void dispose(MessageBuffer *buf); +}; + +} // namespace erpc + +/*! @} */ + +#endif // _EMBEDDED_RPC__RPMSG_RTOS_TRANSPORT_H_ diff --git a/erpc_python/erpc/transport.py b/erpc_python/erpc/transport.py index 0765e9f..c335943 100644 --- a/erpc_python/erpc/transport.py +++ b/erpc_python/erpc/transport.py @@ -31,6 +31,8 @@ import struct import serial +from rpmsg.sysfs import RpmsgEndpoint +import time import socket import threading from .crc16 import crc16 @@ -107,6 +109,25 @@ class SerialTransport(FramedTransport): class ConnectionClosed(Exception): pass +class RpmsgTransport(Transport): + def __init__(self): + self.ept = RpmsgEndpoint( + RpmsgEndpoint.rpmsg_openamp_channel, + RpmsgEndpoint.LOCAL_DEFAULT_ADDRESS, + RpmsgEndpoint.Types.DATAGRAM) + + def send(self, message): + self.ept.send(message, RpmsgEndpoint.REMOTE_DEFAULT_ADDRESS) + + def receive(self): + while True: + ret = self.ept.recv(2048) + if len(ret[1]) != 0: + return ret[1] + else: + time.sleep(0.001) + return ret[1] + class TCPTransport(FramedTransport): def __init__(self, host, port, isServer): super(TCPTransport, self).__init__() -- 2.7.4 Re: Introducing eRPC Thank you Dusan . once i got my demo working , i will create pull request .. Thanks again for your reply , i got python files . i will run demo and come back to u shortly . Re: Introducing eRPC Hi, great work  If you want you can create pull request for imx demo repository to fix it. mareknovak can review it and merge it to the repository. To generate python code: As other application you can do in command line "erpcgen --help (-h should work too)". python -gpy idl_file -> gpy means generate python. Re: Introducing eRPC That's cool, i can continue to work in the same stable version until update .  with couples of fixes my MCU demo build and run properly now ..Thanks for your information Re: Introducing eRPC Hi Dusan I did fix and now i got MCU demo working properly ... Thanks for pointing out me a stable version .. Could you please tell me How to generate python code using erpcgen tool ..  ? Thank you Chandini Re: Introducing eRPC Hi, not sooner than tomorrow. But i can't promise that it will be tomorrow. My colleague mareknovak is not in work today. But it should be soon. Re: Introducing eRPC Could you please tell me , when are you going to update ?  Re: Introducing eRPC Hi thanks for you interest. Then it looks like the erpc generated files were generated with different erpcgen then on commit Marek provided (our mistake). Best solution looks like we need updated that demo with latests stable erpc and erpcgen version. You can try this from master branch GitHub - EmbeddedRPC/erpc: Embedded RPC (and there is erpcgen prebuilt 1.4.0). But i don't know how much changes you need to do. Or you can wait for our update. mareknovak Re: Introducing eRPC Hi Dusan I was using  same eRPC library one which u refereed  Steps i followed are below: Clone  erpc-imx-demos including sub module(which clone eRPC GitHub - MarekNovakNXP/erpc at 232afb209f0a0cfceb25a1be11879f7d1934e065  ) 1. git clone --recursive https://github.com/EmbeddedRPC/erpc-imx-demos.git 2. go to erpc-imx-demos/middleware/erpc folder and build erpcgen like this: installed required packages flex/bison and boost make eprc make eprcgen sudo make install successfully got erpcgen  3. Tried create my own output files using same erpc_matrix_multiply.erpc like this : erpcgen -I erpc-imx-demos/MCU/example_erpc/service -o test/erpc-imx-demos/MCU/example_erpc/service erpc_matrix_multiply.erpc successfully got below files: erpc_matrix_multiply.h erpc_matrix_multiply_server.cpp erpc_matrix_multiply_server.h erpc_matrix_multiply_client.cpp 4. Tried to build  MCU/example_erpc/build/armgcc/imx7d_sdb_m4/build_all.sh failed with error : /home/basavarajuc/test/erpc-imx-demos/MCU/example_erpc/service/erpc_matrix_multiply_server.cpp: In function 'void* create_MatrixMultiplyService_service()': /home/basavarajuc/test/erpc-imx-demos/MCU/example_erpc/service/erpc_matrix_multiply_server.cpp:168:56: error: invalid new-expression of abstract class type 'MatrixMultiplyService_service' return new (nothrow) MatrixMultiplyService_service(); Sorry for asking again , just to clarify my understanding . 1.if i am using eRPC library from GitHub - MarekNovakNXP/erpc at 232afb209f0a0cfceb25a1be11879f7d1934e065 then Do i need to update demo ? to run demo successfully  2. Could you please tell me  output files from erpc-imx-demos/MCU/example_erpc/service at master · EmbeddedRPC/erpc-imx-demos · GitHub  are generated by which erpcgen version ? So that i can use old erpcgen shortly to create my own files  Thanks a lot . and sorry for disturbance  Chandini   Re: Introducing eRPC Hi and thanks for your comment.  Example you mentioned is an older version than your erpcgen build. mareknovak also created his fork of official eRPC repository due to some minor changes which were not present in an official release at that time. If you click on eRPC reference from erpc-imx-demos repository from middleware folder, you will be redirect to his eRPC repository. You need build erpcgen from that version. We want update demo in the future.  Hope i helped you. If you have any concerns don't hesitate and ask us.  Re: Introducing eRPC Hi Sorry if i am asking basic question. I am trying to understand how to use erpcgen tool from NXP. I successfully ran example demo , with reference : https://github.com/EmbeddedRPC/erpc-imx-demos My next approach  was build erpcgen  and create my own output files using same erpc_matrix_multiply.erpc and run same demo again so i get familiar to use erpcgen tool. i got output files but even though i am using same erpc_matrix_multiply.erpc my files different than example files the changes are : Output files in example demo says (erpc_matrix_multiply_server.h): erpc_status_t erpcMatrixMultiply_shim(erpc::Codec * in, erpc::Codec * out, uint32_t sequence); my files(erpc_matrix_multiply_server.h): erpc_status_t erpcMatrixMultiply_shim(erpc::Codec * codec, uint32_t sequence); why files are different , Am i missing any config ? Do i need to manually edit erpc_matrix_multiply_server.h & erpc_matrix_multiply_server.cpp Thank you in advance Chandini
查看全文
MCUXpresso IDE v11.8.1 现已推出 我们很高兴地宣布 MCUXpresso IDE v11.8.1(build 1197)现已推出。 这是一个基于之前的 MCUXpresso IDE v11.8.0 版本的维护版本,我们建议所有现有用户下载并安装这个新版本。   安装程序下载 要下载所有平台的安装程序,请登录我们的下载网站: https://www.nxp.com/mcuxpresso/ide/download   文档 更多信息可在更新后的用户指南及其他文档中查阅,这些文档可通过 IDE 的“帮助”菜单访问内置帮助系统,或以 PDF 格式从安装目录中获取。   未来版本的发布通知 如需接收有关未来版本发布的通知,请关注:MCUXpresso IDE - 发布历史   变更摘要 - 版本 11.8.1 - 2023 年 10 月 升级:更新的 SEGGER J-Link 软件 (v7.92l)。 已升级:更新的 PEmicro 插件(v5.7.3)。 新增:支持 i.MX RT1180 设备和 MIMXRT1180-EVK 板。 新增:支持 KE1xZ512 器件和 X-FRDM-KE17Z512 开发板。 新增:支持 MCXA153 设备和 FRDM-MCXA153 开发板。 改进:[工具链集成] 在支持的编译器方言列表中添加了 C++20 和 C++23 条目。 修复:[Debugger][RW61x] 当安全项目位于闪存中时,连接脚本在 SYSRESET 后不会暂停。 修复:[Flash Programmer] 与 Flash blank 命令相关的一些问题。 已修复:[SDK 集成] 更改设备包时,未考虑设备特定的预处理器定义。   已知问题 请参阅安装布局中的 KnownIssues.txt 文件以获取详细列表。  
查看全文
chromium-ozone-waylandのコンパイル中にビルドが失敗しました こんにちは、 YoctoでIMX8MPボード用にchromium-ozone-waylandをコンパイルしようとしていますが、以下のエラーでコンパイルが失敗します: | デバッグ: Python 関数 extend_recipe_sysroot が完了しました | デバッグ: シェル関数 do_configure を実行中 | エラー //.gn:150:5: 代入が無効でした。 | build_dotfile_settings.exec_script_allowlist + | ^--------------------------------------------- ここで変数「exec_script_allowlist」を設定しましたが、以前は使用されていませんでした。 対象外です。 警告: シェルコマンドからの終了コードが 1 です。 エラー:タスク(/home/admin/Dharmik/IMX8M-Plus/sources/meta-browser/meta-chromium/recipes-browser/chromium/chromium-ozone-wayland_138.0.7204.157.bb:do_configure)終了コード「1」で失敗しました 注:タスクの概要:2814個のタスクが試行され、そのうち2800個は再実行の必要がなく、1個が失敗しました。 conf/local.conf に CORE_IMAGE_EXTRA_INSTALL += "chromium-ozone-wayland" を追加しました。 以下は私のヨクト設定です。 ビルド構成: BB_VERSION = "2.16.0" BUILD_SYS = 「x86_64-linux」 NATIVELSBSTRING = 「ユニバーサル」 TARGET_SYS = "aarch64-poky-linux" MACHINE = "imx8mp-lpddr4-evk" ディストリビューション = "fsl-imx-wayland" DISTRO_VERSION = 「6.18-whinlatter」 TUNE_FEATURES = "aarch64 armv8a crc crypto" ありがとうございます ダルミック Re: Build failed while compiling chromium-ozone-wayland 過去のChromiumバージョンでもこのエラーを見たことがあり、そのビルド状況で私の場合うまくいったのはこのファイルの変更でした。 \tmp\work\armv8a-mx8-poky-linux\chromium-ozone-wayland\117.0.5938.132\chromium-117.0.5938.132\media\gpu\sandbox\BUILD.gn if (current_cpu != "s390x" && current_cpu != "ppc64" && is_linux && ozone_platform_x11 && !is_castos) { # For DRI_DRIVER_DIR. configs += [ "//build/config/linux/dri" ] } このファイルの下部のプラットフォームリストに「&& ozone_platform_x11 」を追加したことで問題は解決しました。 Chromium v138がすでに追加されているか確認してもらえますかozone_platform_x11? よろしくお願いいたします。 ダイアナ Re: Build failed while compiling chromium-ozone-wayland PREFERRED_VERSION_gn-native = "0+git" の変更を追加した後、以下のエラーが発生します。 |DEBUG: Python関数extend_recipe_sysroot完了しました |DEBUG:シェル関数の実行do_configure |//build/config/linux/dri/BUILD.gn:11:20でのエラー:スクリプトがゼロでない終了コードを返しました。 |dri_driver_dir = exec_script(pkg_config_script, |^---------- |現在の編集名: /home/admin/Dharmik/IMX8M-Plus/build-imx8mp/tmp/work/armv8a-mx8mp-poky-linux/chromium-ozone-wayland/138.0.7204.157/sources/chromium-138.0.7204.157/out/Release/ |コマンド: python3 /home/admin/Dharmik/IMX8M-Plus/build-imx8mp/tmp/work/armv8a-mx8mp-poky-linux/chromium-ozone-wayland/138.0.7204.157/sources/chromium-138.0.7204.157/build/config/linux/pkg-config.py --dridriverdir dri |1枚返品して印刷しました: | |pkg-configからのエラーです。 | |スタール: | |pkg-configの検索パスにはdriパッケージが見つかりませんでした。 |おそらく「dri.pc」を含むディレクトリを追加したほうがいいかもしれません |PKG_CONFIG_PATH環境変数に |パッケージの「ドリ」は見つかりませんでした | |//media/gpu/sandbox/BUILD.gn:31:18:を参照し、これがファイルが含まれた原因となりました。 |configs += [ "//build/config/linux/dri" ] |^------------------------- |警告:シェルコマンドからコード1を終了してください。 ありがとうございます ダルミック Re: Build failed while compiling chromium-ozone-wayland こんにちは、ダルミックさん。 local.confにchromiumパッケージ以外にもう一つ追加してみてはどうでしょうか? PREFERRED_VERSION_gn-native = "0+git" 問題が解決しない場合はお知らせください。 よろしくお願いいたします。 ダイアナ
查看全文
S32DS | S32k144 RTD DIO 引脚项目错误 你好 我正在尝试在装有 S32DS 3.6.7 的 S32K144 LQFP100 上使用 RTD AUTOSAR (MCAL) 设置一个基本的 LED 闪烁示例。我在 Pins 工具(.mex 文件)中将 PTC11 配置为 GPIO 输出,并在外围设备/MCAL 视图中添加了 Dio 和端口组件。 但是,当我点击 "更新代码 "时,代码生成失败,并出现以下错误: - [CODEGEN] 生成文件 'Port_Ci_Port_Ip_PBcfg.c' 失败 - TypeError:PinMode.match 不是函数 at GetPDO_IP (:187) - [CODEGEN] 生成文件 'Port_PBcfg.c' 失败 在 GetPDO(port_utils.js:235) 我的设置: -主板:S32K144 LQFP100 -S32DS 版本:3.6.7 -RTD/PlatformSDK_S32K1_S32M24 -引脚:PTC11 配置为 portC: port_11、输出、GPIO-添加了 MCAL 元器件:Dio + 端口(均在 AUTOSAR 模式下) 在端口 MCAL 配置中,PortPin_0 的 "PortPin Direction(端口引脚方向)"和 "PortPin Mode(端口引脚模式)"字段显示为灰色,并显示数值 (0) 而不是字符串。我怀疑代码生成器期望引脚模式的字符串值是 "ALT1",但收到的却是一个数字。 有人遇到过这个问题吗?PortPin 配置是否应该完全由 .mex 自动生成?还是需要手动配置?如能得到任何指导,将不胜感激。 此外,由于我是 RTD AUTOSAR 的新手,我想知道是否有从头开始学习堆栈的推荐资源 - 教程、示例项目、视频或学习 MCAL 模块(端口、Dio、Adc、Pwm、Can...)的任何建议顺序。我有裸机嵌入式 C 语言的经验,但对 AUTOSAR 却一无所知。 如能得到任何指导,将不胜感激。 谢谢! Re: S32DS | S32k144 RTD DIO PIN PROJECT ERROR 我还在努力。我从驱动程序中删除了端口库,但仍然无法正常工作。 PortPinMode 设置为 0,而在你发给我的示例和代码中,它被设置为 GPIO。我不知道如何改变这种状况。 我对工作流程也有些困惑。据我所知 首先,在针脚选择器工具中选择针脚。 然后,在端口模块中配置引脚(底层配置)。 最后,按照 AUTOSAR 原则,使用 DIO 作为封装器/接口,这样应用程序就不会直接依赖于微控制器。 Re: S32DS | S32k144 RTD DIO PIN PROJECT ERROR 你好@antonio_esal 在打开你创建的示例程序时,我确实发现了一些错误。随函附上我创建的示例程序供你参考。 在您的项目中,无需同时在 MCAL 和 Drivers 中添加"Port" 模块。 Re: S32DS | S32k144 RTD DIO PIN PROJECT ERROR 是的,我正在这样做,演示示例运行得很好,但当我尝试从一个新项目中做同样的事情时,我做不到。 Re: S32DS | S32k144 RTD DIO PIN PROJECT ERROR 你好@antonio_esal 您可以参考 RTD 驱动程序包中包含的示例代码开始学习。
查看全文
s32k344 罐 你好,我正在使用 s32k344 电机驱动器代码,并有几个原型。我发现其中一台 CAN 机器在运行一段时间后会脱机,发送和接收都会出现异常。我打开了离线回复,发现信息会丢失 200 毫秒的帧。我更换了 CAN 收发器,但同样的现象依然存在。我已经阅读了勘误手册,是否是芯片本身存在这个错误? Re: s32k344 can Hi@qicbeng 示例代码"MCSPTE1AK344_PMSM_FOC_2Sh_ll" 不提供 FLEXCAN 功能;您必须自行添加 CAN 相关功能。 请提供您的 CAN 测试项目,以便我检查您的配置是否正确。
查看全文
FRDM-MCXN947:Ee(42) 刷新 tflm_modelrunner 后无法连接到内核 刷新 tflm_modelrunner SDK 示例(FreeRTOS + lwIP,定义 USE_RTOS)后,我的 FRDM-MCXN947 不再响应 SWD。LinkServer v25.6 和 MCU-Link V3.128 报告 Ee(42)。所有操作(包括大量擦除)都无法连接到核心。在 “设备管理器” 中可以正确检测到 MCU-Link 探测器。按下 SW3+RESET 时,Windows 会检测到 USB 枚举,但未安装驱动程序,blhost 报告未找到任何设备。 我怎样才能找回板? 更新:我能够在 Linux 上下载 led_blinky 示例,但在 Windows 10 上问题依然存在。 此外,在这两个操作系统上,我通常会收到以下警告: " 项目是为设备 MCXN947 配置的,但选定的探测器报告已连接到设备 MCXN947VDFT。你确定要继续吗?" 第一次尝试下载程序时(不知道是否与此有关)。 Re: FRDM-MCXN947: Ee(42) Could not connect to core after flashing tflm_modelrunner 最新情况--决议 通过从 Windows 设备管理器中卸载 MCU-Link 设备条目并允许 Windows 在重新连接时重新枚举这些条目,该问题得到了解决。 具体而言,删除了两个条目:通用串行总线设备下的 " MCU-LINK FRDM-MCXN947 CMSIS-DAP ",以及端口 (COM & LPT) 下相应的 MCU-Link vCom 端口。重新连接 USB 电缆后,Windows 自动重新安装了这两个驱动程序,LinkServer 可以正确打开探针。 根本原因似乎是Windows中USB设备状态损坏,很可能是在之前使用tflm_modelrunner固件(FreeRTOS + LwIP)的会话中触发的。该探针在系统中可见并被正确枚举,但其句柄无法被 redlinkserv.exe 打开,导致在所有操作(包括大量擦除、闪存和 gdbserver)中出现 Ee(42)。重新安装集成开发环境,替换 redlinkserv.exe、清除 USB 注册表项也无法解决这个问题。只有从设备管理器重新枚举设备才能解决问题。
查看全文
For S32G274A multi-core scenario, can the first 0x9100 bytes of fip.bin be neglected? When making ATF image for BSP42, we get information like this: Boot Core: A53_0 IVT Location: QSPI Load address: 0x342f8f00 Entry point: 0x34302000   Entry point - Load address = 0x9100 it's BL2 that sits at offset 0x9100 of fip.bin. So is "Entry point" refering to BL2?   For multi-core scenario, MCU runs bootloader to load BL2 for A53. If BL2 is the entry point, should bootloader just copy from offset 0x9100 of fip.bin(BL2) to 0x34302000 of RAM space(neglect the first 0x9100 bytes)? GoldVIP Re: For S32G274A multi-core scenario, can the first 0x9100 bytes of fip.bin be neglected? Hello, @wansp  Thanks for your post The bootloader will move the data from QSPI to the Load address(SRAM), they would not be neglected. BR Chenyin
查看全文
i.MX8MP 板。show error DRM_CAP_DUMB_BUFFER"/dev/dri/card0 我将代码从 gui-guider 导出到 yocto。设置环境并 版本 bitbake imx-image-multimedia。运行 gui 应用程序(gui-guider)时部署到 板 上显示错误 DRM_CAP_DUMB_BUFFER " /dev/dri/card0 " 没有 dunb 缓冲区。 Re: i.MX8MP board. show error DRM_CAP_DUMB_BUFFER "/dev/dri/card0 你好 /dev/dri/card0 是默认值,你需要在 GUI Guider 的项目设置中根据你的主板更改这个值。 只需在板上使用以下命令进行检查即可: $ ls-l /dev/dri/card * 顺祝商祺! 宗春 Re: i.MX8MP board. show error DRM_CAP_DUMB_BUFFER "/dev/dri/card0 i use 8MPLUSLPD4-PEVK board. Re: i.MX8MP board. show error DRM_CAP_DUMB_BUFFER "/dev/dri/card0 我改为使用 /dev/dri/card1。但请遵循以下提示 错误:drmModeAtomicCommit 失败:Permission denied error:刷新失败 Re: i.MX8MP board. show error DRM_CAP_DUMB_BUFFER "/dev/dri/card0 你好 请尝试使用 /dev/dri/card1。 最佳回复 宗春 Re: i.MX8MP board. show error DRM_CAP_DUMB_BUFFER "/dev/dri/card0 在板中,我找到了 /dri/card0 和 /dri/card1。
查看全文
Power Optimization Strategies for NXP MCUs in Edge AI Applications Hello everyone, I’m currently designing a low-power edge computing device based on an NXP microcontroller and wanted to get some advice from the community. The system performs intermittent sensor sampling and local inference, then sends summarized results to a host system for further analysis. During development and testing, I’m using an ai enabled laptop to profile performance, validate inference output, and monitor power consumption patterns over extended runs. My main challenge is optimizing power usage on the MCU side while maintaining acceptable response time for inference tasks. Are there recommended low-power modes, clock scaling techniques, or SDK features in MCUXpresso that work well for this kind of workload? Any real-world experiences with balancing performance and power on NXP MCUs would be very helpful. Thanks in advance for your insights.
查看全文
EB更新RTD 7.0.0_QLP03时报告McuPGOOD_POLARITYControl配置错误 这个McuPGOOD_POLARITYControl配置项在该路径下找不到 Re: EB更新RTD 7.0.0_QLP03时报告McuPGOOD_POLARITYControl配置错误 Hi@WeiCh 我不确定你是否可以下载,你可以尝试一下,如果不可以,请联系你的代理商或者FAE来获取评估权限。 https://www.nxp.com/design/design-center/software/automotive-software-and-tools/real-time-drivers-rtd:AUTOMOTIVE-RTD Re: EB更新RTD 7.0.0_QLP03时报告McuPGOOD_POLARITYControl配置错误 在哪可以下载30.0.0吗?30.0.0能打开29.0.0的工程吗? Re: EB更新RTD 7.0.0_QLP03时报告McuPGOOD_POLARITYControl配置错误 Hi@WeiCh 我看这个版本适配的EB Tresos版本应该是30.0.0,不是你所使用的版本。 Re: EB更新RTD 7.0.0_QLP03时报告McuPGOOD_POLARITYControl配置错误 Hi@WeiCh 你这界面的风格不对阿,新版本的风格和之前旧的完全不一样的,你的界面还是老版本的风格。 Re: EB更新RTD 7.0.0_QLP03时报告McuPGOOD_POLARITYControl配置错误 Hi@WeiCh ok,不客气 Re: EB更新RTD 7.0.0_QLP03时报告McuPGOOD_POLARITYControl配置错误 Hi@WeiCh 在下载界面有这样的提示,你要修改后缀 Re: EB更新RTD 7.0.0_QLP03时报告McuPGOOD_POLARITYControl配置错误 好像有点问题,运行setup提示没有安装包,可以解压EBtresosStudio_EBtresosStudio.zip后直接打开应用,但应用界面还是旧的: Re: EB更新RTD 7.0.0_QLP03时报告McuPGOOD_POLARITYControl配置错误 这是30.0.0的界面,好像还是没有这个配置项。 Re: EB更新RTD 7.0.0_QLP03时报告McuPGOOD_POLARITYControl配置错误 已经可以了,感谢!
查看全文
RW612 MCUBoot + TF-M が起動しない こんにちは、 TF-M + MCUBoot の例を使用して、FRDM-RW612 に非常によく似たカスタム ボード セットアップをフラッシュする際に問題が発生しています。 nxp-zephyr リポジトリの最新バージョン (v4.3.0) では、チュートリアルの一部のファイルが変更されているようです。できる限り従おうとしましたが、ボードがまだ正しく起動しません。 MCUBoot ブートローダーだけをフラッシュすると、予想どおりの出力エラー「起動可能なイメージが見つかりません」が表示されます。ガイドの指示に従って PSA 暗号サンプルをフラッシュすると、ターミナルに何も出力されず、MCUBoot テキストも表示されなくなります。端末の問題だけの場合に備えて、点滅サンプルでもテストしましたが、そのCASEはボードの LED も点滅しません。 これらのサンプルは両方とも、MCUBoot なしで TF-M だけをフラッシュすると起動して実行されます ( west build -b frdm_rw612//ns samples/basic/blinky --pristine && west flash )。 このCASE、私は奇妙な癖にも気づきました。ペリフェラルとしてflexcomm3を使用する必要があるため、Zephyrコンソールを別の出力に切り替えたいと考えました。デバイス ツリーを編集すると、さまざまな問題が発生します。   1. zephyrコンソールをFlexcomm3からFlexcomm2に切り替える boards/nxp/frdm_rw612/frdm_rw612_common.dtsi に次の編集を加えました。 i2c-0エイリアスを削除しました ambient-temp0 エイリアスを削除しました chose/zephyr,console を &flexcomm2 に置き換えました flexcomm2 ノードを追加しました: &flexcomm2 { compatible = "nxp,lpc-usart"; status = "okay"; current-speed = <115200>; pinctrl-0 = <&pinmux_flexcomm2_usart>; pinctrl-names = "default"; wakeup-source; }; nxp_pmod_touch_panel_i2c、arduino_i2c、mikrobus_i2cノードを削除しました そして、 boards/nxp/frdm_rw612/frdm_rw612-pinctrl.dtsi に flexcomm2 pinctrl を追加しました: &pinctrl { pinmux_flexcomm2_usart: pinmux_flexcomm2_usart { group0 { pinmux = ; slew-rate = "normal"; bias-pull-up; }; }; }; そしてその後、FC3 をコンソールとして使用したときに動作したのとまったく同じ点滅コードをフラッシュすると、FC3 でブートローダーの出力が表示されます (下記)。ただし、FC2 では何も出力されず、LED も点滅しません。 [INF] Starting bootloader [WRN] This device was provisioned with dummy keys. This device is NOT SECURE [INF] PSA Crypto init done, sig_type: EC-P256, using builtin keys [INF] Image index: 1, Swap type: none [INF] Image index: 0, Swap type: none [INF] Bootloader chainload address offset: 0x20000 [INF] Image version: v0.0.0 [INF] Jumping to the first image slot Booting TF-M v2.2.0+g3b3595f16 [WRN] This device was provisioned with dummy keys. This device is NOT SECURE [Sec Thread] Secure image initializing! [INF][PS] Encryption alg: 0x5500100 [INF][Crypto] Provision entropy seed... [INF][Crypto] Provision entropy seed... complete. 2. ZephyrコンソールをFlexcomm3からFlexcomm14に切り替える chose/zephyr,console を &flexcomm14 に置き換えました flexcomm14 ノードを追加しました:   &flexcomm14 { compatible = "nxp,lpc-usart"; status = "disabled"; current-speed = <115200>; pinctrl-0 = <&pinmux_flexcomm14_usart>; pinctrl-names = "default"; wakeup-source; }; そして、 boards/nxp/frdm_rw612/frdm_rw612-pinctrl.dtsiにflexcomm14 pinctrlを追加しました: &pinctrl { pinmux_flexcomm14_usart: pinmux_flexcomm14_usart { group0 { pinmux = ; slew-rate = "normal"; }; }; }; これらの編集により、FC3 または FC14 に出力が表示されなくなり、LED もまったく点滅しなくなりました。 TF-M + MCUBoot で発生している問題が TF-M のみのコンソール出力の問題に関連しているかどうかはわかりませんが、念のためそれを含めておこうと思いました。私の最終目標は、起動後にファームウェアのアップデートを実行できるように MCUBoot と TF-M を用意することです。また、ペリフェラルとして Flexcomm3 を使用する必要があるため、FRDM-RW612 が使用するものとは異なるコンソール出力が必要です。 また、TF-M も MCUBoot も使用していない場合でも、ボードをフラッシュして FC14 でコンソールに印刷できることにも注意してください。これらのサブシステムを有効にした後でのみ、フラッシュ/ブートに関する問題が発生しました。 どのようなご助力も大歓迎です、ありがとうございます! Re: RW612 MCUBoot + TF-M Not Booting proj.conf をいろいろ試してみたところ、問題はフラッシュ サブシステムに関連するものであることがわかりました。 現在、TF-M なしで MCUBoot をテストしていますが、実行されるアプリと行Iで停止するアプリの違いは、最初のイメージ スロットにジャンプすることが、次の KConfig オプションの 1 つ以上であることです。   CONFIG_FLASH_FILL_BUFFER_SIZE=32 CONFIG_FLASH=y CONFIG_FLASH_MCUX_FLEXSPI_XIP_MEM="RAM" CONFIG_FLASH_INIT_PRIORITY=50 CONFIG_FLASH_HAS_DRIVER_ENABLED=y CONFIG_FLASH_HAS_EXPLICIT_ERASE=y CONFIG_FLASH_HAS_PAGE_LAYOUT=y CONFIG_FLASH_JESD216=y CONFIG_FLASH_MCUX_FLEXSPI_NOR=y CONFIG_MEMC_MCUX_FLEXSPI=y MCUBoot と NXP のフラッシュ ファイルを調べてきましたが、正しい方向に進んでいるかどうかわかりません。次の行のようになります: (( void ( * )( void )) vt ->リセット)(); MCUBoot の Zephyr main.c の do_boot() 関数は、GDB でデバッグできる最後の場所です。そのリセット「関数」が呼び出された後、PC は 0x20005840 にあり、続行/ステップ実行では何も行われず、プログラムはハングするだけです。   繰り返しになりますが、この問題をデバッグするにはどこを参照すればよいかという助言やヒントがあれば、ぜひ教えてください。ありがとうございます! Re: RW612 MCUBoot + TF-M Not Booting こんにちは、リカルドさん。元の投稿が散漫になっていたらごめんなさい。 TF-M + MCUBoot ガイドを最初から完全に開始して、問題点をリストアップすることができました。通常の開発では VSCode 用の MCUXpresso を使用しますが、ガイドでは west コマンドライン ツールを使用しているため、ここでもそれを使用しました。 TF-M + MCUBoot ガイドの問題 (nxp_zephyr タグ nxp-v4.3.0) - 「セキュア イメージの変更」の手順 6 の「ダウンストリームから TF-M をビルドしてフラッシュする」では、M_BOOT_FLASH_CONF_START は BOOT_FLASH_ACT_APP と同じである必要があると記載されています。リポジトリ内のどこにも BOOT_FLASH_ACT_APP が見つかりませんでした。何に設定されているか確認する方法がわかりません。#define M_BOOT_FLASH_CONF_START (0x18020000)を使用しました - 「セキュア イメージの変更」の手順 8 では、ガイドでは hardware_init.c の SystemInitHook に VTOR 構成を追加するように指示されていますが、そのコードはすでに存在しているようです。そのままにしておいた。 - 「非セキュア イメージの変更」セクションでは、 nxp_zephyr\Zephyr\build\tfm\api_ns\platform\partitionフォルダー内のファイルを編集するようにガイドで指示されていますが、 nxp_zephyr\Zephyr\build はデフォルトでは存在しません。この時点では、ガイドでは何も構築するように指示されていません。後でアプリをビルドした後、手順 2 ~ 6 のファイルはすでに正しい値に変更されていました。 - 「非セキュア イメージの変更」の手順 7 に、 nxp_zephyr/zsdk/boardsディレクトリがありません。これはnxp_zephyr/Zephyr/boardsであると想定しているので、そのパスで手順 8 に従いました。 - ガイドに従ってnxp_zephyr/zephyr/boards/nxp/frdm_rw612/frdm_rw612_rw612_ns.dtsを編集した後、次のビルド エラーが発生します:必要なノードラベルが見つかりません: slot0_partition 。その編集を行う代わりに、デフォルトのデバイス ツリー ファイルを使用してビルドすると、サンプルはほぼ完全にビルドされますが、最後のステップでエラーが発生します。 トレースバック(最新の呼び出しが最後): ... intelhex.AddressOverlapError: アドレス 0x18020000 でデータが重複しています 上記の例外の処理中に、別の例外が発生しました: ... intelhex.AddressOverlapError: /nxp_zephyr/zephyr/build/zephyr/tfm_s_signed.hex にマージの問題があります 私はこのエラーを無視してガイドを続行しました。 - 最後に発生した問題は、手順 3 の「バイナリのマージ」セクションで、 「エラー: このようなコマンド 'merge' はありません」というエラーが発生したことです。私にとっては同様の機能があるように見えたので、merge の代わりに「export」コマンドを使用しました。 これらの調整を行い、ガイドの指示に従ってフラッシュした後でも、次のターミナル出力が得られます。 *** Booting MCUboot v2.2.0-192-g96576b341ee1 *** *** Using Zephyr OS build nxp-v4.3.0 *** I: Starting bootloader I: Image index: 0, Swap type: perm I: Image index: 0, Swap type: perm I: Primary image: magic=bad, swap_type=0x0, copy_done=0x2, image_ok=0x2 I: Secondary image: magic=good, swap_type=0x1, copy_done=0x3, image_ok=0x1 I: Boot source: none I: Image index: 0, Swap type: perm I: Image index: 0, Swap type: perm I: Image index: 0, Swap type: perm I: Image index: 0, Swap type: perm E: Image in the primary slot is not valid! E: Unable to find bootable image ガイドの指示に対して行った調整のいずれかが問題の原因なのか、更新された Zephyr リポジトリのその他の違いなのかはわかりません。ご返信ありがとうございます。 Re: RW612 MCUBoot + TF-M Not Booting こんにちは、 あなたの調子が良いといいのですが。セットアップの詳細を教えていただけますか? VSCode で MCUXpresso を使用していますか? flexcomms に関連するすべての変更を実装する前に、投稿をフォローできるかどうかを明確にしていただけますか?(それぞれのバージョンの変更あり) よろしくお願いいたします。 リカルド Re: RW612 MCUBoot + TF-M Not Booting こんにちは@jm-streametric さん、お元気ですか。 あなたが参照しているガイド ( RW612 を使用した Zephyr MCUboot + TFM デモ) は、4.2.0 より前のバージョンの Zephyr にのみ適用されます。この場合、Zephyr v4.3.0 (NXP のダウンストリーム リポジトリ) の例をビルドしてフラッシュする手順は、FRDM-RW612 の方が簡単です。psa_crypto の例をビルドしてフラッシュするには、以下の手順を参照してください。 リポジトリから例をインポートをクリックします。 NXP のダウンストリーム リポジトリ V4.3.0 を選択します。FRDM-RW612 の TF-M サポートがメインの Zephyr リポジトリに完全には追加されていないため、これは重要です。次に、FRDM-RW612 の非セキュア バージョンを選択します。 psa_crypto の例を選択し、[インポート] ボタンをクリックします。 最後に、サンプルをビルドしてボードにフラッシュします (必要に応じてデバッグ セッションを開くこともできます)。すべてが正しく実行された場合、シリアル端末のログは次の画像のようになります。 現時点では、この手順はFRDM-RW612 ボードにのみ適用されます。RW612をカスタム ボードで使用しているため、ボードに TF-M サポートを追加するには、必要な変更を確認して行う必要があります。考慮すべき主なポイントは、使用しているフラッシュ デバイスです。したがって、この点に違いがある場合は、より大きなポートを動作させる必要がある場合があります。 Zephyr コンソールに使用される Flexcomm インスタンスの変更で発生した問題に関しては、 boards/nxp/frdm_rw612/frdm_rw612_common.dtsiファイルで直接変更しないでください。この変更はビルド時にデフォルトに書き換えられるため、代わりにfrdm_rw612.overlayファイルを使用して変更を追加してみてください。このオーバーレイは Zephyr のデフォルトのデバイス ツリー ファイルに優先され、変更が維持されます。 情報が役に立つかどうかお知らせください。 Re: RW612 MCUBoot + TF-M Not Booting こんにちは、ローマン。 ご返信ありがとうございます!あなたの指示に従って、ボード上で作業を行うことができました :)。私のカスタム ボード上のフラッシュ レイアウトは FRDM-RW612 と同じなので、幸いなことにそこで変更する必要はありません。 オーバーレイを追加するのは良い点ですが、以前はそれを試してみようとは思いませんでした。 続いて、TF-M secure + BL2 システムの FlexComm 出力を変更することは可能ですか?ペリフェラルが搭載されているため、デフォルトの Flexcomm3 インターフェイスを使用できません。現在、デバッグ出力を無音にしていますが、BL2 + S ビルドを変更して、たとえば FC3 ではなく FC14 USART に出力できる場所はありますか? ありがとう! Re: RW612 MCUBoot + TF-M Not Booting こんにちは@jm-streametric 。 Flexcomm に関するご質問について: 現在の実装では、TF-M はUSART3 を使用するように「ハードコード」されています。別の USART インスタンスに切り替える必要がある場合は、次の場所にある TF-M プラットフォーム ファイルを確認して変更します。 /modules/tee/tf-m/trusted-firmware-m/platform/ext/target/nxp/frdmrw612 まず、 platform_base_address.hを確認することをお勧めします。ファイルの場所: frdmrw612/Device/Include このファイルは、TF-M で使用される USART インスタンスを含む、プラットフォーム レベルのベース アドレスを定義します。 さらに、同じ TF-M ターゲット ディレクトリ内の project_template フォルダーには、USART の初期構成コードがあります。これらの初期化により、USART3が現在どのように設定されているか、また、別のUSARTインスタンスに切り替えるためにどこに変更を適用するかが明確になります。 この情報がお役に立てれば幸いです! Re: RW612 MCUBoot + TF-M Not Booting こんにちは@jm-streametric さん、お元気ですか。 デバイス ツリーで、Flexcomm14 を参照するノードが正しく構成され、アクティブ化されているかどうかを確認してください。次の例のように、ステータス プロパティが「okay」に設定されていることを確認します。 flexcomm14: flexcomm@126000 { status = "okay"; }; これが役に立つことを願います! Re: RW612 MCUBoot + TF-M Not Booting こんにちは、ローマン。 TF-M システムで使用される USART を切り替えようとしました。すべての定義をtarget/nxp/frdmrw612/project_template/* board.hに切り替えるとおよび pin_mux.cFC3/USART3 -> FC2/USART2 への変更は機能します。 ただし、同じ手順を実行しても、FC14/USART14 に変更すると、BL2 プログラムがハングします。bl2.elf を使って addr2line でハングしているアドレスを実行したところ、プログラムは target/nxp/frdmrw612/Native_Driver/drivers/fsl_reset.c でループしたままになっているようです。51行目。FC14 ペリフェラルのリセットは 67 行目のスイッチ CASE を使用する必要があると思うので、これは正しくないように思えますが、addr2line に問題がある可能性があります。 いずれにしても、TF-M システムを USART14 に印刷するように切り替えた場合、BL2 プログラムがハングし、Zephyr アプリが起動しなくなります。これまでにこの問題を見たことがありますか? また、なぜこの問題が発生するのかの手がかりはありますか? Re: RW612 MCUBoot + TF-M Not Booting こんにちは、ローマン。 はい、flexcomm14 ノードを「正常」ステータスに設定しました。私の質問は BL2/Secure Environment のログ記録に関するものです。これら 2 つのバイナリは別々にビルドされるため、zephyr デバイスツリーは適用されないと思いますか?
查看全文
FRDM-KL25Z 错过 U7 MMA8451Q 新版 FRDM-KL25Z 缺少 U7 MMA8451Q 芯片。这个芯片是这个板的重要元器件,但我不明白为什么它被拆除了。因此,我无法使用板,但是尽管芯片已被移除,价格还是上涨了。我需要那块旧板。请检查一下,你移除了芯片但没有更改板型号,所以当我订购时,我本来想要的是旧板,但我收到了新的。 Re: FRDM-KL25Z miss U7 MMA8451Q 几年前,恩智浦将大部分 Accel/Gyros 的现有库存全部卖给了罗彻斯特电子公司。如今,意法半导体或模拟设备是寻找微机电的更好去处。 如果您要开始新的设计,Kinetis 产品线并不适合。 https://www.rocelec.com/global-search/MMA8451Q Re: FRDM-KL25Z miss U7 MMA8451Q 你好@王建兵 感谢您与我们联系。很抱歉,我们只提供新版本(Rev.I),旧版本将不再生产。正如 FRDM-KL25Z 主页上所指出的那样:"新设计不再推荐使用 MMA8451Q 加速计。 你可以尝试联系代理商或其他第三方平台,检查他们是否还有先前版本的库存。 感谢您的理解。 BR 爱丽丝 Re: FRDM-KL25Z miss U7 MMA8451Q 好吧,我明白了。我遇到了一个问题,请查看如何解决。此版本更改只删除了 U7?如果我把这个 U7 MMA8451Q 焊接到板上。是否可以像旧版本一样使用?现在我需要一个解决方案来处理它。谢谢!
查看全文
I.MX8MP Ethernet Camera Hello, Since the i.MX8MP does not support virtual channels, we would like to stream four Ethernet cameras simultaneously, as illustrated in the diagram below (which belongs to a different S32 processor); therefore, our question is whether the i.MX8MP is capable of decoding and streaming four 1080p @ 30 fps Ethernet camera streams at the same time, given that the Reference Manual indicates support for VLAN-tagged frames and AVB, but the VPU provides only a single hardware decoder.   Thanks, Best Regards.         Re: I.MX8MP Ethernet Camera Hello, Yes the iMX8MP could handle that, and the gstreamer is the tool that we use to decode all your streams. Regards
查看全文
Unable to flash S32K146EVB-Q144 board as D1 glowing red I have a S32K146EVB-Q144 evaluation board which was working fine initially. During a debug session where I had implemented Lin stack, it stopped working. When i reset my controller i see a continuous Red light on D1 and other two green lights are still there. I've used J10 and J107 at position 2-3 to select power from USB source and J104 at position 2-3 to select OpenSDA app flash mode. Now my controller is not getting detected at all by S32DS. I tried following the steps mentioned in below post as symptom seems exactly same. Re: S32K144 D2 RED LED is ON always - NXP Community Here I was able to halt the processor in OpenSDA using P&E Kinetics Recovery Tool but still not able to flash any new application. Even if halt is achieved, i am not able to flash it again and red light is still on. Controller is able to go into bootloader mode as well by adjusting jumper J104 and i was actually able to flash ne bootloader app in it as well. But somehow I am not able to write the flash again, and if i try flashing any example .srec file, D2 keeps on flashing periodically (usually in successful flashing it blinks once and then app starts running). So in a nutshell : -Controller is not able to reach main or getting continuous resets -Controller is not able to write the flash again (could be security issue). I did tried mentioned techniques in above thread except the one involving SEGGER-JLINK as I dont have that debug probe. I do have a PE Multilink Universal with me but its not able to recover/erase the flash as well. Here are the details of board : Board Name is: S32K146EVB-Q144 MicroBoot Kernel Version is: 1.08 Bootloader Version is: 1.13 Installed Application: PEMicro EVB-S32K144 Mass Storage/Debug App Application Version is: 1.25 DUID is: 39A33939-91818199-37539805-F97AE678 EUID is: 4141A238-1BDB8733-1854BA22-D38368D6 TUID is: 74823938-47328196-8576CC9B-0242983E TOA is: 86B6E505-56F042E0-79B2A114-62BA758F TOA2 is: 86B6E505-EB1A8A7C-AF6E54B6-43532420 SUID is: 86B6E505-5BA18877-37239804-8003EC65 Is MCU locked permanently ? If not how can i recover my board ? Is there any h/w failure I am looking at ? (Just FYI D2 and D3 glows green which i think means my 5V and 3.3V power rails are working fine) Is there a physical way to mass erase ? (Cant use S32DS emergency kinetics option as board is not detectable there at all).  Can grounding any pin of OpenSDA chip leads to erase of flash memory ? Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red Please note that during the Christmas holiday period, our support response times may be longer than usual. In some cases, your request might be addressed after the New Year. Thank you for your understanding. Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red Hi After the P&E Recovery Utility halt MCU, close the tool. Then follow the Step 3 or Step 4 to reprogram the S32K146. I'm not sure if this is due to the Application Version is: 1.25 . Please press and hold the reset button SW5, then insert the USB cable and place MSD-DEBUG-S32K146EVB-Q144_Pemicro_v121.SDA into the BOOTLOADER drive. This will update the Application Version to 1.21. I've also attached lpit_periodic_interrupt_s32k146.srec. By the way, you don't need external Segger J-Link. If you follow Step6:Inserting J7 while holding down SW5 puts OpenSDA into BOOTLOADER mode. And then drop SEGGER J-Link application firmware into it(OpenSDA_V1.bin).  The onboard debugger will then become J-Link.  Best Regards, Robin ------------------------------------------------------------------------------- Note: - If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you! - We are following threads for 7 weeks after the last post, later replies are ignored Please open a new thread and refer to the closed one, if you have a related question at a later point in time. ------------------------------------------------------------------------------- Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red Hello Robin, Thank you for your prompt response, well I tried rolling it back to MSD-DEBUG-S32K146EVB-Q144_Pemicro_v121.SDA,  Its behaving the same way, bootloader app is flashed but D1 still glowing red and I am not able to flash .srec file after halting it using kinetis recovery tool. I see that controller is trying to flash the srec but fails since D2 blinks periodically(usually it blinks only 3-4 times and app is flashed). I then tried switching the bootloader to  OpenSDA_V1.bin, I tried attempting connection using J-Link commander afterwards and I see following logs : SEGGER J-Link Commander V8.94 (Compiled Dec 10 2025 14:50:47) DLL version V8.94, compiled Dec 10 2025 14:49:54 Connecting to J-Link via USB...O.K. Firmware: J-Link OpenSDA compiled Jan 31 2023 13:42:36 Hardware version: V1.00 J-Link uptime (since boot): 0d 00h 00m 28s S/N: 621000000 VTref=3.300V Type "connect" to establish a target connection, '?' for help J-Link>connect Please specify device / core. : S32K146 Type '?' for selection dialog Device>S32K146 Please specify target interface: J) JTAG (Default) S) SWD T) cJTAG TIF>SWD Specify target interface speed [kHz]. : 4000 kHz Speed>100 Device "S32K146" selected. Connecting to target via SWD ConfigTargetSettings() start ConfigTargetSettings() end - Took 22us InitTarget() start SWD selected. Executing JTAG -> SWD switching sequence. Timeout while halting CPU. InitTarget() end - Took 392ms Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier Scanning AP map to find all available APs AP[2]: Stopped AP scan as end of AP map has been reached AP[0]: AHB-AP (IDR: 0x24770011, ADDR: 0x00000000) AP[1]: JTAG-AP (IDR: 0x001C0000, ADDR: 0x01000000) Iterating through AP map to find AHB-AP to use AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. FPUnit: 6 code (BP) slots and 2 literal slots CoreSight components: ROMTbl[0] @ E00FF000 [0][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7 [0][1]: E0001000 CID B105E00D PID 003BB002 DWT [0][2]: E0002000 CID B105E00D PID 002BB003 FPB [0][3]: E0000000 CID B105E00D PID 003BB001 ITM [0][4]: E0040000 CID B105900D PID 000BB9A1 TPIU Initializing 126976 bytes work RAM @ 0x1FFF0000 Reset type: NORMAL (https://kb.segger.com/J-Link_Reset_Strategies) Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via AIRCR.SYSRESETREQ. Reset: S_RESET_ST never gets cleared. CPU seems to be kept in reset forever. Reset: Using fallback: Reset pin. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via reset pin Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?). Reset: Reconnecting and manually halting CPU. Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. CPU could not be halted Reset: Core did not halt after reset, trying to disable WDT. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via reset pin Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?). Reset: Reconnecting and manually halting CPU. Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. CPU could not be halted Reset: Failed. Toggling reset pin and trying reset strategy again. Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via AIRCR.SYSRESETREQ. Reset: S_RESET_ST never gets cleared. CPU seems to be kept in reset forever. Reset: Using fallback: Reset pin. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via reset pin Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?). Reset: Reconnecting and manually halting CPU. Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. CPU could not be halted Reset: Core did not halt after reset, trying to disable WDT. Reset: Halt core after reset via DEMCR.VC_CORERESET. Reset: Reset device via reset pin Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?). Reset: Reconnecting and manually halting CPU. Found SW-DP with ID 0x2BA01477 DPv0 detected CoreSight SoC-400 or earlier AP map detection skipped. Manually configured AP map found. AP[0]: AHB-AP (IDR: Not set, ADDR: 0x00000000) AP[0]: Core found AP[0]: AHB-AP ROM base: 0xE00FF000 CPUID register: 0x410FC241. Implementer code: 0x41 (ARM) Found Cortex-M4 r0p1, Little endian. CPU could not be halted CPU could not be halted CPU could not be halted ****** Error: Failed to halt CPU. Memory zones: Zone: "Default" Description: Default access mode Cortex-M4 identified. J-Link> Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red Please use an oscilloscope to observe the waveform of the reset pin, send me the waveform and tell me the reset period and high-level width. In some cases, it may be impossible to recover, and you may have to replace the S32K1 chip.   Connection strategies & recovery steps: Goal: give the debugger a chance to halt the core and neutralize problematic firmware. A. Lower SWD speed + “connect under reset” In J‑Link Commander: J-Link> device S32K146 J-Link> if SWD J-Link> speed 1000 ; start at 1 MHz; if still failing, drop to 100 kHz J-Link> connect If it still fails, use manual connect‑under‑reset: Hold RESET_b low externally, power the board. Run connect in Commander. Release reset and immediately: J-Link> r J-Link> h J-Link> halt Try several times, especially with 100 kHz SWD speed—timing can be critical. B. Change J‑Link reset strategy Different Reset Strategy values behave differently. In Commander (exact IDs may vary by version): J-Link> SetResetType = 3 ; a common “connect under reset / halt after reset”; Try 2 / 4 / 12 etc. depending on your J-Link version J-Link> r J-Link> halt Alternatively, try selecting "Connect under reset" in J-Link Commander. Re: Unable to flash S32K146EVB-Q144 board as D1 glowing red According to the S32K146EVB-SPF-29844-RB.pdf: J104 1-2 Reset signal from OpenSDA J10 2-3 P5V0 If you have an external 9V or 12V power supply, you can also try connecting J107 1-2 P5V_SBC. If you happen to have an external debugger, such as PEMicro Multilink, try using it to see if it can download programs for the S32K146. What was the last project downloaded? Is CSEc enabled? Please answer my previous questions and provide me with the reset signal measured using an oscilloscope.
查看全文