-
Notifications
You must be signed in to change notification settings - Fork 6
Exception decoding for RISC-V chips (ESP32-C3, C6, H2, etc) #6
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
Comments
Thank you for the feature request.
No, I have not.
Great that you have looked into the code. 🙏
The tests cover the correctness of the
No, I do not have anything.
Of course, why not? Great idea.
I always appreciate any help you can give me. I am neither a domain expert nor programming Arduino boards; I enjoy writing tooling and understand the Arduino ecosystem well, so any technical pointer, as you gave above, is welcome. If you plan to contribute, developing a working prototype is sufficient, and I can help finalize the code. Please let me know if you decide so. Otherwise, I am also happy to understand how it works and reimplement it, but it will be available later as I have other priorities. Also, I need to order a C3 board and look into the Python code. So please bear with me if you decide to wait. I would be happy to have this new feature in the repository. |
I would be very interested. I just realised I don't have a backtrace as I'm using an ESP32C3. I'm trying to find a way to see where my code causes a random Load access fault. |
It's a 404 now. Could you please share a permalink? Thank you! |
Here it is @dankeboy36: The removal/replacement occurred here: |
From #31 (comment):
|
Any update on support for these ESP's? I'm having an ESP32-C6 here for which I was trying the decoder but also ending up in |
+1 |
Please help test #37. Thank you! |
Testing as we speak. So far so good 👍 Thanks a lot! |
Also: Can we use this with a stacktrace for a custom ELF file? In order to investigate production issues logged on previous releases? |
🎉 This issue has been resolved in version 1.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@dirkvranckaert, how do you run it? Does it need to enable |
@bhcuong2008 Haven't had the time yet to test and try since it has been released. |
@dankeboy36 Could you guide me? I've already installed the latest 1.1.0. Do I need to setup other things for RISC-V exception decode? Currently I don't enable Thank you. |
Hi @bhcuong2008, thanks for trying the decoder
Did you check the usage guide: https://github.com/dankeboy36/esp-exception-decoder?tab=readme-ov-file#usage?
No.
I do not have the experience to comment on this, but if you get the Arduino IDE 2.x, install the ESP32 core for Arduino (
You don't need to run any Python script to decode the exception with this extension. |
Thank @kittaakos . I've already read the guide, and could do it well with xtensa core. But with C6, RISC-V, it reports
|
Moved to #43. |
Hi @dankeboy36, thanks a lot for effort you put into making this incredibly useful plugin! I would like to check if you have already looked into implementing exception decoding for RISC-V chips, such as ESP32-C3? I found one mention of C3 in the tests but it seems that the code required to convert ESP32-C3 register+stack dumps into backtraces is missing.
Do you have something like that in progress, do you plan on implementing this, or would you like anyone from Espressif to open a PR with this implementation?
For reference: on RISC-V chips, by default we can only dump the registers and the stack, not the backtrace. Unwinding the stack to produce the backtrace on the chip itself is not possible, unless CONFIG_ESP_SYSTEM_USE_EH_FRAME option is enabled. (It is disabled by default, since it significantly increases application binary size.)
To perform stack unwinding, a tool running on the host PC is required. In ESP-IDF, this is done using gdb_panic_server.py which acts as a GDB server. GDB is launched, it connects to the script acting as a server, the script feeds GDB information from the stack dump as if it was coming from the real target, and finally GDB decodes the backtrace (code here).
This is slightly more complex than decoding backtraces on Xtensa chips, but since we already have access to GDB in this plugin, looks like this should be doable.
The text was updated successfully, but these errors were encountered: