The Issue:
A sketch that previously compiled now fails with this error:
fatal error: rom/miniz.h: No such file or directoryCause:
This happened after updating the ESP32 board package (used for M5Stack devices) to version 3.2.0. It only seems to affect sketches that use the M5Core2 library (not M5Unified).
Solution (as of now):
Downgrade the M5Stack board package from v3.2.0 to v2.1.4 using the Boards Manager in the Arduino IDE.
- Go to Tools \ Board: “xxxxx” \ Boards Manager…
- Search for M5Stack
- Remove version 3.2.0

- Install version 2.1.4

- Recompile the sketch
Note:
This is a temporary workaround. M5Stack may address this issue in a future release. If you encounter this error again, first check for an updated board package before downgrading.
Unfortunately, this did not fix the issue. With M5Stack V2.1.4 installed I still get the error
Found a work around:
change `#include <M5Core2.h>` to `#include <M5Unified.h>`.
It then compiles. Make sure you have M5Unified library installed
[Edited by admin: Content in angle brackets was stripped, leaving only “change #include to #include”. Restored based on assumed intent.]