We may earn an affiliate commission when you visit our partners.
Course image
Dr Jon Durrant

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.

Read more

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.

Enroll now

What's inside

Learning objectives

  • Build c code projects on raspberry pico
  • Setup a build efficient environment, so you can focus on your project and not tool issues
  • Reuse others libraries and share own code libraries
  • Debug code
  • Build projects for the pico 2 and rp2350

Syllabus

Introduction

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

Read more

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.

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Focuses on setting up an efficient development environment, allowing learners to concentrate on projects rather than struggling with tool configurations
Teaches debugging techniques through a GUI environment, which is essential for identifying and resolving issues in embedded systems projects
Requires learners to have a Raspberry Pi Pico or Pico-W, along with soldering skills or a pre-soldered Pico, which may pose a barrier to some beginners
Uses both Eclipse and VSCode IDEs, which are industry-standard tools, providing learners with practical experience in different development environments
Requires learners to have some awareness of CMake, which is a build system generator, or the ability to self-study it, which may be time-consuming
Covers the use of external electronics like LEDs and resistors, requiring beginner knowledge of electronics or willingness to learn, which may be challenging for some

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Setting up pico c/c++ environment

According to students, this course is largely effective in helping learners set up a functional C/C++ development environment for the Raspberry Pi Pico. Learners particularly appreciate the step-by-step guidance on toolchain installation across various platforms and the practical demonstrations of setting up VSCode and Eclipse IDEs. Many find the sections on using a Debug Probe or second Pico as a probe and configuring GDB debugging particularly valuable for improving the iterative development cycle. However, some mention the prerequisites regarding CMake could be more explicit, and others note that setting up the environment can still be a complex process with potential platform-specific issues.
Emphasizes efficient build/deploy flow.
"The core focus on speeding up the code-test cycle was exactly what I needed."
"Moving beyond the Bootsel method dramatically improved my workflow."
"Learned how to quickly build and deploy code without constant manual steps."
"The course delivers on its promise to make the development cycle more efficient."
Shows how to use popular IDEs like VSCode.
"Integrating VSCode with the Pico extension was demonstrated very effectively."
"The Eclipse setup section was useful for getting my project ready for coding."
"I found the walkthroughs for configuring VSCode debugging particularly helpful."
"Shows how to set up project structure and build with CMake within the IDE."
Detailed guidance on GDB and probes.
"Learning how to use GDB with the Raspberry Pi Debug Probe was a game changer for debugging."
"The section on using a second Pico as a probe was brilliant and saved me buying extra hardware."
"Getting breakpoint debugging working felt complex, but the course made it manageable."
"Covers both UART stdout and proper GDB debugging techniques."
Provides clear steps for installing tools.
"The instructions for setting up the toolchain on Ubuntu were spot on and worked without a hitch."
"I struggled with toolchains before, but this course walked me through the Windows setup clearly."
"Appreciated the coverage for different OS platforms; it made installation much easier than guessing."
"Helped me get the build environment running quickly on my Mac for the Pico."
Needs clearer expectation on CMake knowledge.
"While CMake awareness is listed, a bit more introduction or primer on its role would help."
"I had to pause and do some extra reading on CMake to fully understand the build process."
"Assumes a certain level of familiarity with CMake that some beginners might lack."
"Could use a quick overview of the key CMake concepts used in the projects."
Environment setup can still be challenging.
"Even with the course, getting the environment working had its moments; troubleshooting took time."
"Ran into a few platform-specific issues not explicitly covered, requiring external research."
"The number of tools and dependencies required can be a bit overwhelming initially."
"Although guided, the process requires attention to detail and patience."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Introduction to C Development Environment for Raspberry PICO with these activities:
Review C/C++ Fundamentals
Solidify your understanding of C/C++ syntax, data structures, and memory management to prepare for the course's embedded development aspects.
Browse courses on C++
Show steps
  • Review basic syntax and data types.
  • Practice writing simple C/C++ programs.
  • Study memory management concepts.
Brush up on CMake Basics
Familiarize yourself with CMake to streamline the build process for Raspberry Pi Pico projects.
Browse courses on CMake
Show steps
  • Learn CMake syntax and commands.
  • Create a simple CMake project.
  • Understand how CMake manages dependencies.
