How luketheengineer/mdk works
MDK is a bare-metal, single-header SDK for ESP32 and ESP32-C3 firmware. A firmware application enters through the architecture startup code, which clears BSS, initializes the SoC, then calls the application’s main; firmware uses the architecture header’s GPIO, SPI, UART, timing and WS2812 APIs to interact with peripherals. README also documents separate build/flash/monitor tooling and the esputil flasher, but those implementations are absent from this tree. The sampled sources support startup-to-API and serial-to-SLIP relationships; examples and unsampled tool behavior are represented only where README or tree evidence identifies the capability.
Main entry points: slipterm.c SLIP terminal · examples Firmware application · esp32/boot.c ESP32 startup · esp32c3/boot.c ESP32-C3 startup
Components 20
Firmware runtime
- Firmware application
examples - ESP32 startup
esp32/boot.c - ESP32-C3 startup
esp32c3/boot.c - BME280 example
examples/bme280/main.c - Button example
examples/button/main.c - WS2812 example
examples/ws2812/main.c
Hardware APIs
- ESP32 API
esp32/mdk.h - ESP32-C3 API
esp32c3/mdk.h - GPIO
esp32c3/mdk.h - Bit-banged SPI
esp32c3/mdk.h - UART output
esp32/mdk.h - Timing and watchdog
esp32c3/mdk.h - WS2812 output
esp32c3/mdk.h
Serial networking
- SLIP terminal
tools/slipterm.c - SLIP codec
tools/slip.h
Other components
- ESP device
- Serial port
- Network interface
- PTY / modem
- esputil flasher
Connections 11
- ESP32 startup → ESP32 API: initializes via
esp32/boot.c - ESP32-C3 startup → ESP32-C3 API: initializes via
esp32c3/boot.c - Firmware application → ESP device: runs on
README.md - SLIP terminal → SLIP codec: calls
tools/slipterm.c - SLIP terminal → Serial port: reads and writes
tools/slipterm.c - SLIP terminal → Network interface: forwards packets
tools/slipterm.c - SLIP terminal → PTY / modem: forwards packets
tools/slipterm.c - ESP device → esputil flasher: flashed by
README.md - BME280 example → Firmware application: example firmware
README.md - Button example → Firmware application: example firmware
README.md - WS2812 example → WS2812 output: uses
README.md