Linking error esp32-cam example.

nacheitor
Posts: 6
Joined: Fri Oct 09, 2020 8:13 am

Linking error esp32-cam example.

Postby nacheitor » Wed Jan 26, 2022 4:48 pm

I'm trying to compile the example esp32-cam.
I added to platformio.ini the following:

Code: Select all

[env]
lib_deps =
  esp32-camera

And enable PSRAM on menuconfig.

But I get this error when compiling:

Code: Select all


Processing esp32cam (platform: espressif32; board: esp32cam; framework: espidf)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32cam.html
PLATFORM: Espressif 32 (3.0.0) > AI Thinker ESP32-CAM
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tin
y, tumpa)
PACKAGES:
 - framework-espidf 3.40200.210118 (4.2.0)
 - tool-cmake 3.16.4
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - tool-idf 1.0.1
 - tool-mconf 1.4060000.20190628 (406.0.0)
 - tool-ninja 1.9.0
 - toolchain-esp32ulp 1.22851.191205 (2.28.51)
 - toolchain-xtensa32 2.80400.210114 (8.4.0)
Reading CMake configuration...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 1 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <esp32-camera> 2.0.0
Building in release mode
Linking .pio\build\esp32cam\firmware.elf
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(esp_camera.o):(.literal.camera_probe+0x14): undefined reference to `camera_enable_out_clock'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(esp_camera.o):(.literal.camera_probe+0x18): undefined reference to `camera_disable_out_clock'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(esp_camera.o): in function `camera_probe':
D:\Proyectos\Ejemplo/.pio/libdeps/esp32cam/esp32-camera/driver/esp_camera.c:138: undefined reference to `camera_enable_out_clock'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/esp_camera.c:169: undefined reference to `camera_disable_out_clock'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/esp_camera.c:184: undefined reference to `camera_disable_out_clock'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o):(.literal.cam_dma_config+0x38): undefined reference to `ll_cam_get_dma_align'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o):(.literal.cam_init+0x14): undefined reference to `ll_cam_set_pin'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o):(.literal.cam_init+0x18): undefined reference to `ll_cam_config'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o):(.literal.cam_stop+0x0): undefined reference to `ll_cam_vsync_intr_enable'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o):(.literal.cam_stop+0x4): undefined reference to `ll_cam_stop'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o):(.literal.cam_deinit+0x0): undefined reference to `ll_cam_deinit'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o):(.literal.cam_config+0x28): undefined reference to `ll_cam_set_sample_mode'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o):(.literal.cam_config+0x2c): undefined reference to `ll_cam_init_isr'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o):(.literal.cam_task+0x10): undefined reference to `ll_cam_memcpy'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o): in function `cam_start_frame':
D:\Proyectos\Ejemplo/.pio/libdeps/esp32cam/esp32-camera/driver/cam_hal.c:79: undefined reference to `ll_cam_start'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/cam_hal.c:81: undefined reference to `ll_cam_do_vsync'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o): in function `cam_dma_config':
D:\Proyectos\Ejemplo/.pio/libdeps/esp32cam/esp32-camera/driver/cam_hal.c:240: undefined reference to `ll_cam_dma_sizes'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/cam_hal.c:255: undefined reference to `ll_cam_get_dma_align'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o): in function `cam_init':
D:\Proyectos\Ejemplo/.pio/libdeps/esp32cam/esp32-camera/driver/cam_hal.c:315: undefined reference to `ll_cam_set_pin'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/cam_hal.c:317: undefined reference to `ll_cam_config'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o): in function `cam_stop':
D:\Proyectos\Ejemplo/.pio/libdeps/esp32cam/esp32-camera/driver/cam_hal.c:329: undefined reference to `ll_cam_vsync_intr_enable'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/cam_hal.c:329: undefined reference to `ll_cam_stop'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o): in function `cam_deinit':
D:\Proyectos\Ejemplo/.pio/libdeps/esp32cam/esp32-camera/driver/cam_hal.c:425: undefined reference to `ll_cam_deinit'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o): in function `cam_config':
D:\Proyectos\Ejemplo/.pio/libdeps/esp32cam/esp32-camera/driver/cam_hal.c:343: undefined reference to `ll_cam_set_sample_mode'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/cam_hal.c:374: undefined reference to `ll_cam_init_isr'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o): in function `cam_start':
C:/.platformio/packages/framework-espidf/components/freertos/include/freertos/task.h:440: undefined reference to `ll_cam_vsync_intr_enable'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o): in function `cam_task':
D:\Proyectos\Ejemplo/.pio/libdeps/esp32cam/esp32-camera/driver/cam_hal.c:134: undefined reference to `ll_cam_stop'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/cam_hal.c:141: undefined reference to `ll_cam_memcpy'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/cam_hal.c:145: undefined reference to `ll_cam_stop'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/cam_hal.c:147: undefined reference to `ll_cam_stop'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: D:\Proyectos\Ejemplo/.pio/libdeps
/esp32cam/esp32-camera/driver/cam_hal.c:160: undefined reference to `ll_cam_memcpy'
c:/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32cam\lib6be\libesp32-c
amera.a(cam_hal.o): in function `cam_take':
D:\Proyectos\Ejemplo/.pio/libdeps/esp32cam/esp32-camera/driver/cam_hal.c:462: undefined reference to `ll_cam_memcpy'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32cam\firmware.elf] Error 1
========================= [FAILED] Took 44.57 seconds =========================
Does anyone know where the problem could be?

Thanks in advance.

Jonathan2892
Posts: 45
Joined: Tue Dec 07, 2021 4:04 pm

Re: Linking error esp32-cam example.

Postby Jonathan2892 » Thu Jul 14, 2022 8:12 am

Hey,

did you solve this? If so, can you give me a hint how?

Best

Who is online

Users browsing this forum: No registered users and 117 guests