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
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
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.
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