Open idpromnut opened 4 weeks ago
CMake can't find the Lwip library. My guess is that you haven't initialised the GitHub sub modules. Either in this checkout or the SDK itself. See https://www.raspberrypi.com/news/how-to-add-ethernet-to-raspberry-pi-pico/ for a full walkthrough for building this repo.
I'm pretty sure the Pico SDK is finding and building the LWIP library. It is complaining that there is an existing interface library.
[cmake] CMake Error at CMakeLists.txt:18 (add_library):
[cmake] add_library cannot create target "pico_lwip" because another target with
[cmake] the same name already exists. The existing target is an interface library
[cmake] created in source directory
And I have init'd the submodules. LWIP is present (with the repo) under lib/lwip. I don't know if it makes a difference, but I am trying to compile this under windows. Is there something with the Cmake setup that may work under Linux that is tripping me up?
I tried the exact instructions found at https://www.raspberrypi.com/news/how-to-add-ethernet-to-raspberry-pi-pico/ on my laptop with a Debian install and i get the exact same problem (I also checked that I had init'd the pico-sdk repo as well):
user@helium:~/dev/pico-rmii-ethernet/build$ cmake ..
Using PICO_SDK_PATH from environment ('/home/user/dev/pico/pico-sdk')
PICO_SDK_PATH is /home/user/dev/pico/pico-sdk
Defaulting PICO_PLATFORM to rp2040 since not specified.
Defaulting PICO platform compiler to pico_arm_gcc since not specified.
-- Defaulting build type to 'Release' since not specified.
PICO compiler is pico_arm_gcc
-- The C compiler identification is GNU 8.3.1
-- The CXX compiler identification is GNU 8.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/arm-none-eabi-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/arm-none-eabi-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
Build type is Release
Defaulting PICO target board to pico since not specified.
Using board configuration from /home/user/dev/pico/pico-sdk/src/boards/include/boards/pico.h
-- Found Python3: /usr/bin/python3.9 (found version "3.9.2") found components: Interpreter
TinyUSB available at /home/usre/dev/pico/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
BTstack available at /home/user/dev/pico/pico-sdk/lib/btstack
cyw43-driver available at /home/user/dev/pico/pico-sdk/lib/cyw43-driver
Pico W Bluetooth build support available.
lwIP available at /home/user/dev/pico/pico-sdk/lib/lwip
mbedtls available at /home/user/dev/pico/pico-sdk/lib/mbedtls
Using PICO_EXAMPLES_PATH from environment ('/home/user/dev/pico/pico-examples')
CMake Error at CMakeLists.txt:18 (add_library):
add_library cannot create target "pico_lwip" because another target with
the same name already exists. The existing target is an interface library
created in source directory
"/home/user/dev/pico/pico-sdk/src/rp2_common/pico_lwip". See
documentation for policy CMP0002 for more details.
-- Configuring incomplete, errors occurred!
user@helium:~/dev/pico-rmii-ethernet/build$
Is there a particular pico-sdk commit that you are using? I am using the version tagged 1.5.1 (commit 6a7db34ff63345a7badec79ebea3aaef1712f374).
Hi, I'm trying to compile pico-rmii-ethernet When I try and build it I get the following CMake error:
I'm using the latest Pico SDK 1.5 and GCC ARM 10.1
Let me know if there is any other information you need from me. I have PICO_SDK correctly mapped (I am able to generate and compile other Pico projects that I am working on).
Thanks!