Multi Source Translation Content

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

Multi Source Translation Content

Discussions

Sort by:
ARM v2018 R1ライセンス延長のためのS32 DSの申請 親愛なるNXPサポートチームへ、 S32 Design Studio for ARM v2018 R1ライセンスの有効期限延長をお願いしたいのでお願いしています。 当社の現在のライセンスは、2026年3月10日に期限切れとなる予定です。ソフトウェアの継続的な使用を妨げずに提供できるよう、ライセンスを更新したいと考えています。 ライセンスの詳細は以下のとおりです。 - 製品:ARM v2018 R1用S32 Design Studio  - アクティベーションコード: C314-0A96-AF3B-C896 このアクティベーションコードの有効期限延長を手伝ってもらえますか? 再開まで今しばらくお待ちください。
View full article
LPSPI SDK Issues I discovered an issue with the SDK implementation while using this function; it clears W1C-related flags, such as... The LPSPI_TRANSMIT_ERROR flag will be cleared when it is requested. The LPSPI_RECEIVE_ERROR flag cannot be used with the |= operator. Re: LPSPI SDK问题 Hi, thank you for your reply. I understand the safe clearing of the W1C flag. Wishing you success in your work! Re: LPSPI SDK问题 Hi @xiaozhi  I can see your concern regarding the implementation: base->SR |= ((uint32_t)1U << (uint32_t)statusFlag); Generally, for Write-1-to-Clear (W1C) registers, writing the flag mask directly to the register is often preferred over a read-modify-write operation, since the latter may affect other W1C bits that are already set. This topic has been discussed previously in the thread S32K144: SPI Transfer with GPIO as CS. BR, VaneB
View full article
[suggestion] Add PCR to Package/Pins/Routing view Inside the Pins view, inside the Package, Pins and Routing Details windows, every pin is referred to by their Port/Pin denomination and their Pin Number. The Peripherals view however works with PCR exclusively. To make working easier, I highly recommend adding the PCR to Pins view as well. Hovering over a Pin in the Package window should show the PCR. The Pins and Routing Details windows should have a column that shows the PCR. The Signal Description IO Multiplexing sheet should have column that shows the PCR. This would make working between the two views significantly easier. Eclipse IDE Usage and Settings General Re: [suggestion] Add PCR to Package/Pins/Routing view Great to hear, thanks. Good point, having pins from the pins tool automatically added to the port peripheral is of course greatly preferrable. Re: [suggestion] Add PCR to Package/Pins/Routing view Hello @daniel_meier, I agree with this suggestion. Actually, in S32K3 RTD, since version 6.0.0, the tool already links the Pins functional group with the Port component in Peripherals view, and pins are routed automatically, no MSCR (PCR) input is required: Port Container and Functional Group issue. I will pass on this recommendation to the RTD team, however, keep in mind that this kind of changes and modifications may take some time to be implemented, if they have not been requested beforehand.  Best regards, Julián
View full article
iMX93: SAI round-trip latency can 'randomly' change by 1 sample The round-trip latency of the SAI in synchronous mode should always be the same (deterministic) when opening a capture & playback ALSA stream on a hardware sound card. That is: if you have an audio codec (ADC+DAC) and you use it for capture and playback, the latency seen from input to output should always be the same, given the ALSA settings (buffer sizes, periods, etc.) do not change. What I am actually seeing is that the latency can vary by 1 sample. This variation is some lower percentage of the time, e.g. 20%. 2 in 10 runs result in a delay 1 sample less than the other 8 runs. This was tested by running DUT Delay measurement on an Audio Precision: Further Info: Codec is TAC5211 running @ 192kHz, connected to SAI3. Codec provides clocks to TXC and TXFS (it is the master). Capture and playback are linked (snd_pcm_link). Running @48kHz: 1 sample offset appears 3/10 times. So, lowering the sample rate does not lower the changes of the 1 sample difference appearing. I suspect some sort of timing related/race condition between the TX and RX, at a very low level (fsl_sai.c, or DMA). 1 sample different might seem like not a big deal, but it does matter when you need to maintain a fixed phase relationship between what you are generating (DAC) with the signal present at the input (ADC). Re: iMX93: SAI round-trip latency can 'randomly' change by 1 sample I have tried 22 different attempts at modifying `fsl_sai.c` to try to get RX and TX to sync. So far I have not been able to get anything that works 100% of the time. There are some changes that reduce the % of time the 1 sample offset appears. This is all on the same board. Each time the audio device is opened, there is a chance the round-trip latency is 1 sample different. Re: iMX93: SAI round-trip latency can 'randomly' change by 1 sample Hello, SAI synchronous mode guarantees a shared BCLK/frame-sync relationship, but synchronous mode does not prove sample accurate startup alignment. That requires synchronized start support and compliance with the processor and SAI enable/reset sequence. You can refer to this link in section Streams Syncronization: https://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html i.MX93 provides shared BCLK/frame-sync SAI operation, but there is not documented that it guarantees deterministic sample aligned startup latency As you mention, this could be caused in a low level preventing simultaneous FIFO start and modification may be needed. Does this issue occur on the same boards, or does it occur randomly across all boards? Best regards. 
View full article
AN14506 i.MX91の消費電力は、ヒートシンクありとなしで測定したものですか? i.MX 91の消費電力測定を見ていたのですが、i.MX 91評価キット |NXP Semiconductorsがテストに使われたハードウェアについて言及しています。 製品写真を見ると、i.MX91の隣にヒートシンク用の取り付け穴が見えます。試験対象機器に関するそれ以上の情報は見つからず、ヒートシンクの有無にかかわらず試験が行われたかどうかは確認できませんでした。この情報は共有できますか? よろしくお願いいたします。 キリスト教徒 Re: AN14506 i.MX91 Power Consumption performed with or without heatsink? ANでわかるように、i.MX91 EVKにはヒートシンクは使われていません。 Re: AN14506 i.MX91 Power Consumption performed with or without heatsink? ねえ、 @Rita_Wang 、 ご返信ありがとうございます。「熱強制装置」が恒温槽のことなのか、ヒートシンクのことなのか、私には確信が持てませんでした。 しかし、評価ボードはヒートシンクなしで使われたという答えは受け入れます。 よろしくお願いいたします。 キリスト教徒 Re: AN14506 i.MX91 Power Consumption performed with or without heatsink? こんにちは、クリスチャンさん。 @Christian_at_SIEはい、おっしゃる通りです。弊社のi.MX91 evkにはヒートシンクは付いていません。 良い一日をお過ごしください よろしくお願いいたします。 リタ
View full article
#LX2160 板上电后无法启动 您好,我有一个关于#Lx2160a-rdb板的问题。 当我接通电源并按下电源按钮时,电路无法启动,LED D20 和 D23 亮起红色。即使该设备之前没有开机,它仍然显示过热状态。 造成这种情况的原因可能是什么?请帮忙——谢谢。 Re: Failure to boot upon power on in the #LX2160 board D20 + D23 并不一定意味着处理器真的过热。 D23(THERM)表示热监测电路检测到热故障并关闭了系统。默认跳闸点为 85 °C。 D20(故障)是一个通用故障指示器;它可以由热故障、电源时序故障或软件故障触发。 最可能的原因 处理器未安装或未正确就位 弯曲/污染的插座引脚 热二极管连接损坏 热监测集成电路或相关电路故障 建议检查 完全断开交流电源,然后检查处理器安装情况、插槽引脚、散热器和板损坏情况。 检查 SW4[1] 是否设置为正常运行 (1)。仅用于诊断测试,将 SW4[1] 设置为 0 可禁用热监控和其他警报。请勿将此作为永久性解决方案。 检查 ATX 连接是否正确:J1 12-V 连接和主 J2 ATX 连接器。检查绿色电源指示灯 D29–D39 是否亮起。 当 D20 亮起时,观察 M7–M0 状态 LED。闪烁模式可以识别出发生故障的电源时序器层。
View full article
i.MX 8M Plusおよびi.MX 95向けRAMの調達 こんにちは、 新しいプロジェクトのためにRAMを調達しているのですが、現在のメモリ不足のため、入手しやすい部品を見つけるのに苦労しています。 現在の入手状況や調達のしやすさを踏まえ、新しいデザインにおすすめのRAMチップはありますか? このプロジェクトでは、i.MX 8M Plusまたはi.MX 95のいずれかを使用する予定です。理想的には、LPDDR4/4Xを両プラットフォームで使い、ソーシングを簡素化し、同じメモリコンポーネントを再利用したいと考えています。 ただし、もし調達が楽になるなら、プラットフォームごとに異なるメモリタイプを使うことも検討しています。例えば: - i.MX 8M Plus向けLPDDR4(DDR4ではなく、この用途では低消費電力が重要) i.MX 95の場合はLPDDR4XまたはLPDDR5 念のため言っておくと、これらのプロセッサと互換性があると知られているメモリデバイスのおすすめを主に求めているわけではありません。むしろ、現在入手しやすく新しいデザインに適した特定の部品番号に興味があります。 どのメーカーや部品が入手しやすいかなど、何かおすすめや情報があれば大変ありがたいです。 ご回答をお待ちしています。 Re: Souring RAM for i.MX 8M Plus and i.MX 95 こんにちは、 @Radeoicさん 申し訳ありませんが、現在のDRAMのマーケット状況については詳しくありません。問い合わせは関連するDRAMサプライヤーに直接お問い合わせいただく必要があります。 B.R Re: Souring RAM for i.MX 8M Plus and i.MX 95 RAMの具体的なモデルを尋ねるべきです。 Re: Souring RAM for i.MX 8M Plus and i.MX 95 中国に拠点を置く製造業者の場合は非常に困難です。他国に拠点を置く場合は、米国企業が支援してくれます。
View full article
Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer Our production firmware is built and validated with MCUXpresso IDE v11.3.1_5262. We need to keep this exact version for build reproducibility, and we are moving our release builds to a Linux build environment (headless build in a container). The Linux installer for this version (MCUXpressoIDE_11.3.1_5262.x86_64.deb.bin) is no longer listed on the download page. Could you provide access to it? Thank you Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer Hello @uesrmane , I’ll send it to you by email. Please check your inbox. The file is quite large, so I’m not sure if it will go through successfully. If you don’t receive it or have any issues, please let me know. BR Celeste Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer I can see the list but I can only see till version 11.6 , the older 11.3 are not found. Let me know if you can send the v11.3.1_5262 Linux installer. thank you Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer Yes my issue is that I can see the previous version list but I can only see until version 11.6V I cant see the older files, would it be possible to ask for the v11.3.1_5262 version for linux? Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer Hello @uesrmane , Thanks for your post. Please refer to the attached screen recording to see how to access your Flexera account and find the legacy MCUXpresso IDE versions. Please note that some versions may not be available for all accounts. If you cannot find the version you are looking for, please let me know. BR Celeste
View full article
AN14506 i.MX91 Power Consumption performed with or without heatsink? I was looking at the i.MX 91 Power Consumption Measurement and it refers to the i.MX 91 Evaluation Kit | NXP Semiconductors as hardware used to test. From the product pictures mounting holes next to the i.MX91 for a heat sink are visible. I did not find any further information about the device under test, to see whether the device was tested with or without a heat sink. Can this information be shared? Best regards Christian Re: AN14506 i.MX91 Power Consumption performed with or without heatsink? You can see in the AN that we do not use the heat sink on the i.MX91 EVK: Re: AN14506 i.MX91 Power Consumption performed with or without heatsink? Hey @Rita_Wang, thanks for the reply. I was not sure whether "Thermal forcing equipment" referred to a thermal chamber or to a heatsink. But I take this answer that the evaluation board was used without a heatsink. Best regards Christian Re: AN14506 i.MX91 Power Consumption performed with or without heatsink? Hi Christian,  @Christian_at_SIE Yes, your understandings are right, for our i.MX91 evk no heatsink on it. Wish you have  a nice day Best Regards Rita
View full article
#LX2160ボードで電源投入時に起動しない こんにちは、#Lx2160a-rdb ボードについて質問があります。 電源を接続して電源ボタンを押しても、回路が起動せず、LED D20とD23が赤く点灯します。デバイスの電源は以前には入れられていなかったにもかかわらず、過熱状態を示している。 その原因は何でしょうか?助けてください。ありがとうございます。 Re: Failure to boot upon power on in the #LX2160 board D20 + D23は必ずしもプロセッサが本当に熱いという意味ではありません。 D23(THERM)は、温度監視回路が熱異常を検知し、システムを停止したことを意味します。デフォルトの作動温度は85℃です。 D20(FAIL)は一般的な故障インジケーターであり、熱故障、電源のシーケンス故障、またはソフトウェアによってトリガーされることがあります。 最も可能性の高い原因 プロセッサーが取り付けられていないか、正しく接続されていない ソケットピンの曲がり/汚染 熱ダイオードの接続部が損傷している 温度モニターICまたは関連回路の故障 推奨される点検項目 交流電源を完全に外した後、プロセッサの取り付け、ソケットピン、ヒートシンク、基板の損傷を確認してください。 SW4[1]が通常動作(1)に設定されていることを確認してください。診断テストのみの場合、SW4[1]を0に設定すると、温度監視やその他のアラームが無効になります。これは恒久的な回避策として使用しないでください。 ATXコネクタの接続が正しいことを確認してください。J1 12VコネクタとメインのJ2 ATXコネクタの両方が接続されていることを確認してください。緑色の電源LED(D29~D39)が点灯するかどうか確認してください。 D20が点灯している間、M7~M0の状態LEDを観察してください。点滅パターンは故障したパワーシーケンサー階層を識別できます。
View full article
请求提供旧版 MCUXpresso IDE v11.3.1_5262Linux 安装程序 我们的生产固件是使用 MCUXpresso IDE v11.3.1_5262构建和验证的。为了保证构建的可复现性,我们需要保持这个确切的版本,并且我们将发布构建迁移到 Linux 构建环境(容器中的无头构建)。 该版本的 Linux 安装程序 (MCUXpressoIDE_11.3.1_5262.x86_64.deb.bin) 已不再列在下载页面上。您能提供访问权限吗? 谢谢 Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer 你好@uesrmane , 我会通过电子邮件发送给你。请查收您的收件箱。 文件很大,所以我不太确定能否成功上传。如果您没有收到或遇到任何问题,请告诉我。 BR 塞莱斯特 Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer 我可以看到列表,但我只能看到到 11.6 版本,找不到更早的 11.3 版本。请告诉我您是否可以发送 v11.3.1_5262 版本。Linux安装程序。谢谢 Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer 是的,我的问题是,我可以看到之前的版本列表,但只能看到到 11.6V 版本,看不到更早的文件。请问能否提供 v11.3.1_5262 版本?Linux 版本? Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer 你好@uesrmane , 感谢您的帖子。 请参考附件中的屏幕录像,了解如何访问您的 Flexera 帐户并查找旧版 MCUXpresso IDE。 请注意,某些版本可能不适用于所有帐户。如果您找不到想要的版本,请告诉我。 BR 塞莱斯特
View full article
AN14506 i.MX91 的功耗测试结果(有散热片和无散热片两种情况下)? 我正在查看i.MX 91 功耗测量,其中提到i.MX 91 评估套件 | NXP 半导体是用于测试的硬件。 从产品图片中可以看到 i.MX91 旁边有用于安装散热器的安装孔。我没有找到关于被测设备的更多信息,无法确定该设备是在有散热器的情况下进行测试的还是没有散热器的情况下进行测试的。这些信息可以共享吗? 顺祝商祺! 基督教 Re: AN14506 i.MX91 Power Consumption performed with or without heatsink? 从AN文档中可以看出,我们在i.MX91 EVK上没有使用散热器: Re: AN14506 i.MX91 Power Consumption performed with or without heatsink? 嘿@Rita_Wang , 谢谢你的回复。我不确定“热力驱动设备”是指热室还是散热器。 但我认为这个答案是评估板没有使用散热片。 顺祝商祺! 基督教 Re: AN14506 i.MX91 Power Consumption performed with or without heatsink? 你好,克里斯蒂安, @Christian_at_SIE是的,您的理解是正确的,我们的 i.MX91 evk 没有散热片。 祝你今天过得愉快 顺祝商祺! Rita
View full article
レガシーMCUXpresso IDEsのリクエストv11.3.1_5262Linuxインストーラー 本番用ファームウェアはMCUXpresso IDE v11.3.1_5262で構築・検証されています。ビルドの再現性のためにこの正確なバージョンを維持する必要があり、リリースビルドをLinuxビルド環境(コンテナ内のヘッドレスビルド)に移行します。 このバージョン(MCUXpressoIDE_11.3.1_5262.x86_64.deb.bin)のLinuxインストーラーは、もはやダウンロードページに掲載されていません。アクセスを許可していただけますか? よろしくお願い申し上げます。 Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer こんにちは、 @uesrmane さん。 メールで送ります。受信トレイをご確認ください。 ファイルがかなり大きいので、うまく処理されるかはわかりません。届かない場合や何か問題がある場合は、お知らせください。 BR セレステ Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer リストは見えますが、バージョン11.6までしか見当たりません。古い11.3は見つかりません。もし送れるなら教えてくださいv11.3.1_5262Linuxインストーラー。ありがとう Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer はい、問題は前のバージョンリストは見えるのにバージョン11.6Vまでしか見えず、古いファイルは見えないことです。v11.3.1_5262をリクエストすることは可能でしょうかLinux用のバージョンは? Re: Request for legacy MCUXpresso IDE v11.3.1_5262 Linux installer こんにちは、 @uesrmane さん。 投稿ありがとうございます。 添付の画面録画をご参照いただければ、Flexeraアカウントへのアクセス方法や、レガシーなMCUXpresso IDEバージョンの確認が可能です。 一部のバージョンは、すべてのアカウントでご利用いただけない場合がありますのでご注意ください。もしお探しのバージョンが見つからない場合は、ぜひ教えてください。 BR セレステ
View full article
Failure to boot upon power on in the #LX2160 board Hello, I have a question regarding the #Lx2160a-rdb board When I plug in the power and press the power button, the circuit fails to start, and LEDs D20 and D23 light up red. Even though the device hadn't been turned on previously, it still indicates an overheating condition. What could be the cause of this? Please help—thank you. Re: Failure to boot upon power on in the #LX2160 board D20 + D23 do not necessarily mean the processor is genuinely hot. D23 (THERM) means the thermal-monitor circuit detected a thermal fault and shut the system down. The default trip point is 85 °C. D20 (FAIL) is a general failure indicator; it can be triggered by thermal fault, a power-supply sequencing failure, or software. Most likely cause Processor not installed or not seated correctly Bent/contaminated socket pins Damaged thermal-diode connection Faulty thermal-monitor IC or related circuitry Recommended checks Remove AC power completely, then inspect processor installation, socket pins, heatsink, and board damage. Check that SW4[1] is set to normal operation (1). For diagnostic testing only, setting SW4[1] to 0 disables thermal monitoring and other alarms. Do not use this as a permanent workaround. Verify the correct ATX connections: both J1 12-V connections and the main J2 ATX connector. Check whether the green supply LEDs D29–D39 illuminate. Observe the M7–M0 status LEDs while D20 is lit. A blinking pattern can identify the power-sequencer tier that failed.
View full article
为 i.MX 8M Plus 和 i.MX 95 寻找内存 你好, 我正在为一个新项目采购内存,但由于目前内存短缺,很难找到供应充足的零件。 根据目前的供货情况和采购便利性,您有什么具体的内存芯片推荐用于新设计吗? 该项目将使用 i.MX 8M Plus 或 i.MX 95。理想情况下,我希望在两个平台上都使用 LPDDR4/4X,以简化采购并有可能重复使用相同的内存元器件。 不过,如果为了方便采购,我也愿意为每个平台使用不同的内存类型。例如: -适用于 i.MX 8M Plus 的 LPDDR4(而非 DDR4,因为低功耗对于此特定应用至关重要) -i.MX 95 处理器支持 LPDDR4X 或 LPDDR5 内存 需要澄清的是,我主要不是在寻找已知与这些处理器兼容的内存设备推荐。相反,我更感兴趣的是目前容易获得且适合新设计的具体零件编号。 如果您能推荐一些更容易采购到的制造商或零部件,或提供一些见解,我们将不胜感激。 谢谢! Re: Souring RAM for i.MX 8M Plus and i.MX 95 嗨@Radeoic 抱歉,我对目前动态随机存取存储器\(DRAM\)的市场供应情况不太了解。您需要直接联系相关的动态随机存取存储器(DRAM)供应商进行咨询。 B.R Re: Souring RAM for i.MX 8M Plus and i.MX 95 如果你是一家位于中国的制造商,这非常困难;如果你位于其他国家,美国公司可以为你提供帮助。 Re: Souring RAM for i.MX 8M Plus and i.MX 95 你应该询问内存的具体型号。
View full article
Souring RAM for i.MX 8M Plus and i.MX 95 Hello, I am sourcing RAM for a new project and am having difficulty finding parts with good availability due to the current memory shortage. Are there any specific RAM chips you would recommend for new designs based on current availability and ease of procurement? The project will use either the i.MX 8M Plus or the i.MX 95. Ideally, I'd like to use LPDDR4/4X across both platforms to simplify sourcing and potentially reuse the same memory component. However, I am also open to using different memory types for each platform if that would make sourcing easier. For example: -LPDDR4 for i.MX 8M Plus (not DDR4, as low-power is important for this specific application) -LPDDR4X or LPDDR5 for the i.MX 95 To clarify, I'm not primarily looking for recommendations on memory devices that are known to be compatible with these processors. Rather, I'm interested in specific part numbers that are currently readily available and suitable for new designs. Any recommendations or insights into which manufacturers or parts are easier to source would be greatly appreciated. Thank you! Re: Souring RAM for i.MX 8M Plus and i.MX 95 Hi @Radeoic  Sorry, I am not familiar with the current market situation regarding the availability of DRAM. you will need to contact related DRAM suppliers directly to make inquiries. B.R Re: Souring RAM for i.MX 8M Plus and i.MX 95 If you are a manufacturer based in China, this is very difficult; if you are based in another country, U.S. companies can assist you. Re: Souring RAM for i.MX 8M Plus and i.MX 95 You should be asking for the specific model of the RAM.
View full article
The basics of secure boot and secure (OTA) updates in MCUs (Japanese blog) In security contexts, the terms "secure boot" and "secure/OTA update" are frequently used. This document explains the basics of these concepts and the Secure Boot Loader (SBL), a means of achieving them, primarily from the perspective of embedded MCU security. The fundamental concepts are similar for MPUs as well. Instructions and usage methods for individual products will be explained in separate articles. (Reading time: 15 minutes) Purpose and Overview of Secure Boot   The purpose of Secure Boot is to "detect and prevent malicious attackers from replacing or tampering with the firmware." If an attacker is able to rewrite the firmware through some kind of vulnerability, it can lead to a very wide range of risks. Examples of risks: Damage to the privacy and property of end product users Unauthorized reading of product firmware can lead to intellectual property leaks and misuse for counterfeit goods. Features that would normally require an additional license are made available for free. Product damage due to unauthorized operation By applying cryptographic signatures to firmware, the integrity of the application (that it has not been destroyed or tampered with) can be verified through signature verification. Note: While the absence of damage can be detected by error checks such as CRC, anyone can calculate the CRC, so if the program itself has been tampered with, it cannot be detected. Verification using a signature, which can only be calculated by the product manufacturer who possesses the secret key, is necessary. A common implementation involves using a separate firmware called a Secure Boot Loader (SBL). The SBL starts before the firmware boots, verifies the firmware's signature, and only boots the firmware if the signature verification is successful (i.e., Secure Boot). The purpose, challenges, and solutions of secure updates   The purpose of secure updates is to "safely update only legitimate firmware, preventing replacement with malicious firmware, tampering, or unintentional reverting to older versions." Firmware updates are used not only to add new features to a product, but also to fix bugs and vulnerabilities. Making software updates available for products already on the market benefits both product manufacturers and end-users.   End users can receive new features and performance improvements without having to replace their products. Furthermore, the provision of fixes for bugs and vulnerabilities discovered after shipment makes it easier to respond to newly discovered vulnerabilities, attack methods, and other threats. Especially for products connected to networks (including not only the internet but also internal networks within companies, buildings, and factories), the availability of continuous security updates is a crucial factor in product selection. Furthermore, if critical bugs or vulnerabilities are discovered, applying fixes without waiting for on-site product replacement or recall can potentially minimize product downtime and business disruption.   Product manufacturers can provide firmware updates to fix critical bugs and vulnerabilities discovered after shipment. This can potentially reduce logistics, labor, and inventory costs associated with recalling, repairing, and replacing affected products. Furthermore, by responding to market demands and specification changes discovered after shipment (including those originating not only from the manufacturer but also from third-party services), and by improving product functionality and compatibility, it becomes easier to extend the product lifecycle and maintain customer satisfaction and product reliability.   However, when applying firmware updates to market products, the following challenges must be addressed: # assignment Solution 1 IP leakage and counterfeit product manufacturing through reading update image content The update image is encrypted and decrypted within the product before application. 2 Attackers can write arbitrary firmware to products. By performing cryptographic signature verification before applying or booting the update image, the integrity of the update image is guaranteed before application or booting. 3 Product startup impossible due to rewrite interruption or failure. Support for retrying updates or recovering via a dual-slot method (described later) (described later) 4 Rollback attack: Reverting to a previous firmware version prior to the vulnerability fix. Preventing unauthorized rollbacks through version checks Note: When an update is performed via a wireless interface, it is specifically called an OTA update. *OTA: Over The Air A common implementation method involves preparing separate firmware for this purpose, as rewriting the running firmware is complex. Furthermore, since the solution to problem #2 involves the same process as the aforementioned secure boot, it is common to integrate the secure update function or a part of it into the SBL used for secure boot. The simplest method is for the SBL itself to receive the new firmware update image and write it directly to the area where the old firmware is located, as shown in the diagram below. The update image, including the new firmware, will be digitally signed and given a version number, and the firmware will be encrypted. The product will verify the signature to confirm the integrity of the image, confirm that the version is newer than the old firmware, and then decrypt and write the image to address issues #1, 2, and 4. The system can address issue #3 by remaining in the SBL (Secure Boot Block) state during interruption and entering a state where it waits to receive an update image due to a Secure Boot failure on the next startup. The biggest drawback of this method is that the execution of the old firmware is completely stopped, including while receiving a firmware update, and that it is not possible to revert to the old firmware if the process is interrupted. To resolve this, you can use the dual-slot update method described later. Security considerations The 1st SBL must not be rewritten. The diagram in the chapter "Purpose and Overview of Secure Boot" only shows the SBL and firmware, but in reality, after startup or reset, the MCU's built-in, non-rewritable Boot ROM is executed first. This Boot ROM may or may not include the functionality for secure boot. Examples of various NXP products and a simplified boot flow are shown below. Boot ROM Secure Boot feature Yes none Examples of NXP products MCX N Series MCX A5 Series MCX A13/14/15 Series Boot flow Reset ↓ Launch without signature verification Boot ROM (operates as the 1st SBL) ↓ Launch after signature verification Signed firmware (on Flash) Reset ↓ Launch without signature verification Boot ROM ↓ Launch without signature verification 1st SBL (on Flash) ↓ Launch after signature verification Signed firmware (on Flash) Here, we specifically refer to the first SBL (System Building Block) to start within the system as the 1st SBL. Secure Boot can be described as "a technology that starts the firmware only after the SBL has confirmed it is trustworthy." However, as mentioned above, the 1st SBL starts without verification by other SBLs. In other words , the 1st SBL is the Root of Trust (RoT) that must be trusted unconditionally , and it is impossible to detect if the 1st SBL is tampered with through some vulnerability. If the 1st SBL is tampered with and secure boot is bypassed, it becomes possible to boot any firmware, so the 1st SBL must be basically unrewritable except for areas that require rewriting (such as the version control area to prevent rollback attacks). Note: Strictly speaking, it is possible to allow updates to the 1st SBL only through authenticated routes, but this presents various problems, such as the risk of being unable to start up in the event of an interruption. It is considered easier to design by deploying a 2nd SBL (described later) and allowing updates to that instead. If the non-rewritable Boot ROM includes Secure Boot functionality: The non-rewritable Boot ROM acts as the 1st SBL to verify the firmware on the flash memory, so the 1st SBL can never be rewritten. The areas that need to be rewritten are implemented using OTP or flash memory that can only be modified from the Boot ROM. If the non-rewritable Boot ROM does not include Secure Boot functionality: The first SBL (Smart Burner Unit) that authenticates the firmware on the flash memory becomes the 1st SBL. It is necessary to use flash protection to make the 1st SBL unrewritable . Since the 1st SBL cannot be updated, it requires extremely careful design and verification, and integrating too many features is not recommended. By utilizing NXP's products with built-in Boot ROMs that have obtained SESIP/PSA security certification and feature secure boot functionality, this design verification effort can be reduced. In some cases, to build a flexible system with rich functionality using SBL, an additional rewritable 2nd SBL may be placed between the firmware and the SBL, as shown in the diagram below. Tampering after firmware startup is undetectable. Secure Boot is used for verification before firmware startup, so it cannot detect tampering after startup. While there are techniques to verify the firmware while it is running, the simplest implementation is to make the firmware unrewritable. However, considering firmware updates, it's not always possible to make it unrewritable. To make the firmware unrewritable, dynamic settings such as dynamically configurable memory protection functions are required, allowing rewriting while the firmware is running and rewriting is enabled during an update. The update image decryption key must be prevented from being read or used. If a vulnerability in the firmware allows the update image decryption key to be read and used, it could lead to the leakage of the update image contents. Since the SBL requires the use of the decryption key, it is necessary to be able to read and use the decryption key while the SBL is running. However, before transferring execution from the SBL to the firmware, if the decryption key exists in RAM, it must be discarded, and furthermore, memory protection must be used to prevent the firmware from reading the decryption key. If the MCU contains hardware such as a cryptographic accelerator with key isolation capabilities, the key cannot be read but can still be used. Therefore, access protection should be used to prevent its use, or the key should be deleted before transferring execution from the SBL to the firmware to prevent it from being imported and thus make it unreadable. When combined with the aforementioned firmware rewrite-disable setting, the access permissions during SBL execution and firmware execution should basically be as follows, and these permission settings must not be changeable from the firmware side. Dual-slot update The implementation method for secure updates that includes a separate area (Slot 1) for temporarily storing new firmware, distinct from the currently operating firmware area (Slot 0), is called the dual-slot method. The update will be performed using the following steps. Firmware receives new firmware A software reset transfers execution to the SBL, which then verifies and decrypts the new firmware. Switch the active firmware from the old firmware to the new firmware and start the new firmware experimentally. If the new firmware boots successfully, confirm the update to complete the process. The system will revert to the old firmware (=Rollback) only if the new firmware fails to boot. There are various methods for switching the active firmware, but in the diagram below, the firmware placed in Slot 0 is considered the active firmware, and the contents of Slot 0 and Slot 1 are swapped using the Swap method. This method requires storage capacity to store at least two update images, as well as space for boot management information and metadata, but it offers the following main advantages: It is possible to receive update images without completely shutting down the firmware. This configuration allows for the reception of update images to be performed in parallel with other firmware tasks. However, if the product's flash memory does not support read-while-write (RWW), it will be impossible to read code or interrupt vectors from the same flash memory area while writing, which will significantly impair the execution speed and responsiveness of the code on the flash memory. If you want to run applications that require real-time performance, you may need to take the following measures as needed. Place the code in RAM External flash memory for storing update images Use a product with built-in flash memory that supports RWW (e.g., NXP MCX N series ). SBL design can be simplified. As mentioned earlier, the 1st SBL is not updatable, requiring extremely careful design and verification, and integrating too many features is not recommended. If the process of receiving update images can be separated from processes such as signature verification, decryption, and key management, placing the receiving function outside the SBL (System Block Label) can reduce the design and verification scope of the SBL. In particular, if the configuration simply stores the received image in an inactive slot without verification, it becomes easier to separate the receiving function from the SBL. For example, methods for receiving updates wirelessly or via Ethernet require a complex protocol stack, making it more suitable to implement them on the firmware side or in the second SBL rather than integrating them into the first SBL. Additionally, as a recovery measure in case of problems with the firmware update reception function, a simple reception function using UART or similar may be retained on the 1st SBL side. Even if reception is interrupted or the new firmware cannot be started, operation can continue using the old firmware. Since the old firmware is not corrupted during reception, execution of the old firmware can be immediately resumed even if interrupted. Furthermore, since the old firmware is retained even after the update, it is possible to immediately revert to the old firmware (Rollback) in the event that the new firmware fails to boot. (This Rollback must be managed separately from malicious Rollback attacks by combining it with version checks.)   summary Secure Boot: Checks whether the currently installed firmware can be booted securely. Secure Update: Guarantees safe replacement with the latest firmware.   Related Information NXP Security - Summary Page (Japanese Blog) i.MX 93 Processor: Explaining the Secure Boot Signature and Authentication Mechanism (Japanese Blog) i.MX 93 Processor: How to Implement Secure Boot - Practical Guide (Japanese Blog) Secure Boot with i.MX 95 SPSDK (Japanese Blog) --> PQC-enabled Secure Boot ========================= We are currently unable to respond to comments left in the " Comment " section of this post . We apologize for the inconvenience, but please refer to " Technical Questions to NXP - How to Contact Us( Japanese Blog) " when making inquiries.(If you are already an NXP distributor or have a relationship with NXP, you may ask your representative directly.) In security contexts, the terms "secure boot" and "secure/OTA update" are frequently used. This document explains the basics of these concepts and the Secure Boot Loader (SBL), a means of achieving them, primarily from the perspective of embedded MCU security. The fundamental concepts are similar for MPUs as well. Instructions and usage methods for individual products will be explained in separate articles. (Reading time: 15 minutes) MCX Security Japanese Blog
View full article
MCU 中的安全启动和安全(OTA)更新基础知识(日文博客) 在安全领域,“安全启动”和“安全/OTA更新”这两个术语经常被使用。本文档主要从嵌入式MCU安全的角度,解释这些概念的基本原理以及实现这些概念的手段——安全启动加载程序(SBL)。这些基本概念也适用于微处理器(MPU)。 各个产品的使用说明和方法将在单独的文章中进行解释。 (阅读时间:15分钟) 安全启动的目的和概述   安全启动的目的是“检测并阻止恶意攻击者替换或篡改固件”。 如果攻击者能够通过某种漏洞重写固件,则可能导致各种各样的风险。 风险示例: 对最终产品用户的隐私和财产造成损害 未经授权读取产品固件可能导致知识产权泄露和被用于制造假冒商品。 通常需要额外许可证的功能现在免费提供。 因未经授权的操作造成的产品损坏 通过在固件上应用加密签名,可以通过签名验证来验证应用程序的完整性(即应用程序是否被破坏或篡改)。 注意:虽然可以通过 CRC 等错误校验方法来检测程序是否被篡改,但任何人都可以计算 CRC 值,因此如果程序本身已被篡改,则无法检测到。必须使用签名进行验证,而签名只能由拥有密钥的产品制造商计算得出。 一种常见的实现方式是使用一个名为安全启动加载程序 (SBL) 的独立固件。SBL 在固件启动之前启动,验证固件的签名,并且只有在签名验证成功后才启动固件(即安全启动)。 安全更新的目的、挑战和解决方案   安全更新的目的是“仅安全地更新合法固件,防止被恶意固件替换、篡改或意外恢复到旧版本”。 固件更新不仅用于为产品添加新功能,还用于修复漏洞和缺陷。为已上市产品提供软件更新,对产品制造商和最终用户都有益。   最终用户无需更换产品即可获得新功能和性能改进。此外,针对发货后发现的漏洞和缺陷提供修复程序,有助于用户更轻松地应对新发现的漏洞、攻击手段和其他威胁。尤其对于连接到网络(不仅包括互联网,还包括公司、楼宇和工厂内部网络)的产品而言,持续的安全更新是产品选择的关键因素。 此外,如果发现重大错误或漏洞,无需等待现场产品更换或召回即可应用修复程序,从而最大限度地减少产品停机时间和业务中断。   产品制造商可以提供固件更新,以修复发货后发现的关键缺陷和漏洞。这可以有效降低与召回、维修和更换受影响产品相关的物流、人工和库存成本。 此外,通过响应市场需求和发货后发现的规格变更(包括来自制造商和第三方服务商的变更),并改进产品功能和兼容性,可以更容易地延长产品生命周期,保持客户满意度和产品可靠性。   但是,在将固件更新应用于市场产品时,必须解决以下挑战: # 任务 解决方案 1 通过读取更新的图像内容进行知识产权泄露和制造假冒产品 更新镜像在应用前会在产品内部进行加密和解密。 2 攻击者可以将任意固件写入产品。 通过在应用或启动更新映像之前执行加密签名验证,可以保证更新映像在应用或启动之前的完整性。 3 由于重写中断或故障,产品无法启动。 支持通过双槽方法重试更新或恢复(稍后详述)(稍后详述) 4 回滚攻击:将固件恢复到漏洞修复之前的版本。 通过版本检查防止未经授权的回滚 注意:当通过无线接口执行更新时,它专门称为 OTA 更新。 OTA:空中传输 常见的实现方法是为此目的准备单独的固件,因为重写正在运行的固件非常复杂。此外,由于问题 2 的解决方案与上述安全启动过程相同,因此通常会将安全更新功能或其一部分集成到用于安全启动的 SBL 中。 最简单的方法是让 SBL 本身接收新的固件更新映像,并将其直接写入旧固件所在的区域,如下图所示。 包含新固件的更新镜像将进行数字签名并分配版本号,固件本身也会被加密。产品将验证签名以确认镜像的完整性,确认版本号高于旧固件,然后解密并写入镜像以解决问题 #1、2 和 4。 该系统可以通过在中断期间保持 SBL(安全启动块)状态,并在下次启动时由于安全启动失败而进入等待接收更新映像的状态来解决问题 #3。 这种方法的最大缺点是旧固件的执行完全停止,包括接收固件更新时,而且如果该过程中断,则无法恢复到旧固件。 要解决这个问题,您可以使用后面描述的双槽更新方法。 安全考量 第一份SBL文件不得重写。 “安全启动的目的和概述”章节中的图示仅显示了安全启动层 (SBL) 和固件,但实际上,启动或复位后,首先执行的是 MCU 内置的不可重写的启动 ROM。该启动 ROM 可能包含也可能不包含安全启动功能。下面展示了 NXP 各种产品的示例以及简化的启动流程。 启动ROM 安全启动功能 是的 没有任何 NXP产品示例 MCX N 系列 MCX A5系列 MCX A13/14/15系列 启动流程 重置 ↓ 无需签名验证即可启动 启动 ROM(作为第一个 SBL 运行) ↓签名验证后启动 已签名固件(在闪存上) 重置 ↓ 无需签名验证即可启动 启动ROM ↓ 无需签名验证即可启动 第一届SBL(Flash版) ↓签名验证后启动 已签名固件(在闪存上) 在这里,我们将系统中第一个启动的 SBL(系统构建模块)特称为第一个 SBL。 安全启动可以描述为“一种仅在安全启动层 (SBL) 确认其可信后才启动固件的技术”。然而,如上所述,第一个 SBL 会在未经其他 SBL 验证的情况下启动。 换句话说,第一安全启动层 (1st SBL) 是信任根 (RoT),必须无条件信任,而且无法检测到第一安全启动层是否因某种漏洞而被篡改。如果第一安全启动层被篡改,安全启动被绕过,则任何固件都可能被启动,因此第一安全启动层基本上是不可重写的,除非某些区域需要重写(例如版本控制区域,以防止回滚攻击)。 注:严格来说,虽然可以仅允许通过认证路由更新第一个安全边界层 (SBL),但这会带来诸多问题,例如在发生中断时可能无法启动。因此,更简便的方案是部署第二个 SBL(稍后详述),并允许对其进行更新。 如果不可重写的启动 ROM 包含安全启动功能: 不可重写的启动ROM充当第一SBL,用于验证闪存上的固件,因此第一SBL永远无法被重写。需要重写的区域使用OTP或闪存实现,这些闪存只能通过启动ROM进行修改。 如果不可重写的启动 ROM 不包含安全启动功能: 第一个用于验证闪存固件的SBL(智能刻录单元)就成为第一个SBL。必须使用闪存保护机制,使第一个SBL不可重写。 由于第一版 SBL 无法更新,因此需要极其谨慎的设计和验证,不建议集成过多的功能。 通过使用 NXP 的内置 Boot ROM 产品(这些产品已获得 SESIP/PSA 安全认证并具有安全启动功能),可以减少这种设计验证工作量。 在某些情况下,为了使用 SBL 构建具有丰富功能的灵活系统,可以在固件和 SBL 之间放置一个额外的可重写的第二个 SBL,如下图所示。 固件启动后进行篡改是无法检测的。 安全启动用于在固件启动前进行验证,因此无法检测启动后的篡改。 虽然有一些方法可以在固件运行时验证其完整性,但最简单的实现方法是使其不可重写。然而,考虑到固件更新,使其不可重写并非总是可行。 为了使固件不可重写,需要动态设置,例如动态可配置的内存保护功能,允许在固件运行时进行重写,并在更新期间启用重写功能。 必须防止更新镜像解密密钥的可读性和使用。 如果固件中的漏洞允许读取和使用更新映像解密密钥,则可能导致更新映像内容泄露。 由于SBL需要使用解密密钥,因此必须在SBL运行时能够读取和使用该解密密钥。但是,在将执行权从SBL转移到固件之前,如果解密密钥存在于RAM中,则必须将其丢弃,并且还必须使用内存保护来防止固件读取该解密密钥。 如果MCU包含诸如具有密钥隔离功能的加密加速器之类的硬件,则密钥虽然无法读取,但仍可使用。因此,应使用访问保护来防止密钥被使用,或者在将执行权从SBL转移到固件之前删除密钥,以防止密钥被导入,从而使其无法读取。 结合上述固件重写禁用设置,SBL 执行和固件执行期间的访问权限基本应如下,并且这些权限设置不得从固件端更改。 双槽位更新 实现安全更新的方法,包括一个单独的区域(插槽 1)用于临时存储新固件,该区域与当前运行的固件区域(插槽 0)不同,这种方法称为双插槽方法。 更新将按照以下步骤进行。 固件接收新固件 软件重置会将执行权移交给 SBL,然后 SBL 会验证并解密新的固件。 将当前固件从旧固件切换到新固件,并启动新固件进行实验。 如果新固件启动成功,请确认更新以完成该过程。 只有当新固件无法启动时,系统才会恢复到旧固件(=回滚)。 切换活动固件的方法有很多种,但在下图所示的示例中,放置在插槽 0 中的固件被视为活动固件,并且使用交换方法交换插槽 0 和插槽 1 的内容。 该方法需要足够的存储空间来存储至少两个更新镜像,以及用于存储启动管理信息和元数据的空间,但它具有以下主要优点: 无需完全关闭固件即可接收更新映像。 此配置允许接收更新映像与其他固件任务并行执行。 但是,如果产品的闪存不支持边写边读 (RWW),则在写入时无法从同一闪存区域读取代码或中断向量,这将严重影响闪存上代码的执行速度和响应能力。 如果您想运行需要实时性能的应用程序,则可能需要根据需要采取以下措施。 将代码放入 RAM 中 用于存储更新映像的外部闪存 使用内置闪存且支持 RWW 的产品(例如,NXP MCX N 系列)。 SBL设计可以简化。 如前所述,第一版 SBL 不可更新,需要极其谨慎的设计和验证,不建议集成过多功能。 如果能够将接收更新镜像的过程与签名验证、解密和密钥管理等过程分离,那么将接收功能置于系统块标签 (SBL) 之外,就可以缩小 SBL 的设计和验证范围。特别是,如果配置只是简单地将接收到的镜像存储在非活动时隙中而不进行验证,那么将接收功能从 SBL 中分离出来就更加容易了。 例如,通过无线或以太网接收更新的方法需要复杂的协议栈,因此更适合在固件端或第二个 SBL 中实现,而不是将其集成到第一个 SBL 中。 此外,作为固件更新接收功能出现问题的恢复措施,可以在 1st SBL 侧保留使用 UART 或类似技术的简单接收功能。 即使接收中断或新固件无法启动,也可以使用旧固件继续操作。 由于旧固件在接收过程中没有损坏,即使中断,也可以立即恢复旧固件的执行。 此外,由于更新后仍保留旧固件,因此如果新固件无法启动,可以立即恢复到旧固件(回滚)。(此回滚操作必须与版本检查相结合,以防止恶意回滚攻击。)   总结 安全启动:检查当前安装的固件是否可以安全启动。 安全更新:保证安全替换为最新固件。   相关信息 NXP Security - 摘要页面(日语博客) i.MX 93 处理器:安全启动签名和认证机制详解(日语博客) i.MX 93 处理器:如何实现安全启动 - 实用指南(日语博客) 使用 i.MX 95 SPSDK 实现安全启动(日文博客) --> 支持 PQC 的安全启动 ========================= 我们目前无法 回复 此帖子“ 评论”部分留下的评论。 对于由此造成的不便,我们深表歉意,但 在进行咨询时, 请 参考“ NXP 技术问题 - 如何联系我们 ( 日语博客 ) ” 。 (如果您已经是 恩智浦的 分销商或 与 恩智浦 有合作关系 ,您可以直接咨询您的代表。) 在安全领域,“安全启动”和“安全/OTA更新”这两个术语经常被使用。本文档主要从嵌入式MCU安全的角度,解释这些概念的基本原理以及实现这些概念的手段——安全启动加载程序(SBL)。这些基本概念也适用于微处理器(MPU)。 各个产品的使用说明和方法将在单独的文章中进行解释。 (阅读时间:15分钟) MCX 安全 日本博客
View full article
MCUにおけるセキュアブート、セキュア(OTA)アップデートの基本 (日本語ブログ) セキュリティ対応においてセキュアブート、セキュア/OTAアップデートという言葉がよく使用されます。これらの概要と、これらを実現するための手段であるセキュアブートローダー(SBL)の概要を主に組み込みMCUのセキュリティ対応の観点で解説します。MPUにおいても基本的な考え方は同様です。 個別の製品における対応や使用方法は別記事にて解説予定です。 (読了時間:15分) セキュアブートの目的と概要   セキュアブートの目的は「悪意ある攻撃者によるファームウェアの置き換えや改ざんを検出し起動を防止すること」です。 何らかの脆弱性経由などにより攻撃者がファームウェアを書き換えることができた場合、非常に広範囲のリスクが発生します。 リスクの例 : 最終製品ユーザーのプライバシーや財産への被害 製品ファームウェアの不正な読み出しによる知的財産漏洩や偽造品への流用 本来利用に追加のライセンスが必要な機能を無料で利用可能にする 不正な動作による製品破壊 ファームウェアに対して暗号技術による署名を行うと、署名検証によりアプリケーションの完全性(破壊、改ざんがないこと)を確認することができます。 注 : 破壊がないことだけであればCRCなどによるエラーチェックでも検出可能ですが、CRCは誰でも計算できるため、CRCごとプログラムを改ざんされた場合は検出できません。秘密の鍵を持つ製品製造者しか計算できない署名による検証が必要となります。 一般的な実装方法としては、ファームウェアとは別にセキュアブートローダー(SBL)という別のファームウェアを用意します。ファームウェア起動前にSBLが起動、ファームウェアの署名を検証し、署名検証に成功した場合のみファームウェアを起動します(=セキュアブート)。 セキュアアップデートの目的と課題および解決方法   セキュアアップデートの目的は「正当なファームウェアだけを安全に更新し、不正なファームウェアへの置き換えや改ざん、意図しない旧バージョンへの書き戻しを防止すること」です。 ファームウェア・アップデートは、製品の機能追加だけでなく、バグや脆弱性の修正にも利用されます。市場に出荷された製品であってもソフトウェアを更新できるようにすることで、製品製造業者とエンドユーザーの双方にメリットがあります。   エンドユーザーは、製品を買い替えることなく、新しい機能や性能改善の提供を受けられます。また、出荷後に発見されたバグや脆弱性に対する修正が提供されることで、新たに発見される脆弱性や攻撃手法などの脅威に対応しやすくなります。特に、ネットワーク(インターネットに限らず社内、建物、工場内などのネットワーク含む)に接続される製品では、セキュリティ更新が継続的に提供されるかどうかが、製品選定時の重要な判断材料になります。 さらに、重大なバグや脆弱性が見つかった場合でも、現地での製品交換や回収を待たずに修正を適用できれば、製品の停止時間や業務への影響を抑えられる可能性があります。   製品製造業者は、出荷後に発見された重大なバグや脆弱性に対して、ファームウェア・アップデートによる修正を提供できます。これにより、対象製品を回収して修理・交換するための物流費、作業費、在庫費などを削減できる可能性があります。 また、出荷後に判明した市場要求や仕様変更(製造業者自身起因のみではなくサードパーティ提供サービスとのインターフェースなど含む)に対応したり、製品の機能や互換性を改善したりすることで、製品のライフサイクルを延長し、顧客満足度や製品の信頼性を維持しやすくなります。   しかし市場製品へファームウェア・アップデートを適用する場合、主に以下のような課題を解決する必要があります。 # 課題 解決方法 1 アップデートイメージ内容読取によるIP漏洩や偽造品製造 アップデートイメージを暗号化、適用前に製品内で復号する 2 攻撃者による製品への任意ファームウェア書込 アップデートイメージの適用または起動前に暗号技術による署名検証を行うことで、アップデートイメージの完全性を保証したうえで適用または起動する 3 書換中断や失敗による製品起動不可 アップデートの再試行またはデュアルスロット方式(後述)による復帰(後述)への対応 4 脆弱性修正前の過去のバージョンのファームウェアへの巻き戻し(Rollback攻撃) バージョンチェックによる不正なRollbackの防止 注 : アップデートを無線インターフェースで行う場合を特にOTAアップデートと呼びます。 *OTA : Over The Air 一般的な実装方法としては、実行中のファームウェアを書き換えるのは複雑になるため、こちらもファームウェアとは別のファームウェアを用意します。さらに課題#2の解決方法は前述のセキュアブートと共通する処理のため、セキュアブートに使用するSBLにセキュアアップデート機能またはその一部を統合する場合も多いです。 最もシンプルな方法は、下図のようにSBL自身が新ファームウェアのアップデートイメージを受信して旧ファームウェアの配置されている領域に直接書込する方法です。 新ファームウェアを含むアップデートイメージには電子署名およびバージョン番号の付与と、ファームウェアの暗号化を施します。製品側では署名を検証してイメージの完全性を確認、バージョンが旧ファームウェアより新しいバージョンのファームウェアであることを確認し、復号と書き込みを行うことで課題#1, 2, 4に対応します。 中断時も次回起動時のセキュアブート失敗によりSBLにとどまり、アップデートイメージ受信待ちに入るという動作を行うことで課題#3に対応できます。 この方式の最大のデメリットは、ファームウェア・アップデート受信中含めて旧ファームウェアの実行が完全に停止することと、中断時は旧ファームウェアの実行に戻れないことです。 これを解決するには後述するデュアルスロット方式でのアップデートが利用可能です。 セキュリティ上考慮すべき点 1st SBLは書き換えられてはならない 「セキュアブートの目的と概要」の章で示した図はSBLとファームウェアしか示しておりませんが、実際は起動・リセット後はまずMCU内蔵の書換不可なBoot ROMが実行されます。このBoot ROMにはセキュアブートを行う機能が含まれる場合と含まれない場合があります。それぞれのNXP製品例と簡易的なブートフローを以下に示します。 Boot ROMの セキュアブート機能 有り 無し NXP製品例 MCX Nシリーズ MCX A5シリーズ  MCX A13/14/15シリーズ ブートフロー  リセット   ↓ 署名検証なしで起動 Boot ROM(1st SBLとして動作)   ↓ 署名検証後に起動 署名済みファームウェア(Flash上) リセット   ↓ 署名検証なしで起動 Boot ROM   ↓ 署名検証なしで起動 1st SBL(Flash上)   ↓ 署名検証後に起動 署名済みファームウェア(Flash上) ここではシステム内で最初に起動するSBLを特に1st SBLと呼んでいます。 セキュアブートは「SBLがファームウェアを信頼できることを確認してから起動する技術」と言えます。しかし上記の通り、1st SBLは他のSBLによる検証が行われることなく起動します。 つまり1st SBLは無条件に信頼しなければならない信頼の起点(RoT : Root of Trust)であり、何らかの脆弱性経由などで1st SBLを改ざんされても検出は不可能です。1st SBLが改ざんされセキュアブートがバイパスされると任意のファームウェアの起動が可能となるため、1st SBLは一部書換が必須となる領域(ロールバック攻撃防止のためのバージョン管理領域など)を除いて基本的に書換不可とする必要があります。 注:厳密には1st SBLを認証された経路のみでアップデート可能としてもよいですが、中断時の起動不可のリスクなど様々な問題があります。後述の2nd SBLを配置してそちらをアップデート可能にするほうが設計が容易と考えられます。 書換不可のBoot ROMにセキュアブート機能が含まれる場合: 書換不可のBoot ROMが1st SBLとしてフラッシュ上のファームウェアを検証するため、1st SBLが書き換えられることはありません。書換必要な領域はOTPや、Boot ROMのみから変更可能なフラッシュ領域を使用して実装されます。 書換不可のBoot ROMにセキュアブート機能が含まれない場合: フラッシュ上の最初にファームウェアの認証を行うSBLが1st SBLとなります。フラッシュ保護機能を活用して1st SBLを書換不可とする必要があります。 1st SBLは更新不可のため、非常に注意深い設計および検証が必要となり、あまり多くの機能を統合することは推奨されません。 NXPのSESIP/PSAセキュリティ認証取得済みのセキュアブート機能付きBoot ROM内蔵製品を活用することでこの設計検証工数を削減できます。 場合によってはSBLにより豊富な機能を搭載した柔軟なシステムの構築のため、下図のようにファームウェアとの間にさらに追加の書換可能な2nd SBLを配置することもあります。 ファームウェア起動後の改ざんは検知不可 セキュアブートはファームウェア起動前の検証のため、起動後の改ざんは検知できません。 ファームウェア動作中にファームウェアの検証を行う技術も存在しますが、最もシンプルな実装はファームウェアを書換不可とすることです。しかしファームウェア・アップデートも考慮すると常に書換不可とすることはできません。 ファームウェアを書換不可とする場合は、動的に設定可能なメモリ保護機能などを活用してファームウェア実行中は書換不可、アップデート実行中は書換可といった動的な設定が必要となります。 アップデートイメージ復号鍵の読出及び使用を防がなくてはならない ファームウェア側の何らかの脆弱性によりアップデートイメージ復号鍵が読出・使用されてしまった場合、アップデートイメージ内容の漏洩にもつながります。 SBL側では復号鍵を使用する必要があるため、SBL実行中は復号鍵を読出・使用できる必要がありますが、SBLからファームウェアへ実行を移す前にもしRAM上に復号鍵がある場合は破棄し、さらにメモリ保護機能を使用してファームウェアからの復号鍵の読出を禁止する必要があります。 MCU内に鍵隔離機能のある暗号アクセラレータなどのハードウェアがある場合は鍵の読出は不可ですが使用は可能なので、こちらもアクセス保護機能を使用して使用されないようにしたり、SBLからファームウェアへ実行を移す前に鍵を削除して鍵をインポートできないよう読出不可とする必要があります。 前述のファームウェア書換不可設定と合わせる場合と、SBL実行中とファームウェア実行中のアクセス権限は基本的に以下のようにし、さらにこの権限設定はファームウェア側からは変更不可とする必要があります。 デュアルスロット方式でのアップデート 以下のように動作中のファームウェア領域(Slot 0)とは別に新ファームウェアを一時的に格納するエリア(Slot 1)を設けたセキュアアップデートの実装方式をデュアルスロット方式と呼びます。 アップデートは以下の手順で行われます。 ファームウェアが新ファームウェアを受信 ソフトウェアリセットによりSBLに実行を移し、SBLが新ファームウェアの検証および復号を行う 有効なファームウェアを旧ファームウェアから新ファームウェアに切り替え、新ファームウェアを試験的に起動 新ファームウェアが起動成功した場合は更新を確定して完了。 新ファームウェアが起動失敗した場合のみ旧ファームウェアへ復帰 (=Rollback) 有効なファームウェアの切替方法には様々な方法がありますが、以下の図の場合はSlot0に置かれたファームウェアを有効なファームウェアとみなし、Swap方式によりSlot 0とSlot 1の内容を入れ替えて切り替えます。 この方式はアップデートイメージを少なくとも2つ格納できる容量に加え、ブート管理情報やメタデータ用の領域が必要になりますが、主に以下の利点があります。 ファームウェアを完全に停止させることなくアップデートイメージの受信が可能 この構成ではアップデートイメージの受信を他のファームウェアのタスクと並列して実行できるよう設計することが可能です。 ただし製品のフラッシュメモリが書込中の読出(RWW : Read While Write)に対応していない場合、書き込み中に同じフラッシュ領域からコードや割り込みベクターを読み出せないため、フラッシュ上のコード実行速度および応答性が大きく損なわれます。 リアルタイム性が要求されるアプリケーションなどを実行したい場合は必要に応じて以下のような対策を行う必要があります。 コードをRAMに配置 アップデートイメージ格納用のフラッシュメモリを外付け RWWをサポートしたフラッシュメモリを内蔵した製品を使用 (例 : NXP MCX Nシリーズ) SBL設計を簡略化できる 前述のとおり、1st SBLは更新不可なため、非常に注意深い設計および検証が必要となり、あまり多くの機能を統合することは推奨されません。 アップデートイメージの受信処理を、署名検証、復号、鍵管理などの処理から分離できる場合、受信機能をSBLの外部に配置することで、SBLの設計および検証範囲を抑えられます。特に、受信したイメージを未検証のまま非アクティブなスロットへ格納するだけの構成であれば、受信機能をSBLから分離しやすくなります。 例えば、無線またはイーサネット経由でアップデートを受信する方式は、複雑なプロトコルスタックを必要とするため、1st SBLに統合するよりも、ファームウェア側または2nd SBLに実装する方が適しています。 また、ファームウェア側のアップデート受信機能に問題が発生した場合の復旧手段として、1st SBL側にUARTなどによるシンプルな受信機能を残す場合もあります。 受信中断時や新ファームウェア起動不可時も旧ファームウェアでの動作継続が可能 受信動作中も旧ファームウェアが破壊されないため、中断した場合も旧ファームウェアの実行を即座に再開可能です。 また更新後も旧ファームウェアを保持しているため、万一新ファームウェア起動できなかった場合にも即座に旧ファームウェアへの復帰(Rollback)が可能です(このRollbackは、バージョンチェックを組み合わせて不正なRollback攻撃とは分けて管理する必要があります)   まとめ セキュアブート:今入っているファームウェアを安全に起動できるか確認 セキュアアップデート:新しいファームウェアへ安全に入れ替えられることを保証   関連情報 NXPのセキュリティ ~まとめページ~ (日本語ブログ) i.MX 93プロセッサ: セキュアブートの署名と認証の仕組みを解説 (日本語ブログ) i.MX 93プロセッサ: セキュアブートの実装方法 - 実践編 (日本語ブログ) i.MX 95 SPSDK によるセキュアブート (日本語ブログ) --> PQC対応セキュアブート ========================= 本投稿の「Comment」欄にコメントをいただいても、現在返信に対応しておりません。​ お手数をおかけしますが、お問い合わせの際には「NXPへの技術質問 - 問い合わせ方法 (日本語ブログ)」をご参照ください。​ (既に弊社NXP代理店、もしくはNXPとお付き合いのある方は、直接担当者へご質問いただいてもかまいません。) セキュリティ対応においてセキュアブート、セキュア/OTAアップデートという言葉がよく使用されます。これらの概要と、これらを実現するための手段であるセキュアブートローダー(SBL)の概要を主に組み込みMCUのセキュリティ対応の観点で解説します。MPUにおいても基本的な考え方は同様です。 個別の製品における対応や使用方法は別記事にて解説予定です。 (読了時間:15分) MCX Security 日本語ブログ
View full article
Smart Device Gateway – First Initialization Failure Symptoms On a clean install of Linux 6.18.37_2.1.0 i.MX Linux image, the Smart Device Gateway first-boot setup (`install.sh`) fails to prepare its Python virtual environment, and the application does not start.  Diagnosis The underlying cause is that `pip`/`uv` try to build `pycairo` and `pygobject` from source on the target, but the lean release image ships only the runtime cairo / GLib / GObject-Introspection libraries — not the matching `-dev` files (pkg-config `.pc`, headers, `.so` symlinks). The source build therefore fails. Solution # 1. Copy the archive to the board (scp, USB, etc.), e.g. to /root # scp missingfiles.tar.gz root@ :/root/ # 2. Extract over the root filesystem (preserves the tree AND symlinks: usr/lib, usr/include, ...) cd / tar xzvf /root/missingfiles.tar.gz # 3. Refresh the linker cache (optional but recommended) ldconfig 2>/dev/null || true # 4. Remove venv folder from /usr/share/smart-device-gateway/ before launching again the /usr/share/smart-device-gateway/install.sh cd /usr/share/smart-device-gateway/ rm -rf venv ./install.sh ARA240 DNPU i.MX Application Processors
View full article