Skip to content

raynayx/rpxContainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Raspberry Pi MCU Series Development Container

About

This container makes setting up the development environment for the RP2040 and RP2350 series of MCUs easy. The container is based on the Fedora:40 image. It creates an image with the following:

  • arm-none-eabi compiler toolchain
  • pico-sdk
  • picotool
  • JLink tools
  • Invoke

How to create the image based on the Dockerfile

The resources required for the container are to be downloaded separately into the same directory as the Dockerfile. Alternatively, you can uncomment the curl commands in the Dockerfile. These are:

  1. arm-none-eabi-14.tar.xz
  2. JLink.rpm
  • Once those are in place, build the image based on the Dockerfile by running:
docker buildx build -t namespace/image_name -f path_to_Dockerfile .
  • The default user is rpx. However, it can be set by passing the build argument --build-args MAIN_USER=your_user.

Run a container based on the built image

In order to allow the container to connect with USB devices(like JLink programmer), pass the --privileged flag and mount /dev/bus/usb in the container.

For example:

docker run -it --mount type=bind,src=project/directory/,dst=/home/rpx/dev --privileged -v /dev/bus/usb/:/dev/bus/usb namespace/image_name  /bin/bash

The arm toolchain and the pico-sdk are in the ~/opt directory. As shown here: ~/opt/arm-none-eabi/ and ~/opt/pico-sdk.

Using the container for development

The container uses the Invoke tool for managing tasks within the project environment.

At the terminal, type invoke -l or inv -l to see a list of the tasks defined in the tasks.py defined in your project.

There's a sample tasks.py file defined here as an example.

Build firmware in the container from the terminal

invoke build

Flash firmware in the container from the terminal

Having connected the JLink Debugger and the powered the MCU board, run:

invoke flash

About

A docker container for RP2040 and RP2350 series development

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published