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

CMake error #2

Open
Mistborn21 opened this issue Oct 25, 2023 · 3 comments
Open

CMake error #2

Mistborn21 opened this issue Oct 25, 2023 · 3 comments

Comments

@Mistborn21
Copy link

Hello!
I'm trying to use this repository, but when I go to do the
cmake -DPICO_BOARD=pico_w -DPICO_SDK_PATH=/your/path/to/pico-sdk ../
command as in the instructions, I keep getting an error.

cmake -DPICO_BOARD=pico_w -DPICO_SDK_PATH="D:\Git_Stuff\pico_sdk_import.cmake"
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Error: The current CMakeCache.txt directory /mnt/d/git_stuff/picow_ds4/build/CMakeCache.txt is different than the directory d:/Git Stuff/picow_ds4/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source directory "/mnt/d/git_stuff/picow_ds4/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

If I do make, it says no targets specified and won't work. What should I do?
Thanks!

@usedbytes
Copy link
Owner

Looks like your commands are wrong and/or you need to clean your build directory and start again.

"PICO_SDK_PATH" needs to be the directory of this repo: https://github.com/raspberrypi/pico-sdk/ (so the directory containing pico_sdk_init.cmake

From the error messages, you've got a strange mix of WSL paths (/mnt/d/...) and Windows paths (D:\Git_Stuff\...) - are you running this in Windows or WSL?

This doesn't look like an issue with this project - you've just got issues with your Pico SDK and build setup.

@Mistborn21
Copy link
Author

I'm running this on vscode using a wsl terminal. I can't figure out how to get cmake on my gitbash terminal. Any help with how to launch and then run the cmake file would be appreciated.

@usedbytes
Copy link
Owner

I'm afraid I don't use VS Code nor Windows for Pico development. As this looks like you have partially set up the environment in Windows and partially in WSL, my only suggestion is to delete the repo and start again.

There are probably other places/people/forums who can help you better with Pico + VS Code issues, as I said, I don't think this is related to this specific project. Maybe try the Raspberry Pi forums

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

2 participants