The Raspberry PI Foundation has released the Raspberry PI Pico and Pico-W as powerful and cheap microcontrollers (RP2040). You can develop for these microcontrollers using Python or C/C++. Only with C and C++ can you get the full power of the device including access to the dual cores and the programmable IO capability.
The Raspberry PI Foundation has released the Raspberry PI Pico and Pico-W as powerful and cheap microcontrollers (RP2040). You can develop for these microcontrollers using Python or C/C++. Only with C and C++ can you get the full power of the device including access to the dual cores and the programmable IO capability.
Getting going can feel hard and you are all thumbs. The bootsel loading strategy (like a USB key) can feel tedious within the development cycle. There are better ways to set up your environment to support an efficient Raspberry Pico development environment. So you can stop worrying about the tools and start focusing on your project.
Join us on this course to find out how to set up a working environment to:
Easily build and deploy code quickly to the Raspberry Pico or RP2040 boards
Reuse other libraries as building blocks for your own work.
Debug your work through GUI debugging environment
Use of Eclipse or VSCode IDEs for the Pico
Build projects for the Raspberry PI Pico 2 and RP2350 boards
Build using the VSCode Pico Extension or a natively installed Toolchain
The course requires students to have:
Raspberry PI Pico or Pico-W, which will be our target
Windows, Mac, or Ubuntu desktop environment to develop through, and install tools on
Optionally Raspberry PI 4 running Ubuntu or Raspberry OS, which can be used as a build and debug probe
Either a Raspberry PI Debug Probe or a Second Pico to act as a Probe for flashing and debugging
Awareness of CMake or ability to self-study this utility
The skills you will learn and the development environment you will set up will work for both the Pico and Pico W . Example projects for both boards are provided for the course.
Prerequisite experience:
The course is focused on the set-up of environments for Raspberry Pico C/C++ development. Some knowledge of C/C++ is expected though the examples used are all very basic.
For Pico, some soldering is required to attach header pins to the Pico and familiarity with soldering is desirable. Or you could buy the Pico-H or Pico-WH which are pre-soldered.
In the libraries section, some simple external electronics are used (5mm LED and 75ohm resistor). Beginner knowledge of electronics or willingness to do some external reading is required. Very straightforward though.
Welcome and the four goals of the course.
Introduction to Jon Durrant as your tutor.
This lecture outlines the focus of the course. Being around the iterative development cycle and the tooling to achieve this for the Raspberry PICO. T
Summary of this section and resources.
Introduction to this section and the resources you will require.
Handling the Raspberry PICO and locating the Micro USB, LED and Bootsel button.
Using Bootsel to load some code from an Apple Mac or Windows PC.
From command line mount the Raspberry PICO as a drive onto the Raspberry PI. Copy program onto PICO.
Summary of this section.
Goals for this section.
Introduction to the Raspberry PICO.
Introducing the iterative development cycle from code to test and the tools we will use to achieve this cycle. We have a few options here to go through here for you to choose from. Though I use several of these at once for different situations.
Goal and resources required. There are several options for of what platform to setup the tool chain on. In this section we talk through those options.
With the new SDK2.0.0 the fastest way to get a running toolchain is to use VSCode and the Pico Extension. In fact this means using the CMake extension too.
Installation and configuration of Samba on Raspberry PI. Allowing us to use Raspberry PI as a remote folder and copy files easily between desktop and Raspberry PI.
Install the Raspberry PICO development toolchain on the Raspberry PI using Raspberry OS or Ubuntu.
Install the Pico development toolchain on Mac, this is a little more manual and requires some additional tools such as Homebrew.
Install the Pico toolchain on Ubuntu x86_64 architecture
Compiler our first example using the newly installed toolchain.
Goals and resources for this section.
Introducing the Serial Wire Debug Port which we will use for code deploy and debugging.
Connecting the Raspberry PI to the PICO SWD Port.
The Raspberry PI Debug Probe is a great device for connecting our desktop environment to the Pico for deployment and debugging. This section talks through it's configuration.
You can use a second Pico as an interface from our desktop environment to the target Pico we are going to flash. This is called Pico Probe and is a DIY version of the Debug Probe from Raspberry PI.
Flashing from VSCode is very simple using either a Raspberry PI Debug Proebe or Pico configured as a Pico Probe.
Computing the flash memory usage by our code.
Summary of this section
Goad and resources for this section.
Integrated Development Environment helps us code and debug our code. This section sets out the capabilities we will use in this course.
Installing Eclipse as IDE on Windows or Apple Mac.
Importing a project into Eclipse for us to edit.
This course is not about Eclipse as an IDE but to get most of the course a small tour is necessary.
Visual Studio Code is a popular alternative to Eclipse. In this lecture I talk through it's installation.
VSCode like Eclipse uses a workspace to which we can add project folders too. In this section, I take a brief tour of VSCode.
Goals and resources needed for this section.
File structure of a project and the controlling make files.
How to create a new project from Eclipse. Copy in the required make files and configure these.
How to create a new project from VSCode. Copy in required make files and configure these.
Build and deploy process to push code onto the Raspberry PICO.
Goals and resources for this section.
STDOUT to print debug statement is often the simplest approach to debugging. This can be done with the PICO over USB or UART.
What is GDB and how does it connect to the Pico.
Debug binaries are different from our production binaries. We need to tell the make system that we are building for debug purposes.
We need to configure Eclipse to run GDB locally, connect to our code edit environment and to the Raspberry PICO via the PI.
Walk through running the debugger on a simple example.
We have two approaches to using VSCode either with the Pico Extension or by manually configuring to use the external GDB server. This lecture looks at the Pico Extension.
The debug configuration for VSCode IDE.
Debugging a project using VSCode.
Libraries are unit of functionality we can reuse or share.
This lecture looks at the PICO SDK libraries and shows an example of using the PWM library to fade a LED.
Different techniques are needed to reuse libraries and this section explore these.
Writing our own libraries to use across projects or share with the community.
Congratulations on finishing the course and what we have build together.
Suggestions of some follow-on courses you might want to try.
Thoughts on using version control and documentation to keep your project on track.
Please share your feedback and the great projects you produce.
Goals and Resources for this section
The Raspberry PI Imaging software.
Installing Ubuntu in a headless process.
Installing Raspberry OS in a headless process.
Goals of this section are to understand the Pico 2 at a high level. Understand the changes to the toolchain needed for the Pico 2. Build and flash an example project onto a Pico 2.
The Pico 2 has the same pinout as the Pico 1 but a different processor.
The Pico 2 requires SDK 2.0.0 and associated version of openocd to be installed.
This application flashes the onboard LED on the Pico 2.
This is a summary of this section.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.