First project with CodeWarrior and first 2 problems

Discussion created by Butcher on Apr 27, 2006
Latest reply on May 4, 2006 by Butcher
Hi All
I have just installed CodeWarrior 3.1 for the HCS12 (I know it's not the latest version but I don't think upgrading will solve the two (probably) simple issues).
1. When I run a demo project I can use the simulator with source level debugging but after adding my own source files the debugger says it has no debug information and the linker gives the following warning *.o has no DWARF debug info.
I assume that there is a setting somewhere to tell the compiler to include the debug info but after comparing each option in the compiler and linker settings I don't see which one it is - also there is no difference between the settings in my project and the demo project.
Any one know the answer?
2. The project which I have used was available as an IAR embedded workbench project and I had no problems getting it to compile and link (presumably without errors since it will simulate - although only as assember without source level info - see point 1 above).
The size of the original IAR project was 23k code with 350 bytes data.
The size of the CodeWarrior generated code (I played a bit with the optimisation sliders but could get it noticably smaller) is 32k with 2k data (rounded), whereas the ANSI library is taking up 7k [7846 bytes to be exact] code and 2k [2012 bytes] data.
The project shouldn't actually use any library functions apart from low level stuff such as MUL and DIV etc. The reason is that the project uses its own library functions eg. Xmalloc() rather than malloc().
I expect the CodeWarrior code efficiency to be equivalent to the IAR efficiency and so I conclude that almost 7k of code is being unnecessarily linked from the ANSI library.
Can anyone suggest why this may be the case or how it can be stopped? I didn't take the risk of removing the library from the project because it probably will cause other problems - there is a warning that such actions are not reversibly and as a first time user I didn't take any risks...
Thanks for any help. It will be appreciated.
Best regards
Mark Butcher