Position Independent Code in S32ds IDE

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

Position Independent Code in S32ds IDE

1,146 Views
Billi2110
Contributor II

Hi, 

Now I am making the sample app for S32k144 and choosing the option Position Independent Code as below the picture

Billi2110_0-1739873830093.png

I don't know when I chose it, the app applied PIC or still not and need to choose another option.

and why the *.bin file when I choose PIC has a big mass (~524KB)

Labels (1)
0 Kudos
Reply
4 Replies

1,121 Views
IsaulO
NXP Employee
NXP Employee

Hi @Billi2110 ,

For a better understanding, you can refer the following example on how to create Position Independent Code using the S32DS ARM 2.2 tools: EXAMPLE S32K144 Position Independent Code - NXP Community

Additionally, for detailed information you can consult the following blog: Position-Independent Code with GCC for ARM Cortex-M | MCU on Eclipse

BR,
IsaulO.

0 Kudos
Reply

1,116 Views
Billi2110
Contributor II

Hi @IsaulO , I checked this example PIC in your Ref Link

But when I built it, I had some error

Billi2110_0-1739934340335.png

 

0 Kudos
Reply

1,109 Views
Billi2110
Contributor II

Hi @IsaulO 

I fixed this error by using S32k144_64_ram.ld when I built the project. But it still does not define the RAM_START and RAM_END because it is defined in S32k144_64_flash.ld

Billi2110_0-1739938131697.png

So how to fix this error?

please help me solve it

0 Kudos
Reply

1,072 Views
IsaulO
NXP Employee
NXP Employee

Hi @Billi2110,

The project is already set up you just need to change the path for the restore gbd command to your project.bin location (see picExample_Debug_RAM_PNE_fpic Debug configuration) and start a debug session.

Untitled picture.png

 Also, if you just want to build the project, you can try selecting the Debug_RAM option.

Untitled picture1.png

BR,
IsaulO.

0 Kudos
Reply