S32DS FORCEFILES and FORCEACTIVE

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

S32DS FORCEFILES and FORCEACTIVE

跳至解决方案
1,028 次查看
yanronglu
Contributor II

How can I achieve the same functionality as CW FORCEFILES in S32DS.

CW lcf file example:

/* This will ensure the rchw and reset vector are not stripped by the linker */
FORCEACTIVE { "bam_rchw" "bam_resetvector" }
FORCEFILES {main.o}

标签 (1)
标记 (2)
1 解答
846 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

I'm not familiar with code warrior linker script. It looks like that on GNU linker you can use just KEEP for particular section: 

.rchw :
{
KEEP(*(.rchw))
} > flash_rchw

.cpu0_reset_vector :
{
KEEP(*(.cpu0_reset_vector))
} > cpu0_reset_vec

 

 

You can find more details in GNU linker documentation https://www.eecs.umich.edu/courses/eecs373/readings/Linker.pdf 

Jiri

在原帖中查看解决方案

1 回复
847 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

I'm not familiar with code warrior linker script. It looks like that on GNU linker you can use just KEEP for particular section: 

.rchw :
{
KEEP(*(.rchw))
} > flash_rchw

.cpu0_reset_vector :
{
KEEP(*(.cpu0_reset_vector))
} > cpu0_reset_vec

 

 

You can find more details in GNU linker documentation https://www.eecs.umich.edu/courses/eecs373/readings/Linker.pdf 

Jiri