05-25-2019 01:45 AM
I have code which works on an STM32**. The code is the "basic.ino" example from the BSEC github download (dated 5-19-2019) + Tiny ASCII only library for an OLED display.
** by works I mean the Serial monitor printed out the full compliment of measurements and calculations (IAQ etc) from the BME680 and the OLED display functioned properly.
It compiled to 69K for the STM32.
I 've modified the platform.txt for the ESP8266 pretty much the same way the STM32 platform.txt was modified.
Now I'm using a NodeMCU V1 -12E and when I try to compile I continually receive an error: "section `.text1' will not fit in region `iram1_0_seg'"
I'm guessing there are some memory boundries on the NodeMCU but except for knowing the term "Memory boundry" I'm lost.
It seems others have this software on the ESP platform so I'm assuming its something I did or didnot do. Any suggestions would be appreciated.
John
More compile messages:
Linking everything together...
"C:\\Users\\john\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\2.5.0-3-20ed2b9/bin/xtensa-lx106-elf-gcc" -CC -E -P -DVTABLES_IN_FLASH "C:\\Users\\john\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.2/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "C:\\Users\\john\\AppData\\Local\\Temp\\arduino_build_639277/local.eagle.app.v6.common.ld"
"C:\\Users\\john\\AppData\\Local\\Arduino15\\packages\\esp8266\\tools\\xtensa-lx106-elf-gcc\\2.5.0-3-20ed2b9/bin/xtensa-lx106-elf-gcc" -fno-exceptions -Wl,-Map "-Wl,C:\\Users\\john\\AppData\\Local\\Temp\\arduino_build_639277/BSEC_OLED_01.ino.map" -g -Wall -Wextra -Os -nostdlib -Wl,--no-check-sections -u app_entry -u _printf_float -u _scanf_float -Wl,-static "-LC:\\Users\\john\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.2/tools/sdk/lib" "-LC:\\Users\\john\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.2/tools/sdk/lib/NONOSDK221" "-LC:\\Users\\john\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.2/tools/sdk/ld" "-LC:\\Users\\john\\AppData\\Local\\Arduino15\\packages\\esp8266\\hardware\\esp8266\\2.5.2/tools/sdk/libc/xtensa-lx106-elf/lib" -Teagle.flash.4m.ld -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -o "C:\\Users\\john\\AppData\\Local\\Temp\\arduino_build_639277/BSEC_OLED_01.ino.elf" -Wl,--start-group "C:\\Users\\john\\AppData\\Local\\Temp\\arduino_build_639277\\sketch\\BSEC_OLED_01.ino.cpp.o" "C:\\Users\\john\\AppData\\Local\\Temp\\arduino_build_639277\\libraries\\BSEC\\bme680\\bme680.c.o" "C:\\Users\\john\\AppData\\Local\\Temp\\arduino_build_639277\\libraries\\BSEC\\bsec.cpp.o" "C:\\Users\\john\\AppData\\Local\\Temp\\arduino_build_639277\\libraries\\Wire\\Wire.cpp.o" "C:\\Users\\john\\AppData\\Local\\Temp\\arduino_build_639277\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\john\\AppData\\Local\\Temp\\arduino_build_639277\\libraries\\SSD1306Ascii\\SSD1306Ascii.cpp.o" "C:\\Users\\john\\AppData\\Local\\Temp\\arduino_cache_443982\\core\\core_90112c4c14131254599985420ac2c45f.a" -lhal -lphy -lpp -lnet80211 -llwip2-536-feat -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc "-LC:\\Users\\john\\Documents\\Arduino\\libraries\\BSEC\\src\\esp8266" -lalgobsec -Wl,--end-group "-LC:\\Users\\john\\AppData\\Local\\Temp\\arduino_build_639277"
c:/users/john/appdata/local/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.exe: C:\Users\john\AppData\Local\Temp\arduino_build_639277/BSEC_OLED_01.ino.elf section `.text1' will not fit in region `iram1_0_seg'
collect2.exe: error: ld returned 1 exit status
{compiler.libraries.ldflags}
Solved! Go to Solution.
05-27-2019 11:38 AM
To solve this, you would need to modify the linker script and specifically define where the library should be placed in memory.
Some instructions to guide you with these steps can be found here.
05-31-2019 07:37 PM
Thank you...... read the instructions, how interesting 🙂
Seriously, thanks, I'm working with the STM32 at the moment and won't get back to the ESP for some time. However I expect your link will solve my problem.
John