How to put a big array in OCRAM?

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

How to put a big array in OCRAM?

ソリューションへジャンプ
826件の閲覧回数
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 解決策
821件の閲覧回数
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 返信
822件の閲覧回数
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 件の賞賛
返信