i would like to know how linker commands can be used in source file to push the multiple structure defines into a part of code memory. can some body share with examples
steps i tried.
step 1: created a section in linker file ".parambuf"
step2: in source file declared a structure
typedef struct{ param_t param[256]; \
} t_param_block_t;
step 3: in header files using attributes commands to push into parambuf section.
extern t_param_block_t t_param_block0 __attribute__ ((section (".parambuf")));
step 4: hereby i defined a structure by filling its values.
t_param_block_t t_param_block0 __attribute__((section(".parambuf"))) =
{
{
1,20,30,40,50,60,70,80,90,a0,b0,c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
}
};
but this doesn't work, according to my tricore infineon experience with linker, #pragma commands must be used before and after the defines, but for stm32 anybody knows how can be used?
