Skip to content

Latest commit

 

History

History
88 lines (64 loc) · 2.93 KB

README.md

File metadata and controls

88 lines (64 loc) · 2.93 KB

meta-raspberrypi-baremetal

Yocto Project/OpenEmbedded compatible layer to build baremetal applications for the Raspberry Pi Pico boards.

This layer adds the functionality to OpenEmbedded of building your own newlib toolchain for the
ARM Cortex M0+ processor and use it to create applications compatible with the Raspberry Pi Pico
boards (RP2040 microcontroller).

Currently MACHINE should be set to "raspberrypi-pico" to build the samples.

Building the pico-examples repo and a FreeRTOS example application via the meta-freertos layer is supported.

When building the pico-samples, the variable RPI_PICO_SAMPLE is used to choose the examples to build, by default, the system will build all the examples, if desired, it may be set to the example we wish to build, e.g. "blink".

Build Status

master Build Status
mickledore Build Status

Dependencies

This layer depends on:

 URI: git://git.yoctoproject.org/poky
 branch: master

 URI: https://github.com/ahcbb6/meta-freertos.git
 branch: master

License

This layer has an MIT license (see LICENSE)

Raspberry Pi baremetal build setup

1.- Clone the required repositories

$ git clone https://git.yoctoproject.org/git/poky
$ cd poky
$ git clone --recurse-submodules https://github.com/ahcbb6/meta-raspberrypi-baremetal.git

2.- Add meta-raspberrypi-baremetal and meta-freertos to your bblayers.conf

$ source oe-init-build-env
$ bitbake-layers add-layer ../meta-raspberrypi-baremetal
$ bitbake-layers add-layer ../meta-raspberrypi-baremetal/layers/meta-freertos

3.- Add the required variables to your local.conf

$ echo "MACHINE = \"raspberrypi-pico\"" >> ./conf/local.conf

Build the examples from the pico-examples repository:

4.- Build:

$ bitbake pico-examples

or

$ bitbake freertos-demo-pico

The compiled binaries are located inside the deploy directory, both the ELF and UF2
files and can easily be flashed to the Raspberry Pi Pico via the usual methods.

$ ls tmp/deploy/images/raspberrypi-pico/
adc_console.elf
adc_console.uf2
blink.elf
blink.uf2
FreeRTOS-example.elf
FreeRTOS-example.uf2
...

For testing purposes, these binaries can also be downloaded from the nightly pipeline build mentioned above.