Removing Debug Code from CodeWarrior with HC12

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Removing Debug Code from CodeWarrior with HC12

ソリューションへジャンプ
2,820件の閲覧回数
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,218件の閲覧回数
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 返答(返信)
1,219件の閲覧回数
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,218件の閲覧回数
gabrielsiqueira
Contributor I
I am running out of space in the 64k flash target.
0 件の賞賛
返信
1,218件の閲覧回数
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,218件の閲覧回数
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 件の賞賛
返信