Assembler toolchain for the ESP32 ULP co-processor, written in MicroPython
Project description
micropython-esp32-ulp is an assembler toolchain for the ESP32 ULP (Ultra Low-Power) Co-Processor, written in MicroPython.
It can translate small assembly language programs to a loadable/executable ULP machine code binary, directly on the ESP32 microcontroller.
This is intended as an alternative approach to assembling such programs using the binutils-esp32ulp toolchain from Espressif on a development machine.
It can also be useful in cases where binutils-esp32ulp is not available.
Features
The following features are supported:
the entire ESP32 ULP instruction set
constants defined with .set
constants defined with #define
expressions in assembly code and constant definitions
RTC convenience macros (e.g. WRITE_RTC_REG)
many ESP32 ULP code examples found on the web will work unmodified
Quick start
To get going run the following directly on the ESP32:
# Step 1: Install micropython-esp32-ulp
# IMPORTANT: Ensure the ESP32 is connected to a network with internet connectivity.
import upip
upip.install('micropython-esp32-ulp')
# Step 2: Run an example
# First, upload examples/counter.py to the ESP32.
import counter
The examples/counter.py example shows how to assemble code, load and run the resulting binary and exchange data between the ULP and the main CPU.
Documentation
See docs/index.rst.
Requirements
The minimum supported version of MicroPython is v1.12.
An ESP32 is required to run the ULP machine code binary produced by micropython-esp32-ulp (the ESP32-S2 will not work as it is not binary compatible with the ESP32).
License
This project is released under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file micropython-esp32-ulp-1.2.0.tar.gz
.
File metadata
- Download URL: micropython-esp32-ulp-1.2.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32754c92a01959a5a0742e0edf8d39e809dc4d317fc9c869b732b7f0d52d44de |
|
MD5 | c20afe3083d96019aa8760a06f38e143 |
|
BLAKE2b-256 | 82cb43243e6dc7de3a12d760269b2122dac79b54564839a0f5012ca28dfae53e |