Skip to content

Latest commit

 

History

History
139 lines (109 loc) · 6.76 KB

File metadata and controls

139 lines (109 loc) · 6.76 KB

1. MicroPython configuration

1.1. Install MicroPython on the RPI Pico

  1. Go to rp2040 documentation site and download U2F file
  2. Connect the pico to your computer while pressing on BOOTSEL button
  3. Copy the U2F file on the Pico's filesystem

Install MicroPython on PRI Pico

1.2. Install Python on your machine

  1. Go to Python website and download the last version of Python
  2. Install the downloaded file on your machine. Make sure to add python to PATH

Add python to PATH

1.3. Setup VS Code

  1. Open VS Code and go to extension tab
  2. Search for pico and install Pico-Go extension chriswood.pico-go
  3. Search for python and install Python extension ms-python.python

1.4. Use VS Code to program RPI Pico

  1. In a new VS Code project, enter the command Pico-Go > Configure Project
  2. Connect your RPI Pico with USB. The terminal will tell you on wich COM port your connected
  3. You can create a new .py file and write code
  4. There is buttons on the bottom of the window to run or upload code and connect the board to VS Code

Run project

A project example can be found in the MicroPython-example branch of this repository.

2. C++ configuration (Not working...)

Make sure to have python installed (Step 1.2. Install Python on your machine) A video can be found on YouTube

2.1. Install softwares and compilers

2.1.1. GCC compiler

  1. Go to ARM website and download the last version
  2. Install the compiler. Make sure to check Add path to environment variable

Add path to environment

2.1.2. Install cMake on your computer

  1. Go to cMake website, download and install cMake for your machine
  2. During the installation, chech Add CMake to the system PATH for all users

Add CMake to the system PATH

2.1.3. Install C++ for Visual Studio

  1. Go to Microsoft website and scroll to "Build Tools for Visual Studio 2019" and click on Download
  2. Run the file and select C++ build tools and click install

2.2. Download and configure PICO SDK

  1. Go to the GitHub repository and download the repository
  2. Go to the GitHub examples repository and download the repository
  3. Put these repositories in a folder on your machine, for example C:\Pico
  4. Open a Developer Command Prompt, go to your folder et add pico-skd to PATH
cd C:\Pico
setx PICO_SDK_PATH "C:\Pico\pico-sdk"

2.3. Setup VS Code

  1. Open VS Code and go to extension tab
  2. Search for cortex and install Cortex-Debug extension marus25.cortex-debug
  3. Search for cmake and install CMake Tools extension ms-vscode.cmake-tools
  4. Search for c++ and install C/C++ extension ms-vscode.cpptools

2.4. Configure VS Code

2.4.1. Configure CMake Tools

  1. Go to CMake tools configuration extension settings
  2. Scroll to Cmake: Configure environment
  3. Click on Add Item and add PICO_SDK_PATH and the value is the pico-sdk folder's path C:\Pico\pico-sdk
  4. Scroll to Cmake: Generator
  5. Type NMake Makefiles

2.5. Use VS Code to program RPI Pico

  1. In a new VS Code project, enter the command CMake: Quick Start, then select Executable and the correct kit GCC for arm-none-eabi, then enter a project name
  2. Click the build button on the bottom of the window

A project example can be found in the c-example branch of this repository.

3. C++ configuration using PlateformIO and arduino libraries

Make sure to have python installed (Step 1.2. Install Python on your machine)

3.1. Setup VS Code

  1. Open VS Code and go to extension tab
  2. Search for PlatformIO and install PlatformIO IDE extension platformio.platformio-ide

3.2. Install drivers

  1. Go to Zadig website and download Zadig
  2. Open Zadig and select RP2 Boot (Interface 1) and the WinUSB driver
  3. Click on Install Driver

Install driver

3.3. Start a new project

  1. Open the PIO Home window and click on New Project

Open PIO Home

  1. Choose a name for your project and select your board and the Arduino framework

New PIO Project

3.4. Build and upload

  1. Before uploading a project for the first time. Add 2 lines to platformio.ini file On Windows use the drive letter when the pico is connected in BOOTSEL mode On MacOS use Volumes/RPI-RP2 On Linux use the path where the volume is mounted
upload_port = E:\
upload_protocol = picotool
  1. To buil or upload your project, the tasks can be found in the PlatformIO plug-in

Build or Upload project

A project example can be found in the C-PlatformIO-example branch of this repository.