Giter Club home page Giter Club logo

pico-setup's Introduction

Pico W Setup Guides

Table of Contents

Windows

macOS

Pico W MSYS2 🧩

The ultimate way to build for Pico W on Windows...

  1. Download msys2 from msys2.org

  2. Open MSYS2 UCRT64 terminal and execute setup script

git clone https://github.com/thewh1teagle/pico-setup
cd pico-setup
./setup
  1. Execute build script
./build

It will build and upload automatically.

That's it! 🎉

You ready to start your project...

Dive Deeper ✨

Upload with picotool manually

picotool reboot -f -u
picotool load -x main.uf2

Fix drivers for uploading with picotool

  1. Download zadig
  2. Select Option > List All Devices
  3. Select RP2040 (interface 1), may be different -> replace driver to libusb32

In case something went bad and you want to restore drivers:

  1. Hit win+r
  2. type devmgmt.msc and ENTER
  3. find the device and choose update device driver
  4. Choose "let me choose" and try to change it to something else

VSCode extensions for develop

vscode-serial-monitor

cpptools

Open ucrt64 from context menu

image

  1. copy the following in new file ucrt.reg
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\mingw64]
@="MinGW UCRT64 Here"
"Icon"="\"C:\\msys64\\ucrt64.ico\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\mingw64\command]
@="C:\\msys64\\msys2_shell.cmd -defterm -where \"%V/\" -ucrt64"

[HKEY_CLASSES_ROOT\Directory\shell\mingw64]
@="MinGW UCRT64 Here"
"Icon"="\"C:\\msys64\\ucrt64.ico\""

[HKEY_CLASSES_ROOT\Directory\shell\mingw64\command]
@="C:\\msys64\\msys2_shell.cmd -defterm -where \"%V/\" -ucrt64"
  1. open it and apply

Open ucrt64 from windows terminal

  1. open windows terminal settings (top arrow -> settings)
  2. open json settings (left dropdown -> open JSON file)
  3. search for profiles and add to profiles list the following
{
    "guid": "{17da3cac-b318-431e-8a3e-7fcdefe6d114}",
    "name": "UCRT64 / MSYS2",
    "commandline": "C:/msys64/msys2_shell.cmd -defterm -here -no-start -ucrt64",
    "startingDirectory": "C:/msys64/home/%USERNAME%",
    "icon": "C:/msys64/ucrt64.ico",
    "font": 
    {
      "face": "Lucida Console",
      "size": 9
    }
}

Play with pico-examples

git clone https://github.com/raspberrypi/pico-examples --depth 1
cd pico-examples
cmake -B build .
cmake --build build blink -- -j16
picotool load -x build/blink/blink/uf2

Pico W macOS M1 🧩

The ultimate way to build for Pico W on macOS...

  1. Install toolchain
brew install gcc-arm-embedded
brew install picotool
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/thewh1teagle/serust/releases/download/v0.0.3/serust-installer.sh | sh
  1. Install Pico SDK
sudo mkdir -p /usr/local/share/pico-sdk
sudo chown $(whoami) /usr/local/share/pico-sdk
cd /usr/local/share/pico-sdk
git clone --recursive --depth 1 https://github.com/raspberrypi/pico-sdk.git .
export PICO_SDK_PATH=/usr/local/share/pico-sdk
echo 'export PICO_SDK_PATH=/usr/local/share/pico-sdk' >> ~/.zshrc
source ~/.zshrc
  1. Build time
cmake -B build -DPICO_BOARD=pico_w -DPICO_PLATFORM=rp2040
cmake --build build -- -j16
  1. Upload
picotool load build/app.elf 
  1. Monitor
serust --pid 000a

pico-setup's People

Contributors

thewh1teagle avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.