Review 'Programming the Raspberry Pi Pico with C'
Use this book as a reference to learn how to program the Raspberry Pi Pico using C.
Show steps
  • Read the introductory chapters.
  • Work through the example projects.
  • Experiment with different hardware interfaces.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Follow Online Debugging Tutorials
Enhance your debugging skills by following online tutorials specific to the Raspberry Pi Pico and your chosen IDE (Eclipse or VSCode).
Show steps
  • Find tutorials on debugging with GDB.
  • Practice debugging simple programs.
  • Learn to set breakpoints and inspect variables.
Simple LED Control Project
Start a simple project to control an LED using the Raspberry Pi Pico, applying the concepts learned in the course.
Show steps
  • Set up the development environment.
  • Write code to blink an LED.
  • Experiment with different blinking patterns.
Contribute to a Pico SDK Example
Deepen your understanding by contributing to an open-source project related to the Raspberry Pi Pico SDK.
Show steps
  • Find an open-source Pico SDK project.
  • Identify a bug or feature to work on.
  • Submit a pull request with your changes.
Document Your Project Setup
Create a blog post or documentation outlining your specific Raspberry Pi Pico development environment setup, sharing your experiences and troubleshooting tips.
Show steps
  • Document your toolchain installation process.
  • Describe your IDE configuration.
  • Share any troubleshooting tips you discovered.

Career center

