S32K312: unable to use int_sram_shareable SRAM section for storing my data

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

S32K312: unable to use int_sram_shareable SRAM section for storing my data

335 Views
tecprasant
Contributor III

Hi,

I am using S32K312 IC (Single Core) in my custom hardware. I have created the project using RTD SDK. 

I see that there are the following RAMs (big partitions) available for us (as per the generated linker file):

int_dtcm
int_sram (primary)
int_sram_no_cacheable
int_sram_shareable

 

As I exceeded the RAM usage (int_sram), I was able to transfer some data to the int_sram_no_cacheable partition using the __attribute__((section(".int_sram_no_cacheable"))) gcc keyword.

I want to place some variables in the int_sram_shareable & int_dtcm sections. The same attribute command is having NO impact while using int_dtcm or int_sram_shareable.

 

To summarize:
1) __attribute__((section(".int_sram_no_cacheable"))) Working 
2) __attribute__((section(".int_dtcm"))) NOT Working
3) __attribute__((section(".int_sram_shareable"))) NOT Working

 

NOTE: I am using section attribute with my static variables.


Any inputs on what I may be doing wrong ?

 

Thanks in advance,

 

Regards, Prasant

#S32K312 

Tags (2)
0 Kudos
Reply
3 Replies

316 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @tecprasant,

This should work:

#pragma GCC section bss ".mcal_shared_bss"
volatile uint32_t data_in_shareable_mcal;
#pragma GCC section bss

#pragma GCC section bss ".mcal_bss_no_cacheable"
volatile uint32_t data_in_no_cache_mcal;
#pragma GCC section bss

#pragma GCC section bss ".dtcm_bss"
volatile uint32_t data_in_dtcm_mcal;
#pragma GCC section bss

 

Have a look at the .map file,

 

Regards,

Daniel

0 Kudos
Reply

291 Views
tecprasant
Contributor III

Thanks @danielmartynek ,

Your suggestion works. This will help me a lot.

PS: ".dtcm_bss" does not seem to work. I will check the linker file.

0 Kudos
Reply

273 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @tecprasant,

Please elaborate on what exactly does not work.

What do you see in the .map file?

Which RTD revision do you use?

 

Thank you,

Daniel

0 Kudos
Reply