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

esp8266 compile errors about RAM size when adding 1 library #296

Closed
A-Industry opened this Issue Sep 28, 2015 · 5 comments

Comments

Projects
None yet
5 participants
@A-Industry

A-Industry commented Sep 28, 2015

After adding just 1 library and trying the example code I am getting an error:

.pioenvs/esp01/firmware.elf section '.text' will not fit in region `iram1_0_seg'
[09/28/15 23:42:08] Processing esp01 (platform: espressif, upload_port: COM3, targets: upload, framework: arduino, board: esp01)

xtensa-lx106-elf-g++ -o .pioenvs\esp01\src\main.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -DPLATFORMIO=020302 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant -I.pioenvs\esp01\ESP8266WiFi -I.pioenvs\esp01\pubsubclient src\main.cpp
xtensa-lx106-elf-ar rcs .pioenvs\esp01\libFrameworkArduinoVariant.a
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\Esp.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\Esp.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\FileSystem.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\FileSystem.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\HardwareSerial.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\HardwareSerial.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\IPAddress.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\IPAddress.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\Print.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\Print.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\Stream.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\Stream.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\Tone.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\Tone.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\WMath.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\WMath.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\WString.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\WString.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\abi.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\abi.cpp.cpp
xtensa-lx106-elf-gcc -x assembler-with-cpp -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant -c -o .pioenvs\esp01\FrameworkArduino\cont.o .pioenvs\esp01\FrameworkArduino\cont.S
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\cont_util.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\cont_util.c
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\core_esp8266_main.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\core_esp8266_main.cpp.cpp
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\core_esp8266_noniso.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\core_esp8266_noniso.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\core_esp8266_si2c.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\core_esp8266_si2c.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\core_esp8266_timer.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\core_esp8266_timer.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_analog.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_analog.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_digital.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_digital.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_pulse.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_pulse.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_pwm.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_pwm.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_shift.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_shift.c
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\debug.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\debug.cpp.cpp
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\libc_replacements.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\libc_replacements.c
xtensa-lx106-elf-g++ -o .pioenvs\esp01\FrameworkArduino\pgmspace.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\pgmspace.cpp.cpp
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_cache.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_cache.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_check.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_check.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_esp8266.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_esp8266.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_gc.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_gc.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_hydrogen.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_hydrogen.c
xtensa-lx106-elf-gcc -o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_nucleus.o -c -std=c99 -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_nucleus.c
xtensa-lx106-elf-ar rcs .pioenvs\esp01\libFrameworkArduino.a .pioenvs\esp01\FrameworkArduino\Esp.cpp.o .pioenvs\esp01\FrameworkArduino\FileSystem.cpp.o .pioenvs\esp01\FrameworkArduino\HardwareSerial.cpp.o .pioenvs\esp01\FrameworkArduino\IPAddress.cpp.o .pioenvs\esp01\FrameworkArduino\Print.cpp.o .pioenvs\esp01\FrameworkArduino\Stream.cpp.o .pioenvs\esp01\FrameworkArduino\Tone.cpp.o .pioenvs\esp01\FrameworkArduino\WMath.cpp.o .pioenvs\esp01\FrameworkArduino\WString.cpp.o .pioenvs\esp01\FrameworkArduino\abi.cpp.o .pioenvs\esp01\FrameworkArduino\cont.o .pioenvs\esp01\FrameworkArduino\cont_util.o .pioenvs\esp01\FrameworkArduino\core_esp8266_main.cpp.o .pioenvs\esp01\FrameworkArduino\core_esp8266_noniso.o .pioenvs\esp01\FrameworkArduino\core_esp8266_si2c.o .pioenvs\esp01\FrameworkArduino\core_esp8266_timer.o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring.o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_analog.o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_digital.o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_pulse.o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_pwm.o .pioenvs\esp01\FrameworkArduino\core_esp8266_wiring_shift.o .pioenvs\esp01\FrameworkArduino\debug.cpp.o .pioenvs\esp01\FrameworkArduino\libc_replacements.o .pioenvs\esp01\FrameworkArduino\pgmspace.cpp.o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_cache.o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_check.o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_esp8266.o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_gc.o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_hydrogen.o .pioenvs\esp01\FrameworkArduino\spiffs\spiffs_nucleus.o
xtensa-lx106-elf-g++ -o .pioenvs\esp01\ESP8266WiFi\ESP8266WiFi.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant -I.pioenvs\esp01\ESP8266WiFi -I.pioenvs\esp01\pubsubclient .pioenvs\esp01\ESP8266WiFi\ESP8266WiFi.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\ESP8266WiFi\ESP8266WiFiMulti.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant -I.pioenvs\esp01\ESP8266WiFi -I.pioenvs\esp01\pubsubclient .pioenvs\esp01\ESP8266WiFi\ESP8266WiFiMulti.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\ESP8266WiFi\WiFiClient.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant -I.pioenvs\esp01\ESP8266WiFi -I.pioenvs\esp01\pubsubclient .pioenvs\esp01\ESP8266WiFi\WiFiClient.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\ESP8266WiFi\WiFiServer.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant -I.pioenvs\esp01\ESP8266WiFi -I.pioenvs\esp01\pubsubclient .pioenvs\esp01\ESP8266WiFi\WiFiServer.cpp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\esp01\ESP8266WiFi\WiFiUdp.cpp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant -I.pioenvs\esp01\ESP8266WiFi -I.pioenvs\esp01\pubsubclient .pioenvs\esp01\ESP8266WiFi\WiFiUdp.cpp.cpp
xtensa-lx106-elf-ar rcs .pioenvs\esp01\libESP8266WiFi.a .pioenvs\esp01\ESP8266WiFi\ESP8266WiFi.cpp.o .pioenvs\esp01\ESP8266WiFi\ESP8266WiFiMulti.cpp.o .pioenvs\esp01\ESP8266WiFi\WiFiClient.cpp.o .pioenvs\esp01\ESP8266WiFi\WiFiServer.cpp.o .pioenvs\esp01\ESP8266WiFi\WiFiUdp.cpp.o
xtensa-lx106-elf-g++ -o .pioenvs\esp01\pubsubclient\PubSubClient.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -U__STRICT_ANSI__ -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -DARDUINO=10604 -IC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\include -I.pioenvs\esp01\FrameworkArduino -I.pioenvs\esp01\FrameworkArduinoVariant -I.pioenvs\esp01\ESP8266WiFi -I.pioenvs\esp01\pubsubclient .pioenvs\esp01\pubsubclient\PubSubClient.cpp
xtensa-lx106-elf-ar rcs .pioenvs\esp01\libpubsubclient.a .pioenvs\esp01\pubsubclient\PubSubClient.o
xtensa-lx106-elf-g++ -o .pioenvs\esp01\firmware.elf -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,-T C:\Users\Bart\.platformio\packages\ldscripts\esp8266.flash.512k.ld .pioenvs\esp01\src\main.o -LC:\Users\Bart\.platformio\packages\framework-arduinoespressif\sdk\lib -L.pioenvs\esp01 -Wl,--start-group -lsmartconfig -lpp -lmain -lwpa -llwip -lnet80211 -lphy -lhal -lgcc -lm .pioenvs\esp01\libFrameworkArduinoVariant.a .pioenvs\esp01\libFrameworkArduino.a .pioenvs\esp01\libESP8266WiFi.a .pioenvs\esp01\libpubsubclient.a -Wl,--end-group
c:/users/bart/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: .pioenvs\esp01\firmware.elf section `.text' will not fit in region `iram1_0_seg'
collect2.exe: error: ld returned 1 exit status
scons: *** [.pioenvs\esp01\firmware.elf] Error 1
 [ ERROR ] Took 11.11 seconds 
