How to use SDRAM with separate heap?

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

How to use SDRAM with separate heap?

917件の閲覧回数
jackking
Senior Contributor I

What is the best way to use the IMXRT SDRAM for dynamic memory allocation?  I want to dynamically place certain object types into SDRAM, while also keeping a heap on DTCM. 

So far I have looked at using a custom malloc for the SDRAM heap (umm_malloc), but it seems like this is an overly complicated solution.  It requires custom allocators to use std containers, etc.  Using a linked list allocator for 32 bit addresses is also quite wasteful.

I would think this is a fairly common issue with multiple RAM types, but I haven’t found very many useful resources on the topic, so I must be missing something.

Hopefully someone here has some ideas.

0 件の賞賛
返信
1 返信

850件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Jack King,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
The embedded development IDE usually doesn't support multiple heap area. So I'd like to suggest you use the SDRAM as the main RAM, meanwhile, assign a small section for heap usage inside it.
Then, it's easy to use the C stand library functions, such as malloc(), free(), etc,  to use the heap area.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信