EspExceptionDecoder Not Working in PlatformIO 6.1.11(latest release) with ESP-IDF 5.1.2 (stable)

A_Hopeful_Creator
Posts: 6
Joined: Fri Oct 27, 2023 7:26 pm

EspExceptionDecoder Not Working in PlatformIO 6.1.11(latest release) with ESP-IDF 5.1.2 (stable)

Postby A_Hopeful_Creator » Fri Dec 29, 2023 4:42 am

I am trying to troubleshoot getting the esp32_exception_decoder to work, but it's not decoding exceptions as expected. The baud rate also gets knocked down to 9600 (maybe due to changes the debug modes I've enabled bring), but that is beside the point.

To Isolate the issue, I've created a fresh project in platformio with the following platformio.ini content:
  1. [env:seeed_xiao_esp32c3]
  2. platform = espressif32
  3. board = seeed_xiao_esp32c3
  4. framework = espidf
  5. monitor_filters =
  6.   send_on_enter
  7.   esp32_exception_decoder
  8. build_type = debug
  9. build_flags =
  10.   -std=gnu++20
  11.   -g
  12.   -Og
  13. build_unflags =
  14.   -std=gnu++11
I have also written a short application that purposefully induces a stack overflow to test with as follows:
  1. #include "freertos/FreeRTOS.h"
  2. #include "freertos/task.h"
  3.  
  4. unsigned int cause_stack_overflow(unsigned int current_depth = 0) {
  5.   printf("Stack depth: %u\n", current_depth);
  6.   if (current_depth < 0x1 << 31) {
  7.     cause_stack_overflow(current_depth + 1);
  8.   }
  9.   return current_depth;
  10. }
  11.  
  12. extern "C" void app_main() {
  13.   printf("Output Start\n");
  14.   vTaskDelay(pdMS_TO_TICKS(5000));
  15.   printf("Output %u\n", cause_stack_overflow());
  16.   printf("Output End\n");
  17. }
I've tried:
  • Ensuring that my PlatformIO version is up-to-date (6.1.11, which is the latest as of now)
  • Ensuring that the ESP-IDF version is up-to-date (5.1.2 which is the latest stable release of the espidf right now)
  • Ensuring that the build_type in platformio is set to "debug"
  • Ensuring that esp32_exception_decoder is set in monitor_filters
  • Adding the -g and -Og build flags to ensure that the compiler left in debugging symbols
  • Running a clean build and upload after reinstalling all relevant packages
  • Searching for documentation that might be helpful such as the platformio official documentation which contains very little information.
  • Searching for ESP documentation, which seems to only cover use with the Arduino IDE (I am not using arduino libraries, and am only using the espidf).
