Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
NXP Model-Based Design Toolbox for S32K3 version 1.8.0 - Product Release Announcement Product Release Announcement Analog & Automotive Embedded Systems NXP Model-Based Design Toolbox for S32K3 – version 1.8.0 The Analog & Automotive Embedded Systems, Model-Based Design Tools Team at NXP Semiconductors, is pleased to announce the release of the Model-Based Design Toolbox for S32K3 version 1.8.0. This release supports automatic code generation for S32K3 peripherals and applications prototyping from MATLAB/Simulink for NXP S32K3 Automotive Microprocessors. This new product adds support for S32K310, S32K311, S32K312, S32K314, S32K322, S32K324, S32K328, S32K338, S32K341, S32K342, S32K344, S32K348, S32K356, S32K358, S32K364, S32K366, S32K374, S32K376, S32K388, S32K389, S32K394 and S32K396 MCUs, and part of their peripherals, based on RTD MCAL components (ADC, CAN, DIO, FEE, GPT, I2C, ICU, LIN, MEM, MCL, PWM, SPI, UART). In this release, we have also updated the RTD, S32 Configuration Tools, AMMCLib, FreeMASTER, and MATLAB support for the latest versions. The product comes with over 130 examples, covering all the features and functionalities of the toolbox, including new demos for motor control applications. Target audience: This product is part of the Automotive SW – Model-Based Design Toolbox. FlexNet Location: https://nxp.flexnetoperations.com/control/frse/download?element=7690521 Technical Support: NXP Model-Based Design Toolbox for S32K3 issues will be tracked through the NXP Model-Based Design Tools Community space. Release Content: Automatic C code generation from MATLAB® for NXP S32K3 derivatives: S32K310 S32K311 S32K312 S32K314 S32K322 S32K324 S32K328 S32K338 S32K341 S32K342 S32K344 S32K348 S32K356 S32K358 S32K364 S32K366 S32K374    S32K376    S32K388 S32K389 S32K394  S32K396 Support for the following peripheral components and functions: ADC CAN DIO eTPU FEE GPT I2C ICU LIN MCL (including DMA support) MEM Memory read/write PWM Profiler Registers read/write SPI UART New RTD version supported (7.0.0) New S32 Configuration Tools version supported (2025.R1.8)😎 Integration with EB tresos v32.0.0 Provides 2 modes of operation: Basic – using pre-configured configurations for peripherals; useful for quick hardware evaluation and testing Advanced – using S32 Configuration Tools or EB tresos to configure peripherals/pins/clocks Default Configuration Project Templates targeting all the supported S32K3 derivatives The toolbox delivers default configuration projects, available in both S32 Configuration Tools and EB tresos, covering an initial enablement of the on-board peripherals, pins, and clocks, for all the supported S32K3 derivatives. The desired template, which represents the starting point for enabling the hardware configuration of the application, can be selected via a dropdown widget. Support for creating and using Custom Project Templates The toolbox provides support to use and create custom project templates. This could be very useful when having a custom board design – offering the possibility to create the configuration for it only once. After it is saved as a custom project template, it can be used for every model that is being developed.   Such custom projects, addressing specific hardware designs are offered inside the current version of the toolbox to integrate the following EVBs: S32K312MINI-EVB MCTPTX1AK324 S32K344-WB S32K3-T-BOX S32K396-BGA-DC1 MR-CANHUBK344, alongside a set of examples specifically created to target this hardware design and a series of articles (available on NXP Community) demonstrating how to use the toolbox features and functionalities for creating applications for custom boards. The toolbox has been tested and validated on the official NXP Evaluation Boards     S32K31XEVB-Q100     S32K312EVB-Q172     S32K312MINI-EVB     MCTPTX1AK324     XS32K3X2CVB-Q172     S32K3-T-BOX     MR-CANHUBK344       XS32K3X4EVB-Q257     XS32K3X4EVB-Q172           S32K3X4EVB-T172      S32K344-WB        XS32K3X8CVB-Q172     S32K388EVB-Q289      S32K389EVB-Q437            XS32K396-BGA-DC     XS32K396-BGA-DC1 Integrates the Automotive Math and Motor Control Library release 1.1.42 All functions in the Automotive Math and Motor Control Functions Library v1.1.42 are supported as blocks for simulation and embedded target code generation. FreeMASTER Integration We provide several Simulink example models and associated FreeMASTER projects to demonstrate how our toolbox interacts with the real-time data visualization tool and how it can be used for tuning embedded software applications. S32 Design Studio integration We provide the feature of importing the code generated from a Simulink model inside the S32 Design Studio IDE. This functionality can be useful if the model needs to be integrated into an already existing project or for debug purposes. Simulation modes We provide support for the following simulation modes (each of them being useful for validation and verification): Software-in-Loop (SIL) Processor-in-Loop (PIL) including AUTOSAR SW-C deployment External mode Motor Control Applications The toolbox provides examples for 1-shunt and 2-shunt PMSM and BLDC motor control applications, supporting both S32 Configuration Tools and EB  tresos. Each of the examples provides a detailed description of the hardware setup and an associated FreeMASTER project which can be used for control and data visualization. The toolbox also demonstrates the integration of the Motor Control Blockset in developing such applications. For demonstrating the S32K3 eTPU Software integration, we have included a PMSM application where the FOC algorithm runs on the main CPU of the S32K396 MCU, while the analog sensing, software resolver, and PWM signals generation are offloaded to the eTPU co-processor. The motor control applications were developed and validated on the MCSPTE1AK344 and MCSPTR2AK396 Motor Control kits.   Support for MATLAB versions We added support for the following MATLAB versions: R2023b R2024a R2024b R2025a R2025b Examples for every peripheral/function supported More than 130 examples showcasing: I/O Control Timers and scheduling Communication (CAN, I2C, LIN, SPI, UART) Memory handling Motor Control applications (BLDC and PMSM) AMMCLib FreeMASTER SIL / PIL / External mode For more details, features, and how to use the new functionalities, please refer to the Release Notes and User Manual documents attached. MATLAB® Integration: The NXP Model-Based Design Toolbox extends the MATLAB® and Simulink® experience by allowing customers to evaluate and use NXP’s S32K3 MCUs and evaluation board solutions out-of-the-box. NXP Model-Based Design Toolbox for S32K3 version 1.8.0 is fully integrated with MATLAB® environment. Target Audience: This release (1.8.0) is intended for technology demonstration, evaluation purposes, and prototyping S32K3 MCUs and Evaluation Boards. Useful Resources: Examples, Trainings, and Support: https://community.nxp.com/community/mbdt
View full article
扩展你的 Android 应用显示 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 许多用户询问过但仍在为 Android 开发中的功能之一是扩展桌面功能。目前,Android 允许您在两个显示器上镜像您的桌面,但您仍然无法像使用 Linux 或 Windows 等任何其他操作系统那样扩展您的桌面。 本教程旨在向您展示如何使用特殊对象来控制辅助或外部显示器上显示的内容,从而取代屏幕镜像。 那么我们该怎么做呢? 演示文稿是在外部显示器上以视图层次结构的形式显示用户界面的容器。这非常类似于对话框,因为它显示与其活动分开的 UI,但不同之处在于演示文稿显示在外部显示器上,而对话框将其显示在主屏幕上。现在,由于这个原因,外部显示器上的 UI 要使用的资源与主屏幕上使用的资源不同,演示的上下文不是活动。 我们如何选择将此演示文稿发送到哪里? 最简单的方法是使用 MediaRouter API。mediarouter 的作用是跟踪系统上可用的音频和视频路由。无论何时选择或取消选择路线,MediaRouter 都会发送通知。应用程序可以简单地监视这些通知并自动在首选演示显示屏上显示或关闭演示。 首选演示显示器是媒体路由器建议应用程序在想要在辅助显示器上显示内容时使用的显示器。如果没有首选的演示显示,则应用程序应该在本地显示其内容而不使用演示。 使用 Mediarouter MediaRouter 是通过调用 getSystemService() 并请求 MEDIA_ROUTER_SERVICE 获得的系统服务。 我们应该使用 mediarouter 在首选的演示显示器上创建和显示演示文稿: MediaRouter mediaRouter = ( MediaRouter ) context . getSystemService ( Context . MEDIA_ROUTER_SERVICE ); MediaRouter.RouteInfo route = mediaRouter.getSelectedRoute ( ) ;​​ 如果(路线!= null ) { 显示presentationDisplay =路由.getPresentationDisplay () ; 如果( presentationDisplay != null ) { 演示文稿=新MyPresentation (上下文, presentationDisplay ) ; 演示.展示(); } } 为了在您的应用中使用此框架,您需要获取 MediaRouter 框架对象的一个实例并附加一个 MediaRouter.Callback 对象来监听可用媒体路由中的事件。 实现媒体路由器 API 的 Android 应用程序需要包含一个 Cast 按钮,以允许用户选择媒体路由在辅助输出设备上播放媒体。实现 Cast 按钮的推荐方法是从 ActionBarActivity() 扩展您的活动并使用 onCreateOptionMenu() 方法添加选项菜单。Cast 按钮必须使用 MediaRouteActionProvider 类作为其操作: xml 版本= "1.0"编码= "utf-8" ?> <菜单xmlns:android = " http://schemas.android.com/apk/res/android " xmlns:app = " http://schemas.android.com/apk/res-auto " > <项目机器人:ID = “@ + id / media_route_menu_item” 机器人:标题= “@string/media_route_menu_title” 应用程序:actionProviderClass = “android.support.v7.app.MediaRouteActionProvider” app:showAsAction = “总是” /> 媒体路由器框架通过附加到媒体路由器框架对象的回调对象与应用程序进行通信。有必要扩展回调对象以便在媒体路由连接时接收消息。 一旦为媒体路由器定义了回调,您就需要将其附加到媒体路由器对象。下面的示例演示了如何使用生命周期方法来适当地添加和删除应用程序的媒体路由器回调对象。您需要添加和删除它,因为无论何时关闭应用程序或将其放在后台,它都需要是空闲的,以便其他应用程序在必要时使用它。 公共类MediaRouterPlaybackActivity扩展了ActionBarActivity { 私人MediaRouter mMediaRouter ; 私人MediaRouteSelector mSelector ; 私人回调mMediaRouterCallback ; // 您的应用程序可以使用它们,以便框架可以发现它们。 @Override 受保护的void onCreate ( Bundle savedInstanceState ) { 超级. onCreate ( savedInstanceState ); 设置ContentView ( R.layout.activity_main ) ;​​ // 获取媒体路由器服务。 mMediaRouter = MediaRouter.getInstance ( this ) ;​ ... } // 在启动时添加回调来告诉媒体路由器有哪些类型的路由 // 您的应用程序可以使用它们,以便框架可以发现它们。 @Override 公共无效的onStart () { mMediaRouter.addCallback ( mSelector , mMediaRouterCallback ,​​ 媒体路由器.回调标志位 请求发现); 超级. onStart (); } // 停止时删除选择器,告诉媒体路由器它不再 // 需要发现您的应用的路线。 @Override 公共无效onStop () { mMediaRouter.removeCallback ( mMediaRouterCallback ) ;​ 超级. onStop (); } ... } 远程回放 这种方法将控制命令发送到辅助设备以启动播放并控制正在进行的播放(播放、停止、快进、倒带等)。当您的应用支持这种类型的媒体路由时,您必须使用通过应用的 MediaRouter.Callback 对象接收的远程播放 MediaRoute.RouteInfo 对象创建一个 RemotePlaybackClient 对象。 下面的示例代码演示了一个控制器方法,该方法创建一个新的远程播放客户端并向其发送视频进行播放。 私人无效更新远程播放器( RouteInfo路线) { // 改变路线:拆除之前的客户端 如果( mRoute != null && mRemotePlaybackClient != null ) { mRemotePlaybackClient .释放(); mRemotePlaybackClient =空; } // 保存新路线 mRoute =路线; // 附加新的播放客户端 mRemotePlaybackClient =新的RemotePlaybackClient ( this , mRoute ) ; // 发送文件进行播放 mRemotePlaybackClient.play ( Uri .​​解析( “ http://archive.org/download/Sintel/sintel-2048-stereo_512kb.mp4 ” ) “video/mp4” , null , 0 , null , new ItemActionCallback () { @Override public void onResult (捆绑数据,字符串sessionId , MediaSessionStatus会话状态, 字符串itemId , MediaItemStatus itemStatus ) { logStatus ( "播放:项目成功" + itemId ); } @Override public void onError (字符串错误, int代码, Bundle数据) { logStatus ( "播放:失败 - 错误:" + code + " - " + error ); } }); } } 有关如何使用媒体路由器的更多信息,请访问developer.android.com
View full article
i.MX6 での高保証ブート (HAB) <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 要約 セキュリティは、私たちが日常生活で耳にする避けられない言葉です。セキュリティのないテクノロジーは、多くの人にとって「信頼」のないテクノロジーです。私たちは皆、職場からソーシャルチャットまで、セキュリティが私たちの生活でどのように重要な役割を果たしているかを知っています。組み込みシステムであっても、機密データへの不正なアクセスを防ぐためのセキュリティを実装する必要があります。i.MX6 プラットフォームが認証されたイメージでのみ起動できるようにするには、どうすればよいですか。High Assurance Booting(HAB)という名前のクールなものを見てみましょう。これにより、ブートイメージが安全でシンプルになります。 紹介 デジタルセキュリティは、その誕生以来、私たちの生活の避けられない部分となっています。このケースは、特に機密データを扱う場合、どの組み込みシステムでも変わりません。銀行取引、防衛、医療、産業、自動車に使用されている多くの組み込みデバイスは、セキュリティを厳格に実装しています。 ほとんどすべての組み込みシステムは、フラッシュされた画像を通じて与えられる特定の命令に基づいて動作しています。ハッカーが自分の命令を組み込みデバイスにフラッシュできるとしたら、そのデバイスで何をする必要があるかを完全に制御できると想像してみてください。デバイスが銀行の目的で使用している場合、ハッカーはパスワードを含むすべての詳細を取得します。このシナリオは、デバイスが防衛または医療分野で使用されている場合、さらに悪化します。どうすればこのケースを防ぐことができますか?まあ、答えはそれほど簡単ではありません! 組み込みシステムOSイメージは、MMC、SDカード、SATA、イーサネットなどのさまざまなメディアからフラッシュできます。SDカードなどのメディアは簡単に交換できるため、メディアにセキュリティチェックを実装することは困難です。さらに、これらのメディアにフラッシュした後、OSイメージを変更できます。したがって、イメージをフラッシュする前だけにセキュリティチェックを実装するだけでは、この問題に対処するには不十分です。では、OSイメージが十分に安全であることを確認するためのセキュリティチェックをどのように実装できますか?その答えはHAB(High Assurance Boot)です。 フリースケールは、i.MX6Qプロセッサのオプション機能としてHABv4 (最新のHABバージョン4) を提供しました。HABはフリースケールのセキュリティブロックの一部であり、CAAMやTrustZoneなどの他のセキュリティ機能と連携できます。 HAB を使用する利点には、次のものが含まれますが、これらに限定されません。 HABv4 は、一度融合すると変更できないブート ROM レベルのセキュリティを実装しています。 効率的。 イメージがシステムを制御する前のセキュリティチェック。 複数のルート キーを許可します。 デジタル署名を利用する - OSイメージを保護する最も効率的な方法。 OSイメージの機能に影響を与えずに、セキュリティをOSイメージに直接追加します。 OS イメージの検証によるプロセッサ レベルのチェックにより、セキュア ブートが完全に保証されます。 HABの仕組みは? デジタル署名の原則に基づくHAB。デジタル署名は、コンテンツコンテキストに署名することにより、コンテンツを安全に保ちます。この署名プロセスには、最終的な結果を強化するために、複数のセキュリティ アルゴリズムを組み込む必要があります。 HAB デジタル署名は、open-ssl 認証、MD5 ハッシュ、RSA-AES-DES の公開鍵と秘密鍵のチェックを組み合わせたものです。 HAB は、ブートローダー (u-boot) と OS イメージ (uImage) の両方を署名付きイメージにすることでセキュリティを確保します。これらの署名付きイメージには、通常のイメージ コンテンツとセキュリティ手順が含まれています。これらのイメージには、公開鍵と秘密鍵も含まれています。HAB プロセス中、組み合わせから派生した公開鍵ハッシュ・コードは、i.MX6 プロセッサーのブート ROM コードに融合します。この融合により、プラットフォームの安全性が向上し、後で変更することはできません。 ブート時間中、ブートプロセスの初期パラメータは、フラッシュメディア(SDカードなど)からブートROMコードを取り込む必要があります。次に、HAB 命令は、ブート ROM と署名付きイメージの内部に存在するハッシュ値を調べます。これら 2 つのハッシュ値が一致すると、HAB プロセスにより、プラットフォームはイメージを起動できます。それ以外の場合、システムはすべてのプロセスを停止し、許可されたイメージを待ちます。 このようにして、システムは、後の段階で誰かが署名されたイメージを変更した場合でも、許可されていないアクセスから保護する必要があります(これにより、最終的にイメージのハッシュ値が変更されるため、ランタイムチェック中に失敗します)。 iWaveは、 i.MX6Q iW-RainboW-G15D-Q7 Linuxプラットフォーム にHABを成功裏に実装し、HABを検証してプラットフォームを保護する方法を確認しました。ただし、HAB は、開発プラットフォームの購入またはモジュールの購入の一部として提供される標準 BSP の一部ではありません。これは特別なリクエストがある場合にのみ利用できます。 結論 HABは、OSイメージへの不正アクセスを防ぐための最良のソリューションの1つです。機密データ(バンキング、防衛など)を扱う組み込みシステムは、外部ソースによってシステム全体を制御されないように、企業内にHABを配置する必要があります。HAB は i.MX6 プラットフォームのオプション機能ですが、ブート プロセスの安全性を高めるために実装することをお勧めします。 参考: AN4581_HAB_Application_Note.pdf - i.MX50、i.MX53、および i.MX53 および HABv4 を使用した i.MX 6 シリーズでのセキュア ブート アプリケーション ノート i.MX_6_Linux_High_Assurance_Boot_(HAB)_User's_Guide.pdf - i.MX 6 Linux High Assurance Boot (HAB) ユーザーズガイド 全般
View full article
FS27 RTDとBMS GEN2 RTDの互換性に関するコンサルティング こんにちは、専門家の皆様 顧客の新しい BMS プロジェクトでは、 S32K358 + FS27 + BMS GEN2 SDK を使用したいと考えています。 BMS チームから次のことを学びました。 BMS GEN2 SDK AUTOSAR 4.4 R21-11 バージョン0.9.1 CD05および BMS GEN2 SL SDK AUTOSAR 4.4 R21-11 バージョン0.9.1 CD05は来週リリース予定です。S32K3 RTD 6.0.0 との統合をサポートします。 BMS GEN2 SDK は、2026 年第 1 四半期中に BMS リリースv1.0.0でS32K3 RTD 6.0.0に移行される予定です。 つまり、 BMS GEN2 SDK は近い将来S32K3 RTD 6.0.0と互換性を持つようになります。 顧客は 24V プラットフォームを必要としているため、FS26 ではなく FS27 を使用したいと考えています。オートモーティブ SW - SBC/PMIC - リアルタイム・ドライバから、次の 2 つのバージョンの FS27 を見つけました。 S32K3xx SBC FS27 R21-11 0.8.0 ( S32K3 RTD 5.0.0ベース) S32K3 RTD 7.0.0 ベースの SBC FS27 R23-11 1.0.0 Q1.顧客は、S32K3 RTD のバージョンが一貫していないため、FS27 と BMS GEN2 SDK のドライバに互換性がないのではないかと懸念しています。BMS GEN2 SDKでS32K3 RTD 6.0.0 を選択した場合、お客様がS32K3xx SBC FS27 R21-11 0.8.0またはSBC FS27 R23-11 1.0.0を使用すると問題が発生しますか? Q2. FS27にはS32K3 RTD 6.0.0に基づくドライバーがありますか? 助けていただけませんか?ご協力をよろしくお願いします! よろしくお願いいたします ロビン お客様情報は次のとおりです: お問い合わせ名 TengHsaing Wen メール(お問い合わせ)[email protected] 会社名:XINGMOBILITY AA SW - 外部デバイス 優先度: 中 出典: 直接顧客 Re: Consulting on the compatibility of FS27 RTD and BMS GEN2 RTD こんにちは、ヴィクトルさん。 情報をいただきありがとうございます。 S32K3 RTD 6.0.0 に基づく「BMS GEN2 SDK AUTOSAR 4.4 R21-11 バージョン 0.9.1 CD05」はまだダウンロードできません。 ダウンロードできるようになったら、少なくとも正常にコンパイルできるかどうかをテストします。 よろしくお願いいたします ロビン Re: Consulting on the compatibility of FS27 RTD and BMS GEN2 RTD こんにちは、ロビン。 RTD 6.0.0専用のリリースはありませんが、最新バージョン(FS27 1.0.0)下位互換性があるはずです。何か問題がございましたら、お知らせください。 よろしくお願いいたします、ヴィクトル Re: Consulting on the compatibility of FS27 RTD and BMS GEN2 RTD このトピックは調査するためにチームにリダイレクトされました。 連絡先: Razvan Tilimpea / Cristian Durla または Viktor Obr Re: Consulting on the compatibility of FS27 RTD and BMS GEN2 RTD こんにちは、ヴィクトルさん。 「BMS GEN2 SDK AUTOSAR 4.4 R21-11 バージョン 0.9.1 CD05」がダウンロード可能になりました。 お客様は、2 つのドライバ(R23-11とR21-11 ) の AUTOSAR バージョンが大幅に異なり、 SBC FS27 R23-11 1.0.0と組み合わせた場合に互換性の問題が発生するのではないかと疑問を呈していました。 よろしくお願いいたします ロビン Re: Consulting on the compatibility of FS27 RTD and BMS GEN2 RTD こんにちは、ロビン。 異なる AUTOSAR バージョン間の互換性は難しいため、統合しようとしている両方のコンポーネントで使用されるすべてのドライバを比較する必要がありますが、私は BMS SDK に 100% 精通しているわけではありません。FS27 のバージョンとそれが使用するドライバに関しては、R21-11 と R23-11 の間で大きな変更は見られませんでしたが、1 つのプロジェクトでコンポーネントを組み合わせるとすぐにわかる小さな違いがいくつかある可能性があります (バージョン固有のマクロなど)。ただし、機能的な観点からは、同じように動作するはずです。 よろしくお願いいたします。 ヴィクトル Re: Consulting on the compatibility of FS27 RTD and BMS GEN2 RTD こんにちは@viktorobr 、 「BMS GEN2 SDK AUTOSAR 4.4 R21-11バージョン 0.9.1 CD06 」がダウンロード可能になりました。 お客様は、2 つのドライバ(R23-11とR21-11) の AUTOSAR バージョンが大幅に異なり、SBC FS27 R23-11 1.0.0と組み合わせた場合に互換性の問題が発生するのではないかと疑問を呈していました。 よろしくお願いいたします ロビン
View full article
PN7160 PN7220 Android 15のi.MX8MN EVKへの移植 はじめに 当社では、PN7160/PN7220 Android 15公式ポーティングガイド(PN7160/PN7220 – Android 15ポーティングガイド)をご用意しております。ただし、パッチはAndroid 15 AOSP r1(android-15.0.0_r1)専用です。AOSP最新版へのポーティングを希望する場合、ソースコードのコンパイル中でエラーが頻発します。このドキュメントを参考に、エラーを一つずつ解決してください。 注:変更はすべて参考目的で提供されており、AOSP最新版へのポーティング向けのNXP公式パッチではありません。変更が最善の解決策ではない可能性がありますので、AOSPソースコードを自社のニーズに基づいて変更してください。これは製品向けではありません。ポーティング後は、お客様側で引き続き完全なテストを実施する必要があります。 ハードウェアボード: i.MX8MN EVK (i.MX 8M Nano評価キット | NXP Semiconductors) PN7160 EVK (OM27160|PN7160 プラグアンドプレイ NFC コントローラ用開発キット|NXP Semiconductors) i.MX8MN EVKとPN7160 OM29110ARD-Bの接続 i.MX8M ナノ EVK ピン PN7160 ピン 3.3V J1003-1 VDD(3.3V) J1-4 5V J1003-2 VBAT(5V) J1-5 I2C3 SDA J1003-3 SDA J2-2 I2C3 SCL J1003-5 SCL J2-1 GPIO3_22 J1003-37 IRQ J2-10 GPIO3_21 J1003-38 REQ J4-2 GND J1003-39 GND J1-6 GPIO3_20 J1003-40 N/A J4-1 i.MX8MN EVK向けAndroidの構築 ここで使用したi.MX Android BSPはAndroid 15.0.0_2.0.0(L6.12.20_2.0.0 BSP)で、こちらからダウンロードしていただけます:i.MX アプリケーション・プロセッサ向けAndroid OS | NXP Semiconductors 1. 「ドキュメント」と「インストールソースパッケージ」をダウンロードします。 2. まず、Androidユーザーガイドの手順に従って、i.MX8MN EVK用のAndroid BSPをビルドします。  android_build/.repo/manifests/aosp-android-15.0.0_2.0.0.xmlによると、表示されるAOSPバージョンはandroid-15.0.0_r32です。 ポーティングに関する参考文献: PN7160/PN7220 – Android 15 移植ガイド  i.MX8M NanoボードでPN7160をAndroid 14に移植 さて、移植を始めましょう。  1. カーネル・ドライバ PN7220またはPN7160との接続を確立するために、Androidスタックはnxpnfcカーネルドライバを使用します。以下のGitHubからドライバをダウンロードできます: br_ar_16_comm_infra_dev · nxp-nfc-infra/nfcandroid_platform_d... の br_ar_16_comm_infra_dev の nfcandroid_platform_drivers/drivers コマンドは次のとおりです。 git clone "https://github.com/nxp-nfc-infra/nfcandroid_platform_drivers.git" -b br_ar_16_comm_infra_dev カーネル6.6および6.12用のドライバがありますので、ポーティングに適したドライバをダウンロードしてください。例えば、i.MX Android BSP Android 15.0.0_2.0.0のカーネルは6.12ですので、ポーティングには6.12ドライバを使用します。 ポーティングする際は、MakefileとKconfigファイルのパスが正しく設定されていることを確認してください。 例えば、ここでは以下のようにポーティングします。 . ├── Kconfig ├── Makefile └── pn7160 ├── common.c ├── common.h ├── i2c_drv.c ├── i2c_drv.h ├── Kbuild ├── Kconfig ├── Makefile ├── spi_drv.c └── spi_drv.h すべてを簡素化するため、I2Cのみをサポートし、SPIはサポートしません。ドライバ/nfc/pn7160/Makefile のデフォルトコードを以下のコードに置き換えてください(理解しやすくするため)。 nxpnfc-i2c-objs = i2c_drv.o common.o obj-$(CONFIG_NXP_NFC_I2C) += nxpnfc_i2c.o ドライバ/nfc/Kconfig の内容。PN7160を以下のように追加してください。 source "drivers/nfc/pn7160/Kconfig" source "drivers/nfc/fdp/Kconfig" source "drivers/nfc/pn544/Kconfig" source "drivers/nfc/pn533/Kconfig" source "drivers/nfc/microread/Kconfig" source "drivers/nfc/nfcmrvl/Kconfig" source "drivers/nfc/st21nfca/Kconfig" source "drivers/nfc/st-nci/Kconfig" source "drivers/nfc/nxp-nci/Kconfig" source "drivers/nfc/s3fwrn5/Kconfig" source "drivers/nfc/st95hf/Kconfig" endmenu The contents of ドライバ/nfc/Makefile. Add the PN7160 like below: # SPDX-License-Identifier: GPL-2.0 # # Makefile for nfc devices # obj-$(CONFIG_NXP_NFC_I2C) += pn7160/ obj-$(CONFIG_NFC_FDP) += fdp/ obj-$(CONFIG_NFC_PN544) += pn544/ obj-$(CONFIG_NFC_MICROREAD) += microread/ obj-$(CONFIG_NFC_PN533) += pn533/ obj-$(CONFIG_NFC_MEI_PHY) += mei_phy.o obj-$(CONFIG_NFC_SIM) += nfcsim.o obj-$(CONFIG_NFC_PORT100) += port100.o obj-$(CONFIG_NFC_MRVL) += nfcmrvl/ obj-$(CONFIG_NFC_TRF7970A) += trf7970a.o obj-$(CONFIG_NFC_ST21NFCA) += st21nfca/ obj-$(CONFIG_NFC_ST_NCI) += st-nci/ obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci/ obj-$(CONFIG_NFC_S3FWRN5) += s3fwrn5/ obj-$(CONFIG_NFC_ST95HF) += st95hf/ obj-$(CONFIG_NFC_VIRTUAL_NCI) += virtual_ncidev.o 2. i.MX8MN EVKデバイスツリーファイルに「nxpnfc」を追加します。 &i2c3 { clock-frequency = <100000>; pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c3>; pinctrl-1 = <&pinctrl_i2c3_gpio>; scl-gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>; sda-gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>; status = "okay"; nxpnfc@28{ compatible = "nxp,nxpnfc"; reg = <0x28>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_nfc>; nxp,nxpnfc-irq = <&gpio3 22 0>; nxp,nxpnfc-ven = <&gpio3 20 0>; nxp,nxpnfc-fw-dwnld = <&gpio3 21 0>; }; The GPIO settings in the IOMUXC: &iomuxc { pinctrl_nfc: nfcgrp { fsl,pins = < MX8MN_IOMUXC_SAI5_RXC_GPIO3_IO20 0X19 // VEN MX8MN_IOMUXC_SAI5_RXD0_GPIO3_IO21 0X19 // FW-DWNLD MX8MN_IOMUXC_SAI5_RXD1_GPIO3_IO22 0X19 // IRQ >; }; 3.  imx8mn_gki.fragmentを変更します。 ファイル:android_build/vendor/nxp-opensource/kernel_imx/arch/arm64/configs/imx8mn_gki.fragment "CONFIG_NXP_NFC_I2C=m" を  imx8mn_gki.fragment に追加します。 4. Androidの対応するボード設定ファイルに設定を追加してください。 - android_build/device/nxp/imx8m/evk_8mn/ に移動してください  BoardConfig.mkを修正します。 # selinux permissive + BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive BOARD_SEPOLICY_DIRS := \ $(CONFIG_REPO_PATH)/imx8m/sepolicy \ $(IMX_DEVICE_PATH)/sepolicy \ + vendor/nxp/nfc/sepolicy \ + vendor/nxp/nfc/sepolicy/nfc + include vendor/nxp/nfc/BoardConfigNfc.mk - ShareBoardConfig.mkに”nxpnfc_i2c.ko”を追加します。パスとファイル名が正しいか確認します。 $(KERNEL_OUT)/drivers/net/phy/realtek.ko \ $(KERNEL_OUT)/drivers/pps/pps_core.ko \ $(KERNEL_OUT)/drivers/ptp/ptp.ko \ $(KERNEL_OUT)/drivers/net/ethernet/freescale/fec.ko + $(KERNEL_OUT)/drivers/nfc/pn7160/nxpnfc_i2c.ko endif $(KERNEL_OUT)/drivers/trusty/trusty-core.ko \ $(KERNEL_OUT)/drivers/trusty/trusty-log.ko \ $(KERNEL_OUT)/drivers/trusty/trusty-ipc.ko \ $(KERNEL_OUT)/drivers/trusty/trusty-virtio.ko \ + $(KERNEL_OUT)/drivers/nfc/pn7160/nxpnfc_i2c.ko else BOARD_VENDOR_RAMDISK_KERNEL_MODULES += \ $(KERNEL_OUT)/drivers/input/touchscreen/goodix_ts.ko \ $(KERNEL_OUT)/drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_i2c.ko Endif - Compatibility_matrix.xmlに以下を追加します netutils-wrapper 1.0 android.hardware.emvco 1 IEmvco default -  device_framework_matrix.xmlに以下を追加します。 nxp.hardware.secureime 1 ISecureIME default nxp.hardware.imx_dek_extractor 1 IDek_Extractor default vendor.nxp.nxpnfc 2 INxpNfc default android.hardware.emvco 1 IEmvco default - evk_8mn.mkに以下を追加します。 # ------nfc------- $(call inherit-product, vendor/nxp/nfc/device-nfc.mk) $(call inherit-product, vendor/nxp/emvco/device-emvco.mk) PRODUCT_PACKAGES += \ android.hardware.nfc-service.nxp PRODUCT_PACKAGES += \ com.nxp.emvco \ com.nxp.nfc \ nfc_nci_nxp_pn72xx - init.rcにnxpnfc_i2cを追加します。 # Grant permission for fetching available_pages info of statsd chown system system /proc/pagetypeinfo chmod 0440 /proc/pagetypeinfo exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d \ /vendor/lib/modules nxpnfc_i2c write /sys/power/wake_lock nosleep on post-fs-data && property:vendor.skip.charger_not_need=0 setprop vold.post_fs_data_done 1 - ueventd.nxp.rc に nxpnfc を追加します。 /sys/devices/virtual/thermal/thermal_zone* trip_point_0_hyst 0660 system system /sys/devices/virtual/thermal/thermal_zone* trip_point_1_hyst 0660 system system /dev/dmabuf_imx 0664 system system /sys/class/backlight/* brightness 0660 system system /dev/ttymxc1 0666 nfc nfc /dev/ttymxc2 0666 nfc nfc /dev/nxpnfc 0666 nfc nfc # for libcamera /dev/media* 0660 system camera /dev/v4l-subdev* 0660 system camera 5. NXP AOSPパッチの適用 NXP公式のNFCパッチはAOSP android-15.0.0_r1のみで、 android-15.0.0_r1と android-15.0.0_r32では大きな違いがあります。このため、パッチを適用する前に、Android-15.0.0_r1からNFCフォルダをコピーして、Android-15.0.0_r32のNFCフォルダを置き換えます。 まず、GitHubからAOSP android-15.0.0_r1をダウンロードしてください。 $ mkdir android-15.0.0_r1 $ cd android-15.0.0_r1 $ repo init -u https://android.googlesource.com/platform/manifest -b android-15.0.0_r1 $ repo sync 次に、以下のフォルダをandroid-15.0.0_r32から削除します。そして、Android-15.0.0_r1から次のNFCフォルダをコピーして、Android-15.0.0_r32の同じフォルダを置き換えます。 パッケージ/apps/Nfc frameworks/base/nfc frameworks/base/nfc-extras システム/NFC 以下にその例をご紹介します。 $ rm -rf android_build/packages/apps/Nfc $ cp -ra android-15.0.0_r1/packages/apps/Nfc android_build/packages/apps/ 私はGitHubからパッチをダウンロードするスクリプトを作成します。お客様は以下のスクリプトを、android_buildと同じディレクトリに配置できます。 AOSP_adaptation.sh # nxp_nci_hal_nfc git clone "https://github.com/nxp-nfc-infra/nxp_nci_hal_nfc.git" cd nxp_nci_hal_nfc git checkout br_ar_15_comm_infra_dev cp -rf * ../android_build/packages/apps/Nfc/ cd .. # nxp_nci_hal_libnfc-nci git clone "https://github.com/nxp-nfc-infra/nxp_nci_hal_libnfc-nci.git" cd nxp_nci_hal_libnfc-nci git checkout br_ar_15_comm_infra_dev cp -rf * ../android_build/system/nfc/ cd .. # nfcandroid_nfc_hidlimpl git clone "https://github.com/nxp-nfc-infra/nfcandroid_nfc_hidlimpl.git" cd nfcandroid_nfc_hidlimpl git checkout br_ar_15_comm_infra_dev cp -rf * ../android_build/hardware/nxp/nfc cd .. # nfcandroid_frameworks git clone "https://github.com/nxp-nfc-infra/nfcandroid_frameworks.git" cd nfcandroid_frameworks git checkout br_ar_15_comm_infra_dev mkdir ../android_build/vendor/nxp/frameworks cp -rf * ../android_build/vendor/nxp/frameworks cd .. # nfcandroid_emvco_aidlimpl git clone "https://github.com/nxp-nfc-infra/nfcandroid_emvco_aidlimpl.git" cd nfcandroid_emvco_aidlimpl git checkout br_ar_15_comm_infra_dev mkdir ../android_build/hardware/nxp/emvco cp -rf * ../android_build/hardware/nxp/emvco cd .. # nfcandroid_platform_reference git clone "https://github.com/nxp-nfc-infra/nfcandroid_platform_reference.git" cd nfcandroid_platform_reference git checkout br_ar_15_comm_infra_dev cp -rf vendor/nxp/* ../android_build/vendor/nxp/ cd .. # nfcandroid_infra_test_apps git clone https://github.com/nxp-nfc-infra/nfcandroid_infra_test_apps.git cd nfcandroid_infra_test_apps/ git checkout br_ar_15_comm_infra_dev cd test_apps/ cp -rf SMCU_Switch/ ../../android_build/packages/apps/ cp -rf EMVCoModeSwitchApp/ ../../android_build/packages/apps/Nfc/ cp -rf load_unload/ ../../android_build/hardware/nxp/nfc/ cp -rf SelfTestAidl/ ../../android_build/hardware/nxp/nfc/ cd ../.. # nfcandroid_infra_comm_libs git clone "https://github.com/nxp-nfc-infra/nfcandroid_infra_comm_libs.git" cd nfcandroid_infra_comm_libs git checkout br_ar_15_comm_infra_dev cp -rf nfc_tda/ ../android_build/system/ cp -rf emvco_tda/ emvco_tda_test/ ../android_build/hardware/nxp/emvco/ cp -rf NfcTdaTestApp/ ../android_build/packages/apps/Nfc/ cd .. Apply_patches.sh cd android_build/build/bazel/ patch -p1 < ../../../nfcandroid_platform_reference/build_cfg/build_pf_patches/AROOT_build_bazel.patch cd ../release patch -p1 < ../../../nfcandroid_platform_reference/build_cfg/build_pf_patches/AROOT_build_release.patch cd ../../external/libchrome patch -p1 < ../../../nfcandroid_platform_reference/build_cfg/build_pf_patches/AROOT_external_libchrome.patch cd ../../frameworks/base patch -p1 < ../../../nfcandroid_platform_reference/build_cfg/build_pf_patches/AROOT_frameworks_base.patch cd ../../system/logging patch -p1 < ../../../nfcandroid_platform_reference/build_cfg/build_pf_patches/AROOT_system_logging.patch このため、 AOSP_adaptation.shを実行し、その後、 Apply_patches.shを実行します。 6. hardware/interfaces/compatibility_matrices に変更を加えます Androidのバージョンごとに互換性マトリックスが異なります。 ファイル: android_build/hardware/interfaces/compatibility_matrices/compatibility_matrix.202404.xml android.hardware.audio.effect 1-2 IFactory default + + nxp.hardware.imx_dek_extractor + 1 + + IDek_Extractor + default + + + + vendor.nxp.nxpnfc + 2 + + INxpNfc + default + + + + vendor.nxp.emvco + 1 + + INxpEmvco + default + + android.hardware.audio.sounddose 1-3 7. デバイス固有の .mk を変更 pn7160の場合、 NXP_NFC_HWはpn7160と等しくなる必要があります。 pn7220の場合、 NXP_NFC_HWはpn7220_i2csと等しくなる必要があります。 File : android_build/vendor/nxp/nfc/device-nfc.mk ##### ##### NXP NFC Device Configuration makefile ###### NXP_NFC_HOST := $(TARGET_PRODUCT) ifndef TARGET_NXP_NFC_HW NXP_NFC_HW := pn7160 else NXP_NFC_HW := $(TARGET_NXP_NFC_HW) endif NXP_NFC_PLATFORM := pn54x NXP_VENDOR_DIR := nxp NXP_I2CM_S := $(TARGET_NXP_I2C_M_S) ファイル: android_build/vendor/nxp/emvco/device-emvco.mk NXP_VENDOR_DIR := nxp NXP_NFC_HW := $(TARGET_NXP_NFC_HW) ifeq ($(strip $(TARGET_NXP_NFC_HW)),) NXP_NFC_HW := pn7160 endif # Nfc service has dependency with EMVCo JAR PRODUCT_PACKAGES += \ com.nxp.emvco 8. これで、Android BSPの構築を始めることができます。 i.MX8MN EVKの場合、  $ source build/envsetup.sh $ lunch evk_8mn-nxp_stable-userdebug $ export TARGET_RELEASE=nxp_stable $ build_build_var_cache $ ./imx-make.sh -j4 2>&1 | tee build-log.txt BSPをビルディングする際には、ビルド中に多くのエラーが発生します。以下にいくつかの誤りと参考解決策を挙げておきます。  エラー リファレンス・ソリューション nfc_aconifg_flagsについて苦情を申し上げます。 packages/apps/Nfc/flags/Android.bp aconfig_declarations { // name: "nfc_aconfig_flags", name: "com.android.nfc.flags-aconfig", package: "com.android.nfc.flags", container: "system", srcs: ["nfc_flags.aconfig"], } java_aconfig_library { // name: "nfc_aconfig_flags_lib", // aconfig_declarations: "nfc_aconfig_flags", name: "com.android.nfc.flags-aconfig-java", aconfig_declarations: "com.android.nfc.flags-aconfig", min_sdk_version: "33", apex_available: [ "//apex_available:platform", "com.android.nfcservices", ], } java_library { name: "nfc_flags_lib", sdk_version: "system_current", min_sdk_version: "33", srcs: [ "lib/**/*.java", ], static_libs: [ "com.android.nfc.flags-aconfig-java", ],  android.hardware.nfc-V2-ndk に関して苦情を伝える ファイル: hardware/interfaces/nfc/aidl/vts/functional/Android.bp android.hardware.nfc-V2-ndk を変更しますandroid.hardware.nfc-V1-ndkへ platform_testing/build/tasks/tests/native_test_list.mk: error: continuous_native_tests:モジュール 'libnfc-nci-jni-tests' のインストールされたファイルが不明です。 'libnfc-nci-jni-tests' を削除します。  native_test_list.mk error: パッケージ/apps/Nfc/tests/instrumentation/Android.bp:6:1:モジュール「NfcNciInstrumentationTests」バリアント「Android_common」は、java_sdk_library「android.test.runner」に直接依存することはできません。「android.test.runner.stubs」に頼ってみて、「android.test.runner.stubs.system」「android.test.runner.stubs.test」または「android.test.runner.impl」その代わり ヒントはエラーメッセージに記載されています。 "android.test.runner" を  "android.test.runner.stubs"、"android.test.runner.stubs.system""android.test.runner.stubs.test"または"android.test.runner.impl"に変更します。 エラー: vendor/nxp/frameworks/nfc/Android.bp:12:1:モジュール "com.nxp.nfc"バリアント"android_common"は、このモジュールから見えない //frameworks/base/nfc:framework-nfc.impl に依存しています。 "//vendor/nxp/frameworks/nfc"を可視性に追加する必要があるかもしれません。 ファイル: frameworks/base/nfc/Android.bp permitted_packages: [ "android.nfc", "com.android.nfc", ], impl_library_visibility: [ "//frameworks/base:__subpackages__", "//cts/hostsidetests/multidevices/nfc:__subpackages__", "//cts/tests/tests/nfc", "//vendor:__subpackages__", "//packages/apps/Nfc:__subpackages__", ], packages/apps/Nfc/nci/src/com/android/nfc/dhimpl/NativeT4tNfceeManager.java:20: エラー:重複クラス:com.android.nfc.dhimpl.nativet4tnfceemanager ファイルを編集してください。 パッケージ/apps/Nfc/nci/src/com/Android/nfc/dhimpl/NativeT4tNfceeManager.java そして重複したクラスをコメントアウトします。 android/R.java:12483:エラー: フィールド FLAG_NFC_ASSOCIATED_ROLE_SERVICES を解決できません     @android.注釈。FlaggedApi(android.nfc.Flags.FLAG_NFC_ASSOCIATED_ROLE_SERVICES) 編集 frameworks/base/nfc/java/android/nfc/flags.aconfig 下のフラグを追加してください。 flag { name: "nfc_associated_role_services" is_exported: true namespace: "nfc" description: "Share wallet role routing priority with associated services" bug: "366243361" } 失敗: platform_testing/build/tasks/tests/native_test_list.mk: エラー: continuous_native_tests: モジュール 'libnfc-nci-tests'のインストールされたファイルが不明です。  native_test_list.mkのlibnfc-nci-testを削除します。 prebuilts/clang/host/linux-x86/clang-r536225/include/c++/v1/string:780:43: error: implicit instantiation of undefined template 'std::char_traits '   780 |   static_assert((is_same<_CharT, typename traits_type::char_type>::value)、       |                                           ^ packages/apps/Nfc/nci/jni/NativeNfcTda.cpp:32:35: note: ここで要求されるテンプレートクラス「std::basic_string 」のインスタンス化    32 | 静的 std::basic_string sRxTdaDataBuff;       |                                   ^ パッケージ/アプリ/Nfc/nci/jni/NativeNfcTda.cppを編集してください using android::base::StringPrintf; extern bool nfc_debug_enabled; SyncEvent sCtLibSyncEvt; //static std::basic_string sRxTdaDataBuff; static std::basic_string sRxTdaDataBuff; packages/apps/Nfc/nci/jni/NativeT4tNfcee.cpp:493:21: エラー: 'append'への呼び出しに一致するメンバー関数がありません。  493 |      sRxDataBuffer.append(data.p_data,data.len);       |       ~~~~~~~~~~~~~~^~~~~~ パッケージ/アプリ/Nfc/nci/jni/NativeT4tNfcee.cppを編集してください void NativeT4tNfcee::t4tReadComplete(tNFA_STATUS status, tNFA_RX_DATA data) { mT4tOpStatus = status; if (status == NFA_STATUS_OK) { if (data.len > 0) { sRxDataBuffer.insert(sRxDataBuffer.end(), data.p_data, data.p_data + data.len); LOG(DEBUG) << StringPrintf("%s: Read Data len new: %d ", __func__, data.len); } } SyncEventGuard g(mT4tNfcEeRWCEvent); mT4tNfcEeRWCEvent.notifyOne(); } frameworks/base/core/java/android/provider/Settings.java:2351: エラー: フィールド FLAG_NFC_ACTION_MANAGE_SERVICES_SETTINGS を解決できませんでした @FlaggedApi(android.nfc.Flags.FLAG_NFC_ACTION_MANAGE_SERVICES_SETTINGS) ファイル: frameworks/base/nfc/java/android/nfc/flags.aconfig flags.aconfig に以下を追加します flag { name: "nfc_action_manage_services_settings" is_exported: true namespace: "nfc" description: "Add Settings.ACTION_MANAGE_OTHER_NFC_SERVICES_SETTINGS" bug: "358129872" } エラーメッセージには、エラーを修正するためのヒントがいくつか含まれているため、表に記載されていないエラーもあります。お客様はヒントに従い、ニーズに応じてソースコードを変更することができます。 時々、お客様はr1とr32のソースコードを比較できます。こちらは AOSP ソースコード android-15.0.0_r32 と android-15.0.0_r1です。 9. 画像をi.MX8MN EVKボードにダウンロードします - 8MN EVKボード上でダウンロードモードに切り替えます - まず、Android BSP WebページからAndroid 15 BSP i.MX8MN EVKデモイメージをダウンロードします。UUUスクリプトと必要なイメージファイルはすでにデモイメージパッケージに入っているためです。  - ここから UUU をダウンロードします: リリース · nxp-imx/mfgtools - UUU実行ファイルをデモイメージフォルダに配置します。 uuu_imx_android_flash.batが同じフォルダに配置されているスクリプトです。 - ビルドに成功した後、画像をデモイメージのフォルダにコピーします。画像は、android_build/out/target/product/evk_8mn/ に位置しています - UUUスクリプトを実行して、画像をEVKボードにダウンロードします。 参考情報: Yocto Linux + PN7160を実行しているi.MX6ULL EVK i.MX8M NanoボードでPN7160をAndroid 14に移植 i.MXアプリケーション・プロセッサ用Android OS | NXP Semiconductors PN7160/PN7220 – Android 15 移植ガイド プラグ・アンド・プレイNFCフロントエンド、統合ファームウェア搭載 | NXP Semiconductors
View full article
Flash layout for new boot flow with TF-A Please note that the LSDK memory layout for TF-A boot flow explained in this topic is only applicable for LSDK 18.12 and newer releases.  The following table shows the memory layout of various firmware stored in NOR/NAND/QSPI flash device or SD card on all QorIQ Reference Design Boards. When the board boots from NOR flash, the NOR bank from which the board boots is considered as the "current bank" and the other bank is considered as the "alternate bank". For example, if LS1043ARDB boots from NOR bank 4, to update an image on NOR bank 0, you need to use the "alternate bank" address range,0x64000000 - 0x64F00000. Firmware Definition MaxSize Flash Offset (QSPI/NAND flash) Absolute address (NOR bank 0 on LS1043ARDB, LS1021ATWR) Absolute address  (NOR bank 4 LS1043ARDB, LS1021ATWR) Absolute address (NOR bank 0 on LS2088ARDB) Absolute address (NOR bank 4 on LS2088ARDB) SD Start Block No. RCW + PBI + BL2 (bl2.pbl) 1 MiB 0x00000000 0x60000000 0x64000000 0x580000000 0x584000000 0x00008 ATF FIP Image (fip.bin) BL31 + BL32 + BL33 4 MiB 0x00100000 0x60100000 0x64100000 0x580100000 0x584100000 0x00800 Boot firmware environment 1 MiB 0x00500000 0x60500000 0x64500000 0x580500000 0x584500000 0x02800 Secure boot headers 2 MiB 0x00600000 0x60600000 0x64600000 0x580600000 0x584600000 0x03000 Secure header or DDR PHY FW 512 KiB 0x00800000 0x60800000 0x64800000 0x580800000 0x584800000 0x04000 Fuse provisioning header 512 KiB 0x00880000 0x60880000 0x64880000 0x580880000 0x584880000 0x04400 DPAA1 FMAN ucode 256 KiB 0x00900000 0x60900000 0x64900000 0x580900000 0x584900000 0x04800 QE/uQE firmware 256 KiB 0x00940000 0x60940000 0x64940000 0x580940000 0x584940000 0x04A00 Ethernet PHY firmware 256 KiB 0x00980000 0x60980000 0x64980000 0x580980000 0x584980000 0x04C00 Script for flashing image 256 KiB 0x009C0000 0x609C0000 0x649C0000 0x5809C0000 0x5849C0000 0x04E00 DPAA2-MC or PFE firmware 3 MiB 0x00A00000 0x60A00000 0x64A00000 0x580A00000 0x584A00000 0x05000 DPAA2 DPL 1 MiB 0x00D00000 0x60D00000 0x64D00000 0x580D00000 0x584D00000 0x06800 DPAA2 DPC 1 MiB 0x00E00000 0x60E00000 0x64E00000 0x580E00000 0x584E00000 0x07000 Device tree(needed by uefi) 1 MiB 0x00F00000 0x60F00000 0x64F00000 0x580F00000 0x584F00000 0x07800 Kernel lsdk_linux.itb 16 MiB 0x01000000 NA NA NA NA 0x08000 Ramdisk rfs 32 MiB 0x02000000 NA NA NA NA 0x10000 The following figures highlight the changes in the flash layout for previous boot flow (with PPA) and flash layout for TF-A boot flow. Flash layout for previous boot flow (with PPA) Changed flash layout for TF-A boot flow QorIQ LS1 Devices QorIQ LS2 Devices
View full article
Zephyr培训资源 以下是一些资源,帮助您更好地了解Zephyr: 本篇 恩智浦 Zephyr 入门教程将通过 MCUXpresso for VS Code 和 MCUXpresso Installer 向您介绍所有 Zephyr 环境设置步骤,帮助您构建并运行第一个 Zephyr 应用程序。 本分步实验室指南(来自恩智浦技术日培训)从 " Hello,World " 开始,然后引导您完成有关 Kconfig、设备树和调试方法的有用教程: 实践研讨会:在 Visual Studio Code 中使用 Zephyr™ 操作系统进行开发 本教程展示了 Zephyr 强大的便携性。演示了将 FRDM-MCXN947 的 LVGL 演示移植到 FRDM-RW612 的简单步骤: 恩智浦 Zephyr 显示器便携性演示 想了解更多?访问我们 Zephyr 登录页面的 “培训” 部分,查找恩智浦在线研讨会和在线培训 ——只需点击页面顶部的 “培训” 选项卡即可 返回 Zephyr 知识中心
View full article
KW38 - 使用 OTAP 客户端软件对 KW38 设备进行重新编程 简介 空中编程(OTAP)是NXP提供的一项基于蓝牙低功耗(Bluetooth LE)的定制服务,提供升级微控制器中运行的软件的解决方案。本文件指导用户通过空中编程(OTAP)Bluetooth LE服务,将新的软件镜像加载到KW38设备中。。 软件要求 MCUXpresso IDE 或 IAR Embedded Workbench IDE。 FRDM-KW38 SDK。 IoT Toolbox 应用程序,适用于 Android 和 iOS 系统。你也可以从以下帖子下载 IoT Toolbox 应用程序的 APK 文件:Android 版 IoT Toolbox 硬件要求 FRDM-KW38板。 带有 IoT Toolbox 应用程序的智能手机。 OTAP 客户端软件在更新过程中使用的 KW38 闪存 默认情况下,512KB KW38 闪存被分区为: 一个 256KB 的程序闪存阵列 (P-Flash),分为 2KB 的扇区,闪存地址范围从 0x0000_0000 到 0x0003_FFFF。 一个256KB的FlexNVM数组,分为2KB的扇区,地址范围从0x1000_0000到0x1003_FFFF。 别名内存 (Alias memory),地址范围从 0x0004_0000 到 0x0007_FFFF。对别名内存的写入或读取操作分别会修改或返回 FlexNVM 的内容。换句话说,别名内存是使用不同地址来访问 FlexNVM 内存的另一种方式。 以下几点将简化说明 OTAP 服务的工作原理:   OTAP 应用程序由两个独立的部分组成,即 OTAP 引导加载程序和 OTAP 客户端。OTAP 引导加载程序会验证 OTAP 客户端中是否有可用的新镜像,以对设备进行重新编程。另一方面,OTAP 客户端软件提供了所需的蓝牙低功耗自定义服务,使 OTAP 客户端设备(待重新编程的设备)能够与 OTAP 服务器设备(包含用于重新编程 OTAP 客户端设备的镜像的设备)进行通信。因此,首次准备软件时,需要对 OTAP 客户端设备进行两次编程,首先是 OTAP 引导加载程序,然后是 OTAP 客户端软件。使两个不同的软件能够在同一设备中共存的机制是将它们分别存储在不同的内存区域。这是通过在链接器文件中为每个软件指定不同的内存区域来实现的。对于 KW38 设备,OTAP 引导加载程序预留了一个从 0x0000_0000 到 0x0000_1FFF 的 8KB 存储空间,因此,内存的其余部分除其他用途外,由 OTAP 客户端软件预留。     为 OTAP 客户端设备生成新的镜像文件时,我们需要在链接器文件中指定代码将以 8KB 的偏移量进行放置(就像 OTAP 客户端软件所做的那样),因为必须保留这些地址范围以避免覆盖 OTAP 引导加载程序。新应用程序还应在相应的地址包含引导加载程序标志,以确保其正常工作(稍后我们将回到这一点)。     当 OTAP 客户端设备和 OTAP 服务器设备连接且正在进行下载时,OTAP 服务器设备通过蓝牙低功耗将镜像数据包(称为块)发送到 OTAP 客户端设备。OTAP 客户端设备可以将这些块存储在外部 SPI 闪存(FRDM-KW38 开发板上已预装)或片上 FlexNVM 区域中。这些块的存储目的地可在 OTAP 客户端软件中选择(本文将提供修改存储目的地的说明)。     当镜像传输完成且所有块都已从 OTAP 服务器设备发送到 OTAP 客户端设备后,OTAP 客户端软件会将诸如软件更新源(外部闪存或 FlexNVM)之类的信息写入称为引导加载程序标志的内存部分。然后,OTAP 客户端对微控制器(MCU)执行软件复位,以执行 OTAP 引导加载程序代码。接着,OTAP 引导加载程序代码读取引导加载程序标志,以获取使用新应用程序对设备进行重新编程所需的信息。请参见以下流程图,该图解释了这两个应用程序的流程。   由于新应用程序是按 8KB 的偏移量构建的,因此 OTAP 引导加载程序从 0x0000_2000 地址开始对设备进行编程,因此,OTAP 客户端应用程序会被新镜像覆盖。然后,OTAP 引导加载程序转移应用程序的流程,开始执行新代码。     实际上,如第 3 点所述,当启用 FlexNVM 存储时,OTAP 客户端软件和软件更新之间的边界并非恰好位于 P-Flash 和 FlexNVM 内存区域的边界上,此外,这些值可能会根据你的链接器设置而变化。要了解边界的位置,你应该检查项目中的实际内存地址。       在 IAR Embedded Workbench IDE 中配置和编程 OTAP 客户端软件 如最后一节所述,要完成 OTAP 实现所需的软件,需要在 FRDM-KW38 开发板上编程两个软件,即 OTAP 引导加载程序和 OTAP 客户端。本节将指导你使用 IAR Embedded Workbench IDE 进行编程,并配置设置以在外部存储和内部存储之间进行选择。 1- 第一步是在 KW38 中编程 OTAP 引导加载程序。解压 SDK,然后在以下路径中找到 OTAP 引导加载程序软件: \boards\frdmkw38\wireless_examples\framework\bootloader_otap\bm\iar\bootloader_otap.eww 2- 点击 “Download and Debug” 图标 (Ctrl + D),在开发板上编程 OTAP 引导加载程序项目。 KW38 编程完成并开始调试会话后,中止会话 (Ctrl + Caps Lock + D) ,以安全地停止 MCU。 3- 此时,您已将OTAP引导程序编程到您的KW38中。接下来是编程和配置 OTAP 客户端软件。请在以下路径找到 OTAP 客户端软件: FreeRTOS项目版本: \boards\frdmkw38\wireless_examples\bluetooth\otac_att\freertos\iar\otap_client_att_freertos.eww 裸机 (Baremetal) 项目版本: \boards\frdmkw38\wireless_examples\bluetooth\otac_att\bm\iar\otap_client_att_bm.eww 4- 然后,配置 OTAP 客户端以选择外部存储或内部存储。 要选择外部存储,请按照以下步骤操作(这是 SDK 项目中的默认配置): 4.1- 在工作区的源文件夹中找到 “app_preinclude.h” 头文件。搜索 “gEepromType_d” 定义,并将其值设置为 “gEepromDevice_AT45DB041E_c”。 /* Specifies the type of EEPROM available on the target board */ #define gEepromType_d gEepromDevice_AT45DB041E_c 4.2- 打开项目选项窗口 (Alt + F7)。在 “Linker->Config” 窗口中,设置 “gUseInternalStorageLink_d=0”。   要选择内部存储,请按照以下步骤操作: 4.1 - 在工作区的源文件夹中找到 “app_preinclude.h” 头文件。搜索 “gEepromType_d” 定义,并将其值设置为 “gEepromDevice_InternalFlash_c”。 /* Specifies the type of EEPROM available on the target board */ #define gEepromType_d gEepromDevice_InternalFlash_c 4.2- 打开项目选项窗口 (Alt + F7)。在 “Linker->Config” 窗口中,设置 “gUseInternalStorageLink_d=1”。   5- 配置好存储设置后,保存项目中的更改。然后点击 “Download and Debug” 图标(Ctrl + D) ,在开发板上编程软件。KW38 编程完成并开始调试会话后,中止会话 (Ctrl + Caps Lock + D) ,以安全地停止 MCU。 在 IAR Embedded Workbench IDE 中创建用于更新 OTAP 客户端软件的 SREC 镜像 本节将展示如何以无线示例为起点,创建与 OTAP 兼容的镜像,以使用 IAR Embedded Workbench IDE 对 KW38 OTAP 客户端进行重新编程。 1- 从 SDK 包的 Bluetooth 文件夹中选择任意示例,使用 IAR IDE 打开。Bluetooth 示例位于以下路径: \boards\frdmkw38\wireless_examples\bluetooth  在本示例中,我们将使用葡萄糖传感器项目: \boards\frdmkw38\wireless_examples\bluetooth\glucose_s\freertos\iar\glucose_sensor_freertos.eww 2- 打开 IAR 中的项目选项窗口 (Alt + F7)。在 “Linker->Config” 窗口中,编辑选项以包含 “gUseBootloaderLink_d=1” 标志,并更新 “gEraseNVMLink_d=0” 标志。当 gUseBootloaderLink_d 标志为 true 时,它向链接器文件指示镜像必须在第一个闪存扇区之后寻址,以避免覆盖 OTAP 引导加载程序软件(如我们之前所述)。另一方面,gEraseNVMLink_d 符号用于用 0xFF 模式填充未使用的 NVM 闪存区域。禁用此标志后,我们的软件镜像将不包含此模式,因此,镜像的总大小会减小,并提高 OTAP 下载速度和内存使用率。 3- 进入 “Output Converter” 窗口。取消选中 “Override default” 复选框,然后展开 “Output format” 下拉框,选择 “Motorola S-records” 格式。点击 “OK” 按钮完成设置。 4- 构建项目。 5- 在以下路径中找到 S-Record 文件 (.srec),并将其保存到智能手机上的已知位置。 \boards\frdmkw38\wireless_examples\bluetooth\glucose_s\freertos\iar\debug\glucose_sensor_freertos.srec 在 MCUXpresso IDE 中配置和编程 OTAP 客户端软件 如前文所述,为了完成OTAP实现,您需要在FRDM-KW38上编写两个软件:OTAP引导加载程序和OTAP客户端。本节将指导您使用MCUXpresso IDE对设置进行编程和配置,以选择外部存储或内部存储。 1- 打开 MCUXpresso IDE。在"快速入门面板"中点击"导入SDK示例"。 2- 选择 FRDM-KW38 图标,然后点击 “Next>”。 3- 导入 OTAP 引导加载程序项目。它位于 “wireless_examples -> framework -> bootloader_otap -> bm -> bootloader_otap”。点击 “Finish” 按钮。 4- 点击 “Debug” 图标 ,在开发板上编程 OTAP 引导加载程序项目。KW38 编程完成并开始调试会话后,中止会话 (Ctrl + F2),以安全地停止 MCU。 5- 重复步骤 1 到 3,在 MCUXpresso IDE 中导入 OTAP 客户端软件。对于 FreeRTOS 版本,它位于 “wireless_examples -> bluetooth -> otac_att -> freertos -> otap_client_att_freertos”;如果你更喜欢裸机版本,则位于 “wireless_examples -> bluetooth -> otac_att -> bm -> otap_client_bm_freertos”。。 6- 然后,配置 OTAP 客户端以选择外部存储或内部存储。 要选择外部存储,请按照以下步骤操作(这是 SDK 项目中的默认配置): 6.1- 在工作区的源文件夹下找到 “app_preinclude.h” 文件。搜索 “gEepromType_d” 定义,并将其值设置为 “gEepromDevice_AT45DB041E_c”。 /* Specifies the type of EEPROM available on the target board */ #define gEepromType_d gEepromDevice_AT45DB041E_c 6.2- 导航至 “Project -> Properties -> C/C++ Build -> MCU settings -> Memory details”。按照下图所示编辑 Flash 字段,保持 RAM 不变。 要选择内部存储,请按照以下步骤操作: 6.1- 在工作区的源文件夹下找到 “app_preinclude.h” 文件。搜索 “gEepromType_d” 定义,并将其值设置为 “gEepromDevice_InternalFlash_c”。 /* Specifies the type of EEPROM available on the target board */ #define gEepromType_d gEepromDevice_InternalFlash_c 6.2- 导航至 “Project -> Properties -> C/C++ Build -> MCU settings -> Memory details”。按照下图所示编辑 Flash 字段,保持 RAM 不变。 7- 配置好存储设置后,保存项目中的更改。然后点击 “Debug” 图标 ,在开发板上编程软件。KW38 编程完成并开始调试会话后,中止会话 (Ctrl + F2),以安全地停止 MCU。 在 MCUXpresso IDE 中创建 SREC 镜像以更新 OTAP 客户端中的软件 本节将展示如何以无线示例为起点,创建与 OTAP 兼容的镜像,以使用 MCUXpresso IDE 对 KW38 OTAP 客户端进行重新编程。 1- 如前所述,从 SDK 包的 Bluetooth 文件夹中导入任意示例。在 SDK 导入向导中,Bluetooth 示例位于 “wireless_examples -> bluetooth” 文件夹中。本示例将使用 “wireless_examples -> bluetooth -> glucose_s -> freertos -> glucose_sensor_freertos” 中的葡萄糖传感器项目。见下图。 2- 导航至 “Project -> Properties -> C/C++ Build -> MCU settings -> Memory details”。按照下图所示编辑 Flash 字段,保持 RAM 不变。最后几个字段向链接器文件指示镜像必须在第一个闪存扇区之后寻址,以避免覆盖 OTAP 引导加载程序软件,如我们在本文简介中所述。 3- 解压 KW38 SDK 包。将 “main_text_section.ldt” 链接脚本从以下路径拖放到工作区的 “linkscripts” 文件夹中。结果应与下图类似。 \middleware\wireless\framework\Common\devices\MKW38A4\mcux\linkscript_bootloader\main_text_section.ldt 4- 在 MCUXpresso IDE 中打开位于 linkscripts 文件夹中的 “end_text.ldt” 链接脚本文件。找到下图所示的部分,并删除 “FILL” 和 “BYTE” 语句。BYTE 和 FILL 行用于用 0xFF 模式填充未使用的 NVM 闪存区域。删除此代码后,我们的软件镜像将不包含此模式,因此,镜像的总大小会减小,并提高 OTAP 下载速度和内存使用率。 5- 打开 “app_preinclude.h” 文件,将 “gEepromType_d” 定义为内部存储。这是一个必要的虚拟定义,用于将引导加载程序标志放置在正确的地址,因此,这不会影响你之前在 MCU 中编程 OTAP 客户端和 OTAP 引导加载程序软件时选择的存储方法。 /* Specifies the type of EEPROM available on the target board */ #define gEepromType_d gEepromDevice_InternalFlash_c 6- 在项目的 “framework” 文件夹中包含 “OtaSupport” 文件夹及其文件。同时在项目的 “framework -> Flash” 文件夹中包含 “External” 文件夹及其文件。“OtaSupport” 和 “External” 文件夹可在 SDK 中找到。你可以轻松地从 SDK 下载路径中拖动这些文件夹并将其放入 MCUXpresso 的工作区中。“OtaSupport” 和 “External” 文件夹位于: OtaSupport middleware\wireless\framework\OtaSupport External 中间件\无线\框架\Flash\External 结果应如以下图所示:  7- 依次进入 “Project -> Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU C Compiler -> Includes”。点击 “Include paths” 旁边的图标(见下图)。会弹出一个新窗口,然后点击 “Workspace” 按钮。 8- 在 “Folder selection” 窗口中展开项目目录,然后选择 “framework -> Flash -> External -> interface”(框架 -> 闪存 -> 外部 -> 接口)和 “framework -> OtaSupport -> interface” 文件夹。点击 “OK”按钮保存更改。 9- 确保 “OtaSupport” 和 “External” 文件夹已导入 “Include paths” 窗口中。然后点击 “Apply and Close” 按钮保存更改。 10- 点击此图标 保存并构建项目。然后,展开项目中的 “Binaries” 图标。右键点击 “.axf” 文件,选择 “Binary Utilities -> Create S-Record” 选项。生成的 S 记录文件将以 “.s19” 为扩展名保存在工作区的 Debug 文件夹中。将该 S 记录文件保存到智能手机上的已知位置。 使用 IoT Toolbox 应用程序测试 OTAP 客户端 本节介绍如何使用 IoT Toolbox 应用测试 OTAP 客户端软件。 1- 在你的智能手机上打开 IoT Toolbox 应用。选择 OTAP,然后点击 “SCAN” 以开始扫描合适的 OTAP 客户端设备。  2- 按下 FRDM-KW38 开发板上的 ADV 按钮 (SW2) 以开始广播。 3- 当你的智能手机找到 FRDM-KW38 开发板后,该设备将显示为 “NXP_OTAA”。将你的智能手机与此设备连接。随后,智能手机上会显示一个新窗口。  4- 点击 “Open” 按钮,查找 SREC 软件更新文件。 5- 点击 “Upload” 开始传输。等待下载完成。更新成功后,会显示确认消息。  6- 等待几秒钟,直到软件更新被编程到你的 MCU 中。新代码将自动开始运行。 如果对本主题有任何问题,请告知我。 BLE软件 千瓦 回复:KW38 - 使用 OTAP 客户端软件对 KW38 设备进行重新编程 嗨,EdgarLomeli   很多人无法使用 Google 应用商店,你能提供 IoT Toolbox 的最新 apk 安装包吗?  非常感谢。
View full article
Unable to debug i.MXRT1064 custom board. Hi,       I'm getting "Break at address "0x20d102" with no debug information available" message while trying to run my code in debug mode.       I'm using i.MXRT1064 custom board and programming it using, LinkServer LPC-Link2.       This board was working earlier without issue but now all of a sudden, this message appears.        I'm tried Release mode. I can successfully flash my board with the release code but then it seems the program doesn't run. I don't see any output, either from serial terminal or from display.       I also tried programming this board using Secure Provisioning Tool but it still doesn't work.         Can anyone help on where to focus or any leads for this issue? Re: Unable to debug i.MXRT1064 custom board. Hi MayLiu,        Thanks for your response.         Earlier, I did try that setting as suggested by you, but the IDE prompted an error (Failed to execute MI command: -target-download) when try to debug. I have attached a snapshot of that error for your reference.         Going back to the previous message, I wish to add that when I checked the address of where the current program is executing, it was showing that the code is in ROM region (address 0x20E35A). So somehow the code is unable to reach/start application code and is struck in ROM. Is my assumption correct? Can there be such a scenario? Re: Unable to debug i.MXRT1064 custom board. Hi @nxpsachve , Thank you so much for your interest in our products and for using our community. 1: Please try select Link application to RAM, then debug again. If your application can run successfully from RAM, please set the board as Serial Downloader mode, and then use the Secure Provisioning Tool to program your board by UART1 or USB1.   If your application  fails to run, I suggest you using an oscilloscope to check your board the power‑on sequence.   Wish it helps you. Best Regards MayLiu Re: Unable to debug i.MXRT1064 custom board. Hi @nxpsachve , I do not think MCUXpresso IDE  change BOOT configuration,  Boot behavior on NXP RT is determined by hardware boot config and boot mode pins.  Since the target can be detected in Serial Downloader mode, this indicates that the ROM is still running correctly. As a next step, you could: Perform a full chip erase, Switch the board to Internal Boot mode, and Try reconnecting with MCUXpresso IDE for debugging. Alternatively, you may also use the MCUXpresso Secure Provisioning Tool to program the application image. Best Regards MayLiu Re: Unable to debug i.MXRT1064 custom board. Hi MayLiu, Thanks for your suggestion. I would like to check if there are any such setting/configuration within MCUXpresso that can alter or impact the BOOT Conf? Just to rule out the IDE. The link server is able to detect the target when in serial download mode. Re: Unable to debug i.MXRT1064 custom board. Hi @nxpsachve , Thanks for your updated information. Based on the information you provided, it is possible that the CPU is currently executing code from the Boot ROM rather than your application code.   I would suggest checking the BOOT CFG and BOOT mode pin settings, ensuring that the device is configured to boot from user flash.   You may also try to set your board as serial downloader mode and then connecting via J-Link to confirm whether the debugger can  detect and communicate with the target.   Best Regards MatLiu
View full article
KSDKの例のリスト <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 現在のKSDK 1.3の例は、C:\Freescale\KSDK_1.3.0\examplesにあります。 C:\Freescale\KSDK_1.3.0\middleware の下にあるミドルウェア (tcpip、ファイルシステム) の例   他にも作成された例があります。   KSDK 1.3 (英語) KSDK 1.3 で FTM PWM を使用したレインボーカラー KDS3.0 + KSDK1.3でprintf()を使用して文字列をUARTに出力する方法 KSDKドライバーを使用した16x2 LCDの駆動 NFCコントローラーライブラリとKSDKの統合 KL43ZによるsLCDおよびKDS3.0 + KSDK1.3.0 +プロセッサエキスパートによるタッチセンスのサポート   KSDK 1.2 (英語) DMAを使用したKSDKによるADCフレキシブルスキャンモードのエミュレーション 初めてのKSDK1.2を書くKDS3.0 でのアプリケーション - Hello World と GPIO 割り込み付きトグル LED KSDKによるDCモータの速度制御とサーボモータの位置制御 [FTM + GPIO] KSDK搭載ラインスキャンカメラ [ADC + PIT + GPIO] フリースケール・カップ・スマート・レースのトラックの中心を検出する簡単な方法 Kinetis Design StudioのKSDKを使用したFatFs + SDHCデータロガー KSDKのセグメントLCDの例 KSDK GPIOドライバーとProcessor Expertの DAC Sinus Demo(PEx + KSDK 1.2 + KDS 3.0を使用) KSDKデモコードに基づいてカスタマイズされたKSDKプロジェクトを開始する方法   KSDK 1.1 (英語) SDKとCMSISを使用したKV31へのFIR機能実装のサンプルプロジェクト KDS 2.0 と KSDK 1.1.0 で LED を切り替える方法およびプロセッサエキスパート KSDK SPIマスタースレーブ(FRDM-K64F付き) Kinetisソフトウェア開発キット(KSDK)による超音波トランスデューサによる距離測定の設定(英語) Kinetis SDK 1.1.0用のUSB HID双方向汎用デバイスのデモ・プロジェクト 赤外線 (IR) センサで距離を測定するためのKinetisソフトウェア開発キット (SDK) の構成 KDSで初めてのKSDKアプリケーションの作成-Hello WorldとGPIO割り込み   KSDK 1.0 (英語) FRMD-K64F + KDS 1.1.0を使用した最初のトグルLEDアプリケーションの作成+ KSDK 1.0.0非プロセッサエキスパート SDKを使用した低消費電力アプリケーション KSDK I2C EEPROM の例 全般 Re:KSDKの例のリスト <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> これらの例はKSDK 2.0用に更新されますか - これらの例は廃止されたKSDKバージョン用です。 また、Processor Expertは明らかに時代遅れで、これ以上開発されることはないのでしょうか? 感謝 よろしくお願いします、デイブ
View full article
Example S32K144 FlexCAN Pretended Networking STOP mode test S32DS.ARM.2.2 ********************************************************************************  Detailed Description:  Example shows how to use FlexCAN 0 Pretended networking mode to allow FlexCAN  module to wake up MCU from STOP mode.  Wake up by Timeout and wake up by Match events are enabled.  Also pin interrupt can be used to exit STOP mode.  So MCU enters STOP mode by pressing SW3 button.  MCU exits STOP mode when one of following happens:  - no CAN message comes in 8sec (CAN PN timeout event)  - message with standard ID 0x554 or 0x555 comes (CAN PN match event)  - SW2 button is pressed (PTC12 interrupt)  In run mode blue LED is dimming and the rate is different for each wakeup event  ------------------------------------------------------------------------------  Test HW: S32K144 EVB-Q100  MCU: FS32K144UAVLL 0N57U  Fsys: 160MHz  Debugger: Lauterbach, OpenSDA  Target: internal_FLASH ******************************************************************************** General
View full article
CAN FDとCAN(動作していません) NXPコミュニティの皆様、こんにちは。 現在、CAN 構成に関する問題が発生しています。CAN 通信には基本設定を使用していますが、 PEAK CAN ViewerでCAN-FD モードを使用する場合にのみ機能します。ただし、標準のClassical CAN (非 FD) を試しても、応答がありません。 参考までに私のプロジェクトを添付しました。どなたか親切にレビューして、不足している構成や設定が見落とされているかどうか教えていただけませんか? 要約すると: CAN-FD + PEAK CAN Viewer :期待通りに動作 標準CAN + PEAK CANビューア:ボードからの応答なし ご提案やご指導をいただければ幸いです。 お手数ですが、よろしくお願いいたします。 よろしくお願いします、 ガネーシュ・バグワット Re: CAN FD and CAN(not Working) こんにちは、ジュリアン ご返信ありがとうございます。 最初はソフトウェアの構成の問題を疑ったので、ここに投稿しました。しかし、それは TJA1443 トランシーバ接続に関するハードウェア関連の問題であることが判明しました。フローティング ピンのため、通常の CAN では CAN メッセージを受信または送信できませんでしたが、FD ではなぜ動作していたのかはわかりません。 ハードウェアの問題を解決した後、すべてが期待どおりに動作するようになりました。 ご返信いただき、また、役に立つコミュニティ投稿を紹介していただき、改めて感謝申し上げます。 よろしくお願いします、 ガネーシャ Re: CAN FD and CAN(not Working) こんにちは@GaneshBhagwat PCAN-View ツールは、モード、ボーレート、サンプリング ポイントに対して正しく構成されていますか? バス上で表示されている内容を共有することは可能ですか?(ロジックアナライザまたはオシロスコープを使用して)フレームが正しく送信されているかどうかを確認するだけです。また、「機能していない」とはどういう意味か詳しく説明してください。受付時にコールバックを入力できますか?問題があるのはトランスミッションだけですか? CANInit 関数で、ID 0x80000 が受け入れ用に設定されていることがわかります。これが CAN アナライザーでも設定されているかどうかを確認してください。 このコミュニティ投稿を CAN 構成のガイダンスとして使用できます:例: S32K358 FlexCAN TXRX ISR S32DS35 RTD400/500 - NXPコミュニティ。 よろしくお願いします、 ジュリアン
View full article
AR1335 相机传感器驱动程序 @kerryzhou 我想知道您是否使用过这种摄像头传感器:AR1335 与任何恩智浦 MCU 配合使用。如果是,请与我分享驱动程序源代码。 此致, 法里德 Re: AR1335 camera sensor driver 你好,法比奥, ,我正在使用 yocto。 您可以在此处找到最新的 ar1335 传感器内核驱动程序: https://github.com/nxp-imx/isp-vvcam/tree/lf-5.15.y_2.0.0/vvcam/v4l2/sensor/ar1335 如果使用 Yocto,除了上述isp-vvcam之外,还需要 isp-imx: 如果对源代码感兴趣,可以在 Ubuntu 主机上下载并执行 bin 文件获取: https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/isp-imx-4.2.2.20.0.bin 用你在电路板支持包中使用的版本替换版本(这里我们使用 v20) 以下是如何为另一个传感器部署驱动程序的示例:https://www.nxp.com/docs/en/application-note/AN13712.pdf Re: AR1335 camera sensor driver 你好,谢谢。我是新手,所以我的问题可能很愚蠢。 您使用的是 Debian 还是 Yocto?能否提供股票驱动程序的链接? Re: AR1335 camera sensor driver 你好,法比奥, 是的,我可以使用原版驱动程序。 到目前为止,我使用的是高清 1080p 分辨率。 计划过几天还将尝试 4K 及以上的分辨率。 Re: AR1335 camera sensor driver 您好。 我想知道你们是否成功地将 AR1335 摄像机与 Mx8 plus 相连接。 请 法比奥 Re: AR1335 camera sensor driver 嗨,迈克尔、 >>我已经使用恩智浦 iMX8M Mini SoC 运行了这个传感器 我对此非常感兴趣。你有可能提供源代码和设备树文件吗? 我正试图让iMX8M-plus 也能这样做,因为它与 iMX8M-plus 非常相似。 谢谢 MC Re: AR1335 camera sensor driver 嗨,迈克-帕特黑、 已经请我们的内部专家进行了仔细检查,并在您的新帖中给您回复。 如有任何新问题,请关注该新帖。 顺祝商祺! kerry Re: AR1335 camera sensor driver 谢谢你,凯瑞!我开设了一个新主题来讨论这个问题: https://community.nxp.com/t5/i-MX-RT/RT1170-Using-MIPI-CSI-with-grayscale-or-raw-image-sensors/m-p/1270310#M14031 Re: AR1335 camera sensor driver 嗨,迈克-帕特黑、 从 AE 的内部描述来看,是芯片 MIPI CSI 无法支持,而不是 SDK 的问题。 因此,参考手册将来会添加相关描述。 但如果要使用原始数据,则需要使用并行 CSI 接口,而不是 mipi-csi。 很抱歉给您带来不便。 顺祝商祺! kerry Re: AR1335 camera sensor driver 嗨,凯瑞、 这是否意味着 RT1176(准确地说是 OV9281,数据格式为 RAW8)无法使用 8 位单色灰度图像传感器?这是硬件的基本限制,还是 SDK 的问题,将来会得到修复? 我已经使用恩智浦 iMX8M Mini SoC 运行了这个传感器,它似乎使用了类似的 MIPI CSI 外设,但需要移植到 RT1176。 贝斯特,迈克尔 Re: AR1335 camera sensor driver 适用于 Jetson nano 的 AR1335 Linux 设备驱动程序: https://www.arducam.com/docs/camera-for-jetson-nano/mipi-camera-modules-for-jetson-nano/driver-installation/ Re: AR1335 camera sensor driver 你好,fmabrouk、 很抱歉迟迟没有回复。 只要得到内部的 AE 回复,这对你来说确实是一个悲惨的故事:由于 VIDEO_MUX 错误,MIPI-CSI2 无法支持原始数据,这些信息将添加到 RT1170 参考手册中。 因此,请检查外部 AR1335 是否可以配置为支持,例如RGB? 现在是 10bit 原始数据,确实没有解决方法。 很抱歉回复晚了,非常感谢你们的努力。 顺祝商祺! kerry Re: AR1335 camera sensor driver 论坛其他成员或恩智浦团队对我的问题是否有任何反馈。我真的没时间了,需要解决这个问题!如果可以,请提供帮助。 Re: AR1335 camera sensor driver @kerryzhou 我希望你一切都好!我只是想跟进一下,看看你们是否对我的问题有任何更新。 我再次需要帮助配置 CSI 驱动程序,这样我才能捕获每个输出像素数据的 10 位原始数据。捕获数据后,我可以使用自己的软件将数据转换为 RGB 888 格式。 谢谢! Re: AR1335 camera sensor driver 你好,凯瑞、 还有一件事我想告诉你,相机传感器的输出格式是 RAW10(10 位):RAW10(10 位),而在当前的恩智浦 CSI/相机驱动程序中,我没有看到支持这种格式。我只看到这些: /*!@brief 像素格式定义。*/ typedef enum _video_pixel_format { /* RGB */ kVIDEO_PixelFormatXRGB8888 = FSL_VIDEO_FOURCC('X','R','2','4'),/*!< 32 位 XRGB8888。*/ kVIDEO_PixelFormatRGBX8888 = FSL_VIDEO_FOURCC('R','X','2','4'),/*!< 32 位 RGBX8888。*/ kVIDEO_PixelFormatXBGR8888 = FSL_VIDEO_FOURCC('X','B','2','4'),/*!< 32 位 XBGR8888。*/ kVIDEO_PixelFormatBGRX8888 = FSL_VIDEO_FOURCC('B','X','2','4'),/*!< 32 位 BGRX8888。*/ kVIDEO_PixelFormatRGB888 = FSL_VIDEO_FOURCC('R','G','2','4'),/*!< 24 位 RGB888。*/ kVIDEO_PixelFormatBGR888 = FSL_VIDEO_FOURCC('B','G','2','4'),/*!< 24 位 BGR888。*/ kVIDEO_PixelFormatRGB565 = FSL_VIDEO_FOURCC('R','G','1','6'),/*!< 16 位 RGB565。*/ kVIDEO_PixelFormatBGR565 = FSL_VIDEO_FOURCC('B', 'G', '1', '6'), /*!< 16 位 BGR565。*/ kVIDEO_PixelFormatXRGB1555 = FSL_VIDEO_FOURCC('X','R','1','5'),/*!< 16 位 XRGB1555。*/ kVIDEO_PixelFormatRGBX5551 = FSL_VIDEO_FOURCC('R','X','1','5'),/*!< 16 位 RGBX5551。*/ kVIDEO_PixelFormatXBGR1555 = FSL_VIDEO_FOURCC('X','B','1','5'),/*!< 16 位 XBGR1555。*/ kVIDEO_PixelFormatBGRX5551 = FSL_VIDEO_FOURCC('B','X','1','5'),/*!< 16 位 BGRX5551。*/ kVIDEO_PixelFormatXRGB4444 = FSL_VIDEO_FOURCC('X','R','1','2'),/*!< 16 位 XRGB4444。*/ kVIDEO_PixelFormatRGBX4444 = FSL_VIDEO_FOURCC('R','X','1','2'),/*!< 16 位 RGBX4444。*/ kVIDEO_PixelFormatXBGR4444 = FSL_VIDEO_FOURCC('X','B','1','2'),/*!< 16 位 XBGR4444。*/ kVIDEO_PixelFormatBGRX4444 = FSL_VIDEO_FOURCC('B','X','1','2'),/*!< 16 位 BGRX4444。*/ /* YUV。*/ kVIDEO_PixelFormatYUYV = FSL_VIDEO_FOURCC('Y', 'U', 'Y', 'V'), /*!< YUV422, Y-U-Y-V.*/ kVIDEO_PixelFormatYVYU = FSL_VIDEO_FOURCC('Y','V','Y','U'),/*!< YUV422, Y-V-Y-U.*/ kVIDEO_PixelFormatUYVY = FSL_VIDEO_FOURCC('U','Y','V','Y'),/*!< YUV422, U-Y-V-Y.*/ kVIDEO_PixelFormatVYUY = FSL_VIDEO_FOURCC('V','Y','U','Y'),/*!< YUV422, V-Y-U-Y.*/ kVIDEO_PixelFormatXYUV = FSL_VIDEO_FOURCC('X', 'Y', 'U', 'V'), /*!< YUV444, X-YU-V.*/ kVIDEO_PixelFormatXYVU = FSL_VIDEO_FOURCC('X','Y','V','U'),/*!< YUV444, X-Y-V-U.*/ } video_pixel_format_t; 能否在应用程序代码中将 Raw10 转换为 RGB888? 我附上了一些数据表供你参考。 Re: AR1335 camera sensor driver 你好,fmabrouk、 感谢您提供的信息。 请耐心等待,我将检查您的代码的更多细节,并与我们内部的 CSI 专家核实。 在我得到任何有价值的信息后,我会尽快通知你们。 请再给我一些时间,非常感谢! 顺祝商祺! kerry Re: AR1335 camera sensor driver @kerryzhou @jingpan 我用示波器验证了相机传感器正在流式传输数据;在调试代码时我能够捕获 CSI 读取寄存器:请参阅随附的屏幕截图。但是,我无法获得全帧缓冲区 CSI 中断。这还是与我初始化 MIPI CSI 的方式有关,你或其他人能否根据我在上一封邮件中说明的图像要求,帮我正确设置一下? 干杯 Re: AR1335 camera sensor driver @kerryzhou 以下是我感兴趣的图像参数摘要:; [PLL 参数] ;目标 Vt 像素频率:220 MHz ;输入时钟频率:24 MHz;实际 Vt 像素时钟:220 MHz ;实际操作像素时钟:110 MHz ;pll_multiplier(M 值)= 55 ;pll_clk_div2(N 值)= 2 ;pll_multiplier2(M2 值)= 55;pll_clk_div2(N2 值)= 55 ;pll_clk_div2(N2 值)= 55 2 ;Fpfd = 12 MHz;Fvco = 660 MHz;Fvco2 = 660 MHz;Vt 系统分频器 = 1 ;Vt Pix 分频器 = 3 ;运算系统分频器 = 1;运算像素分频器 = 6 ;;[图像参数];每个请求的帧数 第二:30 ;输出列:640;输出行数:480 ;使用 Y 求和:未选中 ;仅限 X 的分箱:未选中 ;允许跳过:选中 ;空白计算:HB 最大,然后 VB ;;最大帧时间:33.3333 毫秒 ;最大帧时钟:7333333.3 clocks ; 读出模式:1,YSum:无,XBin: ; Horiz clks: 640 active + 1688 blank = 2328 total ; Vert rows:480 活动 + 2674 空白 = 总计 3154 ; 输出列:640 ; 输出行:480 ; FOV Cols:640 ; FOV 行:480 ; 实际帧时钟:7342512 个时钟 ; 行时间:10.582 usec / 2328 个时钟 ; 积分时间:33 毫秒。 ;帧时间:33.375055 毫秒 ;允许的最大帧速率:191.739fps ;每秒帧数:29.962 fps Re: AR1335 camera sensor driver @kerryzhou 我在 imx RT1170 上使用 mipi CSI2 演示代码从 AR1335 获取 480x640 图像。 我发现该相机传感器的输出格式为:10 位。我需要在 CSI 驱动程序中进行哪些更改才能捕获我需要的图像。 我使用制造商的工具生成了配置文件,但由于错误配置了 CSI 驱动程序,我还远远没有获得图像。 你能否建议需要在演示代码 CSI 驱动程序中修改哪些内容才能从 AR1335 捕获图像。 此致敬礼, Re: AR1335 camera sensor driver 你好,fmabrouk、 到目前为止,我们还没有关于导入其他相机传感器的直接文件。 据我所知,照相机传感器也应该有配置工具,可以进行配置并生成代码。 您的 AR1335 是否已经从自己的公司获得了相关驱动程序? 我还检查了内部,直到现在才找到 AR1335 RT 的相关驱动程序。 顺祝商祺! kerry Re: AR1335 camera sensor driver @kerryzhou 我正在使用这个摄像头传感器:imX RT1170 板上的 AR1335 而不是 OV5640。AR1335 只发送 10 位图像。我相信 OV5640 像素数据总线是 16 位。 如何修改恩智浦 SDK 随附的 mipi csi 演示代码,以便用该传感器获取图像? 我希望能有一些文档,指导如何将另一个相机传感器导入该演示代码。 非常感谢!   Re: AR1335 camera sensor driver 你好,fmabrouk、 关于你提到的时钟,你可以从 RT1170 参考手册中找到: 希望它能帮到你! 顺祝商祺! kerry Re: AR1335 camera sensor driver @kerryzhou @jingpan 除了我上面提出的问题外,如果我需要将像素时钟设置为 80MHz。在 imx RT1170 的 CSI2 mipi 演示代码中,我应该更改哪些寄存器? 谢谢! Re: AR1335 camera sensor driver @jingpan @kerryzhou 我仍在尝试将 AR1335 摄像头驱动程序移植到 ImX RT1170 CCI2 mipi 演示代码中。 在 CS2 mipi 代码中,我发现了这些时钟: CLOCK_SetRootClock(kCLOCK_Root_Csi2,&csi2CClockConfig); CLOCK_SetRootClock(kCLOCK_Root_Csi2_Esc,&csi2EscClockConfig); CLOCK_SetRootClock(kCLOCK_Root_Csi2_Ui,&csi2UiClockConfig); 谁能解释一下这些钟是用来做什么的? 谢谢! Re: AR1335 camera sensor driver 你好,fmabrouk、 到目前为止,我还没有找到有关 AR1335 的 RT 芯片驱动程序,我也在内部搜索过,但没有找到。 也许您可以从互联网上搜索,某些第三方可能有 AR1335 驱动程序。 Nxp 官方那边没有找到,直到现在,RT 主要使用 MT9M114 或 OV7725 摄像头模块。 很抱歉给您带来不便,并感谢您的理解。 顺祝商祺! kerry
View full article
S32M2xx - MOSFET switching adjustment for Motor control examples This article is applicable to all motor control application SWs as described in the following article. S32M2xx - Motor control use cases - NXP Community It has been found that on some of S32M24xEVBs an overheating of the power MOSFETs may occur. This will be addressed in the new release of the Motor control example SW and will be carried out in Motor control example SW for S32M24xEVB, S32M27xEVB and S32M276SFFRD. As a solution in the current release, the following settings are recommended. Extend deadtime: For S32M24xEVB, for FTM3, set Dead Time to 50 (corresponds to 625 nanoseconds): For S32M27xEVB and S32M276SFFRD, for LCU outputs channels 0 - 5, set LUT rise filter to 75 (corresponds to 625 nanoseconds): Set faster slew rates: Common for all EVBs:
View full article
Freescale Yocto Project main page Yoctoproject Framework Installing any Needed Package Using Yocto and i.MX Boards Testing Yocto for i.MX6 i.MX53 QSB - Quick Start Board i.MX6 Sabre Lite Board Build the image SDCard Image Yoctoproject Framework Yoctoproject is a framework for creating Linux distributions for embedded devices. Its layering mechanism makes it easy to add Linux to new target devices highly customized for a particular platform; it can include custom start-up scripts, software packages built with a high degree of optimization for a particular architecture, and different user interfaces from full Gnome desktop to a simple a serial console. Yocto has 2 basic layers: board support packages layer and core layer. In the BSP layer is where all the custom software and configuration tweaks for a particular platform are included, while the core layer provides the common software stack to provide from a simple command line interface to Sato desktop interface (Matchbox based and Gnome mobile software stack). A third layer could be added to provide additional user interfaces LXDE, XFCE, and more; YP is quite flexible&emdash;one of it major strengths. Installing any Needed Package Go to Yocto Project Quick Start and double check that you have all the necessary packages installed for your machine. For example, if building machine was an Ubuntu machine: $ sudo apt-get install gawk wget git-core diffstat unzip texinfo  build-essential chrpath libsdl1.2-dev xterm curl Using Yocto and i.MX Boards Please, go to project's README file in order to see the recommended instructions to download the source code. Testing Yocto for i.MX6 How to test Yocto for i.MX 6 i.MX53 QSB - Quick Start Board Edit conf/local.conf user config file and set imx53 Quick start board machine and enable parallel build features. MACHINE ?= "imx53qsb" BB_NUMBER_THREADS = "4" PARALLEL_MAKE = "-j 4" i.MX6 Sabre Lite Board Edit conf/local.conf user config file and set i.MX6 Sabrelite board machine and enable parallel build features MACHINE ?= "imx6qsabrelite" BB_NUMBER_THREADS = "4" PARALLEL_MAKE = "-j 4" if you've been facing problems to get yocto's images working on your i.MX Sabre Lite board, please take a look on this comment Re: The kernel sometins hang  in L3.0.35_4.0.0_130424 release Build the image some example of available image: image name description core-image-minimal A small image just capable of allowing a device to boot. core-image-base A console-only image that fully supports the target device hardware. core-image-sato Image with sato, a mobile environment and visual style for mobile devices.  The image supports X11 with a Sato theme, Pimlico applications and contains terminal, editor and file manager. fsl-image-test Builds contents core-image-base plus Freescale test applications and multimedia components. fsl-image-gui Builds contents of core-image-sato with Freescale test applications and multimedia with hardware accelerated X11 To build the image: $ bitbake Build using Dash instead can bring some problems. You can check what your system uses typing: "ls -l /bin/sh". On Ubuntu you can change it using "dpkg-reconfigure bash". Some Ubuntu releases you must use "dpkg-reconfigure dash" and choose Bash Built images are located in cd tmp/deploy/images SDCard Image sudo dd if=core-image-minimal-imx6qsabrelite.sdcard of=/dev/sdb i.MX Yocto Project: Frequently Asked Questions Yocto Project Re: Freescale Yocto Project main page All, we're closing this document for any further comments.  If you have a comment about this document or if you have an issue doing what the document describes, please start a new discussion.  Thanks. Re: Freescale Yocto Project main page Hello community, have an urgent need for input on touch screen integration. Please help! We're developing a project which requires touch screen function. The processor we use is i.MX6 dual light. Source code is Yocto 1.5. The LCD is working. We integrated the touch screen driver and can see on the computer that is connected to the board through serial port that touch screen reports coordinates for touches which indicates that touch screen does work. However, the system doesn't respond to touches. No icon displayed on the LCD is touched and the mouse arrow doesn't move with a finger touching the screen. Any advice where to look to see which part is broken? Thanks! Re: Freescale Yocto Project main page There's an error in the document, the part about dash.  You can check what your system uses typing: "ln -s /bin/sh" should probably be "ls -l /bin/sh" since "ln -s /bin/sh" would simply create a symbolic link in the current directory pointing to /bin/sh. Re: Freescale Yocto Project main page Please, LeonardoSandovalGonzalez, hkh and OtavioSalvador, create a new topic in imx.community. Please, remind to add all log available. With kernel version, MM version and branch name. It´s very difficult to us, hkh to provide support when the DOC has several comments on it. It´s much easier to start with a new and clear thread, with all the text futures it has in it (like quote, mark a answer as helpfull, as so on). Thanks in advance, Re: Freescale Yocto Project main page hkh, the issue you found regarding 'mesa' has been fixed in OE-Core and Poky yesterday. You can drop this change from meta-fsl-arm and it will work just fine. I am not a good person to help with GStreamer stuff. LeonardoSandovalGonzalez, can you take a look here? Re: Freescale Yocto Project main page Hello, I am using a Boundarydevices Nitrogen6x with a iMX6 Solo processor. I followed Daiane’s instruction to build my Yocto Dora image. I was able to build core-image-base, but had a problem with fsl-image-test. I found the following issue and applied the change manually (it must not be in the branch since sync was not retrieving the patch): https://lists.yoctoproject.org/pipermail/meta-freescale/2014-April/008057.html Also, I used menuconfig to disable ov5642 and enable ov5640. I can build the images, but can’t use gstreamer. I keep getting this error: ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0 VIDIOC_DQBUF failed. ERROR: v4l2 capture: VIDIOC_QBUF: buffer already queued VIDIOC_QBUF failed I know my hardware works because with the Timesys demo SD Card that came with the board I can use the following command to display the MIPI camera image on the LCD: $ gst-launch mfw_v4lsrc capture-mode=5 ! mfw_v4lsink disp-width=1280 disp-height=800 I have tried many gstreamer commands, and they all fail with the same error. One example is: $ gst-launch mfw_v4lsrc ! mfw_v4lsink I tried adding capture-mode=4 to the above command, and I get the same error. Are you aware of any issue with the latest Yocto Image that would cause this problem (something similar to the patch above that I had to apply)? What else can I try? Here is the complete snapshot of the error I am getting: root@nitrogen6x:~# gst-launch mfw_v4lsrc ! mfw_v4lsink MFW_GST_V4LSRC_PLUGIN 3.0.9 build on Apr 16 2014 09:57:53. pwm_config: pwm freq = 22000000, clk_select=1 clock_rate=66000000 ov5640_mipi_camera_powerdown: powerdown=0, power_gp=0xa9 MFW_GST_V4LSINK_PLUGIN 3.0.9 build on Apr 16 2014 09:57:39. Setting pipeline to PAUSED … pwm_config: pwm freq = 22000000, clk_select=1 clock_rate=66000000 ov5640_mipi_camera_powerdown: powerdown=0, power_gp=0xa9 Pipeline is live and does not need PREROLL … Setting pipeline to PLAYING … New clock: GstSystemClock ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0 ERROR: from element /GstPipeline:pipeline0/MFWGstV4LSrc:mfwgstv4lsrc0: Internal data flow error. Additional debug info: /yocto/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline0/MFWGstV4LSrc:mfwgstv4lsrc0: streaming task paused, reason error (-5) Execution ended after 10004586509 ns. Setting pipeline to PAUSED … Setting pipeline to READY … Setting pipeline to NULL … Total rendered:0 Freeing pipeline … [—>FINALIZE v4l_sink root@nitrogen6x:~# ov5640_mipi_camera_powerdown: powerdown=1, power_gp=0xa9 root@nitrogen6x:~# Thanks, Re: Freescale Yocto Project main page look under "sources" you will see "sources/meta-fsl-arm" "sources/meta-fsl-demos" "sources/poky" Re: Freescale Yocto Project main page Hi All, I want to know where exactly the actual source code will reside after "repo sync", since I see only bitbake, patch and *.inc files under source directory. Please let me know. Thank you, Gautham Re: Freescale Yocto Project main page After: $ source setup-environment build the local.conf file will be placed inside /build/conf/local.conf Re: Freescale Yocto Project main page Thanks DaianeAngolini Please let me know where can i find local.conf file, in fsl-community-bsp Folder tree after repo and clone fsl-community-bsp -> sources--------------------------------- > base                                 README                                  meta-fsl-arm                                 setup-environment                      meta-fsl-arm-extra                                                                                  meta-fsl-demos                                                                                  meta-openembedded                                                                                  poky Thanks Ram Re: Freescale Yocto Project main page The only difference would be the machine name to place in local.conf. Re: Freescale Yocto Project main page Hi All, I want to boot my Imx6q Sabre AI board with Yocto, can I follow the same steps suggested in this post, if not please suggest a thread/link that i can follow to achieve this. Thanks Ram Re: Freescale Yocto Project main page if you got  a custom board, why are you using a mx53qsb machine? unless the board is the same, you need to create your own board layer with proper changes. Leo Re: Freescale Yocto Project main page got a fsl-image-gui to compile for mx53qsb. I have a customboard with an attached LVDS lcd, but both vga as lcd remain black on boot. I attached a serial cable but only get gibberish over this (non-ascii characters). Does anyone know 1) where to find info on how to configure LVDS lcd and 2) where to configure tty/console so i can check my settings and actually see what's happening when I try the image Re: Freescale Yocto Project main page BrianEdmond, what branch are you using? The default distribution used on yocto (and meta-fsl-arm) is poky.conf. And by default X11 is selected. If you´re using master, you can override your DISTRO_FEATURES and remove X11. Take a look on poky.conf file under source Re: Freescale Yocto Project main page I did a build of fsl-image-test and it boots but I still seem to have an OpenGL ES environment which required X11.  In other builds I had a libGAL and libgal-fb which had the fbGetDisplayByIndex calls so I could run with fbdev.  Is there a configuration option I am missing? Brian Re: Freescale Yocto Project main page Thanks Nick. I have corrected the verbatim, adding the curl package. Leo Re: Freescale Yocto Project main page Ok if both packages are prerequisites then please change the text for the Ubuntu command in the section above entitled "Installing any Needed Package" to: $ sudo apt-get install gawk wget git-core diffstat unzip texinfo \   build-essential chrpath libsdl1.2-dev xterm curl This would help new users who need to be able to follow the instructions verbatim Nick Re: Freescale Yocto Project main page You can use both for downloading the repo app. Both packages are requisites. Leo Re: Freescale Yocto Project main page In the prerequisites for an Ubuntu Machine there is sudo apt-get install wget but in the fsl-community-bsp-platform/README there is $: curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo Should this instead be $: wget https://dl-ssl.google.com/dl/googlesource/git-repo/repo -O ~/bin/repo or should curl be added as a prerequisite? Re: Freescale Yocto Project main page All ugly hacks. He might use: sed after every sync (as he did) use local_manifests.xml use gitconfig 'insteadOf' configuration all hacks! better to fix the firewall. Re: Freescale Yocto Project main page OtavioSalvador, any other workaround you know to avoid the issue that Nick found? Leo Re: Freescale Yocto Project main page It seems that to change the repo from using the git protocol to using the http prtocol can be achieved as follows: $ sed -i 's/git:/http:/g' .repo/manifest.xml $ sed -i 's|yoctoproject.org|yoctoproject.org/git|g' .repo/manifest.xml I hope this helps others who are experiencing problems when following the supported BSP installation process from behind firewalls that do not support git Re: Freescale Yocto Project main page Further investigation reveals that the url http://git.yoctoproject.org/git/meta-fsl-arm works Re: Freescale Yocto Project main page No idea Nick. You need to talk to the admin guy Re: Freescale Yocto Project main page Yes a 'git clone http://git.yoctoproject.org/meta-fsl-arm' confirms that the meta-fsl-arm committers are not running git update-server-info so http access does not work. Until this is fixed I will use a zip archive Re: Freescale Yocto Project main page Might use 'git clone' to check git command. Re: Freescale Yocto Project main page Thank you for the information on how to get started with the new Yocto based Freescale BSPs. Could you please assist me with a problem fetching the repositories? It appears that protocols/ports other than HTTP are blocked by the corporate firewall. Changing to HTTP though results in errors finding the info subdirectory. Can you please suggest a resolution to this problem? The output from repo is as follows: $ ./repo sync fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out fatal: unable to connect to git.yoctoproject.org: git.yoctoproject.org[0: 140.211.169.56]: errno=Connection timed out fatal: unable to connect to git.yoctoproject.org: git.yoctoproject.org[0: 140.211.169.56]: errno=Connection timed out fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out fatal: unable to connect to github.com: github.com[0: 207.97.227.239]: errno=Connection timed out error: Cannot fetch meta-fsl-arm error: Cannot fetch meta-fsl-arm-extra error: Cannot fetch meta-fsl-demos error: Cannot fetch fsl-community-bsp-base fatal: unable to connect to git.openembedded.org: git.openembedded.org[0: 140.211.169.152]: errno=Connection timed out fatal: unable to connect to git.openembedded.org: git.openembedded.org[0: 140.211.169.152]: errno=Connection timed out error: Cannot fetch meta-openembedded error: Exited sync due to fetch errors $ sed -i 's/git:/http:/g' .repo/manifest.xml $ ./repo sync Fetching projects:  16% (1/6)  fatal: http://git.yoctoproject.org/meta-fsl-arm/info/refs not found: did you run git update-server-info on the server? Fetching projects:  66% (4/6)  fatal: http://git.yoctoproject.org/poky/info/refs not found: did you run git update-server-info on the server? fatal: http://git.yoctoproject.org/meta-fsl-arm/info/refs not found: did you run git update-server-info on the server? fatal: http://git.yoctoproject.org/poky/info/refs not found: did you run git update-server-info on the server? error: Cannot fetch meta-fsl-arm error: Cannot fetch poky error: Exited sync due to fetch errors $ Re: Freescale Yocto Project main page Hi Thomas, sorry for the confusion but this document should not be used to build Freescale Yocto layers, please refer to this document How to test yocto for imx6 Repeat the steps, and try to build the same core image. If error persists, please send the description/log to the meta-freescale distribution list. Re: Freescale Yocto Project main page Hi Leonardo Sandoval Gonzalez, Met same error as Eduardo Gorio in busybox,. So, Freescale will support repo way for our build only? Either or customize build for our own board? BR Thomas Re: Freescale Yocto Project main page Hi gorio, please post your question on the meta-freescale mailing list. Check this document for instructions. Re: Freescale Yocto Project main page What does it wrong ? I did step by step from this tutorial.. gorio@ubuntu:/opt/poky/build$ bitbake core-image-minimal Loading cache: 100% |############################################################| ETA:  00:00:00 Loaded 1600 entries from dependency cache. Build Configuration: BB_VERSION        = "1.17.1" BUILD_SYS         = "x86_64-linux" NATIVELSBSTRING   = "Ubuntu-10.04" TARGET_SYS        = "arm-poky-linux-gnueabi" MACHINE           = "imx53qsb" DISTRO            = "poky" DISTRO_VERSION    = "1.3+snapshot-20130308" TUNE_FEATURES     = "armv7a vfp neon" TARGET_FPU        = "vfp-neon" meta              meta-yocto        = "master:d823759b4594143d522eae0b2a2498436a6dcb1e" meta-oe           = "master:6c9ac38e8b998e6739383ba91e0c4e0c0ed0094b" meta-fsl-arm      = "master:a502be66bef33f2016b43f8c7129b18f92d6e337" NOTE: Resolving any missing task queue dependencies NOTE: Preparing runqueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: Function failed: do_configure (see /opt/poky/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/busybox/1.20.2-r6/temp/log.do_configure.23360 for further information) ERROR: Logfile of failure stored in: /opt/poky/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/busybox/1.20.2-r6/temp/log.do_configure.23360 Log data follows: | DEBUG: Executing python function sysroot_cleansstate | DEBUG: Python function sysroot_cleansstate finished | DEBUG: Executing shell function do_configure | trap: 80: SIGHUP: bad trap | ERROR: Function failed: do_configure (see /opt/poky/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/busybox/1.20.2-r6/temp/log.do_configure.23360 for further information) ERROR: Task 914 (/opt/poky/meta/recipes-core/busybox/busybox_1.20.2.bb, do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 1030 tasks of which 1026 didn't need to be rerun and 1 failed. Waiting for 0 running tasks to finish: Summary: 1 task failed:   /opt/poky/meta/recipes-core/busybox/busybox_1.20.2.bb, do_configure Summary: There was 1 ERROR message shown, returning a non-zero exit code. gorio@ubuntu:/opt/poky/build$ Re: Freescale Yocto Project main page Please refer to the bellow link to check the community supported way to build Freescale Yocto layers How to test yocto for imx6 Re: Freescale Yocto Project main page I'll update the page above soon. Meanwhile, I suggest you to use the instructions located at: Freescale/fsl-community-bsp-platform · GitHub For i.MX53 platform, use the denzil branch, for i.MX6, use the master branch. Rgds Rogerio Re: Freescale Yocto Project main page Hi Thanks a lot for the information. I tried to use the instruction above to build image for iMX6q SabreLite, but I've got a error below when I try to do "bitbake core-image-minimal" ================================= Summary: There were 2 WARNING messages shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code. WARNING: Host distribution "Ubuntu 10.10" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution. Loading cache: 100% |###########################################| ETA:  00:00:00 Loaded 1160 entries from dependency cache. ERROR: No recipes available for:   /home/its/poky/meta-fsl-arm/recipes-core/udev/udev_173.bbappend ERROR: Command execution failed: Exited with 1 ===================================== Anybody can help? I am very new to Yocto/bitbake, we used to build image by using ltib, Thanks a lot.
View full article
System Controller Firmware 101-はじめに 評価キットを使用する際には、BSPに含まれるSystem Controller Firmware(SCFW)バイナリが提供されます。このscfwバイナリはそのボード専用に調整されており、ご使用のハードウェアに合わせてボード依存部分を変更する必要がある場合があります。 本書ではSCFWのポーティング手順の概要を説明します。詳細についてはSystem Controller Porting guide(sc_fw_port.pdf)を参照してください。 システムを設定する SCFWはLinuxホスト上でビルドされます。システムをセットアップする手順は次のとおりです: GNU ARM Embedded Toolchain: 6-2017-q2-update June 28, 2017をARM websiteからダウンロードします: ファイルを展開するディレクトリを選択します。例: mkdir ~/gcc_toolchain cp ~/Downloads/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 ~/gcc_toolchain/ cd ~/gcc_toolchain/ tar xvjf gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ ツールチェーンを含むディレクトリ(上記例では"~/gcc_toolchain")を指すようTOOLS環境変数を設定します。.bash_profileを編集してこの環境変数をexportすることもできます: export TOOLS=~/gcc_toolchain/ srec_catもビルドに必要です。これは通常srecordパッケージに含まれており、ubuntuでは次のように実行します: sudo apt-get update sudo apt-get install srecord これでポーティングキットのディレクトリ(例:scfw_export_mx8qm)に移動し、scfwをビルドできます。 System Controller Firmwareポーティングキット SCFW 移植キットには、SCFW をお客様のボードで動作するように変更できるソースファイルとオブジェクトファイルが含まれています。 最新のSystem Controller Firmwareポーティングキットは i.MX Software and development webpageから入手できます: ポーティングキットを入手したら展開します: tar xvzf imx-scfw-porting-kit-1.1.tar.gz‍ 次のようなファイル構成が表示されます: ポーティングキットはpackages以下に含まれており、READMEに展開手順が記載されています。基本的には: cd packages/ chmod a+x imx-scfw-porting-kit-1.1.bin ./imx-scfw-porting-kit-1.1.bin‍‍‍ エンドユーザーライセンス契約の同意を求められます: 同意するとポーティングキットは新しいフォルダに展開されます。フォルダ構成は次のとおりです: SCFWに関するドキュメントはdoc/pdfにあるか、html形式で提供されています。sc_fw_port.pdfに目を通すことを推奨します。 異なるSoCバリアント(QM A0、QM B0、QXP B0)のポーティングキットはsrcにtar.gzとして格納されています。その他のファイルはLinux、QNX、FreeRTOS、U-boot、ARM Trusted Firmwareなど向けのSCFWライブラリです。 複数のSoCバリアント(QXPとQMの両方など)で作業する場合は、すべてのポーティングキットを1つのディレクトリに展開することを推奨します。これにより、そのディレクトリから任意のバリアント向けにビルドできます。実行コマンドは次のとおりです: cd imx-scfw-porting-kit-1.1/ cd src/ find scfw_export_mx8*.gz -exec tar --strip-components 1 --one-top-level=scfw_export_mx8 -xzvf {} \;‍‍‍ scfw_export_mx8フォルダが作成され、ここからサポートされている任意のバリアント向けにSCFWをビルドできます。または、目的のバリアントのパッケージだけを展開して使用することもできます。 cd scfw_export_mx8/‍ すべてのビルドフォルダーには、SCFWのビルド結果が含まれており、プラットフォームにはSCFWのソースが保存されています。 ボード固有のコードはすべて「platform/board/mx8_」にあります。ここでderivativeはQXPやQMなどのi.MX8シリコンファミリ、board_nameはSCFWパッケージの対象ボード名です。 SCFWをお使いのボードにポーティングする最初のステップは、i.MX8のderivativeとボード用のフォルダを作成することです。既存のボード例をコピーしてフォルダ名を変更すると、すぐに開始できるプロジェクトが得られます。例: cp -r platform/board/mx8qm_val/ platform/board/mx8qm_myBoard/‍‍‍‍‍‍‍‍‍‍ この例のボードは「myBoard」と呼ばれ、i.MX8QM B0 デバイス用です。このボード用の SCFW を構築するには、単に次のコマンドを呼び出してください。 make qm R=B0 B=myBoard‍‍‍‍‍‍‍‍‍‍‍‍ ターゲットがi.MX8QXPの場合は、このデバイスをベースにしたボードを選び、「make qx」を実行するだけです。 ビルドオプションや詳細なブート情報などの追加情報はSCFWポーティングガイド(sc_fw_port.pdf)に記載されています。本書の第2章はポーティングプロセスの優れた入門です。 概要と有用な情報 PMICの設定概要およびboard.c一般的な修正 変更が必要な主なファイル(場合によっては唯一)は「board.c」で、場所は「platform/board/mx8X_board/」です。board.cファイルにはSCU UARTポート、PMIC初期化ルーチン、PMIC温度アラーム設定などボード関連情報のほとんどが含まれており、LDO電圧を設定したりPMICと通信するように変更することもできます。board.c内のすべての関数はSCU自身によって実行されるため、PMICとの通信に使用されるI2Cインターフェースにアクセスできます。 外部電源(たとえばPMIC LDO)で駆動されるSoCリソース(APコアやGPUなど)はboard_set_power_modeによってオン/オフされ、リソースを特定のPMIC電源にマッピングする処理はboard_get_pmic_infoで行われます。例としてi.MX8QMバリデーションボードでは、A53サブシステムがPF100 PMICカードの3番目のPMIC(PMIC_2_ADDR、アドレスはPMIC_0から開始)のSW2とPF8100 PMICカードの1番目のPMIC(PMIC_0_ADDR)のSW5により給電されます。 case SC_SUBSYS_A53: pmic_init(); if (pmic_card == PF100) { pmic_id[0] = PMIC_2_ADDR; pmic_reg[0] = SW2; *num_regs = 1; } else {/* PF8100_dual Card */ pmic_id[0] = PMIC_0_ADDR; pmic_reg[0] = PF8100_SW5; *num_regs = 1; } break; ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 外部電源で駆動されるSoCリソース(APコア、GPUなど)の電圧はboard.c内のboard_set_voltageで管理されます。リソースと電源のマッピングは前述のとおりboard_get_pmic_infoで行われます。 8個の「ボードリソース」(SC_R_BOARD_R0〜SC_R_BOARD_R7)が利用可能で、これらを用いてSCUが管理できるボード上のコンポーネントを定義できます。たとえばPMICのLDOの1つで駆動されるセンサをボードリソースにマッピングし、board.cを変更してセンサの電源オン/オフや電圧変更を行えます。 ボードリソースの電圧変更は、board_trans_resource_powerで電圧を設定するか、実行時に電圧を変更する必要がある場合はboard_set_controlを修正して、Miscellaneous Service 101で説明されているミスレニアスコールがそのリソースに対して発行されるたびに電圧を変更します。たとえばSC_R_BOARD_R7の電圧を変更する場合、board_set_controlに以下のcaseを追加します: case SC_R_BOARD_R7: if (ctrl == SC_C_VOLTAGE) { /* Example only PMIC_X_ADDR and PMIC_SUPPLY need to match an actual device */ pmic_interface.pmic_set_voltage(PMIC_X_ADDR, PMIC_SUPPLY, val, step); } else return SC_ERR_PARM; break;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ 上記のcaseはアプリケーションが次の関数を呼び出すたびにSCUによって実行されます。 sc_misc_set_control( ipc, SC_R_BOARD_R7, SC_C_VOLTAGE, voltage_val);‍‍‍‍‍‍‍‍ ボードリソースの電源オン/オフはboard.c内のboard_trans_resource_powerで行われます。例えばNXPのバリデーションボードでは、ボード上のPTN5150はボードリソース0で管理され、電源のオン/オフは次のように制御されます: case BRD_R_BOARD_R0 : /* PTN5150 (use SC_R_BOARD_R0) */ if (pmic_ver.device_id == PF100_DEV_ID) { if (to_mode > SC_PM_PW_MODE_OFF) { pmic_interface.pmic_set_voltage(PMIC_2_ADDR, VGEN6, 3300, SW_RUN_MODE); pmic_interface.pmic_set_mode(PMIC_2_ADDR, VGEN6, VGEN_MODE_ON); } else { pmic_interface.pmic_set_mode(PMIC_2_ADDR, VGEN6, VGEN_MODE_OFF); } } else {/* PF8100_dual Card */ if (to_mode > SC_PM_PW_MODE_OFF) { pmic_interface.pmic_set_voltage(PMIC_1_ADDR, PF8100_LDO1, 3300, REG_RUN_MODE); pmic_interface.pmic_set_mode(PMIC_1_ADDR, PF8100_LDO1, RUN_EN_STBY_EN); } else { pmic_interface.pmic_set_mode(PMIC_1_ADDR, PF8100_LDO1, RUN_OFF_STBY_OFF); } } break;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ アプリケーション側で以下の関数が呼び出されるたびに、SCUは上記のコードを実行します: sc_pm_set_resource_power_mode(ipc, SC_R_BOARD_R0, SC_PM_PW_MODE_ON/OFF);‍‍‍‍‍‍‍‍ board_config_scは、I2CモジュールやPMICとの通信に使用されるパッドなど、SCUが必要とするリソースをマーキングするために使用します。board.cの関数が動作するために必要なリソースは、本関数で移動不可に設定する必要があります。例えばSCUのI2Cモジュールを保持するには、次の行を追加します: rm_set_resource_movable(pt_sc, SC_R_SC_I2C, SC_R_SC_I2C, false);‍‍‍‍‍‍‍‍‍ 以下のパッドはSCUに属しており、アプリケーションからはアクセスできません: - SC_P_SCU_PMIC_MEMC_ON - SC_P_SCU_WDOG_OUT - SC_P_PMIC_EARLY_WARNING - SC_P_PMIC_INT_B - SC_P_SCU_BOOT_MODE0〜SC_P_SCU_BOOT_MODE5 board_system_configは初期リソース管理を行う関数で、イメージ内でalt_configフラグが設定されている場合にのみ呼び出され、パーティションを作成してリソースを割り当てることができます。詳細はResource Management Service 101を参照してください。 board_get_pcie_clk_srcはPCIeが使用するクロックを定義し、BOARD_PCIE_PLL_EXTERNALまたはBOARD_PCIE_PLL_INTERNALのいずれかを指定できます。 board_printは変更内容のデバッグに非常に便利で、構文は次のとおりです: board_print(3, "Debug printout %d\n", val);‍‍‍‍‍‍‍ 最初のパラメータがデバッグレベルで、それ以降は標準printfと同様に動作します。出力はSCUが対応するデバッグレベルでビルドされている場合にのみSCUのデバッグ出力で確認できます。上記の例では出力を表示するためにSCFWを次のようにビルドする必要があります: make qm B=myBoard‍‍‍‍ DL=3 or higher (debug level goes from 0 to 5)‍‍‍‍‍‍‍ 使用例 以下のユーティリティはSystem Controller Firmwareリクエストの方法を示し、QNXとLinuxの両方でコマンドラインからリクエストを行う手段を提供します。 System Controller Firmware Command Line Utility for Linux and QNX System Controller Firmware 101 i.MX 8ファミリ | i.MX 8QuadMax (8QM) | 8QuadPlus
View full article
How to Update eIQ Projects with the Latest eIQ Neutron SDK Libraries eIQ Neutron SDK is a new software package that includes the Neutron Converter tool and eIQ Neutron libraries to run Neutron converted neural network models on devices that have an eIQ Neutron NPU like MCX N, i.MX RT700, or i.MX95 Previously the Neutron Converter tool was part of eIQ Toolkit. However going forward, new versions of the Neutron Converter tool will be released as part of the eIQ Neutron SDK. This change will allow for more frequent updates to provide better performance and additional operator support. MCUXpresso SDK and Linux BSP use Neutron libraries as part of the eIQ examples included in those software releases. However to use the latest Neutron Converter, an eIQ project will need to be updated to use the latest Neutron software libraries. This post walks through where to place the updated Neutron libraries and header files.  If the version of the Neutron Converter tool that was used to convert a model does not match the Neutron libraries used by the eIQ project, then during inference you will see the following error(s) printed on the serial terminal and may get incorrect results: Microcode version mismatch Or Internal Neutron NPU driver error 281b in model prepare Or Incompatible Neutron NPU microcode and driver versions The version of the Neutron Converter tool that was used to convert a model can be found by either viewing the converted model in Netron or by looking at the generated header file:   Here is a table showing where you can find the matching version of the Neutron Converter tool for the default Neutron libraries found in different versions of MCUXpresso SDK: MCUXpresso SDK Default Neutron Library Version in MCUXpresso SDK Default Compatible Neutron Converter Can Be Found In 24.12 1.2.0+0x6f710a6d eIQ Toolkit 1.17 25.03 1.2.0+0X1b86b19d eIQ Toolkit 1.17 25.06 2.0.2 eIQ Toolkit 1.17 25.09 2.1.3 eIQ Toolkit 1.17 25.12 2.2.2 eIQ Neutron SDK 2.2.2 26.03 3.0.0 eIQ Neutron SDK 3.0.0 26.06 3.1.1 eIQ Neutron SDK 3.1.1 Manually Update SDK Libraries To Use Latest Version eIQ Neutron SDK 3.1.3 It is highly recommend to always use the latest Neutron Converter tool and to update the libraries in your eIQ project to match the latest Neutron Converter tool. The libraries can be updated by overwriting the original files. You may wish to make a backup first though as the default eIQ examples in that SDK will use models that were converted to match those original Neutron libraries. The Neutron file structure in eIQ Neutron SDK and MCUXpresso SDK are now the same so that the entire Neutron folder can be overwritten directly.  Updating Neutron Libraries in MCUXpresso SDK 25.12 and later: File Source Directory in eIQ Neutron SDK Target Directory in MCUXpresso SDK libNeutronDriver.a target\imxrt700\ rt700\cm33\ \middleware\eiq\neutron\rt700\cm33\ libNeutronFirmware.a target\imxrt700\ rt700\cm33\ \middleware\eiq\neutron\rt700\cm33\ NeutronDriver.h target\imxrt700\ driver\include\ \middleware\eiq\neutron\driver\include\ NeutronErrors.h target\imxrt700\ common\include\ \middleware\eiq\neutron\common\include\ Note: The target\imxrt700\driver\include\NeutronEnvConfig.h and the libraries in target\imxrt700\cmodel are used by the ExecuTorch inference engine and so are not needed for TFLM eIQ projects.  Note: In MCUXpresso SDK 26.03 there are two sets of Neutron libraries in imported projects. It's the files in the /middleware/eiq folder that need to be updated.  Updating Neutron Libraries in MCUXpresso SDK 25.09 or before: File Source Directory in eIQ Neutron SDK Target Directory in MCUXpresso SDK libNeutronDriver.a target\imxrt700\ rt700\cm33\ \middleware\eiq\tensorflow-lite\third_party\neutron\rt700\ libNeutronFirmware.a target\imxrt700\ rt700\cm33\ \middleware\eiq\tensorflow-lite\third_party\neutron\rt700\ NeutronDriver.h target\imxrt700\ driver\include\ \middleware\eiq\tensorflow-lite\third_party\neutron\driver\include\ NeutronErrors.h target\imxrt700\ common\include\ \middleware\eiq\tensorflow-lite\third_party\neutron\common\include\ Updating Neutron Libraries for MCUXpresso SDK 2.16 or before: Replace the entire middleware\eiq directory from MCUXpresso SDK 26.03 into your project, and then the Neutron libraries can be updated per the instructions above. In these older MCUXpresso SDK releases there were additional eIQ changes beyond just the four files above, so the easiest method to update those older projects is just to replace the entire eIQ middleware directory.  Updating Neutron Libraries for i.MX devices: To update the neutron runtime on a target device, upload the files to their designated directories, as follows: File Target Directory NeutronFirmware.elf /lib/firmware libNeutronDriver.so /lib/ libneutron_delegate.so /lib/
View full article
通过 LPC 54018 中的 USB 通信在挂机中读写 如何在 LPC 54018 中通过 USB 通信写入和读取 Pendriver。 我使用的是 USB1 主机? LPC54xxx Re: read and write in pendriver through USB communication in lpc 54018 微控制器必须在 USB 主机模式下工作,因为笔式驱动器是 USB 大容量存储类 (MSC) 设备。 LPC54018 支持USB 2.0 全速主机,足以满足标准笔式驱动器的需求。 实施概述: 硬件要求 USB Type-A 接口 笔式硬盘的外部5V VBUS 电源 正确的 D+ 和 D- 连接 建议使用 VBUS 检测 USB 主机堆栈 使用恩智浦 MCUXpresso SDK 启用 USB 主机 + MSC 类驱动程序 使用FATFS处理文件系统 列举 插入时,USB 主机会枚举笔式驱动器 该设备被识别为大容量存储设备 大容量传输用于数据传输 文件系统访问 大多数笔式硬盘的格式为FAT32 挂载后,可执行标准文件操作 使用 f_open()、f_read() 和 f_write() 等应用程序接口 用例示例 这种 USB 存储访问通常用于嵌入式系统,以存储日志、媒体文件或缓存数据。 例如,嵌入式媒体播放器可从以下平台流式传输内容 HDOBOX等平台流式传输内容的嵌入式媒体播放器,就可以使用这种方法将配置文件、字幕或播放日志存储在 USB 闪存盘上。 重要说明 默认情况下不支持 exFAT 和 NTFS USB 主机 + FATFS 需要足够的内存 安装前在设备连接后添加延迟 Re: read and write in pendriver through USB communication in lpc 54018 观影应用程序 HDO Box 电影 我使用这种方法进行管理,效果很好、 Re: read and write in pendriver through USB communication in lpc 54018 Pendriver 中的 USB 通信相当难用。 Re: read and write in pendriver through USB communication in lpc 54018 你好,@Arularasan、 为了再次确认,能否请您检查一下 USB1 端口是否正常工作?你可以尝试像使用其中一个 USB 示例的设备一样使用它。 另外,能否请您检查一下您的硬盘?将磁盘驱动器输入计算机时,计算机会检测到它吗?你能不能试试用另一个 pendrive 或 USB 设备的 USB 主机示例? 最后,能否请您用挂盘测试另一个 USB 主机示例?使用以下示例进行尝试可能会有所帮助:usb_host_cdc和/或usb_host_msd_command。 致以最诚挚的问候,劳尔。 Re: read and write in pendriver through USB communication in lpc 54018 你需要一个 JTAG 调试器来上市和调试在恩智浦 LPC54018 板上运行的代码。FreeRTOS 使用 OM40006 物联网模块进行了测试。有关支持的调试器的更多信息,请参阅 《恩智浦 LPC54018 物联网模块用户手册 》,该手册可从以下网站获取 OM40007 LPC54018 物联网模块 产品页面。 如果您使用的是 OM40006 物联网模块调试器,请使用变流器电缆将调试器的 20 针连接器连接到恩智浦物联网模块上的 10 针连接器。 使用迷你 USB 转 USB 电缆将恩智浦 LPC54018 和 OM40006 物联网模块调试器连接到计算机的 USB 端口。   filmplus 应用程序 Re: read and write in pendriver through USB communication in lpc 54018 @RaRo感谢您的回复。 SDK 示例代码下的 USB HOST 演示 ("host_msd_fatfs_bm") 我已下载,但无法使用! 我 想通过 USB 通讯读写笔式驱动器,我使用的是 USB1。 请帮助我@RaRo Re: read and write in pendriver through USB communication in lpc 54018 你好,@Arularasan、 您试过 host_msd_fatfs_bm 示例吗?该示例似乎使用了 f_write() 和 f_read(),它们用于通过 FATFS 和 USB 进行写入和读取。 您能否查看以下参考手册,了解有关 USB + FATFS 应用程序的更多信息? MSDFATFSAPIRM、飞思卡尔 MSD FATFS API-参考手册和 USBHOSTAPIRM,飞思卡尔 USB 堆栈主机 API-参考手册。 致以最诚挚的问候,劳尔。 Re: read and write in pendriver through USB communication in lpc 54018 @RaRo是的,我已经在MCUXpresso IDE的帮助下完成了 lpc 54018 中的所有程序。 MCUXpresso IDE 生成的示例代码。没有创建读写功能,请帮助我通过 USB 通信在 lpc 54018(我使用的是 USB1 主机)中读写 Pendriver 的步骤。 Re: read and write in pendriver through USB communication in lpc 54018 你好,@Arularasan、 能否请您查看以下有类似问题的主题?已解决:我想使用 USB 连接从笔读取文件...- 恩智浦社区 此外,您还可以尝试使用 LPC54018 SDK 中的 USB 示例,如果使用的是 MCUXpresso IDE,请单击 "导入 SDK 示例... "并搜索 USB。您可以通过集成开发环境或以下链接下载 SDK:MCUXpresso SDK Builder。 [MCUXpresso IDE 快速启动面板和 SDK 导入向导] 可能需要定义您要使用的 USB:USB1 或 USB0。 致以最诚挚的问候,劳尔。
View full article
将 EdgeLock® SE05X 集成到 MIMXRT1180-EVK 本文档内容免责声明: NXP 提供的任何支持、信息和技术(“材料”)均按“现状”提供,不附带任何明示或暗示的保证,且 NXP 在适用法律允许的最大范围内,否认与材料相关的所有直接或间接责任和损害。NXP 对任何与应用或产品设计相关的协助不承担任何责任。材料仅可用于与 NXP 产品相关联。NXP 可以不受限制地使用您对材料提供的任何反馈。 摘要 本文档旨在指导开发人员在 NXP MIMXRT1180EVK 开发板上集成 EdgeLock® SE050 安全芯片,以实现硬件级别的安全增强。安全元件可以轻松连接到任何系统,要求极低——只需电源和两个 I2C 引脚。此外,由于主机软件支持 Plug&Trust 中间件,因此集成起来非常容易。 硬件先决条件 主机平台:MIMXRT1180EVK 扩展板: OM-SE050X 硬件设置 1. 按如下方式配置 OM-SE05xARD 跳线[1]: 2. 将 MIMXRT1180-EVK 上的跳线配置为默认[2]: 3.将 OM-SE05xARD 安装到 MIMXRT1180-EVK 上 软件集成 有两种方法将 OM-SE05xARD 集成到 MIMXRT1180-EVK:一种基于 SDK,另一种基于 Zephyr。用户可以根据自己的需求选择其中任一。 SDK集成: 平台文件生成。 nano 软件包为在任意 MCU 平台上集成 MW 提供了非常简便的方式。用户只需在 simw-nanopkg/lib/platform 文件夹中添加或修改对应平台的特定文件即可。 应用随附的补丁后,您即可轻松实现上述配置。 导入I2C演示项目作为起点 我们建议以 SDK 的 I2C 演示项目为集成起点,因为该项目已包含 SDK 所需的 I2C 驱动代码。以 RT1180 为例,我们导入:evkmimxrt1180_lpi2c_polling_b2b_master_cm33。 然后排除板级文件,并改用 nano 软件包中的对应文件。 接着导入 nano 软件包中的源文件, 并加入示例代码,这里选择:ex_se05x_crypto.c和 main.c。 添加如下定义用于 nano 软件包构建,以及包含路径。 正在构建项目: 调试: Zephyr 集成: 集成比 SDK 集成简单得多,因为平台特定文件已经存在,用户只需手动添加 MIMXRT1180-EVK 的板覆盖文件。附加的覆盖文件应放在类似于“workspace/modules/crypto/nxp-plugandtrust/examples/se05x_crypto/zephyr/boards/”的文件夹中。 请注意:Zephyr 集成指南已在 https://github.com/NXPPlugNTrust/nano-package/blob/master/zephyr/readme.rst 上发布,而测试的 Zephyr 版本仍停留在 v3.7.0,尚未支持 MIMXRT1180-EVK。为了支持 MIMXRT1180-EVK,我们必须使用最新的 Zephyr,并修改过 west.yml 文件。 以下是我们需要执行的步骤: $ rm workspace/ -rf $ mkdir -p workspace $ cd workspace/ $ git clone https://github.com/NXPPlugNTrust/nano-package.git //Edit ~/workspace/nano-package/zephyr/west.yml as below $ cd .. $ west init -m https://github.com/NXPPlugNTrust/nano-package.git --mf ~/workspace/nano-package/zephyr/west.yml ~/workspace/ $ cd workspace $ west update 版本示例: $ cd workspace/ $ west build -b mimxrt1180_evk/mimxrt1189/cm33 modules/crypto/nxp-plugandtrust/examples/se05x_crypto/zephyr/ --pristine 编程和运行:   参考资料: [1]基于树莓派的 EdgeLock SE05x 快速入门指南 [2]i.MX RT1180 EVK 快速入门指南
View full article
Clock Measuring using the Signal Frequency Analyzer (SFA) module for KW45/KW47/MCXW71/MCXW72 Using the Signal Frequency Analyzer (SFA) to Measure the FRO 6M Frequency Overview The Signal Frequency Analyzer (SFA) is a specialized hardware peripheral available in NXP’s KW45, MCXW71, KW47, and MCXW72 microcontrollers. It is designed to provide precise, real-time measurement and analysis of digital signal characteristics, including frequency, period, and timing intervals. This makes it a valuable tool for applications requiring accurate timing diagnostics, signal validation, and system debugging. By utilizing internal 32-bit counters and configurable trigger mechanisms, the SFA enables high-resolution capture of signal transitions, supporting robust system monitoring and fault detection. Functional Capabilities of the SFA The SFA module supports the following measurements: Clock signal frequency of a Clock Under Test (CUT) Clock signal period It operates using two 32-bit counters: One for the Reference Clock (REF) One for the Clock Under Test (CUT) Measurement is performed by comparing the counts of both clocks until predefined target values are reached. FRO 6M Frequency Failure Scenarios The 6 MHz Free Running Oscillator (FRO6M) may occasionally output an incorrect frequency under certain conditions: When the device exits reset When the device wakes from low-power modes To mitigate potential issues caused by incorrect FRO6M output, it is the application developer’s responsibility to verify the oscillator’s frequency and apply corrective measures as needed. Monitoring the FRO 6M Using the SFA To monitor the FRO6M signal, the following configuration is recommended: SFA Configuration Parameters Reference Clock (REF): CPU Clock (e.g., 96 MHz) Clock Under Test (CUT): FRO6M routed via CLKOUT Interrupt Mode: Enabled for asynchronous measurement completion Code Implementation The presented functions are meant to be implemented in users application, the inner functions are part of the implementations of the SFA driver from the NXP’s SDK. It can be used on MCXW71, MCXW72, KW45, kKW47, just make sure SFA Peripheral Initialization  void init_SFA_peripheral(void) { /* Enable SFA interrupt. */ EnableIRQ(SFA_IRQn); /* Set SFA interrupt priority. */ NVIC_SetPriority(SFA_IRQn, 1); SFA_Init(DEMO_SFA_BASEADDR); SFA_InstallCallback(DEMO_SFA_BASEADDR, EXAMPLE_SFA_CALLBACK); } SFA Callback Function void EXAMPLE_SFA_CALLBACK(status_t status) { if (status == kStatus_SFA_MeasurementCompleted) { SfaMeasureFinished = true; } sfa_callback_status = status; } Frequency Measurement Function This function sets up the measurement of the FRO6M signal using the CPU clock as the reference. uint8_t SFA_freq_measurement_6M_FRO(void) { uint8_t ratio = 0; uint32_t freq = 0UL; sfa_config_t config; CLOCK_SetClkOutSel(kClockClkoutSelSirc); //set clokout to SIRC SFA_GetDefaultConfig(&config); //Get SFA default config config.mode = kSFA_FrequencyMeasurement0; config.refSelect = kSFA_REFSelect1; //Set CPU clk as ref clk config.cutSelect = kSFA_CUTSelect1; //Set clkout as CUT config.refTarget = 0xFFFFFFUL; config.cutTarget = 0xFFFFUL; config.enableCUTPin = true; freq = get_ref_freq_value(CPU_CLK); SFA_SetMeasureConfig(DEMO_SFA_BASEADDR, &config); SFA_MeasureNonBlocking(DEMO_SFA_BASEADDR); while (1) { if (SfaMeasureFinished) { SfaMeasureFinished = false; if(kStatus_SFA_MeasurementCompleted == sfa_callback_status) { freq = SFA_CalculateFrequencyOrPeriod(DEMO_SFA_BASEADDR, freq);//Calculate the FRO freq if(FREQ_6MHZ + TOLERANCE <= freq ) { ratio = 1; } else { if(FREQ_3MHZ + TOLERANCE <= freq) { ratio = 2; } else { if(FREQ_2MHZ + TOLERANCE <= freq) { ratio = 3; } else { ratio = 4; } } } break; } } else { __WFI(); } } return ratio; } Result Interpretation and Usage To test the FRO 6M after adding the above functions the FRO can be tested after executing: init_SFA_peripheral(); SFA_freq_measurement_6M_FRO(); The measured FRO6M frequency ratio is returned by the function SFA_freq_measurement_6M_FRO(), with the ratio you can know the current frequency output of the 6M FRO, ration 1 means 6M are being output by the FRO, ratio 2 means the frequency output of the FRO it's being cut in half meaning the FRO is outputting 3 Mhz, ration 3 means the FRO output frequency is being cut by a third part, this results in 2MHz frequency output. With this information you can: Adapt peripheral clocking if the FRO6M frequency is incorrect (This can be achieve by modifying the peripheral dividers if dividers are being used). Trigger corrective actions such as  switching to an alternate clock source Steps to Reconfigure Peripheral Clocking When FRO6M output frequency is lower Detect the Faulty FRO6M Output Use the SFA measurement as described earlier to determine if the FRO6M is operating below its expected frequency (6 MHz). If the result is significantly lower, proceed to reconfigure. Choose an Alternative Clock Source Most NXP MCUs offer multiple internal and external clock sources. Common alternatives include: FRO 192M OSC RF 32M Sys OSC RTC OSC Choose one that is: Stable Available in your current power mode Compatible with the peripheral’s timing requirements You can add more clock divers if needed to make a higher frequency clock reach a certain lower frequency. Reconfigure the Peripheral Clock Source Use the SDK’s CLOCK_Set... APIs to change the clock source. You may also need to: Adjust dividers to match the required baud rate or timing Reinitialize the peripheral with the new clock settings Example Scenario: Measuring the FRO and Adjusting UART Based on Frequency Ratio Imagine your application relies on the 6 MHz Free Running Oscillator (FRO), and its accuracy directly affects UART communication. To ensure reliable operation, you can use the System Frequency Adjustment (SFA) feature to monitor the FRO output and dynamically adjust the UART configuration. After measuring the 6 MHz FRO using the recommended method, the system returns a frequency ratio value. This value ranges from 1 to 4, where: 1 indicates the frequency is within expected limits (no issues), 2 to 4 represent varying degrees of deviation from the expected frequency. Using this ratio, you can initialize and configure the UART peripheral and its driver to compensate for any frequency variation, ensuring stable and accurate communication. */ int main(void) { BOARD_InitHardware(); uint8_t ch = 0; uint8_t FRO_ratio = 0; init_SFA_peripheral(); /*Measure FRO6M output frequency*/ FRO_ratio = SFA_freq_measurment_6M_FRO(); /*Init debug console and compensate in case a different frequency is output */ if(0 == FRO_ratio) { assert(0);//this user defined return value means something went wrong while measuring 6Mz FRO } uint32_t uartClkSrcFreq = BOARD_DEBUG_UART_CLK_FREQ/FRO_ratio;//Compensate the src frequency set for uart module CLOCK_EnableClock(kCLOCK_Lpuart1); CLOCK_SetIpSrc(kCLOCK_Lpuart1, kCLOCK_IpSrcFro6M); DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, uartClkSrcFreq); ...... } SDK 25.0.00 Enhancements for FRO6M Calibration To address known reliability issues with the 6 MHz Free Running Oscillator (FRO6M), particularly during transitions from low-power modes, SDK version 25.06.00 introduces a set of software enhancements aimed at improving oscillator validation and calibration. Key Features Introduced FRO6M Calibration API Two new functions have been added to facilitate runtime verification of the FRO6M frequency: PLATFORM_StartFro6MCalibration() Initializes the calibration process by enabling the cycle counter, capturing a timestamp, and preparing the system to measure elapsed time using both the CPU and the FRO6M-based timestamp counter. PLATFORM_EndFro6MCalibration() Completes the calibration by comparing the time measured via CPU cycles and the FRO6M timestamp counter. This comparison determines whether the oscillator is operating at the expected 6 MHz or has erroneously locked to a lower frequency (e.g., 2 MHz). The result is stored in a global ratio variable (fwk_platform_FRO6MHz_ratio) for use by the system. These functions provide a lightweight and efficient mechanism to detect and respond to oscillator misbehavior, ensuring system stability and timing accuracy. Configuration Macro gPlatformEnableFro6MCalLowpower_d This macro enables automatic FRO6M frequency verification upon exiting low-power modes. When defined, the system will invoke the calibration functions to validate the oscillator before resuming normal operation. Default Integration The calibration mechanism is enabled by default in the SDK configuration file fwk_config.h, ensuring that all applications benefit from this safeguard without requiring manual setup. Use Case and Benefits These enhancements are particularly valuable in applications where: Precise timing is critical (e.g., wireless communication, sensor sampling). The system frequently enters and exits low-power states. Clock source integrity must be guaranteed to avoid peripheral misbehavior or timing faults. By integrating these calibration routines, developers can proactively detect and correct FRO6M frequency anomalies, improving overall system robustness and reducing the risk of runtime errors due to clock instability.
View full article