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

collect2.exe: error: ld returned 1 exit status #573

Open
ikalash762 opened this issue Nov 27, 2023 · 2 comments
Open

collect2.exe: error: ld returned 1 exit status #573

ikalash762 opened this issue Nov 27, 2023 · 2 comments

Comments

@ikalash762
Copy link

ikalash762 commented Nov 27, 2023

I try to compile this project for ESP8266 (IDE: Visual Studio Code, extension PlatformIO), but i get the following error:

c:/users/user/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: .pio\build\esp12e\libFrameworkArduino.a(core_esp8266_main.cpp.o):(.text._ZL12loop_wrapperv+0x8): undefined reference to setup' c:/users/user/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: .pio\build\esp12e\libFrameworkArduino.a(core_esp8266_main.cpp.o):(.text._ZL12loop_wrapperv+0xc): undefined reference to loop'
c:/users/user/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: .pio\build\esp12e\libFrameworkArduino.a(core_esp8266_main.cpp.o): in function _ZL12loop_wrapperv': core_esp8266_main.cpp:(.text._ZL12loop_wrapperv+0x29): undefined reference to setup'
c:/users/user/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: core_esp8266_main.cpp:(.text._ZL12loop_wrapperv+0x35): undefined reference to `loop'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp12e\firmware.elf] Error 1

The content of platformio.ini file is the following:
[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino
upload_port = COM[3]
upload_speed = 115200
monitor_port = COM[3]

Can you help me to solve this problem?

@uzi18
Copy link
Contributor

uzi18 commented Nov 27, 2023

It is not arduino framework.

@ikalash762
Copy link
Author

ikalash762 commented Nov 28, 2023

Thank you for a quick answer. Please help me a little more, by answering the following questions.
It seems that ESP8266 can work not only with arduino. I have Visual Studio Code + PlatformIO framework (for embedded systems like my ESP8266).
In this case, how can i compile this project? Maybe i can switch it to other platform, which supports this project esp-link (UART to WIFI bridge)? What IDEs and platforms (frameworks) can i use to work with this project on ESP8266?

In according with documentation on this project (https://github.com/jeelabs/esp-link), you can see that it supports arduino:
"flash-programming attached Arduino/AVR microcontrollers and LPC800-series and other ARM microcontrollers via Wifi"
"Note that http://github.com/jeelabs/esp-link is the original esp-link software which has notably been forked by arduino.org as Esp-Link and shipped with the initial Arduino Uno Wifi. The JeeLabs esp-link has evolved significantly since the fork and added cool new features as well as bug fixes."
"You can then attach a uC and upload a sketch:

  • attach a uC (e.g. arduino) to your esp8266 module
  • connect via the serial port to see a pre-loaded sketch running
  • upload a fresh version of the sketch"

Can i solve this problem simply by replacing the "framework = arduino" string to other? What is the framework must be there?
On this page: https://docs.platformio.org/en/stable/frameworks/index.html there are full list of frameworks which PlatformIO supports:

Arduino
CMSIS
Energia
ESP8266 Non-OS SDK
ESP8266 RTOS SDK
Espressif IoT Development Framework
Freedom E SDK
FreeRTOS
Renesas Flexible Software Package
libopencm3
Mbed OS
PULP OS
PULP Runtime Environment
PULP SDK
Shakti SDK
Standard Peripheral Library
STM32Cube
WD-Firmware
WiringPi
Zephyr

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

No branches or pull requests

2 participants