-
Notifications
You must be signed in to change notification settings - Fork 13.3k
section .text' will not fit in region
iram1_0_seg'
#2908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I guess you should make it a bit smaller to fit on ESP. |
thanks for your feedback zgoda. |
I don't use too much C++ features in my code besides simple classes & compositions so I can't really recommend anything. BTW 1: Arduino IDE is not that good in detecting memory usage on foreign chips & cores. BTW 2: you don't need to call |
good to know many thanks @zgoda :) |
first of all, make sure you put all your constant strings into flash memory, by wrapping them in F() and PSTR() macros. example: String foo = F("foo"); this will free up space in the .text section. |
Moving strings into flash should not change utilisation of .text, because strings are placed into .rodata by default. .rodata and .text are placed into different regions of memory (DRAM and IRAM), so freeing up space in DRAM will not make more room in IRAM. |
ok, thanx for making this clear.
…On Fri, Feb 17, 2017 at 12:54 PM, Ivan Grokhotkov ***@***.***> wrote:
Moving strings into flash should not change utilisation of .text, because
strings are placed into .rodata by default. .rodata and .text are placed
into different regions of memory (DRAM and IRAM), so freeing up space in
DRAM will not make more room in IRAM.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2908 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB0jLzMw9SpgTdNA9SKNVQFJhFwZuaM5ks5rdYqMgaJpZM4Lw5M4>
.
|
@olileger is this still valid with 2.4.0-rc1 or latest git? |
I think this should be fixed by #2804 (which is available in master and in 2.4.0-rc1). |
Closing due to no feedback in over 2 months, age, and likely already fixed in master. |
Basic Infos
Hardware: ESP-8266
Core Version: 2.3.0
Description
I try to write my own firmware for my WeMos d1 mini.
I got a main *.ino file that calls a manager.
This manager handles all the application : setup, loop, calls to dependencies (DHT sensor, Wifi controller and so on).
I've written this manager in C++.
Today I tried to add few lines of code to add new features but I'm stopped by a linker error :
section
.text' will not fit in regioniram1_0_seg'
I've
ICACHE_FLASH_ATTR
-ed all my function but unfortunately it has no solved my issue so I wonder to know what am I doing wrong.Settings in IDE
Module: Generic ESP8266 Module
Flash Size: 4MB/3MB
CPU Frequency: 80Mhz
Upload Using: SERIAL (USB)
Compiling env : Windows 10, Arduino 1.6.13 (CLI mode)
Sketch
My firmware is available at https://github.com/olileger/iot/tree/master/esp/ESP8266_Firmware
Debug Messages
The text was updated successfully, but these errors were encountered: