DATA_SEG initializing data to zeros.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

DATA_SEG initializing data to zeros.

跳至解决方案
1,411 次查看
MPeppard
Contributor I
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
688 次查看
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 项奖励
回复
3 回复数
688 次查看
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 项奖励
回复
688 次查看
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 项奖励
回复
689 次查看
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 项奖励
回复