Hello
When you are using CodeWarrior for HC12, the default startup code we are delivering is initializing the global variable to their initialization value automatically.
Just make sure:
1 - You have created your project using the wizard (or a stationery)
2- You did select "ANSI C startup" in the wizard when you have created the project.
If you are not sure about item 2 above, just check the Compiler for HC12 commend line:
- Start the IDE
- Open the project
- Open the target settings dialog (press ALT+F7)
- Switch to "Compiler for HC12" panel.
If you see the option -D__ONLY_INIT_SP this is wrong.
Just remove that option from the command line and you should be fine.
And make sure you are using the startup code we are delivering (module is called start12.c).
I hope this helps.
CrasyCat