How to close the optimize for const which is not used in project in S32DS for ARM

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

How to close the optimize for const which is not used in project in S32DS for ARM

1,135 次查看
OliverTian
NXP Employee
NXP Employee

Hi, 

    For const which is not used in S32K144 project,  how to remain them after compiled?

Thanks

Oliver

标签 (1)
标记 (2)
1 回复

982 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Oliver,

use the 'KEEP' feature.

In *.c:

const unsigned int myconst = 0xAABB;

In linker file:

KEEP (*(.rodata.myconst))

Regards,

Lukas