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

Linker error when building for ESP32-C3 #19

Open
contactalexliu opened this issue Jul 20, 2022 · 0 comments
Open

Linker error when building for ESP32-C3 #19

contactalexliu opened this issue Jul 20, 2022 · 0 comments

Comments

@contactalexliu
Copy link

contactalexliu commented Jul 20, 2022

When building a project in PlatformIO targeting the ESP32-C3, the linker throws the following error:

Linking .pio\build\m5stamp-c3\firmware.elf
c:/users/a/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: .pio\build\m5stamp-c3\libda1\libTelnetSpy.a(TelnetSpy.cpp.o): in function `TelnetSpy::debugWrite(unsigned char)':
G:\Documents\PlatformIO\Projects\Mux Controller/.pio/libdeps/m5stamp-c3/TelnetSpy/TelnetSpy.cpp:346: undefined reference to `ets_write_char_uart'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\m5stamp-c3\firmware.elf] Error 1

Based on this issue in the ESP-IDF repo, it seems ets_write_char_uart() is no longer available for the ESP32-C3. I've managed to bypass this error for now with setDebugOutput(false) and commenting out the debugWrite() and line 520 in TelnetSpy.cpp, but perhaps there is a better solution using the UART driver's uart_tx_chars() instead (I can't seem to find uart_tx_one_char() as suggested in the linked issue in the C3's API reference).

On another note, thank you for all your work on this library!

@contactalexliu contactalexliu changed the title Not compiling on ESP32-C3 Linker error when building for ESP32-C3 Jul 20, 2022
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

1 participant