mlukasek / M5_NightscoutMon

M5Stack Nightscout monitor
GNU General Public License v3.0
197 stars 153 forks source link

Unable to build using Platform.io with current versions #73

Open hhinma opened 1 year ago

hhinma commented 1 year ago

I created a new platform.io project today with the VSC plug in, following the instructions in the readme. The Initial compile failed due to one of the masks used in the play_music_date method (I guess something must have changed in a more recent version of one of the libraries) I resolved that by commenting out the function.

Next problem was unresolved symbols in the Adafruit_NeoPixel library. That did not seem to be being linked in, so I added https://github.com/adafruit/Adafruit_NeoPixel.git to the LIB_DEPS in platform.ini. That resolved the linking issues, but the overall build failed because the image ended up too large. Im assuming I am missing something and/or external dependencies have changed since this was documented. Any thoughts?

Linking .pio/build/m5stack-core-esp32/firmware.elf Retrieving maximum program size .pio/build/m5stack-core-esp32/firmware.elf Checking size .pio/build/m5stack-core-esp32/firmware.elf Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [== ] 21.7% (used 71216 bytes from 327680 bytes) Error: The program size (1935201 bytes) is greater than maximum allowed (1310720 bytes) Flash: [====*** [checkprogsize] Explicit exit, status 1 ======] 147.6% (used 1935201 bytes from 1310720 bytes)

mlukasek commented 1 year ago

Exactly ;-) The main reason not updating anything is the size of application that would require different partitioning and thus non working web update. Also the combination of libraries is a little bit picky to make it work reliably. Everything would be possible, but it needs time, that is scarce for me last year.

If you change the partition size, you can build it and the latest libraries seems to be quite reliable and working well. Create partition file eg. min_spiffs.csv and use it. This should work:

'# Name, Type, SubType, Offset, Size, Flags

nvs, data, nvs, 0x9000, 0x5000,

otadata, data, ota, 0xe000, 0x2000,

app0, app, ota_0, 0x10000, 0x1E0000,

app1, app, ota_1, 0x1F0000,0x1E0000,

spiffs, data, spiffs, 0x3D0000,0x30000,
'

karelkral commented 1 year ago

I have just successfully flashed a new version for M5Stack Core from PlatformIO.

It is working.