https://github.com/brianredbeard/mp-test
MicroPython as an ESP-IDF component
https://github.com/brianredbeard/mp-test
badgelife esp-idf micropython micropython-esp32
Last synced: about 2 months ago
JSON representation
MicroPython as an ESP-IDF component
- Host: GitHub
- URL: https://github.com/brianredbeard/mp-test
- Owner: brianredbeard
- Created: 2023-05-27T16:02:05.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-14T20:27:25.000Z (about 3 years ago)
- Last Synced: 2025-06-18T18:49:09.170Z (12 months ago)
- Topics: badgelife, esp-idf, micropython, micropython-esp32
- Language: C
- Homepage:
- Size: 689 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MicroPython as an ESP-IDF component
-----
This repository represents a proof-of-concept for consuming the
[MicroPython][micropython] project as an [ESP-IDF][esp-idf] component. This
allows users to remove an extensive amount of boilerplate and copy-pasta
resulting in much cleaner downstream builds.
This work was inspired by [BadgePython][badgepython] and serves as a guide for
the structure of it's `v0.2+` release.
## Prerequisites
- ESP-IDF v4.4+
- git
- CMake 3.12+
## Setup
Clone the directory and initialize the submodule `external/micropython`.
- Via a single command:
```bash
git clone --recurse-submodules https://github.com/brianredbeard/mp-test.git
cd mp-test
```
- In multiple discrete steps
```bash
git clone https://github.com/brianredbeard/mp-test.git
cd mp-test
git submodule update --init --recursive
```
If you just want to build the `GENERIC` example which should run on a base ESP32
board, run:
```bash
idf.py build
```
If you wish to define a new board, start by consulting the [MicroPython manifest
files][mff] documentation. In that documentation you will find information on
the structure of a "board", high level APIs available, and how to "freeze"
specific Python code into your compiled firmware.
Additional references can be found in the [MicroPython Boards Source][mbs].
[micropython]: https://github.com/micropython/micropython
[esp-idf]: https://docs.espressif.com/projects/esp-idf/en/v4.4.5/esp32/api-guides/build-system.html
[badgepython]: https://github.com/badgeteam/badgePython
[mff]: https://docs.micropython.org/en/latest/reference/manifest.html
[mbs]: https://github.com/micropython/micropython/tree/33b403dfb4ea9ec90427e7228c53e0ac4d333863/ports/esp32/boards