How to obtain documented assembly listing ?

User avatar
PaulVdBergh
Posts: 58
Joined: Fri Feb 23, 2018 4:45 pm
Location: Brasschaat, Belgium

How to obtain documented assembly listing ?

Postby PaulVdBergh » Thu Dec 06, 2018 12:24 pm

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

User avatar
ESP_krzychb
Posts: 394
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: How to obtain documented assembly listing ?

Postby ESP_krzychb » Thu Dec 06, 2018 2:47 pm

Hi PaulVdBergh,

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

User avatar
PaulVdBergh
Posts: 58
Joined: Fri Feb 23, 2018 4:45 pm
Location: Brasschaat, Belgium

Re: How to obtain documented assembly listing ?

Postby PaulVdBergh » Thu Dec 06, 2018 3:05 pm

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

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: How to obtain documented assembly listing ?

Postby ESP_igrr » Thu Dec 06, 2018 3:28 pm

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.

User avatar
Jakobsen
Posts: 89
Joined: Mon Jan 16, 2017 8:12 am

Re: How to obtain documented assembly listing ?

Postby Jakobsen » Fri Dec 07, 2018 5:10 am

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
Analog Digital IC designer / DevOps @ Merus Audio, Copenhagen, Denmark.
We do novel and best in class Audio amplifiers for consumer products.
Programmed assembler for C-64 back in 1980's, learned some electronics - hacking since then

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 103 guests