For reference, the output still contains an undecoded error message including:
  1. Stack memory:
  2. 3fc8d040: 0x3fc8d044 0xffffffff 0x3c021660 0x403892c0 0x3fc8b2ac 0x3c021660 0x3fc8b290 0x3c021102
  3. 3fc8d060: 0x3fc8b2bc 0x3fc8d074 0x3fc8b2c0 0x3c021134 0x3fc8aed4 0x32373233 0x00000000 0x65737361
  4. 3fc8d080: 0x66207472 0x656c6961 0x70203a64 0x6f4e7672 0x79666974 0x75657551 0x74655365 0x746e6f43
  5. 3fc8d0a0: 0x656e6961 0x44492072 0x6f635c46 0x6e6f706d 0x73746e65 0x6572665c 0x6f747265 0x72465c73
  6. 3fc8d0c0: 0x54526565 0x4b2d534f 0x656e7265 0x75715c6c 0x2e657565 0x32333a63 0x28203237 0x75517870
  7. 3fc8d0e0: 0x53657565 0x6f437465 0x6961746e 0x2d72656e 0x4d78753e 0x61737365 0x57736567 0x69746961
  8. 3fc8d100: 0x3c20676e 0x51787020 0x65756575 0x43746553 0x61746e6f 0x72656e69 0x78753e2d 0x676e654c
  9. 3fc8d120: 0x00296874 0x6564206b 0x00000010 0x42003b64 0x00000011 0x00000011 0x00000011 0x4038126a
  10. 3fc8d140: 0x00000011 0x00000000 0x00000000 0x42000000 0x00000004 0x3fc8d2e0 0x3c020130 0x00000000
  11. 3fc8d160: 0x00000000 0x00000000 0x3fc8fda4 0x40383ac8 0x00000011 0x00000000 0x3fc8d070 0x3fc8d070
  12. 3fc8d180: 0x00000000 0x00000000 0x3fc8d070 0x40383f80 0x00000011 0x3fc8f48c 0x3fc8cedc 0x00000000
  13. 3fc8d1a0: 0x00000011 0x3fc8f48c 0x3fc8cedc 0x3fc8d070 0x00000001 0x3fc8f48c 0x3fc8cedc 0x00000000
  14. 3fc8d1c0: 0x00000000 0x3fc8f430 0x3fc8d070 0x40384130 0x00000000 0x00000004 0x3fc8d21c 0x403811c0
  15. 3fc8d1e0: 0x00000000 0x00000004 0x3fc8d22c 0x00000001 0x00000000 0x3c02012f 0x00000001 0x4038126a
  16. 3fc8d200: 0x00000003 0x3fc8cedc 0x3c020130 0x4038139a 0x00000000 0x3c02012f 0x3fc8d2e0 0x3fc8d070
  17. 3fc8d220: 0x00000000 0x3c02012f 0x00000001 0x4200d480 0x00000000 0x3c02012f 0x00000001 0x3fc8f48c
  18. 3fc8d240: 0x3c02012f 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000011 0x00000001
  19. 3fc8d260: 0x00000003 0x00000000 0x00000000 0x3c0284d0 0x00000000 0x00000000 0x00000000 0x00000000
  20. 3fc8d280: 0x3c027a74 0x00000000 0x3c0278f8 0x00000000 0x3c027a74 0x00000000 0x3c0278f8 0x00000000
  21. 3fc8d2a0: 0x3c027a74 0x00000000 0x3c0278f8 0x3fc8d678 0x3c027a74 0x00000000 0x3c0278f8 0x00000001
  22. 3fc8d2c0: 0x00000000 0x00000000 0x3c0278f8 0x00000001 0x00000000 0x00000000 0x3c0278f8 0x00000001
  23. 3fc8d2e0: 0x3fc8d2ec 0x00000000 0x00000000 0x3c02012f 0x00000001 0x3fc8d38d 0x00000003 0x3c02012f
  24. 3fc8d300: 0x00000001 0x3fc8d39d 0x00000003 0x3c02012f 0x00000001 0x3fc8d3ad 0x00000003 0x3c02012f
  25. 3fc8d320: 0x00000001 0x3fc8d3bd 0x00000003 0x3c02012f 0x00000001 0x3fc8d3cd 0x00000003 0x3c02012f
  26. 3fc8d340: 0x00000001 0x3fc8d3dd 0x00000003 0x3c02012f 0x00000001 0x3fc8d3ed 0x00000003 0x3c02012f
  27. 3fc8d360: 0x00000001 0x3fc8d3fd 0x00000003 0x3c02012f 0x00000001 0x3fc8d40d 0x00000003 0x3c02012f
  28. 3fc8d380: 0x00000001 0x3fc8d41d 0x00000003 0x3636342f 0xffffffff 0x3fc8d42d 0x00000003 0x3536342f
  29. 3fc8d3a0: 0xffffffff 0x3fc8d43d 0x00000003 0x3436342f 0xffffffff 0x3fc8d44d 0x00000003 0x3336342f
  30. 3fc8d3c0: 0xffffffff 0x3fc8d45d 0x00000003 0x3236342f 0xffffffff 0x3fc8d46d 0x00000003 0x3136342f
  31. 3fc8d3e0: 0xffffffff 0x3fc8d47d 0x00000003 0x3036342f 0xffffffff 0x3fc8d48d 0x00000003 0x3935342f
  32. 3fc8d400: 0xffffffff 0x3fc8d49d 0x00000003 0x3835342f 0x000001d2 0x3fc8d4ad 0x00000003 0x3735342f
  33. 3fc8d420: 0x000001d1 0x3fc8d4bd 0x00000003 0x3635342f 0x000001d0 0x3fc8d4cd 0x00000003 0x3535342f

Who is online

Users browsing this forum: Baidu [Spider], Google Adsense [Bot], ShinyGlossy and 220 guests