Skip to content

Allow EspExceptionDecoder to work from the CLI. #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
skorokithakis opened this issue Aug 13, 2016 · 12 comments
Open

Allow EspExceptionDecoder to work from the CLI. #8

skorokithakis opened this issue Aug 13, 2016 · 12 comments

Comments

@skorokithakis
Copy link

This may be related to #7. I don't use the Arduino IDE, so it would be great if I could just run:

java -jar ExceptionDecoder.jar <myfile.elf> <mystack.txt>

And get the decoded exception back.

@boraozgen
Copy link

It would be great to have this feature. I always replace the binaries compiled by the Arduino and with the ones compiled by the makefile and so on...

@littleyoda
Copy link
Contributor

I created a CLI-Version:
https://github.com/littleyoda/EspStrackTraceDecoder

@me-no-dev
Copy link
Owner

@littleyoda you can change your array with exceptions with the one I just added to this repo :) gives better explanation.
Also you might want to make a PR to this repo's README and add link and short usage for your tool :)

@me-no-dev
Copy link
Owner

@ivankravets could maybe use it in platformio to further extend support for ESP?

@littleyoda
Copy link
Contributor

@me-no-dev Thanks for the new description of the exceptions. I've added them to my tool.

@me-no-dev
Copy link
Owner

@littleyoda will you make a pull request with some text for this repo's README so people can easily find your tool and I can close this issue?

@littleyoda
Copy link
Contributor

PR created

@ivankravets
Copy link

@me-no-dev I've jsut made quick look for https://github.com/me-no-dev/EspExceptionDecoder/blob/master/src/EspExceptionDecoder.java. Did you use Java especially for Arduino IDE? Would be good to have cross-platform tool where java is not installed.
I think that this code coudl be easy ported to Python or C, where we can reuse it later on different architectures/OSs.

@me-no-dev
Copy link
Owner

@ivankravets yes :) It's arduino-ide plugin. Surely a python version could be made :) It just parses the given dump and extracts addresses pointing to code that then gives to addr2line. I imagine platformio was the reason @skorokithakis asked for this feature

@skorokithakis
Copy link
Author

Yep, it was!

@skorokithakis
Copy link
Author

I have this one liner from the Gitter channel:

rm -f stack.txt && vi stack.txt && awk '/>>>stack>>>/{flag=1;next}/<<<stack<<</{flag=0}flag' stack.txt | awk -e '{ OFS="\n"; $1=""; print }' | <path_to_tools_bin>/xtensa-lx106-elf-addr2line -aipfC -e <path_to_elf> | grep -v "?? ??:0" ; rm -f stack.txt

@janLo
Copy link

janLo commented Jan 16, 2018

I just had the same problem and created https://github.com/janLo/EspArduinoExceptionDecoder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants