Skip to content
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

ESP-IDF4+ : crash handler and boot status #902

Merged
merged 3 commits into from
May 18, 2023

Conversation

llange
Copy link
Contributor

@llange llange commented May 14, 2023

  • error handling rework (xt_set_error_handler_callback is only available in our ESP-IDF 3.3.4 fork.)
  • esp_task_wdt_get_trigger_tasknames() not available (feature removed from ESP-IDF4+ builds) TODO
  • first steps to support other archs than XTensa in boot_data.crash_data

Copy link
Member

@markwj markwj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem reasonable. Again, lost functionality, but I don't see we have much choice.

`xt_set_error_handler_callback` is only available in our ESP-IDF 3.3.4 fork.

For ESP-IDF >= 4, we implement it a little bit differently by using the linker
wrap feature, which let us execute our handler before `esp_panic_handler()`.

Signed-off-by: Ludovic LANGE <[email protected]>
`esp_task_wdt_get_trigger_tasknames()` was a custom patch of our ESP-IDF 3.3.4 fork.
It is used to list the names of the task(s) responsible for triggering the WDT,
and this information is saved in the (persistent) boot_data structure for post-crash
analysis.

Unfortunately it's not available on upstream ESP-IDF 4+.
For the moment we remove the feature, until we find a way to implement it without
patching ESP-IDF 4+.

Signed-off-by: Ludovic LANGE <[email protected]>
…ata.crash_data`

XTensa and RISC V have differences, and `boot_data.crash_data` being low-level is
exposed to these differences.

We try to handle the CPU registers dump for both architectures.
However backtrace is not handled (yet) for RISC V.

Signed-off-by: Ludovic LANGE <[email protected]>
@llange llange merged commit ab78fab into openvehicles:master May 18, 2023
@llange llange deleted the boot-status-esp-idf4+ branch May 18, 2023 18:53
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

Successfully merging this pull request may close these issues.

2 participants