Position Independent Code in S32ds IDE

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Position Independent Code in S32ds IDE

1,147 次查看
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)

标签 (1)
0 项奖励
回复
4 回复数

1,122 次查看
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 项奖励
回复

1,117 次查看
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 项奖励
回复

1,110 次查看
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 项奖励
回复

1,073 次查看
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 项奖励
回复