Educational cooperative multitasking kernel for ESP32.
# On your computer
cd ~/workspace
# Remove old version if it exists
rm -rf esp32_kernel
# Download and extract the clean version to ~/workspace/esp32_kernel
# Build and flash
cd ~/workspace/esp32_kernel
. ~/esp/esp-idf/export.sh
idf.py build
idf.py -p /dev/ttyUSB0 flash monitoresp32_kernel/
βββ CMakeLists.txt # Top-level build config
βββ main/
β βββ CMakeLists.txt # Component build config
β βββ main.c # Three example tasks
β βββ kernel.c # Simple kernel functions
β βββ kernel.h # Kernel API
β βββ uart.c # UART implementation
β βββ uart.h # UART interface
βββ README.md # This file
========================================
ESP32 Minimal Bare-Metal Kernel
========================================
Kernel initialized
All tasks created!
=== Kernel running ===
[BLINK] LED OFF (tick=0)
[COUNT] Reached 10
[BLINK] LED ON (tick=500)
[MONITOR] === System Status ===
[MONITOR] Ticks: 1000
[MONITOR] Counter: 85
Three tasks demonstrating cooperative multitasking:
- Blinker: Toggles LED state every 500ms
- Counter: Increments counter, reports every 10
- Monitor: Prints system status every second
Build errors: Make sure ESP-IDF is sourced
. ~/esp/esp-idf/export.shPort not found: Check your USB port
ls /dev/ttyUSB*
# Use the port you see (might be ttyUSB0, ttyUSB1, or ttyACM0)Permission denied:
sudo chmod 666 /dev/ttyUSB0- β Get kernel building and running
- β Understand the three tasks
- β See cooperative multitasking in action
- π Document your observations
Good luck! π