How to put a big array in OCRAM?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to put a big array in OCRAM?

跳至解决方案
807 次查看
simmania
Contributor IV

Hi,
I'm usingMCUXpresso with  MIMXRT1010-EVK hardware.

In my program I need a big array. The linker tries to put this in the SRAM_DTC (which I assume is the DTCM). But there is not enough room. While the SRAM_OC (which I assume is the OCRAM) is completely empty.
So, how to instruct the linker to put my big array in SRAM_OC?

Is there some tutorial about this kind of memory management stuff?

0 项奖励
回复
1 解答
802 次查看
simmania
Contributor IV

Ok, I found it out.
So here is how I did it, in case other people may want to know:

In the Properties of the project, under C/C++ Build -> MCU settings, I could see that the OCRAM section has the alias 'RAM3'. (here you also can change the sizes of the RAM sections)

Then in the code you can do:

#include <cr_section_macros.h>

__DATA(RAM3) uint16_t buffer[BUFSIZE];

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
803 次查看
simmania
Contributor IV

Ok, I found it out.
So here is how I did it, in case other people may want to know:

In the Properties of the project, under C/C++ Build -> MCU settings, I could see that the OCRAM section has the alias 'RAM3'. (here you also can change the sizes of the RAM sections)

Then in the code you can do:

#include <cr_section_macros.h>

__DATA(RAM3) uint16_t buffer[BUFSIZE];

 

0 项奖励
回复