m5stack program size is greater than maximum allowed
See original GitHub issueI have a project which I have developed in my previous configuration (ubuntu 14.04, visual studio code), and I wanted to continue it in my new config (ubuntu 18.04, clion). To prevent any problem that can come up by changing the IDE, I created a new project, initialized with pio command to have a clion-compatible project, and then I have copied all sources to the new project from the old one. Everything went fine until I wanted to upload the code onto my m5stack watch when I got the following error:
Error: The program size (1338029 bytes) is greater than maximum allowed (1310720 bytes)
As I figured it out from the M5 core schematic, M5 has an GD25Q32C Serial flash, which is 32M-bit big - thus, I tried to configure the flash size in different ways:
- Added
board_upload.maximum_size = 4194304
to the .ini file which was recognized by the compiler:
PLATFORM: Espressif 32 > M5Stack Core ESP32 SYSTEM: ESP32 240MHz 288KB RAM (4MB Flash)
- Searched board-config file in platformio folder (~/.platformio/platforms/espressif32/boards/m5stack-core-esp32.json) and changed the
"maximum_size": 1310720
line to"maximum_size": 4194304
- Searched boards.txt file in platformio folder (~/.platformio/packages/framework-arduinoespressif32/boards.txt) and changed the
m5stack-core-esp32.upload.maximum_size=1310720
line tom5stack-core-esp32.upload.maximum_size=4194304
.
Not even these miserable steps fixed my issue.
Then I tried to upload my previous project with pio command from command-line, but I had to face with the very same error.
What am I doing wrong and how can I fix this? I think the config json and the boards.txt should not be edited manually, but at least I have tried.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
@Ibrahim2595 It seems you need to further increase the partition size for you app, try this one: