jeelabs / esp-link

esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer
Other
2.82k stars 720 forks source link

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

Open ikalash762 opened 7 months ago

ikalash762 commented 7 months ago

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 toloop' 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 tosetup' 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 commented 7 months ago

It is not arduino framework.

ikalash762 commented 7 months ago

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:

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