Pierre SCHMIDT

Initialized variables are put in sbss2 section

Discussion created by Pierre SCHMIDT on May 31, 2013
Latest reply on Jul 1, 2013 by stanish

Hello, why are variables declared as:

 

CONST(uint8, SOAD_CONST) SoAd_VSockMultPdus[] =

{

  0x00u,

  0x00u,

  0x00u

};

 

put in sbss2 section?

 

As soon as other values than 0 are used, it is OK: SoAd_VSockMultPdus goes into sdata2.

 

sbss2 is for uninitialized data so there is no reason for CodeWarrior to use this sections, because 00 must be initialized.

 

This causes a bug during execution because SoAd_VSockMultPdus is not 00 (no initialization has been done).

 

So what should be done to have SoAd_VSockMultPdus in sdata2??

 

Thanks.

 

Outcomes