Page 1 of 1

How to obtain documented assembly listing ?

Posted: Thu Dec 06, 2018 12:24 pm
by PaulVdBergh
Hi,

I wrote a lot of C++ classes using traditional C++. Now I'm studyng C++11, C++14 and so on. I would like to see if my efforts results in better machine code.

In AVR GCC one could generate an .lls file, a conbination of C++ statements with the corresponding assembler instructions.

Is this also possible with ESP32/ESP-IDF, and how can I do this?

Thanks,

Paul

Re: How to obtain documented assembly listing ?

Posted: Thu Dec 06, 2018 2:47 pm
by ESP_krzychb
Hi PaulVdBergh,

FWIW when using ESP32 with JTAG you can see (and navigate through) both the C code and machine code side by side.

Re: How to obtain documented assembly listing ?

Posted: Thu Dec 06, 2018 3:05 pm
by PaulVdBergh
Hi krzychb,

That is one option... But my experience with JTAG debugging on ESP32 devices is disappointing... When more threads are running in the debugger things get very obfuscated..

I rather would like to have listings of the generated assembly to compare the different compilations.

However, thanks for your suggestion.

Paul

Re: How to obtain documented assembly listing ?

Posted: Thu Dec 06, 2018 3:28 pm
by ESP_igrr
One option is to start xtensa-esp32-elf-gdb <elf file> and then execute "disassemble /m <function name>".
You don't need to connect to the target to do this.

Re: How to obtain documented assembly listing ?

Posted: Fri Dec 07, 2018 5:10 am
by Jakobsen
Thanks - That was very help full for the DSP stuff I am working on.
I have been using obj dump until now but this is much more lean.
/Jakobsen