EspExceptionDecoder
EspExceptionDecoder copied to clipboard
How to make this work in PlatformIO
Any help or hints appreciated.
I also need
me too!
Me too! 😊
Hi there ! some news about integration in PIO ?
I used a Python implementation which reads the stack dump from a file. I launch it from Visual Studio Code directly. See https://github.com/proddy/EMS-ESP/blob/master/scripts/analyze_stackdmp.py
Thanks proddy.
Q: Is there any way to get /.pio/build/debug/firmware_d1_mini.elf as a variable so it is not hard-coded in script ??
I guess one could just run a pre/post script: https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html and read "$BUILD_DIR/${PROGNAME}.elf" OR just scan the /.pio/build/debug/ directory for the (single ?) .elf file
Anyone game to make an VS Code extension using the Python script ???
@starlino yes you can get all the pio variables in python so easy to adjust. See the doc https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html
Creating a VSC extension isn't that useful. If you want to debug, just copy & paste the stack dump into a file or pipe it into the python script either on a command line or double clicking the file in VSC
You can use this indirectly to decode a stack trace from PlatformIO, but you do need Arduino installed. However you don't need to open your PlatformIO project in Arduino, so it is not too hard. Try this:
- Install in the Arduino tools as described.
- In PlatformIO build and run your project and get the stack trace ready in the terminal window. This generates the .elf file.
- Open in Arduino menu, Tools, ESP Exception Decoder.
- You are prompted for a .esp file. Open from
/.pio/build/lolin-d32/firmware.elf (or similar) - You are prompted for the trace - paste in from the terminal
- Read the decoded stack results.
Since version 4.3 platformio has monitor_filters including esp8266_exception_decoder
and esp32_exception_decoder
. These will automatically decode the exception.