Skip to content

About

A playground for learning about microcontroller programming

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

Microcontroller Playground

Tests MCU RTOS Documentation License


This is a playground for my microcontroller projects and experiments.

Supported Hardware

# Board / Module / MCU Specifications My Notes Image
1 Raspberry Pi Pico 2 WH (RP2350) Pico 2 Specs, RP2350 Datasheet Pico 2 Notes Raspberry Pi Pico 2 WH
2 Waveshare ESP32-P4-WIFI6 (ESP32-P4) Waveshare Wiki, Espressif ESP32-P4 Specs ESP32-P4 Notes Waveshare ESP32-P4-WIFI6
3 Waveshare ESP32-S3-Zero (ESP32-S3) Waveshare Wiki, Espressif ESP32-S3 Specs ESP32-S3 Notes Waveshare ESP32-S3-Zero
4 ESP32-C6-DevKitC-1 (ESP32-C6) Espressif ESP32-C6 Specs ESP32-C6 Notes ESP32-C6-DevKitC-1

Quickstart

To follow the steps below, you need to have Git, GNU Make, and Nix (with flakes enabled) installed on your machine.

1. Clone the repository

git clone https://github.com/habedi/microcontroller-playground
cd microcontroller-playground
make submodules

2. Set up the development environment

nix develop

Important

The first nix develop builds the RISC-V cross-compiler from source. Run make shell-pin afterward to protect it from Nix garbage collection. Espressif boards also need make install for esptool.

Note

Serial port access needs membership in the dialout group (can be added by running sudo usermod -aG dialout $USER).

3. Build and run on the Pico 2

# Apache NuttX-based firmware
make nuttx-configure BOARD=raspberrypi-pico-2:usbnsh
make nuttx-build
make flash-pico-uf2             # Hold the BOOTSEL button pressed down while plugging the board in
make console TTY=/dev/ttyACM0   # Picocom at 115200 baud; quit with C-a C-x

Press Enter twice after opening the console to reach the nsh> prompt.

NuttShell

4. Build and run on the ESP32-P4

# Apache NuttX-based firmware
make nuttx-distclean            # Run this whenever you switch boards

make nuttx-configure BOARD=esp32p4-function-ev-board:nsh
# Required for the Waveshare board (silicon revision v1.3)
kconfig-tweak --file external/nuttx/.config \
  --enable CONFIG_ESP32P4_SELECTS_REV_LESS_V3 \
  --enable CONFIG_ESP32P4_REV_MIN_100
make -C external/nuttx olddefconfig

make nuttx-build
make nuttx-flash-esp PORT=/dev/ttyACM0
make console TTY=/dev/ttyACM0

Check out experiments/espidf-sdcard for an ESP-IDF-based example firmware with a lot of features.

5. Build and run on the ESP32-S3

# ESP-IDF-based firmware
make espidf-install ESPIDF_TARGET=esp32s3
make espidf-build ESPIDF_TARGET=esp32s3
make espidf-flash ESPIDF_PORT=/dev/ttyACM0
make console TTY=/dev/ttyACM0

6. Build and run on the ESP32-C6

# ESP-IDF-based firmware
make espidf-install ESPIDF_TARGET=esp32c6
make espidf-build ESPIDF_TARGET=esp32c6
make espidf-flash ESPIDF_PORT=/dev/ttyUSB0
make console TTY=/dev/ttyUSB0

Documentation

Check out the docs directory for more information about the supported boards and my notes on them.

See the experiments directory for information about experiments using the microcontrollers.


Contributing

See CONTRIBUTING.md for details on how to make a contribution.

License

The content of this repository is licensed under the Apache License, Version 2.0 (see LICENSE).

About

A playground for learning about microcontroller programming

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Sponsor this project

Used by

Contributors

Languages