Removing Debug Code from CodeWarrior with HC12

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

Removing Debug Code from CodeWarrior with HC12

跳至解决方案
3,601 次查看
gabrielsiqueira
Contributor I
I am trying to remove all debug code from my build. I am using CodeWarrior 5.7.0 with MC9S12E64.
When I set the option "Output/ don't generate debug information" in the compiler options.
The linker gives me the message "File star12.c.o should contain DWARF information".

I am also setting the option "Output/ ELF/DWARF:strip simbolic information", and there is no problem with it but I am not sure if this is enought  to remove all debug code.

I am having space problems and I am trying to remove all the unused code that I can.
I'll apreciate any suggestion.

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,999 次查看
CompilerGuru
NXP Employee
NXP Employee
Just to be sure, your space problem is on the HD on your PC, and not that you run out of space in the target app on the N64?

I would not disable the debug info generation because of disk space, I don't think that this is worth the effort. The only reason I see for not generating DWARF debug information is to distribute a static library. Anyway, as you noted, the startup code does require the debug information during the link stage.

If you are not using C++, you can delete the lib\hc12c\lib\cpp* files in the library, for me the take 80 MB,
and I hardly ever use them. lib\hc12c\hc12_lib.mcp can be used to rebuild them.
Also if you are really low on disk, the _Data folders on currently not used projects can be deleted, their content is recreated when you build the next time the corresponding project.

Daniel

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,000 次查看
CompilerGuru
NXP Employee
NXP Employee
Just to be sure, your space problem is on the HD on your PC, and not that you run out of space in the target app on the N64?

I would not disable the debug info generation because of disk space, I don't think that this is worth the effort. The only reason I see for not generating DWARF debug information is to distribute a static library. Anyway, as you noted, the startup code does require the debug information during the link stage.

If you are not using C++, you can delete the lib\hc12c\lib\cpp* files in the library, for me the take 80 MB,
and I hardly ever use them. lib\hc12c\hc12_lib.mcp can be used to rebuild them.
Also if you are really low on disk, the _Data folders on currently not used projects can be deleted, their content is recreated when you build the next time the corresponding project.

Daniel
0 项奖励
回复
1,999 次查看
gabrielsiqueira
Contributor I
I am running out of space in the 64k flash target.
0 项奖励
回复
1,999 次查看
CompilerGuru
NXP Employee
NXP Employee
Debug information is not put into the flash, so that option wont help you then.

The first thing I would look at is the map file, check all the larger objects if they are reasonable, if they
can be optimized, if constants are in flash, if all the 64k are used completely.
Daniel

1,999 次查看
bigmac
Specialist III
Hello,
 
Are you using floating point variables & libraries?  You will save considerable code space if these can be avoided.  The use of library functions, such as printf(), sprintf() also require considerable code size, particularly if they also have to accommodate floating point parameters.
 
Regards,
Mac
 


Message Edited by bigmac on 2008-09-30 04:48 PM
0 项奖励
回复