Disassembly process?
Posted: Wed Jan 15, 2020 11:29 pm
by scotthauck
Any suggestions on how to get a disassembly of code for ESP32 under Arduino? Specifically:
(1) Any pointers to a disassembler that people like? I'm developing on a Windows 10 box.
(2) Any pointers to where the executables are stored when you are using the Arduino IDE?
Thanks in advance.
Re: Disassembly process?
Posted: Fri Jan 17, 2020 6:28 am
by scotthauck
Well, I at least found the object files.
C:\Documents and Settings\<user name>\Local Settings\Temp\arduino_build_<a number for that build>\sketch
Looks like it is time to install the ESP tools and figure out how to use objdump...
Re: Disassembly process?
Posted: Fri Jan 17, 2020 10:25 pm
by scotthauck
Got disassembly going, via objdump, on my Windows 10 box for Arduino compiles. Hope this helps other folks.
- Install the ESP-IDF tools (if you haven't already). See the homepage for how.
- Find the place where the Arduino tools do the build:
https://www.kanda.com/blog/microcontrol ... -binaries/
I'd suggest following the directions there to force the builds to an easily accessible folder.
- Open up a command window (I used the mingw32.exe within the msys32 installed with ESP-IDF).
- Navigate to the sketch subdirectory of the build you are interested in.
- Run objdump, redirecting the output to a file:
xtensa-esp32-elf-objdump -S -d *.o > DISASSEMBLY.txt