DATA_SEG initializing data to zeros.

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

DATA_SEG initializing data to zeros.

Jump to solution
1,483 Views
MPeppard
Contributor I
Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
760 Views
CrasyCat
Specialist III

Hello

 

What is the question here exactly?

- Which CPU are you targeting (HC08, HC12, Coldfire, ..)
- Which version of CodeWarrior are you using?
   To retrieve that info:
    - Start CodeWarrior
    - Select Help -> About Freescale CodeWarrior
    - Click on "Install Products"
    - CodeWarrior version used is displayed on top in the Installed Products dialog. 

 

CrasyCat

View solution in original post

0 Kudos
Reply
3 Replies
760 Views
Lundin
Senior Contributor IV
"DATA_SEG initializing data to zeros."

If you placed the variables at file scope (global), they will indeed be set to zero in the C/C++ language, as enforced by the standard.

If you don't want this, you will have to remove initialization of static varibles at project creation. The startup file will then not copy any init values into static/global variables. Note that with this setting you must set all values in runtime and you can't import code relying on static initalization into your project.
0 Kudos
Reply
760 Views
CrasyCat
Specialist III

Hello

 

If you are looking for a way to define global variables, which are not initialized at startup, please look at FAQ-27438 on www.freescale.com.

 

Using the NO_INIT attribute instead on READ_WRITE in the .prm file should help you to achieve that.

 

CrasyCat

0 Kudos
Reply
761 Views
CrasyCat
Specialist III

Hello

 

What is the question here exactly?

- Which CPU are you targeting (HC08, HC12, Coldfire, ..)
- Which version of CodeWarrior are you using?
   To retrieve that info:
    - Start CodeWarrior
    - Select Help -> About Freescale CodeWarrior
    - Click on "Install Products"
    - CodeWarrior version used is displayed on top in the Installed Products dialog. 

 

CrasyCat

0 Kudos
Reply