question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

m5stack program size is greater than maximum allowed

See original GitHub issue

I 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 to m5stack-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:closed
  • Created 5 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
ayoubgouncommented, Feb 28, 2020
  1. go to PlatformIO.ini
  2. add board_build.partitions = no_ota.csv
0reactions
valeroscommented, Nov 9, 2021

@Ibrahim2595 It seems you need to further increase the partition size for you app, try this one:

board_build.partitions = huge_app.csv
Read more comments on GitHub >

github_iconTop Results From Across the Web

Use rainmaker with m5stack-core-esp32
... 327680 bytes) Error: The program size (1716093 bytes) is greater than maximum allowed (1310720 bytes) Flash: [====*** [checkprogsize] Explicit exit, ...
Read more >
ESP32CAM & BLE: Error: The program size is greater than ...
Error: The program size (1690998 bytes) is greater than maximum allowed (1638400 bytes). Could I alter the partitions on ESP32 with esphome?
Read more >
How to fix program size issue when i didn't over flash size?
Error: The program size (1517190 bytes) is greater than maximum allowed (1310720 bytes) RAM: [== ] 18.1% (used 59404 bytes from 327680 bytes)...
Read more >
ESP32 Audio Project - Part II: Bluetooth Receiver Add-on - M5Stack ...
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" ; Error: The program size (1786551 bytes) is greater than maximum allowed...
Read more >
ESP32 Series Datasheet - Espressif Systems
calibration circuitries that allow the solution to remove external circuit ... Note that if more than 3 MB + 248 KB are mapped,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found