My aim is to port a #pragma define_section code to something that works on the GCC compiler( I have found out that some of the #pragma directives don't work on GCC compilers. Of course, my findings may be wrong.)
#pragma define_section appheader_info ".appheader_info" far_absolute R
__declspec(appheader_info) FLASH_APPHEADER_INFO appheader_info =
This is what I need to change to something to work on GCC. Basically, I need to declare a variable/array in a specific location.
extern uint8_t dev_serial[12];
asm(".equ dev_serial, 0x1FFFF7E8");
This is what I tried as an alternate to declare an array in the specified location ie, 0x1FFFF7E8. I've tried printing the address of the array, and it is located in the given variable. But I could not define values to the array. It always shows zero.
How do I overcome this issue and is there any alternative solution to achieve my aim?
Btw I'm trying this in both the STM32 development board and S32K144 series microcontroller.
Thank you in advance.