Error installing Pico-SDK

January 19, 2024, 21:28

.gaedel

I'm trying to install Pico-SDK using the following commands: Install Pico-SDK in Your OS(like Raspberry Pi OS). wget https://github.com/raspberrypi/pico-setup/blob/master/pico_setup.sh -O pico_setup.sh chmod a+x pico_setup.sh ./pico_setup.sh The first two commands (wget and chmod) seem to run fine. However, the /pico_setup.sh fails. /pico_setup.sh is in the current folder where I ran the command. What do I need to do in order to run that? I'm running on Ubuntu 22.04. It's a brand new VirtualBox server. The only items I installed previously were Git and Arduino IDE 2.1.1.

.gaedel

I also installed the CMake command in the previous installation option in the wiki.

oops.se

The command wget https://github.com/raspberrypi/pico-setup/blob/master/pico_setup.sh -O pico_setup.sh is wrong, it will fetch the webpage/json file! Replace that command with wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh -O pico_setup.sh

.gaedel

Does this have to be installed from Raspberry Pi OS or can I do it in Ubuntu or Windows?

.gaedel

That works great!

oops.se

Nice

.gaedel

I received an error at the end of the wget on the pico_setup.sh link:
Using PICO_SDK_PATH from environment ('/home/gaedel/pico/pico-sdk')
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
-- Could NOT find LIBUSB (missing: LIBUSB_INCLUDE_DIR) 
CMake Error at CMakeLists.txt:34 (message):
  picotool cannot be built because libUSB is not found


-- Configuring incomplete, errors occurred!
See also "/home/gaedel/pico/picotool/build/CMakeFiles/CMakeOutput.log".
Any ideas on what to do next?

.gaedel

I was able to get past that last error by reinstalling cmake-data.

.gaedel

Now I'm getting another error.
Installing VSCODE
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done

No apt package "code", but there is a snap with that name.
Try "snap install code"

E: Unable to locate package code
I did the
snap install code
, reran, and got the same error.

.gaedel

Any help with this, please? Do you think it will work if I edit the pico-setup.sh file and remove it?

.gaedel

Here's the code on this segment in the pico_setup.sh file (I commented out the lines and it finished.)
#if [[ "$SKIP_VSCODE" == 1 ]]; then
#    echo "Skipping VSCODE"
#else
#    echo "Installing VSCODE"
#    sudo apt install -y $VSCODE_DEPS

    # Get extensions
#    code --install-extension marus25.cortex-debug
#    code --install-extension ms-vscode.cmake-tools
#    code --install-extension ms-vscode.cpptools
#fi
Do you guys see anything wrong in the code?

thunder07337

Everything is commented out with #. You must delete the # otherwise the commands will be ignored.

.gaedel

The commands failed, so I commented them out so the pico_setup.sh file could finish. I was able to get the breakboard to work finally after commenting them out. However, since this section was not installed, will I have problems later? What does the "code" section here that I skipped, what does it do?