Hi. I'm using arduino_cli on macOS with an Adafruit ESP32 feather. All works great but I can't find a command to interpret Backtrace. I know there is a plugin for the Arduino IDE but I'm not using that for this project. An example output of what I would like to decode is:
Thanks for the ideas. However those are designed to decode the track format shown in the IDE. Unfortunately this is completely different from the trace reported by arduino_cli. I would think arduino_cli would have its own command for this. I could try making something myself if I knew where the linker symbol table was stored.
The plugin search for the builded .elf file inside the temporary folder created from IDE.
If you launch the plugin without compiling, you will be prompted to manually load the elf file,.
You can select the file generated by Arduino CLI and then copy and paste the backtrace log.
I have made progress. I found the xtensa-esp32-elf-gcc-nm program and ran it on the bin created by arduino-cli. Then by looking for symbol addresses near the values in the first address of each pair in the backtrace, I worked out which function each address was in, and thus made a complete stack trace, which lead me to my problem. Success! But if I have to do this again I will Indefinitely write a little perl script to do it automatically.