cmake does not respect PICO_SDK_PATH changing

Open
#12 3 comments 0 reactions 1 assignee View on GitHub

@kilograham is already working on this.

Since Jun 6, 2023.

Assessment

This issue has not been assessed yet.

Description

[nix-shell:~/apps/rpi/pico/pico-examples/build]$ cmake .. -DPICO_STDIO_USB=1
CMake Error at pico_sdk_import.cmake:54 (message):
  Directory '/nix/store/iakf0a4wi5al3a6gngf70arkmwcz7il1-source' not found
Call Stack (most recent call first):
  CMakeLists.txt:4 (include)


-- Configuring incomplete, errors occurred!
See also "/home/clever/apps/rpi/pico/pico-examples/build/CMakeFiles/CMakeOutput.log".
See also "/home/clever/apps/rpi/pico/pico-examples/build/CMakeFiles/CMakeError.log".

[nix-shell:~/apps/rpi/pico/pico-examples/build]$ echo $PICO_SDK_PATH
/nix/store/60rlhylazjg06mpzn9qnpjwcs2n1ykh5-source

[nix-shell:~/apps/rpi/pico/pico-examples/build]$ rm CMakeCache.txt

[nix-shell:~/apps/rpi/pico/pico-examples/build]$ cmake .. -DPICO_STDIO_USB=1
Using PICO_SDK_PATH from environment ('/nix/store/60rlhylazjg06mpzn9qnpjwcs2n1ykh5-source')
Pico SDK is located at /nix/store/60rlhylazjg06mpzn9qnpjwcs2n1ykh5-source
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
PICO_GCC_TRIPLE defaulted to arm-none-eabi
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /nix/store/1nkm42wc9rkpvly02q2vbd6gprjxsxjz-arm-none-eabi-stage-final-gcc-debug-wrapper-9.3.0/bin/arm-none-eabi-gcc
Defaulting PICO target board to pico since not specified.
Using board configuration from /nix/store/60rlhylazjg06mpzn9qnpjwcs2n1ykh5-source/src/boards/include/boards/pico.h
-- Found Python3: /nix/store/bs03sg8b0gq2zr4v252hh9psp780qj5q-python3-3.8.5/bin/python3.8 (found version "3.8.5") found components: Interpreter
TinyUSB available at /nix/store/60rlhylazjg06mpzn9qnpjwcs2n1ykh5-source/lib/tinyusb/src/portable/raspberrypi/rp2040; adding USB support.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
ELF2UF2 will need to be built
PIOASM will need to be built
-- Configuring done
-- Generating done
-- Build files have been written to: /home/clever/apps/rpi/pico/pico-examples/build

after running a garbage collection (deleting the old $PICO_SDK_PATH) and updating $PICO_SDK_PATH to point to the new directory, cmake refused to respect that, and kept looking in the old path
deleting CMakeCache.txt made it forget and look in the new path, but it would be better if it detected the change automatically

Dominant language
C
Stars
3.9k
Forks
1k
Avg merge
1d 16h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/pico-examples

All issues in raspberrypi/pico-examples

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.