2139321_ja-JP

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

2139321_ja-JP

2139321_ja-JP

NXP OTA の例におけるキャッシュ不可能な領域

皆様へ

ここで示されている OTA メカニズムの例を使用しようとしています。

https://github.com/nxp-mcuxpresso/mcuxsdk-examples/tree/release/25.09.00-pvw1/_boards/evkbmimxrt1170...

リンカー スクリプトには次のセクションがあります。

/* Specify the memory areas */
MEMORY
{
  m_flash_config        (RX)  : ORIGIN = 0x30000400, LENGTH = 0x00000C00
  m_ivt                 (RX)  : ORIGIN = 0x30001000, LENGTH = 0x00001000
  m_interrupts          (RX)  : ORIGIN = 0x30002000, LENGTH = 0x00000400
  m_text                (RX)  : ORIGIN = 0x30002400, LENGTH = TEXT_SIZE
  m_qacode              (RX)  : ORIGIN = 0x00000000, LENGTH = 0x00040000
  m_data                (RW)  : ORIGIN = 0x20240000, LENGTH = 0x00040000
  m_data2               (RW)  : ORIGIN = 0x202C0000 + RPMSG_SHMEM_SIZE, LENGTH = 0x00080000 - RPMSG_SHMEM_SIZE
  rpmsg_sh_mem          (RW)  : ORIGIN = 0x202C0000, LENGTH = RPMSG_SHMEM_SIZE
  m_core1_image         (RX)  : ORIGIN = CORE1IMAGE_START, LENGTH = 0x00040000
}

Then later there is:

  __NDATA_ROM = __ram_function_flash_start + (__ram_function_end__ - __ram_function_start__);
  .ncache.init : AT(__NDATA_ROM)
  {
    __noncachedata_start__ = .;   /* create a global symbol at ncache data start */
    *(NonCacheable.init)
    . = ALIGN(4);
    __noncachedata_init_end__ = .;   /* create a global symbol at initialized ncache data end */
  } > m_data2
  . = __noncachedata_init_end__;
  .ncache :
  {
    *(NonCacheable)
    . = ALIGN(4);
    __noncachedata_end__ = .;     /* define a global symbol at ncache data end */
  } > m_data2

これは、OCRAM2 の残りの部分 (202C_0000 から 2033_FFFF - 512KB) として追加のキャッシュ不可能なセクションを定義します。

ただし、Board_ConfigMPU は次のことを行います。

https://github.com/nxp-mcuxpresso/mcuxsdk-examples/blob/release/25.09.00-pvw1/_boards/evkbmimxrt1170...

#if defined(CACHE_MODE_WRITE_THROUGH) && CACHE_MODE_WRITE_THROUGH
    /* Region 6 setting: Memory with Normal type, not shareable, write through */
    MPU->RBAR = ARM_MPU_RBAR(6, 0x20200000U);
    MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 0, 0, ARM_MPU_REGION_SIZE_1MB);

    /* Region 7 setting: Memory with Normal type, not shareable, write trough */
    MPU->RBAR = ARM_MPU_RBAR(7, 0x20300000U);
    MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 0, 0, ARM_MPU_REGION_SIZE_512KB);
#else
    /* Region 6 setting: Memory with Normal type, not shareable, outer/inner write back */
    MPU->RBAR = ARM_MPU_RBAR(6, 0x20200000U);
    MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_1MB);

    /* Region 7 setting: Memory with Normal type, not shareable, outer/inner write back */
    MPU->RBAR = ARM_MPU_RBAR(7, 0x20300000U);
    MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_512KB);
#endif


この RAM セクターをキャッシュ可能としてマークします。

サンプル コードが実際に m_data2 のリマインダーをキャッシュ不可としてマークしているかどうか教えていただけますか?

または、言い換えると、これをどのように実現できるか誰か教えていただけますか。私たちのアプリケーションでは、この RAM セクションの残りをキャッシュ不可として使用したいと考えています。

ご支援ありがとうございます

Re: Non-Cachable region in NXP OTA example

こんにちは@jslota13245さん

NXP MIMXRTシリーズにご興味をお持ちいただきありがとうございます。

OCRAM はキャッシュ可能な領域です。アプリケーションシナリオについては、このガイドを参照してください: https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs-Knowledge/Using-NonCached-Memory-on-i-MXRT/ta-p/...

よろしくお願いします、
ギャビン

Tags (1)
No ratings
Version history
Last update:
‎11-20-2025 04:32 PM
Updated by: