Multi Source Translation Content

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

Multi Source Translation Content

讨论

排序依据:
NFM18PC225B1A3 生命周期结束 - 1:1 替换? 如果制造商村田没有提供后续类型,NFM18PC225B1A3 馈通电容将停产。 因为许多 QorIQ / Layerscape 设计检查列表中都有该过滤器:恩智浦是否有可用的 1:1 替换类型的信息? 根据我自己的研究,只有 TDK 的 YFF18PH0J225MT000N 可以替代,但焊盘布局略有不同(两个内焊盘而不是一个)。此外,还有一些焊盘布局相同、标称电容值较低的产品,它们的标称电容值为 1 uF,而不是 2.2 uF。 约翰内斯 Re: NFM18PC225B1A3 End of Life - 1:1 Replacement? 是否有最新进展?我们可以在新设计中使用 TDK 部件吗? Re: NFM18PC225B1A3 End of Life - 1:1 Replacement? 到目前为止,我的团队认为你们的 TDK 部分没有问题。 Re: NFM18PC225B1A3 End of Life - 1:1 Replacement? 与 AE 团队确认。
查看全文
#MCUXpresso-IDE 程序 " arm-none-eabi-c++ " 在 PATH 中找不到 你好 我在使用最新版本的MCUXpresso-IDE# 时遇到了一个问题,特此联系您。我最近更换了电脑并安装了 2025 年 6 月 27 日发布的 MCUXpresso-IDE IDE v25.6 [版本 136]。从 Git 导入我的项目后,它无法编译。我收到了以下错误消息:" 在 PATH " 中找不到程序 “arm-none-eabi-c++” 和 " 在 PATH 中找不到程序 “arm-none-eabi-gcc”。 在之前版本的 McuXpresso-IDE(v24.12 [Build 148])上,这个项目运行良好。有趣的是,我可以在新版本中创建新项目,并顺利编译它们。此外,我还可以导入和编译其他项目,但有一个项目有问题。 经过比较,我发现在这个特定项目的链接资源中缺少了一些路径变量:cmsis_pack_root、$、cmsis-rte 和 $。 您能帮我解决这个问题吗? 开发板 Re: #MCUXpresso-IDE Program "arm-none-eabi-c++" not found in PATH 嗨,@脑残粉 根据你的描述,这可能是 MCUXpresso IDE 25.03 的问题。 遗憾的是,我无法获得有关该问题的更详细描述,也无法重现该问题,因此无法找到根本原因。 BR 哈利 Re: #MCUXpresso-IDE Program "arm-none-eabi-c++" not found in PATH 你好@Harry_Zhang、 谢谢您的答复。我刚刚进行了检查,工具链的参数完全相同。如果它能帮助你理解问题,我已经在新电脑上安装了版本 mcuxPresso IDE v24.12 [Build 148] [2025-01-10],这个项目运行良好。因此,这不是操作系统的问题。 不幸的是,我无法将我的 GIT 与项目一起附上。 Re: #MCUXpresso-IDE Program "arm-none-eabi-c++" not found in PATH 嗨,@脑残粉 新项目运行正常 → 工具链已在 v25.6 中正确安装。 因此,我认为您可以检查工具链设置 右键单击有问题的项目 → 属性 Harry_Zhang_0-1756958672465.png 如果问题仍未解决,您可以链接您的 git。我可以试试。 BR 哈利
查看全文
新しいプロジェクトのコンパイル中に発生した問題 開発環境をセットアップしたばかりなので、S32K312の使い方を学ぶ予定です zhaobasui_0-1757310236757.png IDE、ADE アップデート パッケージ、および RTD パッケージをインストールした後、簡単なプロジェクトを作成しましたが、次のコンパイルの問題が発生しました。 zhaobasui_1-1757310604695.png 新しく作成したプロジェクトを別の同僚のコンピューター(自分のものと同じ開発環境を持つ)に配置し、問題なくコンパイルします。 助けてください、すでに3回再インストールしました。 なぜでしょうか? S32K312EVB-Q172 S32DS-S32プラットフォーム Re: ‌Problems encountered during compilation of a new project 私のパソコンにもインストールしましたが、操作は同じですが、このパソコンに問題があります。あなたが言及したリファレンスマニュアルには、あまり役立つ情報が記載されていないようです。 Re: ‌Problems encountered during compilation of a new project 私の問題はまだ解決されていません。FSL の使用にはまだ問題があり、Gnu の使用は遅すぎます。 Re: ‌Problems encountered during compilation of a new project 問題が解決してよかったです。 一方、RTD 4.0.0 のインストールフローに従っていないことがわかります。 詳細については、 SW32K3_S32M27x_RTD_R21-11_4.0.0_D2311_ReleaseNotes.pdf を参照してください。 Re: ‌Problems encountered during compilation of a new project zhaobasui_1-1757555030282.png zhaobasui_0-1757555012778.png zhaobasui_2-1757555038160.png また、C/C++build のツール チェーン エディターで現在のビルダーとして FSL Make Builder を選択すると、上記のコンパイル エラーが発生するという問題も見つかりました。ただし、他のオプションを選択すると、正常にコンパイルCAN。これはどういう意味ですか? zhaobasui_3-1757555302875.png zhaobasui_4-1757555322862.png Re: ‌Problems encountered during compilation of a new project 当社製品にご興味をお持ちいただき、また当社コミュニティに貢献していただき、ありがとうございます。 「ヘルプ」タブにある「インストールの詳細」のスクリーンショットを共有してください。
查看全文
MCX W72 Knowledge hub The MCX W72x family features a 96 MHz Arm® Cortex®-M33 core coupled with a multiprotocol radio subsystem supporting Matter, Thread, Zigbee and Bluetooth LE. The independent radio subsystem, with a dedicated core and memory, offloads the main CPU, preserving it for the primary application and allowing firmware updates to support future wireless standards. The MCX W72x also offers advanced security with an integrated EdgeLock® Secure Enclave Core Profile and will be supported by NXP's EdgeLock 2GO cloud services for credential sharing. The MCX W72x family includes Bluetooth Channel Sounding capabilities, with a dedicated on-chip Localization Compute Engine to reduce ranging latency. It incorporates additional memory to support application-specific code, connectivity stacks and over-the-air firmware updates. In addition, the radio subsystem can run the full Thread or Zigbee stack alongside the Bluetooth Low Energy stack. This delivers reliable wireless performance, as the real-time activities of the radio run on a separate core from the application. Building on NXP's strong history of providing industrial edge solutions, the MCX W series offers a wide operating temperature range from -40 °C to 125 °C and peripherals for industrial applications, including an optional CAN interface and will be part of NXP's 15-year Product Longevity program to support long-term industrial use. The MCX W series is supported by the MCUXpresso Developer Experience to optimize, ease and help accelerate embedded system development. joseAntonio_ruiz_0-1739550415233.png   joseAntonio_ruiz_1-1739550414945.png Security Certifications  PSA Certified Level 2 SESIP Level 2 Security Target  SESIP Level 2 KW47/MCXW72 SESIP certificate and ST are on TrustCB website Regulatory Certifications European Union Declaration of Conformity - FRDM MCXW72 European Union Declaration of Conformity - MCXW72-LOC Bluetooth Qualifications Qualified Products | Bluetooth® Technology Website Q360996: KW47 / MCX W72 Bluetooth LE 6.0 (Channel Sounding) Controller Q332147: KW47 / MCX W72 Bluetooth LE 6.0 (Channel Sounding) Host Documents MCX W72 Product Family Data Sheet MCX W72 Reference Manual Errata Sheet for MCX W72 MCXW72 Hardware Design Guide   Getting Started with Matter on MCX W72 platforms Getting Started with OpenThread on NXP MCX W72    FRDM-MCXW72 User Manual Getting Started with the FRDM-MCXW72   MCX W72-LOC User Manual Bluetooth Interested in Bluetooth technology? Bluetooth® Low Energy Primer – Essential reading for understanding BLE fundamentals. Bluetooth® Specifications – Full list of standards, protocols, and technical documents. Awards and Recognition - Every year, the Bluetooth Special Interest Group (SIG) celebrates the hard work and commitment of working groups, committee members, and contributors who have been recognized by their peers as making a difference in advancing Bluetooth technology.  2024: Channel Sounding 2025: Channel sounding amplitude-based attack resilience, LE test mode enhancements and Ranging profile and service.  Bluetooth Feature Overview Bluetooth_5.0_Feature_Overview  Bluetooth_5.1_Feature_Overview  Bluetooth_5.2_Feature_Overview Bluetooth_5.3_Feature_Overview Bluetooth_5.4_Feature_Overview Bluetooth_6_Feature_Overview Bluetooth_6.1_Feature_Overview Bluetooth_6.2_Feature_Overview Bluetooth_6.3_Feature_Overview Application Notes Software, Hardware and Peripherals: AN14850 Boosting application performance with MCX W72: This application note describes the usage of the dual-core architecture in the MCX W72 microcontroller to improve performance in generic embedded applications. AN14937 32kHz Crystal-less mode on MCX W72: This application note provides information on the 32 kHz Crystal-less mode on the MCX W72 device. This mode allows you to reduce the cost of the system, without compromising the 32 kHz clock accuracy. The Free‑Running Oscillator (FRO32K) is used as the 32 kHz clock source and is calibrated against the 32 MHz RF oscillator through the Signal Frequency Analyzer (SFA) module of MCX W72 AN14745 Features, Usage, and Capabilities of Smart Power Switch on the MCX W72: This application note describes the use of the smart power switch in the MCX W72microcontroller. The MCX W72 integrates a programmable solid-state switch that turns connected components on or off, including MCX W72 power domains. AN14747 Loadpull test Report for MCX W72: This document explains the purpose of measuring the supply current, the transmit power, and the harmonics level. These measurements are monitored while the complex output load seen by the device under test (DUT) is tuned in amplitude and phase. Power Management:  AN14739 MCX W72 Bluetooth Low Energy Power Consumption Analysis: This document provides the power consumption analysis of the MCX W72 (IIOT) wireless MCU using the MCXW72-EVK board AN14745 Features Usage and Capabilities of Smart Power Switch on MCX W72 Microcontroller:  This application note describes the use of the smart power switch in the MCX W72 microcontroller. The MCX W72 integrates a programmable solid-state switch that turns connected components on or off, including MCX W72 power domains. AN14841 802.15.4 Matter and Zigbee Power Consumption Analysis for MCX W72: This document provides the power consumption analysis of the Kinetis MCX W72 (IIoT) wireless MCUs. AN14742 Power Management Hardware for the MCX W72: This application note describes the usage of the different modules dedicated to power management in the MCX W72microcontroller AN14664 Coincell Hardware Recommendations for Kinetis BLE Applications: his document describes some hardware and software solutions to minimize the peaks of current at the coin cell level AN14889: FRDM-MCXW72 Radio Frequency System Evaluation Report for Bluetooth Low Energy and for IEEE 802.15.4 This document provides the radio frequency (RF) evaluation test results of the FRDM-MCXW72 board for Bluetooth Low Energy (2FSK modulation) and IEEE 802.15.4 (OQPSK modulation) applications.  RF: AN14865 Channel Sounding Fundamentals for the KW47 and MCX W72: This document provides an overview of the fundamentals for CS technology and how it can be used for custom solutions and applications. AN14779 Printed Channel Sounding Antennas for the KW47 and MCX W72: his application note is focused on printed antennas implemented on printed-circuit boards (PCB), designed by NXP for the KW47 and MCX W72 controllers AN14832 Fundamental Steps to Design a Channel Sounding Board - Creating a Simple PCB without Diversity: In this document, an example of a minimalistic CS subsystem is presented. Attention is paid to the Radio-Frequency (RF) path, since RF circuitry strongly influences the properties of the whole CS application. AN14747 Loadpull Test Report for MCX W72: This document explains the purpose of measuring the supply current, the transmit power, and the harmonics level. These measurements are monitored while the complex output load seen by the device under test (DUT) is tuned in amplitude and phase. AN14868 RF Modeling of Channel Sounding in ANSYS: focuses on techniques for simulating and analyzing channel sounding in wireless communication systems using ANSYS tools AN14855 Channel Sounding Tests in Different Environments: This application note is about Bluetooth Channel Sounding (CS), a technique for measuring the distance between two devices in the Bluetooth frequency band. It explains key factors affecting accuracy AN14869 Fundamental Steps to Design a Complex Channel Sounding Board:  It focuses on creating hardware that supports advanced CS features, including antenna diversity and optimized RF paths, to improve accuracy and mitigate issues like multipath propagation. AN2731 Compact Planar Antennas for 2.4GHz Communication: This document is not an exhaustive inquiry into antenna design. It is instead focused on helping the customers understand enough board layout and antenna basics to select a correct antenna type for their application, as well as avoiding typical layout mistakes that cause performance issues that lead to delays Security: AN14648 MCX W72 In-System Programming Utility: The document provides steps to boot the MCX W72 MCU in ISP mode and establish various serial connections to communicate with the MCU AN14613 MCX W72 Secure Boot using SEC tool: The MCX W72 is a low-power, highly secure, single-chip wireless MCU, the contents of flash memory can be saved as encrypted data, which can be decrypted instantly. It helps in protecting the sensitive data and algorithms. AN14646 Debug Authentication on MCX W72: This application note describes the steps for debug authentication using the MCUXpresso Secure Provisioning Tool (SEC). AN14728 MCX W72 Flash Encryption using NPX: There is an increasing requirement to protect the application code and data stored in flash memories in an encrypted form due to security reasons. The NVM PRINCE XEX (NPX) is a module inside the Flash Memory Controller (FMC) that allows customers to protect the contents of flash regions (up to four regions). It performs on-the-fly, low-latency encryption and decryption of flash contents, and it is transparent to the developer and to the Cortex-M33 platform. No special handle is needed from the perspective of the developer. AN14644 MCX W72 Managing Lifecycles: This document describes the following: Lifecycle stages that are available to the user, how to access the lifecycles, limitations of the lifecycles, how to transition to the next lifecycle AN14670 EdgeLock 2GO Provisioning via SPSDK for MCUs: EdgeLock 2GO is a fully managed cloud platform operated by NXP that provides secure provisioning services for easy deployment and maintenance of IoT devices that integrate NXP MCU, MPU, and EdgeLock SE05x secure elements. AN14624 EdgeLock 2GO PRovisioning via Secure Provisioning Tool (SEC) for MCUs: EdgeLock 2GO is a fully managed cloud platform operated by NXP that provides secure provisioning services for easy deployment and maintenance of IoT devices that integrate NXP MCU, MPU, and EdgeLock SE05x secure elements. AN14544 EdgeLock 2Go Services for MPU and MCU: EdgeLock 2GO is the service platform of NXP for provisioning and managing IoT devices. It lets you securely install keys and certificates into your devices, either during manufacturing or in the field, and then keep credentials up to date during the device life cycle. EdgeLock 2GO uses the security capability of each device, for optimal levels of security across your entire IoT fleet. Bluetooth Training Bluetooth Low Energy 6.0 NXP Training MCX W Series Training - NXP Community   RF Switch Comparison Absorptive/Reflective Standards Comparison ETSI / FCC / ARIB requirements BLE Channel Sounding  - Overview BLE Channel Sounding - RF Hardware BLE Channel Sounding - ANSYS Modeling Tools  BLE Channel Sounding - Antenna Prototypes Validation Measurements Equipment Wireless Equipment: This article provides the links to the Equipment that helps to the project development  Useful Links Debug probe firmware installation for the KW47-EVK and FRDM-MCXW72 This post will cover how to install the CMSIS-DAP/SEGGER J-link firmware for the KW47-EVK and FRDM-MCXW72 using NXP’s MCU-LINK installer. How to generate a Standalone IAR toolchain project from MCUXSDK application example - KWX/MCWX  Updating NBU for Wireless Examples on KW47/MCXW72This post will cover how to update the NBU firmware How to import and run demo examples with MCUXpresso for Visual Studio Code: This article gives information on how to import and run demo examples from the new SDK with ARM GCC toolchain, in MCUXpresso for Visual Studio Code. [MCUXSDK] How to use GitHub SDK for KW4x, MCXW7x, MCXW2x - NXP Community this community post provides step by step how to use GitHub SDK [MCUXSDK] GitHub SDK - Documentation for Bluetooth LE platforms - NXP Community this community post provides the documentation for BLE platforms.  The best way to build a PCB first time right with KW47 (Automotive) or MCXW72 (IoT/Industrial): In this community provides the important link to build a PCB using a KW45 or K32W148 and MCXW71 and all concerning the radio performances, low power and radio certification (CE/FCC/ICC) Workaround implementation for DCDC failure during drive strength change a DCDC failure can occur infrequently during a drive strength change to low, and the DCDC output voltage becomes greater than or equal to the current output voltage. How to use the HCI_bb on Kinetis family products and get access to the DTM mode:  This article is presenting two parts: How to flash the HCI_bb binary into the Kinetis product. Perform RF measurement using the R&S CMW270 BLE HCI Application to set transmitter/receiver test commands: This article provides the steps to show how user could send serial commands to the device. Bluetooth LE HCI Black Box Quick Start Guide : This article describes a simple process for enabling the user controls the radio through serial commands. Kinetis (../45/47/43;MCX W71/72/70) & MCX W23 Power Profile Tools (including Localization):  This page is dedicated to the Kinetis (KW35/KW38/KW45/KW47/KW43) and MCX W7x (MCX W71/W72/W70) Power Profile Tools. It will help you to estimate the power consumption in your application (Automotive or IIoT) and evaluate the battery lifetime of your solution. KW47/MCXW72 32MHz & 32kHz Oscillation margins: this article provides the properly configuration for the Oscillation margins for the circuit. Errata ERR053377: Use Cases for Different Message Buffer ConfigurationsThis article discusses the different use cases and configuration of the errata "ERR053377: FlexCAN: Message Buffer (MB) and Enhanced RX FIFO Filter Element (ERFFEL) Memory Corruption" Videos NXP Channel Sounding technology interfacing with Google Pixel 10 This is a demo showing the MCX W72 LOC board interacting with Google Pixel 10 phone using channel sounding Exploring Bluetooth Channel Sounding on FRDM-MCXW72 - Part 1: In this video, you will see step‑by‑step how Bluetooth® Channel Sounding works using NXP’s Rate2 distance‑estimation solution. Performing the demonstration includes a computer with VS Code, the MCUXpresso extension and toolchains installed, a FRDM‑MCXW72 development board and a smartphone running the BLE Hero application. Exploring Bluetooth Channel Sounding on FRM-MCXW72 - Part 2:  Concluding the demonstration of Bluetooth® Channel Sounding, part two of this presentation continues with a brief review of the testing setup and walks you through running board‑to‑board measurements
查看全文
S32K Sound Mixer Hi all, Recently, we completed S32K Sound Mixer reference code and demo, and glad to share this demo at here. Some key feature of this demo:  - Demo HW based on S32K344/S32K148 + audio codec SGTL5000 + QSPI flash MX25L6433.  - Demo SW based on S32K3 RTD RTM 2.0.0 and S32K1 RTD RTM 1.0.0.  - Demo provided 2 kinds of sound mixing algorithm realization code, and corresponding audio materials and codec SGTL5000 driver.  - Demo showed how to programming QSPI flash and its AHB accessing via audio storage and playing process.  - Demo used mono audio as source for processing, and output stereo audio (I2S format) via SAI HW FIFO combine (Line_Mux) function with nearly no extra cost. HMI/Cluster apps need multiple audio sources (usually warning sounds) be played simultaneously, which brings sound mixing ability requirement. However, S32K1/3 lack of this HW/SW feature support. With the demand from local key customer, and considering potential customer requirements, we planned to enable a SW sound mixer with scheduled peripherals, to enhance the S32K family audio mixing ability. It shall be easy of using/porting on S32K1/3, and use QSPI flash (AHB mode read) to store the music. Attachment the Sound Mixer package includes 2 sound mixing examples based on S32K344 EVB and S32K148 T-Box RDB, and some slides to introduce this implementation and quick start guide.  Thanks and welcome any comment from you. Best Regards, Shuailin Li Re: S32K Sound Mixer Hi @zyc0211 , Please sign-in your NXP website account, and see below place: Shuailin_0-1701068284626.png Shuailin_1-1701068308597.png Shuailin_2-1701068382263.png Shuailin_3-1701068447957.png Shuailin_4-1701068501893.png Shuailin_5-1701068526449.png FYI. If you still can not obtain the RTD 2.0.0 driver, please contact corresponding NXP FAE/DFAE to get the resources. Regards, Shuailin 回复: S32K Sound Mixer Hello, where is the download connection for S32K3 RTD RTM2.0? The S32K3 RTD 4.4 I installed cannot open the project
查看全文
BugBusters_Milestone_1 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 用于控制我们的机器人的简单的网络界面。它包含用于移动的按钮和用于机器人输出的控制台。 (在 “我的视频” 中查看) 2017 年 Linux 嵌入式挑战赛
查看全文
MHW-N1921 数字高效交流/直流谐振电源 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 谐振交流/直流电源在高功率输出时具有卓越的效率。TEA1916 是一种数字控制器,可简化谐振 LLC 设计的复杂性并提供轻松的调节。它是非常流行的 TEA1716 的继承者,用于许多谐振开关模式电源,例如PC 和电视,但 TEA1916 实际上非常适合任何大于 75W 的电源,例如医疗、工业和服务器电源。TEA1916 采用新的数字逐周期架构(Vcap 控制)来实现低功率负载下的新型操作。通过采用精确控制的突发模式操作,可以提高低输出功率下的效率。TEA1916 在待机或关机状态下也能实现极低的功耗;这是区别于竞争对手的一个关键性能参数。为了获得最高效率,TEA1916 与 NXP 的 TEA1995 同步整流器配合使用效果极佳。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 谐振交流/直流电源在高功率输出时具有卓越的效率。TEA1916 是一种数字控制器,可简化谐振 LLC 设计的复杂性并提供轻松的调节。它是非常流行的 TEA1716 的继承者,用于许多谐振开关模式电源,例如PC 和电视,但 TEA1916 实际上非常适合任何大于 75W 的电源,例如医疗、工业和服务器电源。TEA1916 采用新的数字逐周期架构(Vcap 控制)来实现低功率负载下的新型操作。通过采用精确控制的突发模式操作,可以提高低输出功率下的效率。TEA1916 在待机或关机状态下也能实现极低的功耗;这是区别于竞争对手的一个关键性能参数。为了获得最高效率,TEA1916 与 NXP 的 TEA1995 同步整流器配合使用效果极佳。 安全移动 | 医疗保健和可穿戴设备
查看全文
智能世界之旅-厦门-2016年11月15日 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 设计、软件与服务 APF-DES-T2229 - Kinetis 新产品,KE+,采用 K8x 和 KL8x 的安全性 安全互联汽车和自动化汽车 APF-AUT-T2295 - 实践研讨会:如何逐步调整新型 PMSM 安全移动、医疗保健和可穿戴设备 APF-MHW-T2232 - 适用于可穿戴设备的 LPC541xx
查看全文
NXP FTF Connects-オーランド-2016年9月22日 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> デザイン、ソフトウェア、サービス ハンズオン・ワークショップ:新しいLPC54114電力効率の高いMCUを使用した、常時稼働市場向けの組み込みソリューションによる設計  DES-N2084 およびDES-N1956ハンズオン・ワークショップ:Kinetisマイクロコントローラ向けFreeRTOSソリューション  DES-N1960 ハンズオン・ワークショップ Kinetis Enablement  ハンズオン・ワークショップ:KinetisによるIoT One Edge Node at a Timeの保護 DES-N1931 i.MX 6QuadPlusおよび i.MX 6DualPlusアプリケーションプロセッサ-視覚的に美しいグラフィックス中心のアプリケーションのためのパフォーマンス層マルチコア  DES-N1940 i.MX 8 グラフィックスアーキテクチャ   Kinetis®マイクロコントローラ・セキュリティ・テクノロジ  リニアテクノロジー:実証済み&最新のQorIQシリーズ・プロセッサに対応するスケーラブルな電源ソリューション  ロジック・デバイス:NXPの革新的なロジック・ソリューションによる電力、スペース、コストの節約の実例のケーススタディ Micron Technology:NXPマイクロプロセッサのメモリの選択肢  Security 101: QorIQ®プロセッサのセキュリティ・アクセラレーションの概要  TQ-Systems: モジュラー・アプローチで設計を高速化および最適化する方法  USB Type-C の概要  スマートホーム&ビル ® Bluetooth Smart Mesh:シンプルで使いやすい低電力ワイヤレスネットワークプロトコル ハンズオンワークショップ:ルーティング、境界ルーター、セキュリティ、低電力、コミッショニングに関する上級スレッド®スタッククラス  ハンズオンワークショップ:NFCペアリングを使用して、タップするだけで複数のBluetooth®およびWi-Fi®デバイスを接続  ユースケースに適したNFCソリューションの選び方 インサイト&イノベーション LPCマイクロコントローラのポートフォリオ、イネーブルメントの概要とロードマップ  INS-N1819 センサのディープダイブデモとデータ収集技術  セキュアなモバイル、ヘルスケア、ウェアラブル MHW-N1990 最新のシングルチップシステムモジュール技術で究極の小型化とカスタマイズを実現  MHW-N2009 ハンズオンワークショップ Hexiwear.pdfでIoTおよびウェアラブルアプリケーションを即座に開発  MHW-N1917 ワイヤレス充電でそのコードを切ってくれる!  スマートマシナリー&インダストリアルオートメーション SMI-N1948 ハンズオン・ワークショップ - Kinetisモータ Suite.pdf  スマートネットワーク NET-N1865 QorIQ LS1012A入門 - 世界最小・低消費電力の64ビットProcessor.pdf 
查看全文
APF-SNT-T1360 - 南京、深セン <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> このセッションでは、ハードウェアとソフトウェアの互換性を確保しながら、QorIQ T2081とT1040の通信プロセッサ・ファミリ間で移行する方法について説明します。このセッションでは、これらのプロセッサ間での移行と、これらのプロセッサの共通ボードの設計中に存在するハードウェア、ソフトウェア、およびボード レベルの考慮事項についても説明します。 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> このセッションでは、ハードウェアとソフトウェアの互換性を確保しながら、QorIQ T2081とT1040の通信プロセッサ・ファミリ間で移行する方法について説明します。このセッションでは、これらのプロセッサ間での移行と、これらのプロセッサの共通ボードの設計中に存在するハードウェア、ソフトウェア、およびボード レベルの考慮事項についても説明します。
查看全文
How to Measure the Internal Temperature and Voltage of an MCU Using the ADC0 NXPサポートチームの皆様、こんにちは。  現在、S32K314、RTD 7.0.0、およびFreeRTOSを使用したプロジェクトに取り組んでいます。MCALのADCモジュールを使用して、MCUに接続された外部デバイスの電圧、MCUの内部温度(TEMPSENSE)、MCUの内部電圧(ANAMUX)、およびバンドギャップ電圧の測定を実装しようとしています。測定結果を見ると、外部デバイスの電圧とバンドギャップ電圧は正しく測定されているようですが、MCUの内部温度と内部電圧の値は予想と異なっています。 期待値: MCU内部電圧(VDD_HV_A): 8192(2.5V、14ビット分解能) 実測値: 約6800~7100(2.07~2.13V、14ビット分解能) MCUの電源電圧は5.0Vです。ADCハードウェアユニットはADC0に設定され、ADC測定対象は以下のように構成されます。  Ch8:MCU内部温度(TEMPSENSE)  Ch9:MCU内部電圧(ANAMUX)  第10章:バンドギャップ ADC Setting00.png ADC Setting01.png ADC Setting02.png  MCU入力電圧 = 5.0V ADC Setting03.png ADC Setting04.png ADC初期化コード: void AdcAdapter_Init ( void ) { Adc_Calibrate ( ADC0 , & calStatus ) ; Adc_SetupResultBuffer ( ADC0 , Group0Result ) ; IP_DCM_GPR -> DCMRWF1 = ( IP_DCM_GPR -> DCMRWF1 | DCM_GPR_DCMRWF1_SUPPLY_MON_EN ( 1 ) | DCM_GPR_DCMRWF1_VDD_HV_A_VLT_DVDR_EN ( 1 ) | DCM_GPR_DCMRWF1_VDD_HV_B_VLT_DVDR_EN ( 1 ) | DCM_GPR_DCMRWF1_VDD_1_5_VLT_DVDR_EN ( 1 ) ) ; IP_DCM_GPR -> DCMRWF1 = ( IP_DCM_GPR -> DCMRWF1 & ~ DCM_GPR_DCMRWF1_SUPPLY_MON_SEL_MASK ) | DCM_GPR_DCMRWF1_SUPPLY_MON_SEL ( 0U ) ; // VDD_HV_A_DIV Adc_StartGroupConversion ( ADC0 ) ; // AdcConversionStart } ADCデータ取得(すべての周期的なタスク) void AdcAdapter_RunCyclic ( void ) { Adc_StatusType ret = ADC_IDLE ; Std_ReturnType adcStatus ; uint16 temperature ; // 変換完了チェック ret = Adc_GetGroupStatus ( ADC0 ) ; if ( ( ret == ADC_COMPLETED ) || ( ret == ADC_STREAM_COMPLETED ) ) { // 結果を取得 Adc_ReadGroup ( ADC0 , Group0Result ) ; // 次の変換を開始 Adc_StartGroupConversion ( ADC0 ) ; } else { // エラーログ } /* Adc_TempSenseGetTemp Singed Q11.4 */ adcStatus = Adc_TempSenseGetTemp ( ADC0 , mcuTemperature ) ; if ( E_OK == adcStatus ) { temperature = Adc_TempSenseCalculateTemp ( ADC0 , mcuTemperature ) ; } else { // エラーログ } }  ADC0グループのADC値は`Adc_ReadGroup`を使用して更新できると思いますが、MCUの内部温度については`Adc_TempSenseGetTemp`と`Adc_TempSenseCalculateTemp`を使用する必要があると思います。もし私が見落としている設定があれば教えてください。 Re: How to Measure the Internal Temperature and Voltage of an MCU Using the ADC0 こんにちは、センレントさん。 迅速なご対応ありがとうございます。 ご提供いただいたサンプルコードは既に確認済みで、私のコードに組み込んだと考えています。 ご提供いただいた表は、ADCブロックに供給される各クロックに対するレジスタ設定の表であると解釈しました。しかし、それらがMCALのどのADC設定に対応しているのかを特定することはできませんでした。 ソースコードを提供できないため、ADC設定の画像を添付します。どの設定を変更すればよいか教えてください。 他に何か必要な設定画面があれば、お知らせください。 1_ADC_ConfigTimeSupport.png AdcHwUnit> 2_ADC Config_AdcHwUnit.png 3_ADC General.png 4_ADC0 HwConfiguration.png 6_ADC AutosarExt.png Re: How to Measure the Internal Temperature and Voltage of an MCU Using the ADC0 こんにちは@輝彦 提供された情報にはADCの完全な構成が見当たらなかったので、ADCクロックがデータシートの要件に合っているか再確認してください。 可能であれば、テストプロジェクトを共有していただければ、私が確認します。 Senlent_0-1782458295032.png ちなみに、下記のリンクからデモをご覧ください。 https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-TempSenser-S32DS36-RTD600-500-400-p24/ta-p/2136187 Re: How to Measure the Internal Temperature and Voltage of an MCU Using the ADC0 こんにちは、センレントさん。 アドバイスありがとうございます。 ご助言に従い、TEMPSENSEのサンプリング時間を1.2マイクロ秒に設定するように、以下のように設定を変更しました。 ADC Setting10.png 160MHz = 0.00625マイクロ秒 1.2マイクロ秒/0.00625マイクロ秒= 192 ADC Setting11.png FreeRTOSで1秒サイクルのタスクを作成し、MCU電圧(VDD_HV_A)とMCU温度(TEMPSENSE)のADC値を毎秒取得しました(30秒分のデータ収集)。 ADC Setting13.png MCU電圧についてはバンドギャップ電圧を使い、以下の補償式でmVに変換しました。 (バンドギャップ電圧はほとんど変動せず、約3975(約1.2V)の値が得られた。) Adc補正 = (1200(mV) * Adc_VCC_HV_A) / Adc_バンドギャップ Mcu電圧 = アドコレーション × 2(2は電圧分割比VDD_HV_A) ADC Setting12.png さらに、 McuTempデータは `Adc_TempSenseGetTemp(ADC0, &mcuTemperature)` から取得されます。 ADC変換誤差が±5.0%であることを考慮しても、このばらつきは大きすぎると思います。何か解決策の提案はありますか?   Re: How to Measure the Internal Temperature and Voltage of an MCU Using the ADC0 こんにちは@輝彦 ご提供いただいた設定画面のスクリーンショットとコードを見る限り、明らかなエラーは見当たりません。ただし、温度センサのサンプリング時間は1.2μsを超えなければならないことに注意が必要です。そうでなければ、サンプリングの精度に影響します。したがって、テストを行う前にサンプリング時間を再度確認することをお勧めします。 Senlent_0-1782377529947.png Re: How to Measure the Internal Temperature and Voltage of an MCU Using the ADC0 ADC_Config>AdcHwUnitの画像が圧縮されて解像度が低下したため、再アップロードします。 <#1> 2_ADC Config_AdcHwUnit_1.png <#2> 2_ADC Config_AdcHwUnit_2.png <#3> 2_ADC Config_AdcHwUnit_3.png Re: How to Measure the Internal Temperature and Voltage of an MCU Using the ADC0 こんにちは@輝彦 温度チャネルから生データを直接読み取って、変動があるかどうかを観察できます。変動が大きい場合は、サンプリング時間を延ばし続けるCAN。 Re: How to Measure the Internal Temperature and Voltage of an MCU Using the ADC0 こんにちは、センレントさん。 ご返信ありがとうございます。 下図に示すように、サンプリング期間1/期間2の値を増加させた後、値は安定しました。デフォルト設定はサンプリング持続時間0だと思っていましたが、サンプリング持続時間0、1、2の切り替えはどうすればいいのでしょうか? 10_ADCConfig_AdcHwUnit.png (プリスケール設定に基づくと、ADCクロックは80MHzなので、1.2μsに相当する期間は96となる。) Re: How to Measure the Internal Temperature and Voltage of an MCU Using the ADC0 こんにちは、センレントさん。 ドキュメントを添付してくださりありがとうございます。現在チャネル32から63を測定しているので、これはサンプリング持続時間1に対応していると理解しています。 迅速なご対応ありがとうございます。問題は解決しました。 Re: How to Measure the Internal Temperature and Voltage of an MCU Using the ADC0 こんにちは、センレントさん。 私は表317の情報を以下のように解釈しました。 fmc = 160 MHz の場合: ・キャリブレーション用のプリスケーラを4に設定する ・通常のADC変換のプリスケーラを2に設定する ・「ADC高速」を無効に設定する 7_ADCConfig_AdcHwUnit.png これらの設定を適用して得られたデータは、以下の表に示されています。 平均化することでばらつきは減りましたが、MCU内部温度の変動は依然としてかなり大きいと感じます。 8_ADCConfig_AdcHwUnit.png 以下の表は、ADC値から°Cに変換したMCU温度データを示しています。 (ADC値を摂氏に変換するために、ADC値を16で割りました。) 9_ADCConfig_AdcHwUnit.png 16点平均で2.55度の変動は極めて大きい。MCUの温度はプロセッシング負荷によって変動することは理解していますが、これほど瞬時に大きく変わるのは普通のことですか? MCUの内部温度を測定する際に、平均を取るのが正しいアプローチでしょうか?
查看全文
Flutter 在 IMX93 上的运行 你好 我有一个 IMX93 主板,我想在上面运行一个 Flutter 程序。我在 CPU 使用率方面遇到了很大问题(显示一个每秒刷新一次的时钟的静态画面时,CPU 使用率约为 20%% ;而滚动包含图片的整页内容时,CPU 使用率则超过 90%% )。这主要取决于栅格(在静态屏幕上,每秒约180毫秒)。我正在尝试启用 PxP,但要么是我无法启用,要么是 Flutter 无法使用它进行栅格化。 我看到 Flutter 使用的 API 包括 OpenGL ES、Vulkan 和 Metal,因此我不确定是否可以使用 PXP 来辅助 CPU。  谢谢!
查看全文
IMX8mp gstreamer vpuenc_h264 プロファイルとレベルを設定 当社では、カスタムボード上にIMX8mpを搭載し、NXP Yocto Hardknottをベースプラットフォームとして使用しています。 ハードウェアH264エンコーダーであるvpuenc_h264プラグインを使用して、カメラストリームをH264/MP4に圧縮/エンコードしています。 基本的な例としては、次のようなものがあります。 gst-launch-1.0-v videotestsrc num-buffers=100 !video/x-raw、幅=720、高さ=576、フレームレート=25/1 !vpuenc_h264 !video/x-h264,profile=main !h264parse !mp4mux fragment-duration=10 !filesink location=/tmp/Video1.mp4 しかし、vpuenc_h264 は profile= および level= ストリームパラメータを無視するようです。imx-gst1.0-plugin を見てみるとコードには、H264プロファイルを設定する機能がないようです。 GStreamerのパラメータを使用してH264ハードウェアエンコーダのプロファイルを設定する機能はありますか? インターネットで、この設定をVPUのハードウェアレジスタにハードコーディングする必要があることを示唆する情報を見かけたのですが、実際はどうなのでしょうか? 代替案(コミュニティ?)があることに気付いた。gstreamer1.0-plugins-imxこのプラグインはプロファイルとレベルをサポートしているようです。これは、NXP fsl-nxp-bsp-hardknott Yoctoビルドのソフトウェアモジュール/カーネルでは使用できないということでしょうか? Re: IMX8mp gstreamer vpuenc_h264 set profile and level 裏付けとなるご意見をありがとうございます。 私も同様に、v4l2-ctl -d /dev/video1 --all がこれらのエンコーダーパラメータに関して誤解を招くような表示をしており、変更可能であるかのように誤って示唆し、「high」がデフォルトのプロファイルであるかのように見せかけているのを目にしました。 Re: IMX8mp gstreamer vpuenc_h264 set profile and level はい、ご指摘ありがとうございます。 NXPの公式ドキュメントは通常入手困難なため、インターネット検索やコードの確認を通して私が収集した情報を他のユーザー向けに以下にまとめました。 H264エンコーディングプロファイルは、vpu_wrapper内でBaselineにハードコーディングされています。例えばこれをMainlineに変更すると(vpu_wrapperを再構築する)、H264ストリームがMainlineとしてマークされます。実際の圧縮率が異なるかどうかは分かりません。 レベルは、ビデオの解像度に基づいてvpu_wrapperによって設定されます。このレベルをH264ストリームにタグ付けする以外に、何か影響があるかどうかは分かりません。どうやら、vpu_wrapperの古いバージョンには、このレベルを誤って設定するバグがあったようです。 ビットレートを指定しない場合、少なくともgstreamerのvpuenc_h264レベルでは、結果として得られるストリームのビットレートは非常に低くなり、したがって非常に低品質になります(少なくとも私たちのビデオストリーム(通常は静止画で、時折動きがある)の場合)。ビットレートを設定しない場合、H264エンコーダーは私が知らない何らかの可変ビットレートアルゴリズムを使用することになります。 NXPへのフィードバック: H264エンコーダーのプロファイル、レベル、ビットレートに関するドキュメントが必要であり、おそらく「i.MX Linuxリファレンスマニュアル」または他の場所に記載されているでしょう。 NXPのgstreamer vpuenc_h264コードは、gst-inspect-1.0でモジュールに関する情報を一覧表示する際に、この点について言及すべきです。なぜなら、多くのエンドユーザーがこのレベルで作業を行うからです。 Re: IMX8mp gstreamer vpuenc_h264 set profile and level こんにちは、 @TerryBarnaby1 さん。 お元気でお過ごしでしょうか。   関連情報については、下記のスレッドをご覧ください。 https://community.nxp.com/t5/ i-MX-プロセッサ/Encoding-H-264-amp-H-265-using-vpu-wrapper-h/mp/1347610   この情報がお役に立てば幸いです。   ありがとう、よろしく。 ドゥルヴィット・ヴァサヴァダ Re: IMX8mp gstreamer vpuenc_h264 set profile and level 同様に、デバイスはforce_key_frame ( V4L2_BUF_FLAG_KEYFRAME )が使用可能であると誤って宣伝しているようですが、実際には、私がそれを送信してもVPUによって完全に無視されているようです。
查看全文
如何通过 UART 接收不同长度的数据? 嘿 ! 我使用的是 s32k144 评估板,我使用 UART_PAL 库使用 MODBUS 协议通过 UART 接收数据。我在 while 循环中使用了 thenon 阻塞 uart_receivedata() API,并使用回调检查接收事件和接收数据。 在我确定要接收的数据长度之前,一切都很正常,但当要接收的数据长度不固定,而且每次都不一样时,我该怎么办呢? 我看到了许多相同的主题,但没有一个主题提供了绝对的解决方案,我请求您指导我一个正确的解决方案,如果可能的话,请提供相同的代码/屏幕截图。 我附上了一张截图,在开关语句中,不同情况下接收数据的长度是不确定的。 Adarshnanda_0-1683700959540.png 请@Robin_Shen为我们提供解决方案。 此致, 阿达尔什 Re: How to receive data of varying length over UART? 你好,我想问一下你们是否解决了在 485 上接收变长数据的问题。我目前也遇到了同样的问题,但一直无法解决。 Re: How to receive data of varying length over UART? 本指南中还缺少一样东西,但@Robin_Shen发送的链接中却有。我也会把它写在这里。 6.在 LPUART_DRV_StartReceiveDataUsingInt() 函数中,启用 CTRL[IDLE]。 harivignesh_1-1746257780938.png 非常感谢@Adarshnanda制作这份指南! Re: How to receive data of varying length over UART? HI 我正在尝试通过 LPC804 的 UART 接收数据,并使用 mcuxpresso ide,请问谁能提供代码并告诉我接收数据的步骤。 Re: How to receive data of varying length over UART? 嘿,@Robin_Shen、 我查看了该主题,它对我很有效。唯一令人困惑的是,该主题中有些答案与通过 DMA 接收数据有关,有些则与通过中断接收数据有关。 如果想使用 INTERRUPTS 实现 UART_IDLE_LINE_RECEIVE,让我总结一下需要遵循的步骤。 请注意,我们需要添加 LPUART 驱动程序。 1.在 LPUART_DRV_INIT 函数中,必须配置外设寄存器,以启用 IDLE LINE INTERRUPT& 设置 IDLE 标志设置前接收的空闲字符数。你应该看看参考手册。我已将其配置为 8 个空闲字符& ,在此附上截图。 Adarshnanda_0-1684475336590.png 2.在 LPUART_DRV_IRQHandler 中,必须检查 IDLE_LINE_DETECT 标志是否设置& ,如果设置了,则调用 LPUART_DRV_RxIdleCallback 函数(默认情况下没有,用户需要定义)。请注意 - 需要在启动 IRQ_Handler 时调用此函数。 Adarshnanda_1-1684475537665.png 3.在文件 - (callbacks.h) 的枚举 - uart_event_t 中,定义一个事件 UART_EVENT_IDLE_DETECT。 Adarshnanda_2-1684475649321.png 4.定义 LPUART_DRV_RxIdleCallback& 并提供其函数原型。 Adarshnanda_3-1684475819016.png 5.之后,您就可以在应用程序中使用它了。 Adarshnanda_4-1684475984634.png 谢谢@Robin_Shen & 我希望这对其他人有所帮助。 此致, 阿达尔什 Re: How to receive data of varying length over UART? 你好,阿达什、 很抱歉,最近的 S32K1 SDK/RTD 驱动程序没有实现空闲检测功能。您是否参考过S32K144 LPUART IDLE 线路中断配置中的讨论? 您需要更改 SDK 驱动程序,才能获得 LPUART 空闲线中断。 祝好, Robin ------------------------------------------------------------------------------- 注: - 如果本帖回答了您的问题,请点击"Mark Correct" 按钮。谢谢! - 我们会在最后一次发帖后的 7 周内跟踪主题,之后的回复将被忽略 如果您以后有相关问题,请另开新主题,并参考已关闭的主题。 ------------------------------------------------------------------------------- Re: How to receive data of varying length over UART? 7。调用 LPUART_DRV_GetReceiveStatus 函数来计算接收的长度,调用 LPUART_DRV_AbortReceivingData 函数以在处理第一帧后重新开始接收数据,这样接收缓冲区从 0 开始。 企业微信截图_17737263769503.png 这是我添加的内容。现在调试成功了。感谢专家们分享之前的内容。谢谢大家。
查看全文
i.MX 91 - LPDDR4 内存兼容性指南 本文档的目的是为选择 i.MX 91 系列处理器支持的兼容 LPDDR4 内存设备提供扩展指导。在所有情况下,强烈建议遵循恩智浦硬件开发者指南中针对特定 SoC 概述的动态随机存取存储器(DRAM)布局指南。 二进制密度(例如 1 GB、2 GB、4 GB)的内存设备是首选,因为它们通过与系统寻址方案保持一致并降低软件复杂性来简化内存管理。 LPDDR4 - 最大支持密度 SoC 最大数据总线宽度 最大密度 假定内存组织 说明 i.MX 91 (i.MX 91xx) 16 位 16GB / (2GB) 具有 17 行地址的单列单通道设备(R0-R16) 1, 2, 3 LPDDR4 - 经过验证的存储器列表 验证过程是一项持续性工作--预计将定期更新表格。 SoC 密度 内存供应商 经过验证的内存部件编号 说明 i.MX 91 16GB / (2GB) 美光 MT53E1G16D1FW-046 AAT:A MT53E1G16D1ZW-046 AAT:C 5 2 Gb/(256 MB) Winbond W66BP6NBHAHJ 4 8GB / (1GB) 南亚 NT6AN512M16AV-J1I   4 Gb/(512 MB) 南亚 NT6AN256M16AV-J1I 4 8GB / (1GB) ISSI IS43LQ16512B-046BLI 4 12GB / (1.5GB) 美光 MT53E768M16D1ZW-046 4 16GB / (2GB) 智能存储器 IMAG16L4KBBG 4 2 Gb/(256 MB) 南亚 NT6AN128M16AV-J1 4 4 Gb/(512 MB) 联合信息中心 SCB11N4G160BF-04ZI 4 4 Gb/(512 MB) ISSI IS43LQ16256B-053BLI 4 4 Gb/(512 MB) Winbond W66CP6RBHAHJ 4 Note: This device supports operation with LPDDR4 memories only. LPDDR4x operation is not supported. Dual‑mode memories that support both LPDDR4 and LPDDR4x are allowed as long as the device can operate in LPDDR4 mode, including using LPDDR4 I/O voltage levels and initialization sequences. 注意:某些内存供应商的 LPDDR4 设备可能不支持低速运行,此外,DQ ODT 可能未处于活动状态,这可能会影响这些速度下的信号完整性。如果在用例中计划低速运行,请向内存供应商咨询内存设备的配置方面和可能的自定义,以确保功能正确。 注 1: 这些数字完全基于DDR控制器和DDR PHY的IP文档、为将其集成到SoC而选择的实现参数设置、SoC参考手册以及JEDEC标准 JESD209-4B(LPDDR4)。因此,除非另有说明,否则它们没有经过验证,也不能保证存储器供应商提供的 SoC 具有特定的密度和/或所需的内部结构。如果客户选择使用最大密度,并将其用于预期用途,则风险自负。 注 2: 不支持任何密度的字节模式 LPDDR4 设备(在两个芯片之间内部分配 x16 通道,每个 x8),因此,这些数字仅适用于内部组织 x16 的设备(在 JEDEC 规范中称为 " 标准 ")。 注 3: SoC 还支持双列单通道设备,因此,使用具有 16 行地址(R0-R15)的双列单通道设备也可以实现 16GB/2GB 的密度。 注 4: 该内存部件号没有经过 JEDEC 的全面验证,但通过了所有功能测试项目。 注 5: 该内存部件号不推荐用于新设计,已被新部件号取代
查看全文
S32DS v3.5 - 在创建项目时不可见 SDK& OpenSDA 调试问题 (S32K144) MCU:S32K144 板:S32K144 EVB(板载 OpenSDA) 集成开发环境:S32 Design Studio v3.5 SDK:S32K1xx SDK v4.0.1 操作系统:Windows 11 问题 1:创建项目时看不到 SDK 已成功安装 S32K1xx SDK v4.x,可在下面看到:   首选项→ S32 Design Studio → SDK 管理   但是,在创建新的 S32DS 应用程序项目时,"选择要附加的 SDK "列表是空的,没有 SDK 出现。 发生在S32DS v3.5中 SDK 在首选项中可见,但在创建项目时无法选择 问: S32DS v3.5和S32K1xx SDK v4.x 之间是否存在已知的兼容性问题? 建议 v3.5 使用哪个 SDK 版本? 问题 2:使用板上 OpenSDA (peMicro) 调试失败 在板载 O penSDA 上使用 GDB peMicro 接口调试时,我经常会遇到以下错误: "启动 GDB 服务器任务遇到问题" "执行 MI 命令失败:-exec-run" "不知道怎么跑。试试'帮助目标'" 说明: 板被检测为 OpenSDA USB 设备 即使是基本的hello_world也会出现问题 重新刷新 OpenSDA 固件后有时能正常工作 在S32DS v3.5中发生得更频繁 问题: v3.5 中 是否完全支持板载 OpenSDA,还是推荐使用外部调试器? 申请它 请告知: 针对 S32K144 推荐的S32DS + SDK版本组合 SDK 附件和 OpenSDA 调试的已知问题或变通方法 谢谢! Re: S32DS v3.5 – SDK not visible during project creation & OpenSDA debug issues (S32K144) 你好@mahesh7、 一般来说,SDK 不再得到支持和维护。 最后一个版本 - S32 SDK for S32K1xx RTM 4.0.2 - 用于 S32DS 3.4。 请使用 S32K1 的实时驱动程序而不是 SDK: S32K1_S32M24X 实时驱动程序 AUTOSAR 4.4 & R21-11 版本 2.0.0 适用于 S32DS 3.5 S32K1_S32M24X 实时驱动程序 AUTOSAR R21-11 版本 3.0.0 适用于 S32DS 3.6 可以从页面访问实时驱动程序 (RTD) https://www.nxp.com/products/S32K1软件部分。 顺祝商祺! 帕维尔 Re: S32DS v3.5 – SDK not visible during project creation & OpenSDA debug issues (S32K144) 你好@PavelL、 感谢您对 SDK 的弃用以及对 S32K1 使用实时驱动程序 (RTD) 的建议的澄清。 根据建议,我已将S32 Design Studio 3.5移至RTD。不过,我目前在RTD 的安装和使用方面也遇到了问题,尤其是在创建项目和调试时。 我面临的问题是 RTD 软件包似乎已安装,但是在创建新应用程序项目期间,RTD 并非总是可以选择或正确识别的 即使创建了项目,我在调试过程中也会遇到问题,例如调试器无法启动,或者目标程序无法在 main() 处停止。 如果您能提供或指点我一个分步骤的程序,包括S32DS 3.5 和 RTD 的完整工作流程,将对我非常有帮助: S32DS 3.5 和热电阻的正确安装顺序 如何验证S32DS 内部的RTD 安装情况 创建基于 RTD 的新项目的正确步骤 所需项目设置(编译器、SDK/RTD 路径等) 推荐的调试探针和调试配置 在 S32DS 3.5 中使用热电阻进行调试时的任何已知限制或常见陷阱 这些详细的指导将大大有助于建立稳定的开发和调试环境。 感谢您的支持。 致以最诚挚的问候, @mahesh7 Re: S32DS v3.5 – SDK not visible during project creation & OpenSDA debug issues (S32K144) 你好@mahesh7、 请查看以下相关链接: 安装 -https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-offline-install-S32K1-RTD-2-0-0-in-S32DS-v3-5/ta-p/1927845 创建新项目 -https://community.nxp.com/t5/S32-Design-Studio/Install-SDK-RTD-into-S32-Design-Studio/m-p/1779464 上述主题的解决方案中有几个相关链接。 具体到 S32K1,要查看可用的 SDK/RTD,可能需要选择工具链的上一版本。 推荐的调试探针取决于您的要求,例如: 多链路调试探器:适用于许多 ARM 和 8-/16/32 位设备的调试探器 世纪佳缘 J-Link 调试探头 劳特巴赫 TRACE32 调试和跟踪解决方案 顺祝商祺! 帕维尔 Re: S32DS v3.5 – SDK not visible during project creation & OpenSDA debug issues (S32K144) 你好@PavelL、 谢谢你的参考。我使用 S32K1 SDK RTM 4.0.3 安装了 S32DS v3.4,并开始使用建议的设置创建项目。在运行 SDK 示例项目(FTM、ADC、UART、GPIO)时,我仍然会遇到版本和集成问题,希望获得有关同时使用 ConfigTools、生成的代码和 SDK 驱动程序的推荐工作流程的指导。您能否还阐明可靠地导入和构建 SDK 示例的正确方法?此外,查看运行日志的推荐工具是什么?S32DS 是否提供串行终端,还是应该通过 OpenSDA 虚拟 COM 端口使用 PuTTY?如果能就所需的驱动程序和调试工具提出建议,将非常有帮助。 Re: S32DS v3.5 – SDK not visible during project creation & OpenSDA debug issues (S32K144) 你好@mahesh7、 示例流程可能是这样的 根据示例创建项目 打开配置工具 修复所有错误(如果有 检查外围设备的引脚、时钟和设置(如果所有设置都符合板要求) 更新源代码 返回代码 - S32DS C/C++ 构建 闪存 调试时可使用 printf() -已解决:如何在 S32DS.3.5 中使用 printf 函数?- 恩智浦社区 你可以使用 S32设计工作室知识库——恩智浦社区作为参考点。 顺祝商祺! 帕维尔
查看全文
IMX8QX DDR RPA_tool 構成、レジスタ情報が欠落しています こんにちは、 IMX8QX 上の DDR3L 用の RPA_tool の構成に記載されているいくつかのレジスタに関する情報が必要です。次のようなレジスタ アドレスが記述されています。 0x41C80044 0x41C80208 0x41C80204 0x41C82C00 0x41C83800 しかし、それらはドキュメントのどこにも記載されていません。 それぞれの機能と設定フィールドを教えていただけますか。 よろしくお願い申し上げます。 Re: IMX8QX DDR RPA_tool configuration, missing register information こんにちは、 @CPE さん。 この設定ファイルは、サードパーティのIPベンダーによって提供されています。ポイント付きレジスタはNDAドキュメントには表示されていません。i.MX8X実装の場合、提供された値以外に選択肢はないとご理解ください。 よろしくお願いいたします。
查看全文
RT1170 上的 LPUART1 BREAK 检测问题 亲爱的恩智浦支持团队 我目前正在 RT1170 上使用 SDK 和 LPUART1 进行 UART 通信。我在发送 BREAK 检测时遇到了一个问题,希望得到您的指导。 问题描述: 当我启用LIN 中断检测 (LBKDE)和LBKDIE 时: MCU 成功检测到来自 PC 的发送 BREAK 信号(LBKDIF 标志置位)。 但是,正常的 UART 数据通信不起作用。 在正常 UART 模式下,RX 和 TX 正常工作。 示波器测量结果显示,在发送中断期间,PC 的 TX 线路在预期的持续时间(约 2100 毫秒)内保持低电平。 问题 RT1170 LPUART 是否会出现这种行为? 有没有既能检测 PC 发送 BREAK,又能进行正常 UART 通信的推荐方法? 如果您能指导我如何在保持 RT1170 正常 UART 数据接收的同时可靠地检测到来自 PC 的发送中断(Send BREAK),我将不胜感激。 感谢您的帮助。 顺祝商祺! Re: Issue with LPUART1 BREAK Detection on RT1170 亲爱的恩智浦支持团队 感谢您之前的解释和对 RT1170 参考手册的参考。 根据 RM 的描述,我们可以理解当LBKDE = 1 时,LIN 中断检测电路被启用,接收到的数据不会写入 RX FIFO,因此正常的 UART 接收会被有意禁用。我们承认这种行为是意料之中的。 不过,我们想就可能的替代方案或建议的解决方案提出一个后续问题。 我们的要求 检测来自 PC 的发送 BREAK条件(通过 USB-UART)。 同时,继续正常的 UART 数据收发。 不需要 LIN 协议栈;这是一般的 UART 通信,BREAK 用作同步或控制信号。 我们观察到的情况 LBKDE = 1时 LIN BREAK 检测正确(LBKDIF 已设置)。 正常 UART RX 数据被阻断,如 RM 所述。 LBKDE = 0时 正常 UART RX 正常工作。 我们的问题 RT1170 是否支持或推荐在不启用 LBKDE 的情况下,在保持正常 UART RX 激活的同时检测发送中断(Send BREAK)的方法? 是否认为使用成帧错误 (FE) + RX FIFO 清除是非 LIN UART BREAK 检测的预期解决方法? 在使用 LBKDE 与普通 UART 通信时,是否存在任何勘误、未注明的设置或硬件限制? 如果不支持这种使用情况,能否请您确认RT1170 LPUART 在设计上不支持同时进行 LIN BREAK 检测和正常 UART 接收? 如果您能确认或推荐任何最佳做法,我们将不胜感激。 非常感谢你们一如既往的支持。 顺祝商祺! Re: Issue with LPUART1 BREAK Detection on RT1170 你好@dskim2、 感谢您关注恩智浦 MIMXRT 系列! 您所描述的现象是意料之中的。请参阅 RM 的以下解释: Gavin_Jia_0-1768802115983.png 此外,我们的一位同事也实现了类似的功能,或许对您有所帮助: 1.https://community.nxp.com/t5/NXP-Designs-Knowledge-Base/RT1170-LIN-driver-development-and-stack-porting/ta-p/1356144 2.https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Use-RT1060-STAT-LBKDE-to-detect-Lin-quot-break-quot-but-cannot/m-p/1458242 致以最诚挚的问候, Gavin
查看全文
i.MX95 VPU H265 latency and performance(v4l2h265enc/v4l2h265dec) Hello, I am currently evaluating the H265 decode → encode pipeline on i.MX95 and I am observing significantly worse latency and stability compared to i.MX8MP, using similar workloads and configurations. Context On i.MX8MP, using: imxvpudec_h265 vpuenc_hevc I am able to achieve: Very low end-to-end latency (≈ 10 ms) Stable operation with multiple streams No visible freezes or artifacts On i.MX95, using: v4l2h265dec v4l2h265enc I observe: ~90 ms latency for a single decode → encode pipeline Freezes and visual artifacts when running 4 simultaneous camera streams Test pipeline To reproduce the issue, I used IP cameras (H265 over RTSP) with the following pipeline: test-launch "( rtspsrc location=rtsp://10.42.0.85 drop-on-latency=true latency=0 buffer-mode=4 ! rtph265depay ! h265parse config-interval=1 ! v4l2h265dec ! v4l2h265enc ! rtph265pay name=pay0 pt=96 )" This pipeline works correctly with a single camera, but when scaling to 4 cameras, freezes and artifacts start to appear. Questions Why is the H265 VPU pipeline on i.MX95 significantly more latent than on i.MX8MP? Is DMABUF zero-copy fully supported between v4l2h265dec and v4l2h265enc on i.MX95? If not, is there an implicit memory copy that could explain the additional latency and bandwidth pressure? Are there known limitations in the current i.MX95 VPU driver regarding: Low-latency operation Multi-stream decode + encode Internal buffering depth Are there recommended V4L2 controls or io-modes (capture/output-io-mode) to minimize latency on i.MX95? Is the i.MX95 VPU driver expected to reach performance parity with i.MX8MP in future BSP releases, or is the higher latency an inherent design tradeoff? Goal My objective is real-time, low-latency video processing (decode → process → encode), similar to what is achievable on i.MX8MP. Thank you for your support. Re: i.MX95 VPU H265 latency and performance(v4l2h265enc/v4l2h265dec) Hello, Which BSP version are you using on i.MX8MP and i.MX95 to recreate this issue? Are you using the same GST pipeline (other than the decoder/encoder elements) on both 8MP and 95? AFAIK, there is no known limitation that results in high latency on i.MX95. On i.MX95, encoder support mmap and dmabuf, which can make a pipeline to transfer dma-buf without copy b/w decoder and encoder. Does the IP camera encode without B frames? Then we can disable decode frame reorder, which will reduce the latency. Please check this. You can disable frame reorder using below v4l2 control " v4l2h264dec extra-controls="decode,display_delay_enable=1,display_delay=0" " You can list all v4l2 controls using below command: v4l2-ctl -l -d Regards Re: i.MX95 VPU H265 latency and performance(v4l2h265enc/v4l2h265dec) The kernel versions: imx95: 6.6.101-0 imx8mp: 6.6.84-0 Yes it is the same gstreamer pipeline. The IP camera encode without B frames. I tired your command and it doesn't solve the issue. There are still artifacts on the screen and the latency is high. However qualitatively speaking, it seems to remove the freezes. ``` v4l2-ctl -l -d /dev/v4l/by-path/platform-4c480000.vpu-video-index0 User Controls min_number_of_capture_buffers 0x00980927 (int) : min=1 max=32 step=1 default=1 value=1 flags=read-only thumbnail_mode 0x00981901 (bool) : default=0 value=0 flags=write-only Codec Controls h264_profile 0x00990a6b (menu) : min=0 max=4 default=0 value=0 (Baseline) hevc_profile 0x00990b67 (menu) : min=0 max=0 default=0 value=0 (Main) display_delay 0x00990b8d (int) : min=0 max=0 step=1 default=0 value=0 display_delay_enable 0x00990b8e (bool) : default=0 value=0 ``` ``` v4l2-ctl -l -d /dev/v4l/by-path/platform-4c480000.vpu-video-index1 User Controls horizontal_flip 0x00980914 (bool) : default=0 value=0 vertical_flip 0x00980915 (bool) : default=0 value=0 rotate 0x00980922 (int) : min=0 max=270 step=90 default=0 value=0 flags=modify-layout min_number_of_output_buffers 0x00980928 (int) : min=1 max=32 step=1 default=1 value=1 flags=read-only Codec Controls video_gop_size 0x009909cb (int) : min=0 max=2047 step=1 default=30 value=30 video_bitrate_mode 0x009909ce (menu) : min=0 max=1 default=1 value=1 (Constant Bitrate) flags=update video_bitrate 0x009909cf (int) : min=1 max=1500000000 step=1 default=2097152 value=2097152 frame_level_rate_control_enable 0x009909d7 (bool) : default=1 value=1 h264_mb_level_rate_control 0x009909da (bool) : default=1 value=1 number_of_mbs_in_a_slice 0x009909dc (int) : min=0 max=262143 step=1 default=1 value=1 slice_partitioning_method 0x009909dd (menu) : min=0 max=1 default=0 value=0 (Single) force_key_frame 0x009909e5 (button) : value=0 flags=write-only, execute-on-write intra_refresh_period 0x009909ec (int) : min=0 max=2160 step=1 default=0 value=0 intra_refresh_period_type 0x009909ed (menu) : min=0 max=1 default=1 value=1 (Cyclic) h264_i_frame_qp_value 0x00990a5e (int) : min=0 max=51 step=1 default=30 value=30 h264_p_frame_qp_value 0x00990a5f (int) : min=0 max=51 step=1 default=30 value=30 h264_b_frame_qp_value 0x00990a60 (int) : min=0 max=51 step=1 default=30 value=30 h264_minimum_qp_value 0x00990a61 (int) : min=0 max=51 step=1 default=8 value=8 h264_maximum_qp_value 0x00990a62 (int) : min=0 max=51 step=1 default=51 value=51 h264_8x8_transform_enable 0x00990a63 (bool) : default=1 value=1 h264_cpb_buffer_size 0x00990a64 (int) : min=0 max=18750000 step=1 default=0 value=0 h264_entropy_mode 0x00990a65 (menu) : min=0 max=1 default=1 value=1 (CABAC) h264_i_frame_period 0x00990a66 (int) : min=0 max=2047 step=1 default=0 value=0 h264_level 0x00990a67 (menu) : min=0 max=16 default=14 value=14 (5) h264_loop_filter_alpha_offset 0x00990a68 (int) : min=-6 max=6 step=1 default=0 value=0 h264_loop_filter_beta_offset 0x00990a69 (int) : min=-6 max=6 step=1 default=0 value=0 h264_loop_filter_mode 0x00990a6a (menu) : min=0 max=2 default=0 value=0 (Enabled) h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4 (High) vertical_size_of_sar 0x00990a6c (int) : min=0 max=65535 step=1 default=0 value=0 horizontal_size_of_sar 0x00990a6d (int) : min=0 max=65535 step=1 default=0 value=0 aspect_ratio_vui_enable 0x00990a6e (bool) : default=0 value=0 vui_aspect_ratio_idc 0x00990a6f (menu) : min=0 max=17 default=0 value=0 (Unspecified) h264_constrained_intra_pred 0x00990a7f (int) : min=0 max=1 step=1 default=0 value=0 h264_chroma_qp_index_offset 0x00990a80 (int) : min=-12 max=12 step=1 default=0 value=0 hevc_minimum_qp_value 0x00990b58 (int) : min=0 max=51 step=1 default=8 value=8 hevc_maximum_qp_value 0x00990b59 (int) : min=0 max=51 step=1 default=51 value=51 hevc_i_frame_qp_value 0x00990b5a (int) : min=0 max=51 step=1 default=30 value=30 hevc_p_frame_qp_value 0x00990b5b (int) : min=0 max=51 step=1 default=30 value=30 hevc_b_frame_qp_value 0x00990b5c (int) : min=0 max=51 step=1 default=30 value=30 hevc_profile 0x00990b67 (menu) : min=0 max=0 default=0 value=0 (Main) hevc_level 0x00990b68 (menu) : min=0 max=8 default=7 value=7 (5) hevc_loop_filter 0x00990b6c (menu) : min=0 max=2 default=1 value=1 (Enabled) hevc_loop_filter_beta_offset 0x00990b6d (int) : min=-6 max=6 step=1 default=0 value=0 hevc_loop_filter_tc_offset 0x00990b6e (int) : min=-6 max=6 step=1 default=0 value=0 hevc_refresh_type 0x00990b6f (menu) : min=0 max=2 default=2 value=2 (IDR) hevc_num_of_i_frame_b_w_2_idr 0x00990b70 (int) : min=0 max=2047 step=1 default=0 value=0 hevc_constant_intra_prediction 0x00990b72 (int) : min=0 max=1 step=1 default=0 value=0 hevc_strong_intra_smoothing 0x00990b76 (int) : min=0 max=1 step=1 default=1 value=1 hevc_tmv_prediction 0x00990b79 (int) : min=0 max=1 step=1 default=1 value=1 prepend_sps_and_pps_to_idr 0x00990b84 (int) : min=0 max=1 step=1 default=1 value=1 frame_skip_mode 0x00990b86 (menu) : min=0 max=2 default=0 value=0 (Disabled) average_qp_value 0x00990b91 (int) : min=0 max=51 step=1 default=0 value=0 flags=read-only ``` Re: i.MX95 VPU H265 latency and performance(v4l2h265enc/v4l2h265dec) The BSP versions are : imx8mp: lf-6.6.52-2.2.0 imx95: lf-6.6.52-2.2.1 Thank you Re: i.MX95 VPU H265 latency and performance(v4l2h265enc/v4l2h265dec) Yes the IP camera encode without B frames. I tried your command and it doesn't solve the issue. There are still artifacts on the screen and the latency is high. However qualitatively speaking, it seems to remove the freezes. Re: i.MX95 VPU H265 latency and performance(v4l2h265enc/v4l2h265dec) ok Also please confirm the B frame question I mentioned above. Regards Re: i.MX95 VPU H265 latency and performance(v4l2h265enc/v4l2h265dec) Hello, To confirm: the IP cameras encode without B frames (I-P only). I have applied display_delay_enable=1, display_delay=0 on the decoder. This helped remove freezes, but the latency remains at ~90 ms. To isolate the bottleneck, I used the GStreamer element-latency tracer on this pipeline: ``` rtspsrc location=rtsp://... drop-on-latency=true latency=0 buffer-mode=4 !  rtph265depay ! h265parse config-interval=1 !  v4l2h265dec extra-controls="decode,display_delay_enable=1,display_delay=0" capture-io-mode=4 output-io-mode=4 !  v4l2h265enc extra-controls="encode,video_bitrate_mode=1,video_bitrate=2097152,frame_level_rate_control_enable=0,video_gop_size=30" capture-io-mode=4 output-io-mode=4 !  h265parse config-interval=1 ! rtph265pay name=pay0 pt=96 ``` Per-element latency results (640x480 @ 30fps, single stream): v4l2h265enc: ~67 ms v4l2h265dec ~2 ms all other elements < 1 ms The encoder alone accounts for ~67 ms (~2 frame periods). This is consistent across runs. The decoder is fine at ~2 ms. I have tried: frame_level_rate_control_enable=0 capture-io-mode=4 and output-io-mode=4 (DMABUF) on both encoder and decoder Minimal queue buffering between elements (max-size-buffers=1) None of these significantly reduce the encoder latency. My questions, focused on the encoder: Is the Wave6 encoder expected to hold 2 frames internally before producing output? Is there a way to reduce this internal buffering (similar to display_delay=0 on the decoder side)? Does output-io-mode=5 (DMABUF_IMPORT) work on the encoder to achieve zero-copy from upstream? Would this help latency? Is there a V4L2 control or driver parameter to enable a low-latency / zero-delay encoding mode on the Wave6? On i.MX8MP, vpuenc_hevc achieves ~10 ms for the same workload. Is this latency gap with v4l2h265enc on i.MX95 expected to improve in future BSP releases? Thank you for your help.
查看全文
介绍 eRPC 本教程介绍eRPC(嵌入式远程过程调用)开源项目。 eRPC(嵌入式远程过程调用)是由恩智浦创建的远程过程调用(RPC)系统。RPC是一种机制,用于通过简易本地函数调用远程系统上的调用软件例程。远程系统可以是通过通信信道连接的任何CPU:例如,网络中的服务器、多核系统中的另一个CPU内核,等等。对客户端而言,这就像在应用中调用某个库中的函数一样。唯一的区别在于通信信道引入的任何延迟或不可靠性。 重要链接: 所有与 eRPC 开发相关的内容都位于:GitHub - eRPC base eRPC开发数据位于GitHub - eRPC development。 eRPC 发布版本位于:GitHub - eRPC Releases eRPC文档位于Github - eRPC wiki eRPC已作为Python软件包发布至pypi eRPC支持多核和多处理器类型的应用。 在哪里可以找到 eRPC 示例 在 NXP MCUXpressoSDK 软件包中可以找到大量 eRPC 多核和多处理器示例。访问 https://mcuxpresso.nxp.com 可配置、构建并下载这些软件包。 要获取支持多核(包含 eRPC)的开发板列表,请基于 “中间件 (Middleware)” 进行筛选,并搜索 “multicore” 关键词。下载包含多核中间件的选定软件包后,可参考以下路径: /boards/ /multicore_examples :eRPC 多核示例(使用 RPMsg_Lite 或消息单元传输)或者 /boards/ /multiprocessor_examples :eRPC 多处理器示例(使用 UART 或 SPI 传输)。 eRPC 示例均以 “erpc_” 为名称前缀。 获取 NXP MCUXpressoSDK 的 eRPC 多核和多处理器示例的另一种方法是使用 mcux-sdk 的 GitHub 代码库。请按照 README 概述部分中关于如何使用 West 工具克隆和更新 mcuxsdk 代码库的说明操作。完成后,armgcc 版本的 eRPC 示例可以在以下文件夹中找到: mcuxsdk/examples/ /multicore_examples or in mcuxsdk/examples/ /multiprocessor_examples folders. 例如,你可以使用 evkmimxrt1170 作为 board_name。与 MCUXpressoSDK 软件包类似,这些 eRPC 示例都使用 “erpc_” 作为名称前缀。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Kunal,您好!您的问题似乎已在此得到解答:需要帮助——在iMx6sx中实现eRPC的分步过程?· 问题#5 · EmbeddedRPC/erpc-imx-demos · GitHub Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> HI [email protected]‌, 我不知道 eRPC 在 MPC5748G 上的官方使用方式。只是提醒一下:eRPC 取决于编程语言、操作系统和传输层。它没有特定于电路板的文件。所以,如果使用的是 FreeRTOS 和 C 语言,那几乎就成功了,你只需要移植你想用的传输层(如果还没有移植的话)。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan,       eRPC是否已移植到恩智浦MPC5748G?有没有可供参考的示例代码? 顺祝商祺! Alex Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi [email protected], 我在这方面没有太多经验。最近,当从多个任务中调用多个 eRPC 调用时,我们不得不添加一些互斥锁。不过我喜欢你的想法。 我快速浏览了一下源代码。你需要说明你的用例。但我认为是 i.MX Linux 与使用 RPMsg 的 M 核之间的通信。在这种情况下,我认为你可以像我们那样添加互斥锁(这将使 eRPC 调用序列化。你需要在 performRequest 函数的某个地方添加它们)。为每个线程创建端点在我看来是个好主意,但我发现有更多问题需要解决。一个更简单的解决方案可能是:传输初始化函数将初始化更多端点(基于任务数量),客户端的 eRPC rpmsg 发送 / 接收函数改为使用未使用的端点进行发送,并使用相同的端点接收消息,服务器上的 eRPC rpmsg 接收函数需要等待所有端点上的消息。 我不知道这对你来说是简单的任务还是更复杂的任务。但恐怕如果不修改代码,你将无法进行多线程调用。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan, 我目前在Cubic与Chandini共事。我只是想了解一下从多个线程调用eRPC的额外信息。当前我们采用单一端点进行即止型调用,每次调用完成后才发起下一次调用。现在我们希望通过多个线程发起多次调用,因此想了解实现该功能的最佳方案。 其实由于我对这方面了解不足,我们尝试过并发进行其他调用,不过直到出现问题,我们才意识到正在这么做。 我们已观测到eRPC返回的通信故障错误代码。 是否可以使用单一端点来实现这一点,也就是说客户端这边是否应该是线程安全的? 如果不建议执行此操作,是否应该为每个线程配置独立的端点, 或者我们应该做别的事情吗? 此致 李 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi [email protected]‌, 感谢您告知我们。真有趣,我今天因为另一项目刚刚研读过相关方案:smileygrin: Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan, 感谢您的快速回复。 通过在客户端和服务器端的套接字连接中禁用Nagle算法,并使用以下API调用,我可以在TCP中实现更好的性能(响应时间以微秒为单位)。 int result = setsockopt(sock, /* 受影响的套接字 */                         IPPROTO_TCP,     /* 在TCP级别设置选项 */ TCP_NODELAY, /* 选项名称 */ (char *) &flag, /* 类型转换是历史遗留问题 */ sizeof(int)); /* 选项值的长度 */ 参考资料:TCP_NODELAY:2018 年 TCP 优化最佳实践 | ExtraHop 谢谢! 萨西达兰。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi [email protected]‌, 或许您可以询问GitHub的相关用户(在同一主题下,或创建新主题)。至少有两名用户正在执行与TCP相关的任务: github: GitHub - EmbeddedRPC/erpc: Embedded RPC 线程1:使用具备TCP传输功能的多连接处理服务器 · 问题#32 · EmbeddedRPC/erpc · GitHub 讨论帖 2:TCP Example client /server code・Issue #39・EmbeddedRPC/erpc・GitHub 就个人而言我建议这个方案,但不确定是否适用于您的情况:linux - Ubuntu上的低延迟TCP设置 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan, 我想要将eRPC移植到TCP套接字上。 我在虚拟串口(Linux 系统内)上运行了你的示例测试代码 (test_arrays),串口的响应时间不到 1 毫秒。 当我通过TCP运行同一示例代码时,TCP的响应时间约为90毫秒。 有没有办法像优化串口那样,降低 TCP 的延迟并提升其性能呢? 谢谢! 萨西达兰。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi, Dusan. 这很有帮助。顺便说一下,示例的头文件中提到了这一点。 来自A9的函数调用运行良好,M4则可返回数据。 但当前问题出现在M4调用函数时。A9中显示如下错误:“MU传输缓冲等待清空超时!imx_mu_rpmsg_send()失败,错误码:-5”。 在出现此错误之后,数据函数调用也无法在另一端正常运行:“rpmsg_multiept rpmsg0: virtqueue_add_outbuf失败,错误码:-5” 我应该检查什么? 感谢您的帮助。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Vadim, 通常情况下,您需要执行两项任务。一项针对客户端,另一项则针对服务器。问题还在于erpc_arbitrated_client_init的输出结果应作为参数传递给初始化服务器。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 嗨,Dusan、Marek、社区。 我已经使用eRPC创建多个应用,M4(客户端)-A9(服务器)或M4(服务器)-A9(客户端)均能正常运行,但我希望在各端使用客户端/服务器应用。不过它现在无法正常工作或运行,只要从一端执行一次,应用就会挂起。 我想检查一下代码的整体结构。 我哪里做错了呢? 是不是应该在 M4 上为客户端和服务器分别使用两个独立的 FreeRTOS 任务? 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: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> vadimfilippenko,您好!如果您仍然对使用Python版本的话题感兴趣,可以查看此线程:将MPU补丁添加到内核中 - 我无法查看新模块 · 问题#2 · EmbeddedRPC/erpc-imx-demos · GitHub。来自mhanuel26 的最后两条消息值得您关注,因其已成功使用python应用。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Dusan, Marek, 我终于成功启动了修改后的 eRPC 示例。不过在 Linux 端我用的是 C 语言,且在 M4 端使用的是 eRPC 1.5.0 版本,其中 rpmsg 初始化函数带 6 个参数(这是杜尚在 GitHub 上提到的关于第 6 个参数的提示)。感谢你们的帮助。准备好迎接新的问题吧) Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您需要在运行python应用之前运行M4应用。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Vadim, 请在这里贴出:ls /sys/class/rpmsg 的结果 看起来 M4 没有发送命名服务(M4 是否运行了正确的固件?)。正因为如此,没有创建来自 M4 的动态宣告通道的文件夹,因此 Python 无法创建 rpmsg 传输... 请检查你的 M4 内核打印输出。 此致, Marek Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Vadim,  正如你在其他评论中看到的,我一直努力尽快回复。但这周(可能还有下周)我比较忙。 不过,从你遇到的错误来看,你应该对比一下 transport.py 中 RpmsgTransport 类里的初始化函数, 以及erpc-imx-demos/sysfs.py at master · EmbeddedRPC/erpc-imx-demos · GitHub   - class RpmsgEndpoint 请确保 GitHub - EmbeddedRPC/erpc-imx-demos: eRPC demos for i.MX devices 是最新版本,且子仓库已根据与 erpc-imx-demos 匹配的提交进行了检出 也许mareknovak能更准确地指出问题所在。 看起来 如果self.id == -1: raise Exception() 返回 -1 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 有人能帮我解决以下问题吗? 我正在 iMX6COM 开发板上使用 erpc-imx-demos 中的 eRPC 演示示例。 在M4侧启动演示应用程序: "硬件已初始化 eRPC已初始化 MatrixMultiply服务已添加" 在 Linux 中添加驱动: "root@imx6sxea-com:~# modprobe -v rpmsg_multiept insmod /lib/modules/4.1.15-2.0.3+geb0b90b/kernel/drivers/rpmsg/rpmsg_multiept.ko" (系统并未反馈关于rpmsg通道已创建的信息,并且sys/class/rpmsg目录下的rpmsg文件夹为空) 在 Linux 上启动 appl 演示: 回溯(最近一次调用在最后): 文件"example.py",第111行,在 transport = erpc.transport.RpmsgTransport() 文件"build/bdist.linux-armv7l/egg/erpc/transport.py",第 199 行,在 __init__ 文件 "build/bdist.linux-armv7l/egg/rpmsg/sysfs.py" 中,第 116 行,在__init__ 异常 异常类型错误:'需要整数' 在 <绑定方法 RpmsgEndpoint.__del__ of > 被忽略 附言: 我已构建M4 eRPC演示应用,所用平台为cmake和eclipse。 M4 rpmsg演示应用运行良好。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Vakul, 抱歉,我错过了您的评论。目前我们不支持任何加密传输。但由于eRPC是模块化的,我认为您可以轻松地将此功能添加到您的eRPC项目中。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi eRPC 通信能否通过某种加密传输方式(例如 TLS)来保障安全? 此致 Vakul Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 嗨,Evgeny,目前我们对此还没有预估。但我认为你可以通过编写自己的 erpc_malloc/erpc_free 函数实现来编写/使用自己的分配器。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan, 是否计划在其他部分(例如erpcMatrixMultiply_shim 的生成等效实现)中增加更多静态内存分配?每个输入参数是否都需要动态分配内存(从编解码器填充数据后,在函数调用结束时释放)? 比如将预先分配的内存(由用户应用静态分配)传递给框架? 谢谢! Evgeny Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 嗨,Evgeny,这看起来像是 MCUExpresso 项目文件/ IDE 的问题。顶层文件夹名称应该是虚拟目录,未来这些目录将不会存在。你磁盘上的软件包中,eRPC 的目录结构应该与 GitHub 上的类似。GitHub 的目录结构更为推荐。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan, 我注意到ERPC在运行时使用了大量动态内存分配。是否有计划使其更适合嵌入式系统,并添加静态内存分配方案? 编辑: 很抱歉我刚才的问题,我确实在代码仓库中看到了 erpc_setup_mbf_static.cpp 文件。问题在于,我的代码是基于 MCUXpresso SDK 中提供的示例 ——frdmk66f_multiprocessor_examples_erpc_server_matrix_multiply_spi 和 frdmk66f_multiprocessor_examples_erpc_client_matrix_multiply_spi。这些示例的目录结构与代码仓库中的代码大不相同。 所以我的问题再问一次,应该使用 SDK 示例的目录结构还是代码仓库中的呢?它们为什么会有这么大的差异? 谢谢! Evgeny  Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Evgeny, 首先:您是否正在使用 develop 分支中的 smac.erpc(并且应用程序是从该分支构建的)?对我来说,这个版本是可以正常工作的。 目前erpcgen应用版本和其余eRPC代码已连接。这意味着如需使用您从github构建的新版erpcgen应用,则必须将github上的github erpc_c/*文件复制至您的示例中。然后,您可以使用新版erpcgen应用重新生成代码,更新应用(erpc初始化 + 传输)功能,其他部分即可正常运行。否则,如果您不更新erpc_c文件,则必须使用提供的erpcgen应用。 查看这个页面的底部内容:入门指南・EmbeddedRPC/erpc Wiki・GitHub,对于较新的 erpcgen 版本来说,该内容应该是相当新的。 我不确定最新提交是否已修改spi,建议您暂时使用旧版实现。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hey Dusan, 当我使用自己编译的 erpcgen.exe 时,我在 smac.erpc 示例中遇到了相同的错误: error: file smac.erpc:135:5: syntax error, unexpected identifier, expecting '}' 我之前提到的目录结构是存储库中的erpc_c目录,并且: 来自SDK示例。哪个目录结构是“正确”的?结合使用我生成的文件与SDK示例代码是否安全? 谢谢! Evgeny Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hey dusancervenka-b51352, 感谢您的快速回复!我克隆了开发分支。我注意到erpc_c目录结构与Kinetis SDK提供的示例有很大不同。哪一个更合适? 谢谢! Evgeny Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi evgenyerlihman‌, 实际上,我们正在进行更频繁地更新。您需要切换到开发分支。GitHub - EmbeddedRPC/erpc at develop。最后一次代码更新是昨天。但您需要在该此构建erpcgen应用。有了smac IDL,就能正常运行。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi dusancervenka-b51352, 我正在考虑将 eRPC 框架用于我正在开发的一款新产品,该产品使用多个 NXP 的 Kinetis 器件。我注意到 eRPC 的 GitHub 仓库最后一次更新是在 6 个月前。我的问题是,这个框架目前还在维护、修复和开发吗?我尝试了 GitHub 上的示例: erpcgen.exe smac.erpc 并且它未能生成 cpp 源代码,出现了错误。 erpcgen可执行文件来自MCUXpresso SDK。 谢谢! Evgeny Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好,Chandini, 没关系。我也刚休完长假,希望您度过了一段美好时光。 我已通过社区消息系统(私信)给你发了邮件。 我们可以通过邮件详细讨论。大致流程是,你需要在 GitHub 上创建分支,切换到开发分支,应用你的修改,创建提交记录,再发起拉取请求。我们会审核你的修改,提出修改建议,之后将其合并到开发分支。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan , 非常抱歉回复迟了,我刚结束长假回来。已与团队成员进行内部沟通,请提供您的电子邮箱地址以便我们转发资料。根据公司政策,我们无法直接将任何内容直接上传至您的github。 谢谢 Chandini Re: Introducing eRPC 嗨,杜桑 、 当然,我会与我的前辈讨论并创建拉取请求。目前我正在度假,抱歉迟复。 谢谢 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 嗨,Chandini。很高兴你成功了。我有一个特别的提议,你能否在 eRPC 的 GitHub 开发分支上,就你新创建的传输层提交一个拉取请求(基于开发分支)?或许还需要做些工作才能让它与更新版本的 eRPC 兼容。但如果你不想更新的话,我可以来做:)通过在 GitHub 上提交拉取请求,你将成为有价值的贡献者,并且会永远出现在贡献者历史记录中。 希望 eRPC 能成为你的理想解决方案。我们会一直在这儿(或 GitHub 上)为你提供帮助:) Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi dusancervenka-b51352 , b50844 , novakma7   终于恢复正常运行,演示程序现可在Linux上配合我的c++代码运行。 非常感谢各位回答了我所有的问题。:) 特别感谢Dusan:smileyhappy 谢谢 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> HI Dusan , 由于我昨天忙于其他任务,所以未能进行任何尝试。今天我会进行尝试,并及时通知您。 我觉得我得稍微修改一下我的函数,再进行尝试。因为到目前为止,我在发送和接收函数中只传递了 char * 类型的数据。 很快会回来找您。 谢谢 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Chandini,您好!是的,没错。我当时不在公司,所以无法获知具体功能的名称。此功能是否能正常运行? Re: Introducing eRPC 你好,杜桑 感谢您的答复: write(fd、 >getBuffer(), >getUsed()😞 我可以看到getused函数(位于erpc/message_buffer.h at 9e18d069aeae19a6e80a5e8783903bc63bd9b567 · EmbeddedRPC/erpc · GitHub中),但找不到getbuffer函数。 我想我必须用下面这个函数来获取我的缓冲区,对吗? /*! * @brief This function returns pointer to buffer to read/write. * * @return Pointer to buffer to read/write. */ uint8_t *get() { return m_buf; } 因此函数为如下形式: send :erpc_status_t send(MessageBuffer *message) { write(fd, message->get, message->getUsed())};  谢谢 chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好,chanidi,您需要以不同的方式来做:您必须使用 transport.h。如果您不使用它,它将无法正常工作。 也许您可以使用我上面提到的 ioctl 命令: erpc_status_t receive(MessageBuffer *message) {int fd = open("/dev/rpmsg_ept1024.1", O_RDWR);} 发送:erpc_status_t send(MessageBuffer *message) { write(fd, message->getBuffer(), message->getUsed())}; 读取:erpc_status_t receive(MessageBuffer *message){size_t size = read(fd, message->getBuffer(), 500); message->setUsed(size)}; novakma7您能否确认操作步骤? Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Dusan , Marek 是的,我也参考了那些文件,但是 我正在使用trasport.h创建传输层。但面临参数不匹配的问题 transport.h中的发送和接收函数以消息缓冲区作为参数,          virtual erpc_status_t receive(MessageBuffer *message) = 0;          virtual erpc_status_t send(MessageBuffer *message) = 0; 根据 example.py 我已经创建了我的 RpmsgEndpoint 类,该类需要以下参数       RpmsgEndpoint::receive(int maxlen) RpmsgEndpoint::send(char *buffer,int dst) 根据我的理解,我们只需要从 Linux 中读取和写入 /dev/rpmsg_ept1024.1 设备即可。   所以我在想,与其使用 transport.h,或许我需要创建自己的 transport.h 版本? 感谢大家 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 不客气。您可以从/erpc-imx-demos/middleware/erpc/transport/文件夹汲取灵感。有多种传输方式。 Re: Introducing eRPC 非常感谢 Dusan 的快速回复 ,我将继续沿着这条路走下去,不久后再来找你。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好,Chandini。您是对的。这些步骤是正确的。您需要创建继承自transport.h的类 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Marek 我还有一个问题。 目前我的工作状态: 我已在c++中实现RpmsgEndpoint类 我正在研究如何让我的客户端应用程序现在正常运行。 erpc-imx-demos/MPU/example_erpc at master · EmbeddedRPC/erpc-imx-demos · GitHub中的 Python example.py调用继承自Transport类的 RpmsgTransport。 我的问题是,我是否应该使用transport.h(位于/erpc-imx-demos/middleware/erpc/erpc_c/infra)来确保应用正常运行。 以便我创建RpmsgTransport类,并在客户端应用中调用它。 我这样想对吗? 先感谢您 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 是的,你说得对。 Python 所做的一切都只是对文件的 IO 操作(读/写)。这在任何语言中都可以实现,包括 C/C++。 选择 Python 来演示是因为它在 Linux 用户空间中很受欢迎,但你完全可以将其移植到 C 语言中。 我想我们现在的理解是一致的了。 祝您好运! 祝好, Marek Re: Introducing eRPC 你好,马雷克 感谢您的答复,它消除了我的一些疑惑。 我们不打算在两边都使用 FreeRTOS。 我们的计划是   M4 核 - 运行 FreeRTOS—— 这一点在你们的演示中已经实现了 A7 核 - 运行 Linux—— 你们的演示中有 Python 代码,用于利用内核的 RPMSG 实现   我们只需要用C或C++来代替Python。 我认为我们可以轻松地将 Python 代码移植到 C 或 C++,对吗? 谢谢 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好,Chandini Indavara Basavaraju, RPMSg-Lite是RPMsg协议的实现,仅适用于运行 FreeRTOS或裸机的M4端。 在Linux/A7端,您可以放心使用内核中的RPMsg实现。(例如:GitHub - EmbeddedRPC/erpc-imx-demos:i.MX设备的eRPC演示) 或者你是打算在 M4 和 A7 两个内核上都运行 FreeRTOS?这种情况下它是可以工作的,但这并非标准用例。这需要你为 A 内核创建一个移植层,并让 FreeRTOS 在那里运行。 希望这能给你一些方向, Marek Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Marek 不知怎的,我漏掉了你的消息,对此我很抱歉 非常感谢 。我会尽快尝试您的最新版本。 您能否回答我关于RPMSG传输层的最后一个问题? 谢谢 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好,我理解您。 您需要新建一个(此外还可根据需求,通过github上的拉取请求将其添加到我们的存储库)。 在 Linux 端,您可以使用 /dev/ttyRPMSG(如果系统中存在)。   例如,在此处创建新的传输erpc_c/transports with: 初始化可以像这样: int fd = open("/dev/ttyRPMSG", O_RDWR); 发送:write(fd, buffer, buffer_size); read:size_t size = read(fd, buffer, expected size); 如果没有这样命名的设备,你可以从 Python 代码中获取灵感。RPMSG 不是我的专长。我不知道在 Linux 上应该如何使用它。我会把你的问题转发给 Marek。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan , Marek 我计划的是: 在 M4(freertos)和 A7(Linux)上使用rpmsg-lite 我需要: RPMSG C 包装器(在 erpc_c/setup 下),可在 M4 和 A7 侧使用 RPMSG 传输层(在 erpc_c/transports 下),可在 M4 和 A7 侧使用 我有以下问题: 请问,您是否有适用于该场景的传输层? 或 我们是否需要参考 rpmsg-python 并写出类似的内容? 任何建议都会非常有帮助 感谢大家 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好,我不确定是否有您需要的信息(Linux端的c传输)。但新建一个也很简单。您可以从/dev/ttyRPMSG(如果系统中存在)读取和写入。 例如: 初始化操作如下: int fd = open("/dev/ttyRPMSG", O_RDWR); 发送:write(fd, buffer, buffer_size); 读取:size_t size = read(fd, buffer, expected size); mareknovak或许能就该问题分享更多专业见解。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan , 感谢您告知我此次更新。 我想现在我对ERPC有了初步的了解。一旦我让RPMSG客户端应用程序正常运行,我就可以更新ERPC版本。 我开始研究rpmsg-lite,其中包含M4平台文件。 我想知道是否有适用于A7平台的方案?任何相关信息都将大有帮助。我的主要目标是使用C语言获取客户端应用,并使用RPMSg作为传输层 谢谢 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 我很高兴您能够独立解决问题(对我们而言,这意味着该问题对开发人员来说并不复杂)。此外,正如mareknovak在上述评论中提到的那样, 他已经在存储库中更新其imx演示应用。您在进行下一步操作可以使用该版本,因其已采用新的rpc功能 Re: Introducing eRPC 感谢您的回复 这正是我想要的信息,我已经为 TCP 创建了 C 语言包装器,在对 eRPC 做了几处修复后,它运行得很顺利。 我的下一步是将TCP层替换为rpmsg。 再次感谢 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好,Chandini Indavara Basavaraju, 我刚刚更新了 GitHub 上的 erpc-imx-demos 仓库(链接:GitHub - EmbeddedRPC/erpc-imx-demos: eRPC demos for i.MX devices),使其适配 eRPC 1.4.0 和 RPMSg-Lite 1.1.0。 你可以下载预编译的 erpcgen 应用程序,它用于代码生成,下载地址是:Release v1.4・EmbeddedRPC/erpc・GitHub,在下载部分选择适合你的架构即可。 然后你可以这样调用它:./erpcgen -gpy 接口定义语言文件名.erpc,这会为你生成 Python 的序列化和反序列化垫片代码。如果你省略 - gpy 参数或指定 - gc,将会得到 C 语言的垫片代码。 erpc-imx-demos 仓库的最新提交中也更新了序列化 / 反序列化垫片代码,你可以放心使用。 欢迎以拉取请求的形式提交你的修改, 感谢你使用 eRPC 和 RPMsg-Lite! Marek Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好,目前我们在 GitHub 仓库中没有示例。但是我们在那里有 C(c++) 测试。如果您熟悉 Linux 或 Mac,您可以以此为例。其他选项如上所述: 1. 下载支持的开发板的 SDK -> 多核/多处理器 C/Python 示例。 2. 阅读这篇文章:入门指南・EmbeddedRPC/erpc Wiki・GitHub Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan 请问你们有 C 语言的客户端应用示例吗?不是 Python 的那种。或者你们有计划编写一个吗?如果已经有的话,那会非常有用,能帮上大忙。 先感谢您 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 终于成功了,非常感谢你的帮助:)Dusan 抱歉未找到附件选项以上传补丁,故将内容粘贴如下: 来自 7a5b152524a3c82b5bced4a72ed396f21860b666 2001年9月17日星期一00:00:00 日期:2017年5月8日星期一11:33:05 +0100 主题:[补丁]修复问题以运行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 传输层的抽象接口。 * @@ -89,7 +89,7 @@ public: * * @return基于发送实现。 */ - virtual erpc_status_t send(MessageBuffer *message) = 0; + virtual erpc_status_t send(const MessageBuffer *message) = 0; /*! * @brief 轮询传入消息。 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; //////////////////////////////////////////////////////////////////////////////// +// 类 +//////////////////////////////////////////////////////////////////////////////// + +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(); + } + } +}; + +//////////////////////////////////////////////////////////////////////////////// // 变量 //////////////////////////////////////////////////////////////////////////////// @@ -50,29 +75,32 @@ using namespace erpc; static ManuallyConstructed s_server; SimpleServer *g_server; +static ManuallyConstructed s_msgFactory; static ManuallyConstructed s_codecFactory; //////////////////////////////////////////////////////////////////////////////// // 代码 //////////////////////////////////////////////////////////////////////////////// -void erpc_server_init(erpc_transport_t transport, erpc_mbf_t message_buffer_factory) +void erpc_server_init(erpc_transport_t transport) { // 初始化工厂。 + s_msgFactory.construct(); s_codecFactory.construct(); // 使用提供的传输初始化服务器。 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" { * * 此函数用于初始化服务器,且包含运行服务器所需的所有组件。 */ -void erpc_server_init(erpc_transport_t transport, erpc_mbf_t message_buffer_factory); +void erpc_server_init(erpc_transport_t transport); /*! * @brief 此函数用于取消初始化服务器。 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. + * + * 允许以源代码或二进制形式重新分发和使用,无论是否修改, + * 只要满足以下条件: + * + * o 重新分发的源代码必须保留上述版权声明、本 + * of 条件列表以及以下免责声明。 + * + * o 以二进制形式重新分发时,必须在随分发提供的 + * 提供的文档和/或 + * 其他材料中复制上述版权声明、此条件列表和以下免责声明。 + * + * o 未经事先书面许可,不得使用Freescale Semiconductor, Inc.的名称或其 + * 贡献者的姓名来认可或推广由此 + * 软件衍生的产品。 + * + * 本软件由版权所有者和贡献者“按原样”提供,并且 + * 不提供任何明示或暗示的担保,包括但不限于 + * 对适销性和针对特定用途的适用性的暗示担保 + * 免责声明。在任何情况下,版权所有者或贡献者均不对 + * 任何直接、间接、偶然、特殊、惩戒性或后果性的损害 + *(包括但不限于采购替代商品或服务; + * 使用、数据或利润损失;或业务中断)负责,无论其由 + * 何种原因引起,也无论其基于何种责任理论,无论是在合同、严格责任还是侵权行为 + *(包括疏忽或其他行为)中,以任何方式因使用本 + *软件而引起,即使已被告知可能发生此类损害。 + */ + +#include "manually_constructed.h" +#include "rpmsg_lite_rtos_transport.h" +#include "erpc_transport_setup.h" + +using namespace erpc; + +//////////////////////////////////////////////////////////////////////////////// +// 变量 +//////////////////////////////////////////////////////////////////////////////// + +static ManuallyConstructed s_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, 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 不透明传输对象类型。 typedef struct ErpcTransport *erpc_transport_t; //! @brief RPMsg-Lite传输就绪回调对象类型。-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 创建RPMsg-Lite零拷贝传输。 */ -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 创建RPMsg-Lite传输。 */ 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 创建RPMsg-Lite零拷贝传输。 */ -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 创建RPMsg-Lite RTOS传输。 @@ -133,7 +134,8 @@ erpc_transport_t erpc_transport_rpmsg_lite_rtos_master_init(unsigned long src_ad * @brief 创建RPMsg-Lite RTOS传输。 */ 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. + * + * 允许以源代码或二进制形式重新分发和使用,无论是否修改, + * 只要满足以下条件: + * + * o 重新分发的源代码必须保留上述版权声明、本 + *条件列表以及以下免责声明。 + * + * o 以二进制形式重新分发时,必须在随分发提供的 + * 提供的文档和/或 + * 其他材料中复制上述版权声明、此条件列表和以下免责声明。 + * + * o 未经事先书面许可,不得使用 + * Freescale Semiconductor, Inc.的名称或其贡献者的姓名来认可或推广由此 + * 软件衍生的产品。 + * + * 本软件由版权所有者和贡献者“按原样”提供,并且 + * 不提供任何明示或暗示的担保,包括但不限于 + * 对适销性和针对特定用途的适用性的暗示担保 + * 免责声明。在任何情况下,版权所有者或贡献者均不对 + * 任何直接、间接、偶然、特殊、惩戒性或后果性的损害 + *(包括但不限于采购替代商品或服务; + * 使用、数据或利润损失;或业务中断)负责,无论其由 + * 何种原因引起,也无论其基于何种责任理论,无论是在合同、严格责任还是侵权行为 + *(包括疏忽或其他行为)中,以任何方式因使用本 + *软件而引起,即使已被告知可能发生此类损害。 + */ + +#include "rpmsg_lite_rtos_transport.h" +#include + +#if !(__embedded_cplusplus) +using namespace std; +#endif + +using namespace erpc; + +//////////////////////////////////////////////////////////////////////////////// +// 变量 +//////////////////////////////////////////////////////////////////////////////// +uint8_t RPMsgRTOSTransport::s_initialized = 0; +struct rpmsg_lite_instance *RPMsgRTOSTransport::s_rpmsg; + +//////////////////////////////////////////////////////////////////////////////// +// 代码 +//////////////////////////////////////////////////////////////////////////////// + +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. + * + * 允许以源代码或二进制形式重新分发和使用,无论是否修改, + * 只要满足以下条件: + * + * o 重新分发的源代码必须保留上述版权声明、本 + *条件列表以及以下免责声明。 + * + * o 以二进制形式重新分发时,必须在随分发提供的 + * 提供的文档和/或 + * 其他材料中复制上述版权声明、此条件列表和以下免责声明。 + * + * o 未经事先书面许可,不得使用 + * Freescale Semiconductor, Inc.的名称或其贡献者的姓名来认可或推广由此 + * 软件衍生的产品。 + * + * 本软件由版权所有者和贡献者“按原样”提供,并且 + * 不提供任何明示或暗示的担保,包括但不限于 + * 对适销性和针对特定用途的适用性的暗示担保 + * 免责声明。在任何情况下,版权所有者或贡献者均不对 + * 任何直接、间接、偶然、特殊、惩戒性或后果性的损害 + *(包括但不限于采购替代商品或服务; + * 使用、数据或利润损失;或业务中断)负责,无论其由 + * 何种原因引起,也无论其基于何种责任理论,无论是在合同、严格责任还是侵权行为 + *(包括疏忽或其他行为)中,以任何方式因使用本 + *软件而引起,即使已被告知可能发生此类损害。 + */ + +#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 + */ + +//////////////////////////////////////////////////////////////////////////////// +// 定义 +//////////////////////////////////////////////////////////////////////////////// + +enum +{ + kRpmsgMessageBufferSize = RPMSG_BUFFER_SIZE, + kInitCountMessageBuffers = 2, +}; + +//////////////////////////////////////////////////////////////////////////////// +// 类 +//////////////////////////////////////////////////////////////////////////////// + +namespace erpc +{ +/*! + * @brief 使用RPMsg RTOS API进行进程间消息传递的传输。 + * + * @ingroup rpmsg_lite_rtos_transport + */ +class RPMsgRTOSTransport : public Transport +{ +public: + /*! + * @brief 构造函数。 + * + * 此函数用于初始化对象属性。 + */ + RPMsgRTOSTransport(); + + /*! + * @brief RPMsgRTOSTransport析构函数 + */ + virtual ~RPMsgRTOSTransport(); + + /*! + * @brief 此函数调用RPMsg rtos初始化函数 - 作为RPMsg主服务器 + * + * @Param[in] src_addr 源地址。 + * @Param[in] dst_addr 目标地址。 + * @Param[in] base_address 共享内存中的RPMsg基地址。 + * @Param[in] length RPMsg共享内存区域长度。 + * @Param[in] rpmsg_link_id 选择通信将在哪些内核之间进行。 + * + * @retval kErpcStatus_Success 当rpmsg初始化函数成功执行时。 + * @retval kErpcStatus_InitFailed 当rpmsg初始化函数未成功执行时。 + */ + virtual erpc_status_t init( + unsigned long src_addr, unsigned long dst_addr, void *base_address, unsigned long length, int rpmsg_link_id); + + /*! + * @brief 此函数调用RPMsg rtos初始化函数 - 作为RPMsg远程 + * + * @Param[in] src_addr 源地址。 + * @Param[in] dst_addr 目标地址。 + * @Param[in] base_address 共享内存中的RPMsg基地址。 + * @Param[in] rpmsg_link_id 选择通信将在哪些内核之间进行。 + * @Param[in] ready_cb 在RPMsg初始化完成且内核就绪后调用的回调函数。 + * @Param [in] send_nameservice 如果为true,RPMsg主服务器会收到域名服务通知。 + * + * @retval kErpcStatus_Success 当rpmsg初始化函数成功执行时。 + * @retval kErpcStatus_InitFailed 当rpmsg初始化函数未成功执行时。 + */ + 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 将传入消息存储于消息缓冲区。 + * + * 在无消息传入时进行循环。 + * + * @Param[in] message 消息缓冲区,用于存储传入的消息。 + * + * @retval kErpcStatus_ReceiveFailed 无法接收消息缓冲区。 + * @retval kErpcStatus_Success 成功接收所有数据。 + */ + virtual erpc_status_t receive(MessageBuffer *message); + + /*! + * @brief 函数用于发送就绪消息。 + * + * @Param[in] message 传递要发送的消息缓冲区。 + * + * @retval kErpcStatus_SendFailed 无法发送消息缓冲区。 + * @retval kErpcStatus_Success 成功发送所有数据。 + */ + virtual erpc_status_t send(const MessageBuffer *message); + +protected: + /* 远程设备 */ + struct remote_device *m_rdev; /*!< 代表第二个内核的设备。*/ + struct rpmsg_channel *m_app_rp_chnl; /*!< 代表两台设备(两个内核)间的连接。*/ + unsigned long m_dst_addr; /*!< rpmsg使用的目标地址。*/ + rpmsg_queue_handle m_rpmsg_queue; /*!< 处理RPMsg队列。*/ + struct rpmsg_lite_endpoint *m_rpmsg_ept; /*!< 指向RPMsg Lite端点结构的指针。*/ + + static struct rpmsg_lite_instance *s_rpmsg; /*!< 指向RPMSG lite实例的指针。*/ + static uint8_t s_initialized; /*!< 表示rpmsg-lite是否已初始化的信息。*/ +}; + +class RPMsgMessageBufferFactory : public MessageBufferFactory +{ + uint8_t m_freeBufferBitmap; + uint8_t m_buffers[kInitCountMessageBuffers][kRpmsgMessageBufferSize]; + +public: + /*! + * @brief 构造函数。 + */ + RPMsgMessageBufferFactory() + : m_freeBufferBitmap(0xFF) + { + } + /*! + * @brief RPMsgMessageBufferFactory destructor + */ + virtual ~RPMsgMessageBufferFactory() {} + /*! + * @brief 此函数可创建用于设备间通信的消息缓冲区。 + */ + virtual MessageBuffer create(); + /*! + * @brief 此函数可处理用于设备间通信的消息缓冲区。 + */ + virtual void dispose(MessageBuffer *buf); +}; + +} // 命名空间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. + * + * 允许以源代码或二进制形式重新分发和使用,无论是否修改, + * 只要满足以下条件: + * + * o 重新分发的源代码必须保留上述版权声明、本 + *条件列表以及以下免责声明。 + * + * o 以二进制形式重新分发时,必须在随分发提供的 + * 提供的文档和/或 + * 其他材料中复制上述版权声明、此条件列表和以下免责声明。 + * + * o 未经事先书面许可,不得使用Freescale Semiconductor, Inc.的名称或其 + * 贡献者的姓名来认可或推广由此 + * 软件衍生的产品。 + * + * 本软件由版权所有者和贡献者“按原样”提供,并且 + * 不提供任何明示或暗示的担保,包括但不限于 + * 对适销性和针对特定用途的适用性的暗示担保 + * 免责声明。在任何情况下,版权所有者或贡献者均不对 + * 任何直接、间接、偶然、特殊、惩戒性或后果性的损害 + *(包括但不限于采购替代商品或服务; + * 使用、数据或利润损失;或业务中断)负责,无论其由 + * 何种原因引起,也无论其基于何种责任理论,无论是在合同、严格责任还是侵权行为 + *(包括疏忽或其他行为)中,以任何方式因使用本 + *软件而引起,即使已被告知可能发生此类损害。 + */ + +#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 + */ + +//////////////////////////////////////////////////////////////////////////////// +// 定义 +//////////////////////////////////////////////////////////////////////////////// + +enum +{ + kRpmsgMessageBufferSize = RPMSG_BUFFER_SIZE, +}; + +//////////////////////////////////////////////////////////////////////////////// +// 类 +//////////////////////////////////////////////////////////////////////////////// + +namespace erpc +{ +/*! + * @brief 使用RPMsg RTOS API进行进程间消息传递的传输。 + * + * @ingroup rpmsg_rtos_transport + */ +class RPMsgRTOSTransport : public Transport +{ +public: + /*! + * @brief 构造函数。 + * + * 此函数用于初始化对象属性。 + */ + RPMsgRTOSTransport(); + + /*! + * @brief RPMsgRTOSTransport析构函数 + */ + virtual ~RPMsgRTOSTransport(); + + /*! + * @brief 此函数用于调用rpmsg rtos初始化函数。 + * + * @Param[in] dev_id 设备ID号。 + * @Param[in] role 设备角色编号。 + * + * @retval kErpcStatus_Success 当rpmsg初始化函数成功执行时。 + * @retval kErpcStatus_InitFailed 当rpmsg初始化函数未成功执行时。 + */ + virtual erpc_status_t init(int dev_id, int role); + + /*! + * @brief 将传入消息存储于消息缓冲区。 + * + * 在无消息传入时进行循环。 + * + * @Param[in] message 消息缓冲区,用于存储传入的消息。 + * + * @retval kErpcStatus_ReceiveFailed 无法接收消息缓冲区。 + * @retval kErpcStatus_Success 成功接收了所有数据。 + */ + virtual erpc_status_t receive(MessageBuffer *message); + + /*! + * @brief 用于发送就绪消息的函数。 + * + * @Param[in] message 传递要发送的消息缓冲区。 + * + * @retval kErpcStatus_SendFailed 无法发送消息缓冲区。 + * @retval kErpcStatus_Success 成功发送所有数据。 + */ + virtual erpc_status_t send(const MessageBuffer *message); + +protected: + /* 远程设备 */ + static struct remote_device *m_rdev; /*!< 代表第二个内核的设备。*/ + static struct rpmsg_channel *m_app_rp_chnl; /*!< 代表两台设备(两个内核)之间的连接。*/ +}; + +class RPMsgMessageBufferFactory : public MessageBufferFactory +{ +public: + /*! + * @brief 构造函数。 + */ + RPMsgMessageBufferFactory() {} + /*! + * @brief RPMsgMessageBufferFactory destructor + */ + virtual ~RPMsgMessageBufferFactory() {} + /*! + * @brief 此函数可创建用于设备间通信的消息缓冲区。 + */ + virtual MessageBuffer create(); + /*! + * @brief 此函数可处理用于设备间通信的消息缓冲区。 + */ + virtual void dispose(MessageBuffer *buf); +}; + +} // 命名空间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: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Dusan,谢谢 。一旦演示程序正常运行,我将创建拉取请求。 再次感谢你的回复,我已经拿到了 Python 文件。我会运行演示,很快再跟你说。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 嗨,做得真棒:)如果你愿意的话,可以为 i.MX 演示代码库创建一个拉取请求来修复这个问题。mareknovak 可以审核并将其合并到代码库中。 要生成python代码:与其他应用一样,您可以在命令行中输入"erpcgen --help"(-h也应有效)。 python -gpy idl_file -> gpy 表示生成 python。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 太好了,在更新之前我可以继续使用这个稳定版本。 经过几次修复,我的 MCU 演示现在可以正常构建和运行。感谢您的信息。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan 我已修复此问题,现在MCU演示程序恢复正常运行......感谢您推荐的稳定版本...... 你能告诉我如何使用 erpcgen 工具生成 Python 代码吗? 谢谢 Chandini Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 嗨,最早也要到明天。但我不能保证一定是明天。我的同事 mareknovak 今天没来上班。不过应该很快就会处理。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 请问您能告诉我,您什么时候会更新? Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好,感谢您的关注。erpc似乎使用不同的erpcgen生成文件,且与Marek提交时的版本不一致(这是我们的失误)。最佳解决方案是将该演示程序更新为erpc和erpcgen的最新稳定版本。您可以从主分支GitHub - EmbeddedRPC/erpc: Embedded RPC(且已部署预构建erpcgen 1.4.0)尝试此操作。但我不知道您需要完成多少变更。或者您可以等待我们进行更新。 mareknovak Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi Dusan 我正在使用您推荐的同一个eRPC库 我遵循的步骤如下: 克隆 erpc-imx-demos(包含子模块,该子模块会克隆 eRPC 库,对应链接为 GitHub - MarekNovakNXP/erpc at 232afb209f0a0cfceb25a1be11879f7d1934e065) 1. git clone --recursive https://github.com/EmbeddedRPC/erpc-imx-demos.git 2. 进入 erpc-imx-demos/middleware/erpc 文件夹,然后像这样构建 erpcgen: 安装所需的 flex、bison 和 boost 包 make eprc 生成eprcgen sudo make install 成功获取 erpcgen 3. 尝试使用相同的 erpc_matrix_multiply.erpc 文件创建我自己的输出文件,命令如下: erpcgen -I erpc-imx-demos/MCU/example_erpc/service -o test/erpc-imx-demos/MCU/example_erpc/service erpc_matrix_multiply.erpc 成功获取以下文件: erpc_matrix_multiply.h erpc_matrix_multiply_server.cpp erpc_matrix_multiply_server.h erpc_matrix_multiply_client.cpp 4. 尝试构建 MCU/example_erpc/build/armgcc/imx7d_sdb_m4/build_all.sh。 失败并出现错误: /home/basavarajuc/test/erpc-imx-demos/MCU/example_erpc/service/erpc_matrix_multiply_server.cpp:在函数 'void* create_MatrixMultiplyService_service()' 中: /home/basavarajuc/test/erpc-imx-demos/MCU/example_erpc/service/erpc_matrix_multiply_server.cpp:168:56:错误:抽象类类型“MatrixMultiplyService_service”的 new-expression 无效 返回 new(nothrow) MatrixMultiplyService_service(); 很抱歉再次询问,只是为了澄清我的理解。 如果我使用的是 GitHub - MarekNovakNXP/erpc at 232afb209f0a0cfceb25a1be11879f7d1934e065 这个 eRPC 库,那我是否需要更新演示程序才能成功运行演示? 2. 您能否告知我erpc-imx-demos/MCU/example_erpc/service at master · EmbeddedRPC/erpc-imx-demos · GitHub中的输出文件是由哪个erpcgen版本生成的? 这样我就能暂时使用旧版本的 erpcgen 来创建我自己的文件了。 非常感谢。很抱歉打扰您 Chandini   Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 您好,感谢您的评论。 您提到的示例版本早于当前erpcgen构建版本。mareknovak也因当时官方eRPC版本未包含某些细微改动,而创建了官方eRPC存储库的分支版本。如果您点击中间件文件夹下erpc-imx-demos存储库中的eRPC引用,将重定向到其eRPC存储库。您需要借助该版本构建erpcgen。我们计划在未来更新演示。 希望我的回答对你有帮助。如果你有任何疑问,欢迎随时向我们咨询。 Re: 介绍 eRPC <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Hi 抱歉,如果我问的是基本问题。 我正在尝试理解如何使用恩智浦的erpcgen工具。 参考 https://github.com/EmbeddedRPC/erpc-imx-demos,我成功运行了示例演示。 我的下一步计划是构建 erpcgen,然后使用相同的 erpc_matrix_multiply.erpc 文件创建自己的输出文件,再次运行相同的演示,以便熟悉 erpcgen 工具的使用方法。 我得到了输出文件,但即使我使用了相同的erpc_matrix_multiply.erpc文件,我的文件与示例文件不同。 变更如下: 示例演示中的输出文件显示(erpc_matrix_multiply_server.h): erpc_status_t erpcMatrixMultiply_shim(erpc::Codec * in, erpc::Codec * out, uint32_t sequence); 我的文件 (erpc_matrix_multiply_server.h): erpc_status_t erpcMatrixMultiply_shim(erpc::Codec * codec, uint32_t sequence); 为什么文件会不同呢?我是不是漏掉了什么配置? 我是否需要手动编辑 erpc_matrix_multiply_server.h 和 erpc_matrix_multiply_server.cpp 文件? 先感谢您 Chandini
查看全文