Trying to compile Core example from M5Stack github
-
I am trying to compile the Core Basic example from M5Stack github examples:
https://github.com/m5stack/M5Stack/blob/master/examples/Basics/Button/Button.inoI keep getting this error"
Arduino/libraries/M5Stack/src/utility/pngle.c:31:10: fatal error: rom/miniz.h: No such file or directory 31 | #include <rom/miniz.h> | ^~~~~~~~~~~~~ compilation terminated. exit status 1 Compilation error: exit status 1Because of this I recently erased my entire Arduino IDE down to the Arduino15 folder and only reinstalled the latest:
Arduino IDE ver2.3.6 and
esp32 boards 3.2.0 and
M5Stack boards 3.2.1
libraries:
M5Stack latest ver 0.4.6 and all other required dependancies.If...(and this is NOT the answer)...I revert to the old M5Stack boards 2.1.4, it compiles correctly. (and this is NOT the answer).
I keep my Arduino IDE environment up-to-date, but I have to be carful to not allow the M5Stack boards to update to current.
This is most tedious.
What can I do to permanently resolve this, going forward...without downgrading to an old M5Stack boards def like 2.1.4.
(This effects Core2, btw)
?How to install rom/miniz and compile OK?
Cheers, Terry
(@felmue do you have any ideas?) -
Hello @teastain
I am afraid I cannot help, sorry. I exclusively use Visual Studio Code with PlatformIO / pioarduino (which so far doesn't have this issue).
Note: Visual Studio Code / PlatformIO doesn't use M5Stack boards and setting up new Cores (M5Stack and others) can sometimes be quite difficult as well.
Thanks
Felix -
@teastain
Arduino/libraries/M5Stack/src/utility/pngle.c:31:10: fatal error: rom/miniz.h: No such file or directory
31 | #include <rom/miniz.h>Change in pngle.c into include <miniz.h> maybe?
Regards -
You can try replacing the following line in the Sketch:
#include <M5Stack.h>
With:
#include <M5Unified.h>
That should resolve the compilation error.
-
@wavydavy I'll try that!
-
@wavydavy
Yes, that resolved the issue, I am now using the
"M5Stack by M5Stack official 3.2.2 installed " board def.
The entire problem was that my pre-existing code AND the M5Stack Github examples by M5Stack use
#include <M5Stack.h>
instead of M5Unified.
Thanks for your help.
Also:
No one at M5Stack picked up on this, except you, not even the online M5Stack AI chat helper.Note: The examples in the newer web based API work fine, just not the old M5Stack official Github.
Cheers, Terry
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login