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,210件の閲覧回数
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 返信

1,057件の閲覧回数
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