Initilization error for Z7a core

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

Initilization error for Z7a core

Jump to solution
5,631 Views
burak_
Contributor II

 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,

Labels (1)
0 Kudos
Reply
1 Solution
5,454 Views
burak_
Contributor II

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,

 

 

View solution in original post

0 Kudos
Reply
9 Replies
391 Views
krishnaduriseti
Contributor I

Hello All,

I am also having same error, But I am building for MPC5748  MCU and z4 core, So I am wondering if is there any way to compile project with option -msdata=eabi without disabling small data sections. Any suggestions ?

Thank you in Advance.

Regards,

Krishna Duriseti.

0 Kudos
Reply
5,458 Views
stanish
NXP Employee
NXP Employee

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.

 

stanish_0-1629822990941.png

Regards,

Stan

0 Kudos
Reply
5,455 Views
burak_
Contributor II

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,

 

 

0 Kudos
Reply
5,563 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

could you share the linker file? Is C1_CODE_START_ADDR label defined in the file?

Regards,

Lukas

0 Kudos
Reply
5,559 Views
burak_
Contributor II

Actually, C1_CODE_START_ADDR defined in the SDK linker files. I added project and SDK linker files.

0 Kudos
Reply
5,542 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply
5,538 Views
burak_
Contributor II

uploaded a example project that getting same error.

Thanks,

0 Kudos
Reply
5,475 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

short update only - I haven't found the root cause yet, so I asked our S32DS experts for help.

Regards,

Lukas

0 Kudos
Reply
5,586 Views
burak_
Contributor II

Anyone have any idea ? I reviewed the RSDK_Demo example, Z7 core also initialize inside the main of z4 like what i try.

0 Kudos
Reply