PlatformIO Community

ESP8266 project works fine in Arduino IDE gets exception in Platformio

Is there one clear simple explanation of how to use the exception decoder in PlatformIo?
Using core 6.1.3 Home 3.4.3 in VS Code 1.69.2.

I have a D1 Mini ESP8266 project that I developed in PlatformIO but it started throwing exception 28 after some “improvements”. On a whim I opened it in Arduino IDE with absolutely no code changes. It runs perfectly!

I copied firmware.elf to the Arduino exception decoder and pasted the PlatformIO dump. This is the result:

Exception 28: LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads
PC: 0x4022f1b8
EXCVADDR: 0x00000000

Decoding stack results

As explained in Monitor options — PlatformIO latest documentation and its subpage pio device monitor — PlatformIO latest documentation

monitor_filters = esp8266_exception_decoder

What does the Arduino IDE board manager (Tools → Boards → Board Manager → esp8266) say about the installed core version? What exact settings have you set in the Arduino IDE and what’s your platformio.ini?

platformio.ini:

[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
lib_deps =
    bblanchon/ArduinoJson@^6.19.1
    ropg/ezTime@^0.8.3
    adafruit/Adafruit GFX Library@^1.10.13
    adafruit/Adafruit ST7735 and ST7789 Library@^1.9.0
    datacute/DoubleResetDetector@^1.0.3
    https://github.com/tzapu/WiFiManager.git
    adafruit/Adafruit BusIO@^1.11.0
    adafruit/Adafruit Unified Sensor@^1.1.5
    adafruit/DHT sensor library@^1.4.3
    adafruit/Adafruit AHTX0@^2.0.1
monitor_speed = 115200
upload_speed = 921600
[platformio]
description = Main project for IoT WeatherBit only, local temp/humidity sensor can be DHT11 or AHT10

Arduino Boards Manager 3.0.2 (I think this was a recent update???)

Another observation: in PlatformIO Flash = 556109 RAM = 36180
In Arduino Flash = 558341 RAM = 36188

My code stores configuration data in LittleFS collected from the latest beta of WiFiManager. When I erased LittleFS the problem went away.

Thanks for the instruction link. I will read it now.