Hello,
I want to run fromelf utility automatically once build procedure terminated (to see disassembly code).
Is it possible ?
Thanks in advance.
Pavel.
Hi Pavel-san,
Sorry for the late reply. I am on my business trip.You wrote:
> For example, if project contains multiple source files (e.g. source1.c, source2.c, source3.c), does exist some format
> of fromelf command that would generate source1.asm, source2.asm, source3.asm ?For such case, I recommend to use "--asm" option on Compiler setting rather than use of fromelf after linking. This option automatically generates disassembly file when C or C++ source file is compiled.You can add this for entire of project or each C source files.
Please see compiler documentation for detailed information of "--asm" option .
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472m/chr1359124901873.html
You can add this option by:
1) Right Click project name (or source file name) on Project Explorer and select "property".
2) Select C/C++ Build -> Settings.
3) Select "Tool Settings" tab.
4) Select "ARM C Compiler 5" -> "Miscellaneous"
5) Add --asm on Other flags.
The above image includes some Japanese menu items. Sorry for the inconvenience.
Best Regards,Toshiko
Perfect !
Thanks Toshiko.
It's exactly what I searched for.
Disassembly, produced by fromelf, that process .axf file, is quite bulky ... i.e. it contains initialization code, debug-related code ... probably some other things.
Whereas disassembles, produced by compiler with --asm option are compact and contain only information related to code in source file.
Much easy to read if one is interested only to assess the quality of produced code.
Just one question before closing the thread: is fromelf capable to process .o files, or the only input it accepts is .axf ?
Best Regards,
Pavel
Hi, Pavel-san,
You wrote:
> Just one question before closing the thread: is fromelf capable to process .o files, or the only input it accepts is .axf ?
Yes, fromelf can process .o files also.
If you hope to generate disassembly image from object file, you can use fromelf. For example:
fromelf -c main.o -o main_dasm.txt
Thus, if you wrote several fromelf command on .bat file and call the .bat file at "Command:" area for "Post-build steps" of project
properties window, you can generate disassembly file from one or more object files by fromelf.
I hope this will be your help.
Toshiko
Ok, thanks Toshiko.