Skip to content
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

Error when compiling any of the examples #104

Closed
marcoschwartz opened this issue Apr 24, 2015 · 6 comments
Closed

Error when compiling any of the examples #104

marcoschwartz opened this issue Apr 24, 2015 · 6 comments

Comments

@marcoschwartz
Copy link

Hello, since the last commit on the repo (ad74bee) I have the following error with all my sketches using the ESP8266:

/Users/marco/Downloads/Arduino/build/macosx/work/Arduino.app/Contents/Java/hardware/tools/esp8266/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: /var/folders/cy/_hsnm_s10gz1lkx2yyrlmg4w0000gn/T/build6868186071784743931.tmp/HelloServer.cpp.elf section .text' will not fit in regioniram1_0_seg'
collect2: error: ld returned 1 exit status
Error compiling.

Anybody else has that?

@av1024
Copy link

av1024 commented Apr 24, 2015

Confirm.
Falling back to pre- strtok_r version with a bit monkey-patching

@natetrue
Copy link

I'm getting the error too with that commit. Looks like the linker is trying to put too much stuff into iram and not irom - which is odd, the linker script has not changed.

@natetrue
Copy link

I tried moving libm.a to the irom section and it appears to work:

diff --git a/hardware/tools/esp8266/sdk/ld/eagle.app.v6.ld b/hardware/tools/esp8266/sdk/ld/eagle.app.v6.ld
index 4bafb69..a72e7d0 100644
--- a/hardware/tools/esp8266/sdk/ld/eagle.app.v6.ld
+++ b/hardware/tools/esp8266/sdk/ld/eagle.app.v6.ld
@@ -153,6 +153,7 @@ SECTIONS
     _irom0_text_start = ABSOLUTE(.);
     *core_esp8266_*.o(.literal*, .text*)
     *.cpp.o(.literal*, .text*)
+    *libm.a:(.literal .text .literal.* .text.*)
     *(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
     _irom0_text_end = ABSOLUTE(.);
   } >irom0_0_seg :irom0_0_phdr

libm seems to have a lot of the mathy functions (log, sin, etc), though, so it may not be the best choice to move out of iram.

@Links2004
Copy link
Collaborator

good idea have changed it

@thewiep
Copy link
Contributor

thewiep commented Apr 24, 2015

I had the same issue with ad74bee and adding the line from abdbdb1 fixes it.
Thanks!

igrr added a commit that referenced this issue Apr 26, 2015
* esp8266: (21 commits)
  HardwareSerial: add other configs than 8N1
  Delete jre-8u31.zip.sha
  Fix Windows build
  Add boot loader compatible speed of 74880 to serial.
  update SDK to esp_iot_sdk_v1.0.1_15_04_24
  include stdlib_noniso.h in Arduino.h see #110
  strnlen implementation
  missing strn program space wrappers
  uart_interrupt_handler is now in ram
  move libm to flash (.irom0.text) saves 3544 Byte in ram see #104
  Revert c_types.h
  fix bug #98
  add INPUT_PULLDOWN support
  add prototypes for ets_vsnprintf and ets_vprintf fix some compiler warnings
  update SDK to 1.0.1_b2_15_04_10 + SSL Patch
  update SDK to 1.0.1_b1_15_04_02
  add files to ignore (use hardlink) to get git hardware in arduino dir
  Add method to configure softAP IP address
  test for #86
  add to ESP class: getChipId getSDKversion getBootVersion getBootMode getCPUfreqMHz
  ...
@igrr
Copy link
Member

igrr commented Apr 26, 2015

fixed in abdbdb1

@igrr igrr closed this as completed Apr 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants