恩智浦 OTA 示例中的不可缓存区域 亲爱的各位, 我试图使用这里给出的 OTA 机制示例: https://github.com/nxp-mcuxpresso/mcuxsdk-examples/tree/release/25.09.00-pvw1/_boards/evkbmimxrt1170/ota_examples/mcuboot_opensource 链接器脚本中有一节: /* 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/board.c #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 将此内存扇区标记为可缓存。 有谁能告诉我,示例代码是否真的将 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/1183369
致以最诚挚的问候, Gavin
記事全体を表示