When i compile my code i receive .irom0.text' will not fit in region `irom0_0_seg' , i dont know how to resolve it

i use arduino iot cloud web editor, when i compile i had issues but i solved them , but now i get .irom0.text' will not fit in region `irom0_0_seg' and i dont know how to solve it even if i researched the answers ,it would be incredible if someone could help me. im trying to make a smart pet plant with facial expression for a school project fair and i used esp8266 esp-12e nodemcu module , along with a capacitive moisture sensor, a temperature sensor , a tft display and a ldr sensor with resistor can c&p my code so u can check if there is any error.
here is the message :

/usr/local/bin/arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2:baud=115200,dbg=Disabled,eesz=4M,exception=disabled,ip=lm2f,lvl=None____,vt=flash,wipe=none,xtal=80 --libraries /home/builder/opt/libraries/latest --build-cache-path /tmp --output-dir /tmp/988762528/build --build-path /tmp/arduino-build-3CFF130C5E12AFC34E2F193F93BFC97E /tmp/988762528/Pet_plant_dec12a

Using library arduino_debugutils_1_4_0 at version 1.4.0 in folder: /home/builder/opt/libraries/arduino_debugutils_1_4_0

Using library arduinomqttclient_0_1_6 at version 0.1.6 in folder: /home/builder/opt/libraries/arduinomqttclient_0_1_6

/home/builder/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-3-20ed2b9/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: /tmp/arduino-build-3CFF130C5E12AFC34E2F193F93BFC97E/Pet_plant_dec12a.ino.elf section `.irom0.text' will not fit in region `irom0_0_seg'

collect2: error: ld returned 1 exit status

Error during build: exit status 1

Help us help you.

Try picking a larger FLASH size under Tools -> Flash size.

There is a trade-off between the amount of FLSH set aside for your program and the amount left for the file system. If you aren't storing data in files you can use more for program.

Forgive me please for this stupid question but i dont find tools.

Doesn't your Arduino IDE have a "Tools" menu?

it does but i dont have flash size so i can pick it,
maybe i can post and give u the code so u can see if there is anything wrong with it

OK. Post your sketch and maybe someone can figure out what is going wrong.

Menu is dependent on board selected:

Executable segment sizes:
ICACHE : 32768           - flash instruction cache 
IROM   : 231500          - code in flash         (default or ICACHE_FLASH_ATTR) 
IRAM   : 26217   / 32768 - code in IRAM          (IRAM_ATTR, ISRs...) 
DATA   : 1496  )         - initialized variables (global, static) in RAM/HEAP 
RODATA : 876   ) / 81920 - constants             (global, static) in RAM/HEAP 
BSS    : 25520 )         - zeroed variables      (global, static) in RAM/HEAP 

give me ur email so i can send it to u , the file is more then 8 mb so they wont let me upload it here and when i c&p here i cant because iget an error 502

i did find these eventually after downloading the esp8266 bord ,are these the information that i need so i can obtain a larger size?

Go back to #8 and note how the flash partitioning menu is structured; find option giving (hopefully) a larger sketch size.

i did this exactly the same still the same problem

You selected the second option???
image

If so, time to move to a device with more flash ... or restructure your code.

yes i selected the second option and still the same problem
so what d u suggest as an alternative device
what do u advise me to chose in this one

Your graphic shows SRAM **not ** FLASH.

no i did chose that in the upper section there is a section to chose how much is for the ram and stuff which one to choose

Re: post#3 where increasin flash was recommended... then #6 where you could not identify the menu drop-down.

Since I cannot "see" your web-browser, maybe ask your instructor.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.