when called Z7CoresInit() inside main() of Z4 cannot build the project.
getting a error : real-ld.exe: ./SDK/middleware/rsdk/platform_setup/src/PPC/gen_sdk/platform_setup_sdk_sa.o: the target (C1_CODE_START_ADDR) of a R_PPC_VLE_SDA21 relocation is in the wrong output section (*ABS*)
but when using a address location instead of 'C1_CODE_START_ADDR', not getting any error.
void Z7CoresInit(uint8_t coreId)
{
uint32_t mctl = MC_ME->MCTL;
//C1_CODE_START_ADDR = 0x1080000;
switch (coreId)
{
case 1:
// enable core 1 in all modes
MC_ME->CCTL2 = 0x00FE;
// Set Start address for core 1: Will reset and start
MC_ME->CADDR2 = ((uint32_t)&C1_CODE_START_ADDR) | 0x1;
break;
Thanks in Advance,
Solved! Go to Solution.
I solved the problem with your guidance.
this is my flags after adding disable SDA :
-c -fmessage-length=0 -fstrict-volatile-bitfields -mlra -msdata=eabi -mno-sdata
I removed last 2 command (-msdata=eabi -mno-sdata) and not getting any error. BTW, it also builded with -mno-sdata.
Thanks for your helping,
Hi burak_,
What version of S32DS are you using?
Could you possibly try to add the option to disable Small Data Sections (-mno-sdata) -> basically disable creation of SDA21 relocation as a workaround? Please note that this should have some impact on speed performance.
Regards,
Stan
I solved the problem with your guidance.
this is my flags after adding disable SDA :
-c -fmessage-length=0 -fstrict-volatile-bitfields -mlra -msdata=eabi -mno-sdata
I removed last 2 command (-msdata=eabi -mno-sdata) and not getting any error. BTW, it also builded with -mno-sdata.
Thanks for your helping,
Hi,
could you share the linker file? Is C1_CODE_START_ADDR label defined in the file?
Regards,
Lukas
Well, it's not a problem of the linker files in this case. Is it possible to share your project? I was discussing this also with S32DS team but they have no idea based on provided information.
Thanks,
Lukas
Hi,
short update only - I haven't found the root cause yet, so I asked our S32DS experts for help.
Regards,
Lukas
Anyone have any idea ? I reviewed the RSDK_Demo example, Z7 core also initialize inside the main of z4 like what i try.