[Finished in 11.9s with exit code 1]

And this is the example code:

#include <ESP8266WiFi.h>
#include <PubSubClient.h>

// Update these with values suitable for your network.

const char* ssid = "........";
const char* password = "........";
const char* mqtt_server = "broker.mqtt-dashboard.com";

WiFiClient espClient;
PubSubClient client(espClient);
long lastMsg = 0;
char msg[50];
int value = 0;

void setup_wifi() {

  delay(10);
  // We start by connecting to a WiFi network
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("WiFi connected");
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
}

void callback(char* topic, byte* payload, unsigned int length) {
  Serial.print("Message arrived [");
  Serial.print(topic);
  Serial.print("] ");
  for (int i = 0; i < length; i++) {
    Serial.print((char)payload[i]);
  }
  Serial.println();

  // Switch on the LED if an 1 was received as first character
  if ((char)payload[0] == '1') {
    digitalWrite(BUILTIN_LED, LOW);   // Turn the LED on (Note that LOW is the voltage level
    // but actually the LED is on; this is because
    // it is acive low on the ESP-01)
  } else {
    digitalWrite(BUILTIN_LED, HIGH);  // Turn the LED off by making the voltage HIGH
  }

}

void reconnect() {
  // Loop until we're reconnected
  while (!client.connected()) {
    Serial.print("Attempting MQTT connection...");
    // Attempt to connect
    if (client.connect("ESP8266Client")) {
      Serial.println("connected");
      // Once connected, publish an announcement...
      client.publish("outTopic", "hello world");
      // ... and resubscribe
      client.subscribe("inTopic");
    } else {
      Serial.print("failed, rc=");
      Serial.print(client.state());
      Serial.println(" try again in 5 seconds");
      // Wait 5 seconds before retrying
      delay(5000);
    }
  }
}

