Skip to content
bare metal Raspberry Pi Zero / Zero W port of MicroPython
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
micropython @ 51482ba pulled on Nov 23,2018 Nov 23, 2018
raspberrypi feature: added mini_uart_set_speed() Apr 21, 2019
.gitmodules replaced csud/ to https://github.com/boochow/csud May 5, 2018
LICENSE Initial commit Nov 25, 2017
README.md updated the instructions and csud Dec 24, 2018
_config.yml Set theme jekyll-theme-slate Jul 22, 2018

README.md

micropython-raspberrypi

MicroPython on bare metal Raspberry Pi Zero / Zero W / 2

How to build

git clone https://github.com/boochow/micropython-raspberrypi.git
cd micropython-raspberrypi
git submodule update --init
cd micropython; git submodule update --init; cd ..
cd raspberrypi

for Raspberry Pi Zero/Zero W,

make BOARD=RPI1

for Raspberry Pi 2

make BOARD=RPI2

Options

  1. MICROPY_HW_USBHOST=1 to enable USB keyboard support.
  2. MICROPY_MOUNT_SD_CARD=1 to mount SD card on /sd in the boot sequence.

How to install

  1. download bootcode.bin and start.elf from https://github.com/raspberrypi/firmware/tree/master/boot
  2. copy bootcode.bin and start.elf to the root of your microSD card
  3. copy build/firmware.img to the root of your microSD card
  4. copy build/config.txt to the root of your microSD card. (if config.txt already exists, edit it to add a line kernel=firmware.img.)

Modules and Classes

See wiki.

References

The First bare metal Raspberry Pi port by Stefan Naumann. (Bare-Metal Raspberry Pi port by naums · Pull Request #3522 · micropython/micropython)

csud USB host driver by Alex Chadwick. (Chadderz121/csud: Chadderz's Simple USB Driver for Raspberry Pi I modified this to support RPi zero/zero W. The modified version is here).

sd.c SD card driver by Zoltan Baldaszti. (raspi3-tutorial/0B_readsector at master · bztsrc/raspi3-tutorial)

A lot of bare metal examples by David Welch. (dwelch67/raspberrypi: Raspberry Pi ARM based bare metal examples)

You can’t perform that action at this time.