platformio / platform-espressif32

Espressif 32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif32
Apache License 2.0
855 stars 570 forks source link

Exception decoder not working on CLI #1384

Closed italocjs closed 1 month ago

italocjs commented 1 month ago

I'm trying to use the exception decoder filter, but it is not found as an filter.

Executing task: pio device monitor --baud 115200 --filter esp32_exception_decoder --filter send_on_enter 

Warning! Skipping unknown filters `esp32_exception_decoder`. Known filters are `colorize, debug, default, direct, hexlify, log2file, nocontrol, printable, send_on_enter, time`
--- Terminal on /dev/ttyUSB0 | 115200 8-N-1

Filter does exists and its located located at \wsl.localhost\Ubuntu\home\italo.platformio\platforms\espressif32\monitor\filter_exception_decoder but seems that the monitor tool cant pick it up. i dont have platformio extension installed, i'm using CLI only.

;This platformio.ini file is good for usage in WSL
[env:native]
lib_ldf_mode = deep+
test_framework = googletest
test_ignore = test_esp32dev
platform = native
build_flags = -D USE_NATIVE_ENVIRONMENT
; extra_scripts = scripts/build_doxygen.py

[env:esp32dev]
build_type = debug
test_framework = googletest
test_ignore = test_native
platform = espressif32
framework = arduino, espidf
; platform_packages =
    ; framework-arduinoespressif32 @ https://github.com/italocjs/arduino-esp32.git#idf-release/v4.4
    ; framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.4

board = simovatrack130
board_build.partitions = partitions.csv
build_flags = 
    -D USE_ESP32_ENVIRONMENT
    -Wall                ; Enable all warnings
    -Wno-error           ; Ensure warnings are not treated as errors

upload_speed = 921600
monitor_speed = 115200
monitor_filters = esp32_exception_decoder 
; monitor_filters = 
;     esp32_exception_decoder
    ; send_on_enter

lib_deps = 
    adafruit/Adafruit Unified Sensor
    adafruit/Adafruit BusIO
    adafruit/Adafruit ADXL343
    https://github.com/italocjs/DFRobot_LIS.git
    https://github.com/italocjs/geofencing_esp32.git
    https://github.com/italocjs/NuS-NimBLE-Serial
    mprograms/QMC5883LCompass
    adafruit/RTClib
    mikalhart/TinyGPSPlus
    bblanchon/ArduinoJson
valeros commented 1 month ago

esp32_exception_decoder is a platform-specific filter, you need to specify the path to your project and a proper environment name, for example:

pio device monitor -d /path/to/your/project -e esp32dev --baud 115200 --filter esp32_exception_decoder --filter send_on_enter
italocjs commented 1 month ago

Thank you, the following worked great: pio device monitor -e esp32dev --baud 115200 --filter esp32_exception_decoder --filter send_on_enter