void setup() {
  pinMode(BUILTIN_LED, OUTPUT);     // Initialize the BUILTIN_LED pin as an output
  Serial.begin(115200);
  setup_wifi();
  client.setServer(mqtt_server, 1883);
  client.setCallback(callback);
}

void loop() {

  if (!client.connected()) {
    reconnect();
  }
  client.loop();

  long now = millis();
  if (now - lastMsg > 2000) {
    lastMsg = now;
    ++value;
    snprintf (msg, 75, "hello world #%ld", value);
    Serial.print("Publish message: ");
    Serial.println(msg);
    client.publish("outTopic", msg);
  }
}

@ivankravets ivankravets modified the milestone: 2.3.3 Sep 29, 2015

@m4mbart

This comment has been minimized.

m4mbart commented Sep 29, 2015

When compiling an example using the Arduino IDE and installed esp8266 module from the Board Manager the resulting message is:

Sketch uses 301,840 bytes (69%) of program storage space. Maximum is 434,160 bytes. Global variables use 48,456 bytes (59%) of dynamic memory, leaving 33,464 bytes for local variables. Maximum is 81,920 bytes.

The library used is: https://github.com/morrissinger/ESP8266-Websocket
I tested this with the websocketclient example code.

So it must be possible to include libraries for this platform. Maybe PlatformIO is somehow pulling too much linked code into the binary?

@ivankravets

This comment has been minimized.

Member

ivankravets commented Sep 29, 2015

Thanks friends. We are working on it...

@valeros valeros closed this in 4dcef89 Oct 2, 2015

ivankravets added a commit that referenced this issue Oct 2, 2015

Merge pull request #299 from valeros/develop
Update espressif platform // Resolve #296, #297
@m4mbart

This comment has been minimized.

m4mbart commented Oct 2, 2015

Cool! I have no development board available to check the actual uploading. But compiling works successful now 👍

@ivankravets

This comment has been minimized.

Member

ivankravets commented Oct 2, 2015

@m4mbart thanks for the report! We are going to release PlatformIO 2.3.3 today. Don't forget to upgrade for the stable release.

ivankravets added a commit that referenced this issue Oct 2, 2015

@daniellycosta

This comment has been minimized.

daniellycosta commented Sep 4, 2017

I'm having the same problem

"c:/users/dany/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: .pioenvs\d1_mini\firmware.elf section .text' will not fit in
region iram1_0_seg'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment