How to put a big array in OCRAM?

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

How to put a big array in OCRAM?

ソリューションへジャンプ
1,289件の閲覧回数
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 解決策
1,284件の閲覧回数
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 返信
1,285件の閲覧回数
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 件の賞賛
返信
%3CLINGO-SUB%20id%3D%22lingo-sub-2001975%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EOCRAM%E3%81%AB%E5%A4%A7%E3%81%8D%E3%81%AA%E9%85%8D%E5%88%97%E3%82%92%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AF%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2001975%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%3CBR%20%2F%3E%E7%A7%81%E3%81%AFMIMXRT1010-EVK%E3%83%8F%E3%83%BC%E3%83%89%E3%82%A6%E3%82%A7%E3%82%A2%E3%82%92%E6%90%AD%E8%BC%89%E3%81%97%E3%81%9FMCUXpresso%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E7%A7%81%E3%81%AE%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0%E3%81%A7%E3%81%AF%E3%80%81%E5%A4%A7%E3%81%8D%E3%81%AA%E9%85%8D%E5%88%97%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%A7%E3%81%99%E3%80%82%E3%83%AA%E3%83%B3%E3%82%AB%E3%81%AF%E3%81%93%E3%82%8C%E3%82%92%20%3CSPAN%3ESRAM_DTC%3C%2FSPAN%3E%20(DTCM%E3%81%A7%E3%81%82%E3%82%8B%E3%81%A8%E4%BB%AE%E5%AE%9A%E3%81%97%E3%81%BE%E3%81%99)%E3%81%AB%E5%85%A5%E3%82%8C%E3%82%88%E3%81%86%E3%81%A8%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%E3%81%97%E3%81%8B%E3%81%97%E3%80%81%E5%8D%81%E5%88%86%E3%81%AA%E3%82%B9%E3%83%9A%E3%83%BC%E3%82%B9%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E4%B8%80%E6%96%B9%E3%80%81%20%3CSPAN%3ESRAM_OC%3C%2FSPAN%3E%20(OCRAM%E3%81%A0%E3%81%A8%E6%80%9D%E3%81%84%E3%81%BE%E3%81%99)%E3%81%AF%E5%AE%8C%E5%85%A8%E3%81%AB%E7%A9%BA%E3%81%A7%E3%81%99%E3%80%82%3CBR%20%2F%3E%E3%81%A7%E3%81%AF%E3%80%81%E5%A4%A7%E3%81%8D%E3%81%AA%E9%85%8D%E5%88%97%E3%82%92SRAM_OC%E3%81%AB%E5%85%A5%E3%82%8C%E3%82%8B%E3%82%88%E3%81%86%E3%81%AB%E3%83%AA%E3%83%B3%E3%82%AB%E3%81%AB%E6%8C%87%E7%A4%BA%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AF%3F%3C%2FP%3E%3CP%3E%E3%81%93%E3%81%AE%E7%A8%AE%E3%81%AE%E3%83%A1%E3%83%A2%E3%83%AA%E7%AE%A1%E7%90%86%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E3%83%81%E3%83%A5%E3%83%BC%E3%83%88%E3%83%AA%E3%82%A2%E3%83%AB%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E