Can't place data in BOARD_SDRAM (RT1176)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't place data in BOARD_SDRAM (RT1176)

Jump to solution
760 Views
D_TTSA
Contributor V

Good day @jingpan @kerryzhou 

I would like to place data in the BOARD_SDRAM (external RAM) block on Embedded Artist's uCOM for the RT1176 (for the use of the M7 core).

I can successfully use the cr_section_macros.h macro's to place variables in the SRAM_OC_2 block, but using similar macro's for the BOARD_SDRAM block does not work.

My memory configuration looks like this (standard RT1176 config):

D_Tram23_1-1653574571017.png

Before any changes to my project, the linker gives the following output for these memory regions:

D_Tram23_3-1653575619830.png

If I add the following line of code: 

D_Tram23_2-1653575504425.png

then the memory allocation for SRAM_OC2 increases, as it should:

D_Tram23_4-1653575747692.png

If I change the above testRegion[] allocation to be in BOARD_SDRAM block:

D_Tram23_5-1653575881772.png

then the memory allocation for BOARD_SDRAM does not increase:

D_Tram23_6-1653575925312.png

I also tried allocating testRegion[] to SRAM_OC1 like this:

D_Tram23_8-1653576024003.png

which also didn't affect the linker output:

D_Tram23_7-1653576003061.png

Why does this work for some regions and not for others?

Is there a setting that I should change to allocate variables to the BOARD_SDRAM region?

 

Kind regards

D_Tram23

0 Kudos
1 Solution
737 Views
D_TTSA
Contributor V

Hi @jingpan 

No, that is to put the application in the RAM, not variables/data.

The problem was that I was not using testRegion[ ] in my code, so it was optimised out and not allocated by the linker.

Since I have other variables that are allocated to SRAM_OC2, so it showed up there.

 

Frustrated regards,

D_Tram23

View solution in original post

0 Kudos
2 Replies
743 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @D_TTSA ,

Please link application to RAM.

jingpan_0-1653618459771.png

 

Regards,

Jing

0 Kudos
738 Views
D_TTSA
Contributor V

Hi @jingpan 

No, that is to put the application in the RAM, not variables/data.

The problem was that I was not using testRegion[ ] in my code, so it was optimised out and not allocated by the linker.

Since I have other variables that are allocated to SRAM_OC2, so it showed up there.

 

Frustrated regards,

D_Tram23

0 Kudos