AnsweredAssumed Answered

how to keep/initialize unused variables/constants

Question asked by adam rakam on Aug 30, 2017
Latest reply on Aug 31, 2017 by ZhangJennie

Hi,

 

I want to keep unused constant in my code but I get strange initial value.

 

 

I use 3 variations but none of them initialize argument on left side by value 21 :

static              uint32_t prm_sw_version                __attribute__((used)) = 21;

static volatile  uint32_t prm_sw_version_volatile   __attribute__((used)) = 21;

static const    uint32_t prm_sw_version_const     __attribute__((used)) = 21;

 

Why are left side arguments not initialized ?

 

Thank you !

Outcomes