Compiler Assembly listing

16 Apr 2012

It would be nice to be able to see the ASM code for our apps in the compiler. I'm often wondering if the compiler has generated the most optimal code from my C code.

Cheers :)

17 Apr 2012

I would love to have access to the ELF output file from the linker before it is converted to a binary file. This would allow dumping to look at the disassembler among other things. Of course I have other reasons for wanting access to the ELF with intact symbols :)

18 Jul 2013

I'll add that this would be very helpful in my computer organization an assembly language class. Compiler output in assembly is a great way for students to see how simple examples in C get turned into machine instructions. For mixed C and assembler programming, it helps them understand the interface. Studying generated code and annotating it to explain what each instruction is doing is also a way of learning proper usage in assembly language without starting from a blank file. At least with the Arduino Due, it is possible to rerun the last step of the build (with a few small edits) from the console to generate a listing. It seems like it would be possible to add a Compile with Assembly Listing option to the mbed Compile menu, and have the file(s) appear in a folder in the repository (e.g., Assembly_Out/main.s).

20 Jun 2016

Ist there any update or progress regarding this question? Is it possible to get the compiled assembly code?

The only way I figured out to do so is to export the project sources and use my local toolchain to create the preprocess and compilation output.