RE: HOWTO: M5Stack Fire - use the full 16MB with the Arduino IDE
I hesitate because I really don't know how much RAM to allow. Shall I just subtract as much (or a little more) as they did for the 400 kB version? I will if there's no reaction (which would be typical, I'm afraid), but this is stuff that M5Stack should do.
I mean: we don't even have a decent list of what's out there in terms of models and revisions, we don't get answers when we ask questions. I understand they're busy – always on the next version – but I'm beginning to feel someone should redo this whole thing as a true open source / open hardware project.
HOWTO: M5Stack Fire - use the full 16MB with the Arduino IDE
For reasons unclear to me, the M5Stack Fire support added to the Board Manager does not change the size of the flash from the original M5Stack Core. What that means is that you cannot use all that extra flash (Fire has 16 MB, classic M5Stack has 4 MB).
Here's how to use the extra space:
Find the directory that on my Mac is at
(It's probably named slightly different on Windows machines, don't use those.)
There, add a file called
default_16MB.csvand put the following lines in it:
# Name, Type, SubType, Offset, Size, Flags nvs, data, nvs,0x9000,0x5000, otadata, data, ota,0xe000,0x2000, app0, app,ota_0,0x10000,0x640000, app1, app,ota_1,0x650000,0x640000, eeprom, data,0x99,0xC90000,0x1000, spiffs, data, spiffs,0xC91000,0x16F000,
Now go two directories up (so for me that would be
~/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0) and edit the file
m5-stack-fire.upload.maximum_sizeand replace that line with:
m5stack-fire.build.partitionsand replace that line with:
And then restart the IDE and you can use the full flash: I chose 2 x 6.5 MB OTA partitions, 1.5 MB SPIFFS. So now the M5ez demo program uses only 18% of one OTA partition. Nice...
There is another
m5stack-fire.upload.maximum_data_size=327680thing, which points to how much RAM usage is allowed for the sketch, but I haven't touched that yet, mostly because I'm not really sure where to set it.
M5Stack people: I know you don't answer questions or talk to us in general, but this is something you people should be doing, not some dude in the community...
M5Stack Fire questions...
Just got my M5Stack Fire.
First off, if I use the Arduino IDE, I see only the regular program space. (
Maximum is 1310720 bytes.). Should this have way more flash? How do we use it?
Also, the M5Stack-CORE-ESP32 board setting came with Tools/Partition scheme where you could select "Normal, "No OTA" or "Minimal SPIFFS", all are gone. I know I can manually edit the boards,txt file to fix this, but is there any reason this is the way it is?
One of the M5ez users says one of his LEDs wakes up blue when using M5ez: I do not see this myself. Are there different versions of the Fire?
RE: M5ez, a complete interface builder system for the M5Stack as an Arduino library. Extremely easy to use.
Just released: M5ez 2.0.0
- Simply install from the Arduino Library Manager..
- But then be ready to make some changes to existing code
From the User Manual:
What's new in M5ez 2.x ?
- Many user-selectable settings, including backlight, clock/timezone, FACES keyboard, etc.
- Theme values can be changed at runtime, multiple thmes can be loaded; a theme chooser then shows up in the settings
- Header can have user-defined widgets (internally used for clock and wifi signal display)
- The canvas now inherits from the Print class, so everything print and println could do, you can now also do on the canvas.
- The canvas scrolls (unless you don't want it to)
- you can create your own events that get ran in the M5ez button wait loops
- Many bugs got fixed
- Code is a lot cleaner now, easier to add things without the sometimes ad-hoc and organically grown constructs of M5ez 1.x
However, all of this comes with some changes to the names of common functions in M5ez. Generally things are more consistent now, but that does mean they are different: your M5ez 1.x code will not run without modifications. I am not planning an M5ez 3.0 at this time, so expect no further modifications to be needed to existing code for a while.
Converting code from M5ez 1.x to 2.x
To convert code form 1.x to 2.x, it is recommended you start by replacing the following functions:
M5ez 1.x M5ez 2.x
Then, check all your print functions: they no longer support the setting of font, location or color in the statement itself: these need to be done with
ez.canvas.coloretc. (Print is much nicer now because the canvas object inherited from the Print class, and because the canvas can scroll now.)
Then simply fix any remaining problems by first fixing any compiler complaints with this document in hand, and then walk through all of your program's functionality to see if everything works as expected.
Please consider starring the repository: it helps people find M5ez.