zephyr project - how to configure project use internal RAM instead of external?

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

zephyr project - how to configure project use internal RAM instead of external?

3,462 Views
ping1
Contributor V

Hi, all

Just started to learn zephyr project with VS code, import a few examples like hello_world and button, they work fine , but I noticed they all use external RAM like below:

[build] Memory region         Used Size  Region Size  %age Used
[build]            FLASH:       24972 B         4 MB      0.60%
[build]              RAM:          4 KB        32 MB      0.01%
[build]             ITCM:          0 GB        64 KB      0.00%
[build]             DTCM:          0 GB        64 KB      0.00%
[build]            OCRAM:          0 GB       128 KB      0.00%
[build]         IDT_LIST:          0 GB         2 KB      0.00%
 
I am thinking of moving the project into our custom boards which has no external RAM, how can I configure it to use different RAM in the project? also need to reconfigure the FlexRAM size like I did for existing project, but not sure how to do it. Please advise.
 
Thank you.
Ping
 
0 Kudos
Reply
5 Replies

3,429 Views
ping1
Contributor V

Hello, Diego

Thanks for reply. 

Yes, I am using RT1024. I would like to move whole application into Zephyr, so it has RTOS, currently it is bare metal. I reconfigured FlexRAM according to the application note and it works fine. And in production already.

Just thinking of the way forward and new to Zephyr RTOS, is there an easy way to migrate?

Regards!

Ping

0 Kudos
Reply

3,345 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @ping1 

I am glad to know that our application note helped you! 

Regarding Zephyr, drivers change  a bit   and you are now operating with a device tree. There is a training made by my colleague Dereck that may help you Application Portability Made Easy With Zephyr™ OS and NXP

Regards, 

Diego 

0 Kudos
Reply

3,331 Views
ping1
Contributor V

Hi, Diego

It helped me when I develop bare metal application use MCUXpress, but it seems not apply to Zephyr project. I went thought the video too, it is a good one, and covers basic things well, But I am still nor sure how to reconfigure RAM after that, hence asking for help here.

Thank you!

Ping

0 Kudos
Reply

3,244 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @ping1 

My apologies for not getting back to you sooner.

Considering that you have development with Zephyr RTOs, I have to mention that we encourage Zephyr RTOs users to use the Zephyr GitHub. As stated in https://community.nxp.com/t5/Zephyr-Project/bd-p/Zephyr-Project

In the Zephyr github, there is a thread  that I hope is still of interest or help Run entire application from RAM #36800 This post details how to execute from internal SRAM, in this case, ITCM, first by changing the CODE_LOCATION to this memory

 

All the best, 

Diego

0 Kudos
Reply

3,438 Views
diego_charles
NXP TechSupport
NXP TechSupport

Hi @ping1 

I hope that  you are doing well! 

It looks like you are using an i.MX RT10xx, could you please specify?

Would you like to move whole application  or some secitons of code or variables?

If you need to reconfigure FlexRAM you can check this application note: AN12077: Using the i.MX RT FlexRAM – Application Note This app note goes into details of possible re-arragements of the flexRAM. Please keep in mind that for development and evaluation purposes you will need to modify some fleRAM registers to change flexRAM arragement , but for production, is advisable to burn fuses.

Best regards,

Diego

0 Kudos
Reply