Skip to content

Instantly share code, notes, and snippets.

@cpq
Last active May 4, 2019 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpq/139ab247adce2b04291c62835f051036 to your computer and use it in GitHub Desktop.
Save cpq/139ab247adce2b04291c62835f051036 to your computer and use it in GitHub Desktop.
Symbolizing Arduino backtrace dump for ESP32 (MacOS version)
#!/bin/sh
# Usage:
# sh bt.sh sketch_Apr25 400d4e36:0x3ffb1e50 0x400d1bce:0x3ffb1e90 0x400d1d96:0x3ffb1ee0 0x400d5a8d:0x3ffb1f30
ARDUINO_DIR=$HOME/Documents/Arduino
A2LINE=$ARDUINO_DIR/hardware/espressif/esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-addr2line
ELF=$(find /var/folders/ -name $INO.elf 2>/dev/null)
INO=$1
shift
ELF=$(find /var/folders/ -name $INO.ino.elf 2>/dev/null)
for E in $* ; do
$A2LINE -pfiaC -e $ELF ${E%:*}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment