Skip to content

Linking fails on feature/stage branch #164

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

Closed
Niek opened this issue Jul 10, 2019 · 3 comments
Closed

Linking fails on feature/stage branch #164

Niek opened this issue Jul 10, 2019 · 3 comments

Comments

@Niek
Copy link

Niek commented Jul 10, 2019

The develop branch and old versions work fine, but when trying to build my project on the feature/stage branch I get this error from the linker:

~/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: .pio/build/my-env/libFrameworkArduino.a(Esp.cpp.o): in function `EspClass::getSketchSize()':
~/.platformio/packages/framework-arduinoespressif8266@src-31d658a59f41540201fc3726a1394910/cores/esp8266/Esp.cpp:520: undefined reference to `_FS_start'
collect2: error: ld returned 1 exit status
*** [.pio/build/my-env/firmware.elf] Error 1

This seems to be related to this PR that was merged a month ago: esp8266/Arduino#5511

@Niek
Copy link
Author

Niek commented Jul 11, 2019

It seems the toolchain in feature/stage is at an old version: 2.40802.190218 (4.8.2). To build it needs a toolchain of at least 3.0: https://github.com/earlephilhower/esp-quick-toolchain/releases

@mcspr
Copy link
Contributor

mcspr commented Jul 13, 2019

3.0... looks like a testing branch for gcc-7 (and even gcc-9 as of right now!)

_FS_start is expected to be provided by the linker script:
https://github.com/esp8266/Arduino/blob/8b5433977edbe9749d3d7cdfc6a2fb7b19944095/tools/sdk/ld/eagle.flash.1m.ld#L17
Replacing old _SPIFFS_start, _end, _page and _block
Which could be an issue when the used ldscript does not come from the tools/sdk/ld but from the project (using old variables still, for example)

@Niek
Copy link
Author

Niek commented Jul 13, 2019

You're right @mcspr - I needed a change in the linker script, it actually builds fine with the old toolchain - so closing this.

@Niek Niek closed this as completed Jul 13, 2019
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

2 participants