Greater than maximum allowed (1310720 bytes) RAM: [== ] 18.1% (used 59404 bytes from 327680 bytes) *** [checkprogsize] Explicit exit, status 1 Flash: [==========] 103.0%

Checking size .pio\build\esp-wrover-kit\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
Error: The program size (1349521 bytes) is greater than maximum allowed (1310720 bytes)
RAM:   [==        ]  18.1% (used 59404 bytes from 327680 bytes)
*** [checkprogsize] Explicit exit, status 1
Flash: [==========]  103.0% (used 1349521 bytes from 1310720 bytes)

my platform.ini file

 ; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
lib_deps = https://github.com/gilmaimon/ArduinoWebsockets

build_flags =
    -DBOARD_HAS_PSRAM


           
monitor_speed = 115200
upload_port = COM5

Your program code is too big to fit on the board you’re trying to put it on

This board has 4MByte flash, so if you don’t need to do OTA updates or don’t need a filesystem you can just change the partition table so that the application has more than ~1.3 MByte available to it.

All of this is documented in

https://docs.platformio.org/en/latest/platforms/espressif32.html#partition-tables

So e.g. add the line

board_build.partitions = huge_app.csv

to your platformio.ini.

(Or min_spiffs.csv, no_ota.csv, etc.)

1 Like

i solved it the main issue was the enable
build_flags =
-DBOARD_HAS_PSRAM
so after lil research i modify it to

build_flags =
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
-DCONFIG_MBEDTLS_DYNAMIC_BUFFER=1
-DCONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST=1
-DCONFIG_SPIRAM_CACHE_WORKAROUND=1

board_build.partitions = huge_app.csv
;no_ota.csv
extra_scripts = pre:build_script_versioning.py

so it work smoth and fixed my issue

so by changing my platform.ini fix this issue i dont know how

; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; Redirecting...

[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
lib_deps = GitHub - gilmaimon/ArduinoWebsockets: A library for writing modern websockets applications with Arduino (ESP8266 and ESP32)

build_flags =
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
-DCONFIG_MBEDTLS_DYNAMIC_BUFFER=1
-DCONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST=1
-DCONFIG_SPIRAM_CACHE_WORKAROUND=1

board_build.partitions = huge_app.csv
;no_ota.csv
extra_scripts = pre:build_script_versioning.py

monitor_speed = 115200
upload_port = COM5