SRAM Lower

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

SRAM Lower

5,125件の閲覧回数
AsafTv
Contributor II

How do i use SRM Lower the compile generate link error .heap will not fit in region SRAM_UPPER 

can i put heap in SRAM_LOWER?

advice

0 件の賞賛
返信
15 返答(返信)

5,098件の閲覧回数
AsafTv
Contributor II

how do i place parameters in SRAM LOWER

all the parameters placed automatically in SRAM Upper.

0 件の賞賛
返信

5,096件の閲覧回数
ErichStyger
Specialist I

See the articles I have posted. It depends on the tool chain used, but in essence you can change/modify the linker file for this.

0 件の賞賛
返信

5,115件の閲覧回数
vicentegomez
NXP TechSupport
NXP TechSupport

Can you please tell us the part number that you are using?

Thanks

 

0 件の賞賛
返信

5,107件の閲覧回数
AsafTv
Contributor II

mk64fn1m0xx12

0 件の賞賛
返信

5,106件の閲覧回数
AsafTv
Contributor II

i want the compiler use both RAMs as one RAM without ak me for that.

what is the usage those RAMs?

why upper and lower?

There is advantage for each RAMs?

0 件の賞賛
返信

5,102件の閲覧回数
ErichStyger
Specialist I

You might have a read at the following articles and the discussions there:

https://mcuoneclipse.com/2013/07/10/freertos-heap-with-segmented-kinetis-k-sram/

https://mcuoneclipse.com/2017/09/18/using-multiple-memory-regions-with-the-freertos-heap/

Basically the reason is that there are two/multiple mermory controllers. That way a better memory performance could be achieved.The important point is that you shall not combine the two memory areas, to prevent a variable/object crossing that memory boundary. Otherwise you will see a hard fault.

More details in the above articles, and as well ways how to use both memory areas.

I hope this helps,

Erich

0 件の賞賛
返信

5,053件の閲覧回数
AsafTv
Contributor II

what is the way to place const struct in fix address in flash?

the way to do it in IAR is @#pragma location=0x3000

How to do it in gcc? 

0 件の賞賛
返信

5,010件の閲覧回数
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hello,

Please take a look to these websites. I believe you can find useful information that might help you.

https://developer.arm.com/documentation/ka002853/latest

https://community.nxp.com/t5/Kinetis-Microcontrollers/Store-a-variable-in-ROM-FLASH/m-p/328690

Have a good day, Daniel.

0 件の賞賛
返信

4,987件の閲覧回数
AsafTv
Contributor II

Place Parameters at fix address in flash for example const uint8 buf[10] in address 0x3000

advice

0 件の賞賛
返信

4,986件の閲覧回数
AsafTv
Contributor II

const uint8 buf[10] __attribute__ ((section(".ARM.__at_0x3000"))) = {0xAA,0xaa......};

is not work

advice

0 件の賞賛
返信

4,966件の閲覧回数
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

I can see that you are declaring an array and storing data at the same time. Could you please try declaring the variable with the desired address first, and once it is declared, store the respective data to the variable?

Also verify that the address is not overlapped with your code in RAM.

Regards, Daniel.

0 件の賞賛
返信

4,947件の閲覧回数
AsafTv
Contributor II

i try to place const param in fix address (FLASH)

0 件の賞賛
返信

4,883件の閲覧回数
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hello,

I just tried the following example and it worked on my side. Could you please help us verify that you are trying to write in a valid memory address?

const uint8_t TEST[4] __attribute__((aligned(0x00004000))) = {'T', 'E', 'S', 'T'};

Regards, Daniel.

0 件の賞賛
返信

4,868件の閲覧回数
AsafTv
Contributor II

Hi,

Thank you for your help.

this line is not work the address i get in the map file for my const param is 0x20000

0 件の賞賛
返信

4,820件の閲覧回数
DanielRuvalcaba
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信