usedbytes / picow_ds4

Basic PS4 / Dual Shock 4 controller handling on a Pico-W
BSD 3-Clause "New" or "Revised" License
41 stars 11 forks source link

CMake error #2

Open Mistborn21 opened 1 year ago

Mistborn21 commented 1 year ago

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 commented 1 year ago

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 commented 12 months ago

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 commented 12 months ago

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