Learners who complete Introduction to C Development Environment for Raspberry PICO will develop knowledge and skills that may be useful to these careers:
Hobbyist Maker
A hobbyist maker engages in personal projects, often involving electronics and software. This course is directly applicable to the work of a hobbyist maker, as it provides a complete guide to setting up a development environment for the Raspberry Pi Pico, a very popular board for hobby projects. The course will help the hobbyist maker be able to build projects with C on the Raspberry Pi Pico. The course’s instruction on building and deploying code, debugging and using libraries allows a maker to go further with their electronics projects and to be more efficient. The course uses affordable and accessible development tools and hardware.
Firmware Engineer
A firmware engineer develops low-level software that controls hardware devices. The work involves writing code that interacts directly with the hardware using languages like C and C++, which are the focus of this course. This course provides a valuable introduction to the development environment for the Raspberry Pi Pico, a microcontroller commonly used in embedded systems. It teaches skills such as building and deploying code, using libraries, and debugging, all essential for performing the job of a firmware engineer. The course’s focus on both VSCode and Eclipse is useful, as is the material on debugging using GDB, which is a typical debugging tool in this field.
Embedded Systems Engineer
An embedded systems engineer designs, develops, and tests software and hardware for embedded systems. Often, this includes work with microcontrollers, which is the focus of this course. This course is directly applicable to this career, as it steps through setting up a complete development environment for the Raspberry Pi Pico, a popular microcontroller. It will help you build deployable code, reuse existing libraries, and debug code, which are all essential skills for an embedded systems engineer. The course teaches the use of C in this context, which is common for embedded systems. A specific benefit of this course is the ability to set up a GUI debugging environment.
Internet of Things Developer
An Internet of Things developer creates software for interconnected devices. This course can be valuable for anyone looking to start a career as an Internet of Things developer. The course focuses on setting up a development environment for the Raspberry Pi Pico, which is often used in IoT projects. The skills learned, including deploying code, debugging, and using libraries will transfer directly to IoT development. The course’s instruction on C and C++, along with its debugging strategies, are valuable for creating applications for microcontrollers in the IoT field.
Robotics Engineer
Robotics engineers design, build, and test robots. Often, this involves programming microcontrollers, which is a major focus of this course. This course helps build a foundation in setting up a development environment for the Raspberry Pi Pico. It will familiarize engineers with tools and processes required to program and deploy applications on this microcontroller, which is useful in robotics projects. The course provides a good grounding in using C and C++, which are frequently used in robotics software development. The ability to debug code using a GUI is also beneficial for the testing and tuning of robotic systems, and the course provides detailed instruction in this area.
Control Systems Engineer
A control systems engineer designs and implements systems that control the behavior of machines and processes. Often, this involves programming microcontrollers, as discussed in this course. The course's focus on setting up a development environment for the Raspberry Pi Pico helps prepare control systems engineers to work with hardware directly. The course also provides experience in building and deploying code using C and C++, and debugging, all of which are essential for a control systems engineer. The course’s focus on the iterative development cycle is beneficial for those in control systems.
Hardware Engineer
A hardware engineer designs and develops physical hardware components, and needs to understand how software interacts with hardware. This course helps hardware engineers by enabling them to understand the software development cycle for a microcontroller. By setting up the software environment for the Raspberry Pi Pico, a hardware engineer gains valuable insight into the challenges and methods used in programming hardware devices. The course specifically allows the development, debugging and deployment of C and C++ applications, which are valuable skills in the hardware domain. This also helps the hardware engineer to work more effectively with software teams.
Automation Engineer
An automation engineer develops systems that automate processes. This often includes programming microcontrollers, which is a focus of this course. This course will help build a foundation in using and setting up a development environment for the Raspberry Pi Pico, which can be used in various automation projects. The course's instruction on debugging and deploying code is pertinent to automation. The course’s focus on using libraries and C and C++ code are typical tools used by automation engineers. This course's focus on hardware interactions and debug will be beneficial.
Electrical Engineer
An electrical engineer designs, develops and tests electrical devices and systems. While not exclusively focused on software, a hardware engineer benefits from an understanding of software systems. The course helps an electrical engineer to understand how software interacts with hardware through the setup of a Raspberry Pi Pico development environment. The process of building and deploying C and C++ code, and the instruction on debugging will assist in the development of electrical systems. The course’s direct involvement with hardware is very beneficial to electrical engineers.
Product Development Engineer
A product development engineer is involved in the entire lifecycle of a product, from design to launch. This course may be useful as it provides a foundational understanding of developing for embedded systems. The course focuses on setting up a development environment for the Raspberry Pi Pico, which is often used in product development. In particular, the ability to use C and C++ and debug software are very important technical skills that can be gained from the course. This course gives insight into the software side when working with hardware teams.
Systems Engineer
A systems engineer focuses on the overall design and integration of complex systems. This course provides a useful, hands-on introduction to the development cycle for microcontrollers. By learning how to set up an efficient development environment for the Raspberry Pi Pico and working with C code, the systems engineer gains a deeper understanding of the challenges and techniques involved in embedded systems. This understanding of how hardware and software work together may be valuable to their job. The ability to debug code and use libraries are also valuable skills.
Research Scientist
A research scientist conducts experiments and analyzes data, and often requires an advanced degree. This course may be useful for a research scientist who works in fields involving embedded systems, or microcontrollers. Experience will be gained in this course building and using a C-based development environments, and this may be helpful in a research environment. It is important to be able to debug code, and this course covers debugging tools essential for working with microcontrollers, such as GDB. The skills gained are helpful when building prototypes or research tools where there is a need to interact with custom hardware.
Test Engineer
A test engineer is responsible for designing and implementing tests for software and hardware. This course may help a test engineer who is involved in testing embedded systems. By setting up a development environment for the Raspberry Pi Pico, this course helps build a foundation for testing the code running on these devices. It provides the ability to compile and debug C code on these target hardware platforms. This course, with its focus on debugging and code deployment, may help a test engineer in their role. Skills learned will help prepare testing strategies.
Computer Science Educator
A computer science educator teaches others about computer science concepts. This course may be useful for an educator who intends to teach the fundamentals of embedded software or systems development using microcontrollers. This course provides a valuable resource for setting up a C code development environment, specifically using the Raspberry Pi Pico as a target. This experience will help to translate academic concepts into practical instruction. Furthermore, the ability to debug code, and interface with hardware will give the educator more confidence in leading practical labs.
Software Developer
A software developer designs, develops and tests software. Although this course focuses on embedded systems, there may be applications of its teachings in the general field of software development. An understanding of C/C++ development is a useful skill for many software developers. This course may also help a software developer who is looking to expand their understanding of low-level systems or hardware interactions. The course’s focus on build tools, debugging, and library usage may be useful, though less directly so than for careers specializing in embedded systems.

Reading list

We've selected one books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Introduction to C Development Environment for Raspberry PICO.
Provides a comprehensive guide to programming the Raspberry Pi Pico using C. It covers fundamental concepts, hardware interfacing, and practical projects. It valuable resource for understanding the Pico's capabilities and applying C programming skills in an embedded environment. This book is useful as a reference text during the course.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

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.

Affiliate disclosure

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.

© 2016 - 2025 OpenCourser