Hello,
I want to run fromelf utility automatically once build procedure terminated (to see disassembly code).
Is it possible ?
Thanks in advance.
Pavel.
Hello, Pavel-san,
Yes, you can can run fromelf automatically after build operation finished.
1) Right Click project name on Project Explorer and select "property".2) Select C/C++ Build -> Settings.
3) Select "Build Steps" tab.4) At "Command:" area for "Post-build steps", write fromelf command with any parameters which you hope to use.
Best Regards,Toshiko
Hello Toshiko,
Thanks for feedback. Sure I've tried this at the beginning.
Unfortunately doesn't work.
I used pipeline in "Build Steps" and provided explicit name of obj. file and also the name of output file.
After building no file is generated.
Here is screenshot of "Build Steps" option.
Regards
Hi! Pavel-san,
You dont need to use "cmd" to call fromelf.You simply call fromelf directly "Command" area. For example:  fromelf -c ${workspace_loc}\hello\Debug\hello.axf -o ${workspace_loc}\hello\Debug\hello.asmPlease refer about options for fromelf at:http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0477m/pge1362128884798.html
http://http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0477m/pge1362128884798.html
Hi Toshiko.
It works. Thanks !
It works perfectly for .axf file, whereas for .o it doesn't.
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 ?
Best Regards
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.
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.