Documentation - amir1387aht/MicroCS GitHub Wiki
MicroCS documentation
New here? Read the main README first: it shows the two ways to use MicroCS (a library inside your firmware, or the whole firmware as a C# REPL).
| Guide | What you will find | |
|---|---|---|
| š§ | Step-by-step guides | from nothing to C# on your board: PC, ESP32, ESP32-C3 + OLED, Raspberry Pi Pico, STM32, Arduino, Zephyr |
| š | Getting started | build, first script, simulator, REPL, precompiling, embedding ā in 10 minutes |
| š | Hardware API | GPIO, UART, I²C, SPI, ADC, DAC, PWM, timers, I²S, QSPI, CAN, watchdog, RTC; interrupts; writing a board table |
| šļø | Peripheral configuration | GpioConfig, SpiConfig, UartConfig ā¦: pins, pulls, drive strength, filters, board options; what each board supports; implementing it in a port |
| ā” | DMA | DmaBuffer, SPI.WriteAsync & co., DmaTransfer, memory DMA; ordering and lifetime rules; per-board support; implementing it in a port |
| š¶ | Wi-Fi & networking | Wifi (station, soft AP, scan, events, static IP, saved networks), ESP-NOW, NTP, mDNS, ping, TcpClient / TcpListener / UdpClient, Http + HTTPS, Json; ESP32 setup; the --sim radio |
| šµ | Bluetooth LE | opt-in Ble: advertising and beacons, scanning, GATT server (BleService) and client (BleConnection), pairing / bonding, BleUart; ESP32 NimBLE, Pico W BTstack, Zephyr, ArduinoBLE; the --sim radio |
| š„ļø | U8g2 displays | optional C# U8g2 / U8x8 on olikraus' u8g2: turning it on in each build, choosing displays and fonts, fonts from files, the whole API, the --oled simulator |
| š§© | Device drivers | the driver registry, the built-in ws2812 (LedStrip) and servo (Servo) drivers and their backends, writing your own, turning drivers off |
| āļø | Configuration | the project config header mcs_user_config.h, -D options, profiles, precedence, per build system |
| š§ | Porting & build systems | Make, CMake, ESP-IDF, Zephyr, PlatformIO, Arduino, CubeIDE/Keil/IAR; the vendor ports; new chips |
| š | Standalone firmware | mcs_runtime, the REPL, boot sequence, upload protocol, mcs_remote.py |
| š§ | Embedding | the C API: VMs, running code, C bindings, calling scripts, limits, GC rules |
| š§© | Language | the supported C# subset, feature by feature, and every known difference from .NET |
| š | Standard library | generated reference of every class and member a script can call |
| š¾ | Filesystem | VFS mounts, RAM / POSIX / TinyFS / LittleFS / YAFFS2 backends, flash ports, File / Directory / Path |
| ā±ļø | Scheduler | startup / once / periodic jobs, jobs.cfg |
| š§µ | Threads | optional real OS threads: FreeRTOS / Zephyr / POSIX, second core, Channel |
| šŖ« | Small MCUs | running in 24ā64 KB of RAM: profiles, execute-in-place images, GC tuning, measured results |
| š | Performance | benchmarks, Cortex-M footprint, memory findings ā with commands to reproduce |
| šļø | Architecture | pipeline, VM, GC, modules, invariants for contributors |
| š§± | Bytecode | .mcsb image format, loader validation, full instruction set |
| š”ļø | Security | what the sandbox guarantees and what it does not |
| š§Ŗ | Testing | test matrix, port checks, fuzzing, sanitizers, .NET parity, adding tests |
Port guides: STM32 Ā· ESP32 Ā· RP2040/RP2350 Ā· Zephyr Ā· Arduino Ā· examples: examples/
The same pages are on the wiki (published from
this folder on every push to main by tools/wiki_sync.py; edit them here).
Project history: CHANGELOG Ā· Contributing