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

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

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

648 Views
OliverTian
NXP Employee
NXP Employee

Hi, 

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

Thanks

Oliver

Labels (1)
Tags (2)
1 Reply

495 Views
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