2318693_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2318693_en-US

2318693_en-US

OCRAM/ITCM/DTCM allocation on Teensy4.1/Zephyr

Hoping someone out there can shed some light on the default OCRAM/DTCM/ITCM configuration for a Teensy4.1 board (MIMXRT1062) running Zephyr 4.3.0 and how to change it.

From the IMXRT1060 technical reference manual, OCRAM, DTCM, and ITCM are all shown to have a size of 512kB.

My understanding (and assumption) is that OCRAM (aka FlexRAM) is allocated to DTCM and ITCM as needed and the total of that allocation would be 512kB in size.

In the Zephyr device tree,  OCRAM takes its size from: zephyr/dts/arm/nxp/nxp_rt1060.dtsi as 256kB.

The DTCM and ITCM regions take their size from zephyr/dts/arm/nxp/nxp_rt10xx.dtsi as 128kB.

The resulting memory map for a Zephyr build for a Teensy4.1 then looks something like:

           FLASH:      144676 B         8 MB      1.72%
             RAM:       68512 B       256 KB     26.14%
            ITCM:          0 GB       128 KB      0.00%
            DTCM:          0 GB       128 KB      0.00%
           OCRAM:          0 GB       256 KB      0.00%
          OCRAM2:          0 GB       512 KB      0.00%
        IDT_LIST:          0 GB        32 KB      0.00%

 

Hoping someone familiar with Zephyr and the Teensy could indicate how to safely increase the OCRAM/ITCM/DTCM regions to take advantage of the full 512kB as seeming available there as indicated by the technical reference manual (and echoed by the Teensy website).

I'm posting here b/c most of the Zephyr support for Teensy is build atop of the NXP SDK for the RT1062.


Thanks in advance!

--George


i.MXRT 106xRe: OCRAM/ITCM/DTCM allocation on Teensy4.1/Zephyr

Hi

From your memory map output it is not clear what RAM is used (it states that RAM is occupied with a certain amount of data but not that the physical RAM areas are used). Since the TEENSY boards don't have SDRAM it can't be that type and so I don't know what it refers to.

Take a look at chapter 11 of https://www.utasker.com/docs/iMX/i.MX_RT_1060_uTasker.pdf
which explains the default FlexRAM layout and how it can be modified to suit the application's requirements (dynamically at run time).

Also, take a look at the very first lines in your reset vector code since FlexRAM settings are typically (almost exclusively in an application) made there and it would be obvious if it is doing anything.

There are also boot loaders available for the Teensy boards:
https://www.utasker.com/iMX/Teensy_4_0.html
https://www.utasker.com/iMX/Teensy_4_1.html
which allow application (irrespective of their code or OS) to be executed in ITC whereby the OCR/DTC/ITC configurations are dynamically set to suit the application.
For code that runs in XiP mode the loader can also pre-configure the FlexRAM layout based on the application's header setting which also gives full control (but requires you to set the linker script to suit the layout you actually want).

There are some further guides and videos at https://www.utasker.com/iMX/developers.html

Regards

Mark



Re: OCRAM/ITCM/DTCM allocation on Teensy4.1/Zephyr

Hi EdwinHz,

Thanks - yes I had found that application note before when I searched for other posts on this topic.

While it's true that anything implemented in the NXP SDK and Zephyr layers has to flow from that document, I was hoping that somebody in the user community who is using the Teensy4.1 with Zephyr could share their wisdom as to how AN12077 was applied and how the current setting may be modified.  Would be greatly appreciated!!

Thanks in advance!
--George

Re: OCRAM/ITCM/DTCM allocation on Teensy4.1/Zephyr

Hi @zeebrog,

The following application note is not Zephyr based or uses a Teensy4.1 board as an example, but it does describe how to reconfigure the FlexRAM in order to achieve specific OCRAM/ITCM/DTCM regions: AN12077: Using the i.MX RT FlexRAM – Application Note. Regardless of what board or OS you are using, the inner workings of the FlexRAM, and how to set them up will be the same.

BR,
Edwin.

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎02-26-2026 03:28 AM
更新者: