Repository navigation
Try it without installing anything: MicroCS Studio in Chrome or Edge, connected to a board flashed with one of the files below.
| Board | File | How to flash |
|---|---|---|
| Raspberry Pi Pico / Pico 2 / Pico W / Pico 2 W / RP2040-Zero | microcs-2.0.0-<board>.uf2 |
hold BOOTSEL, plug in, copy the file to the RPI-RP2 drive (pico_w / pico2_w files: Wi-Fi, sockets, HTTP client + server, WebSocket) |
| ESP32 / S2 / S3 / C2 / C3 / C5 / C6 / C61 / H2 / P4 | microcs-2.0.0-<chip>.bin |
esptool.py --chip <chip> write_flash 0 microcs-2.0.0-<chip>.bin |
| STM32 Nucleo-F401RE / F411RE / F446RE / G474RE / L476RG / H743ZI | microcs-2.0.0-nucleo_<board>.bin |
copy the file to the NOD_xxx drive of the Nucleo's ST-LINK (or STM32CubeProgrammer, .hex keeps your files); the console is the ST-LINK virtual COM port |
| STM32 Black Pill (F411CE) | microcs-2.0.0-blackpill_f411ce.bin |
USB DFU (hold BOOT0, reset): dfu-util -a 0 -s 0x08000000:leave -D microcs-2.0.0-blackpill_f411ce.bin, or ST-LINK; console = USART1 (PA9 TX, PA10 RX) via a USB-serial adapter |
| Linux x64 | mcs-2.0.0-<os>.tar.gz |
compiler, REPL and simulator: ./mcs --repl --sim |
| Threads | Pico / Pico 2 / RP2040-Zero and ESP32 files run FreeRTOS (SMP on dual cores): Thread.RunOn(1, …) and jobs.cfg jobs use real threads; STM32 files are bare-metal |
|
| Radios | ESP32: Wi-Fi + ESP-NOW and BLE where the chip supports them. S2: Wi-Fi + ESP-NOW only; H2: BLE only; P4: neither onboard radio. Pico W / Pico 2 W: Wi-Fi. Radios start when used by a script (or saved Wi-Fi autoconnect). | |
| ESP32 storage migration | Radio-enabled images use a larger app partition than the old no-Wi-Fi releases. Back up scripts before flashing: the storage partition moves and old files are not preserved. | |
| ESP32-C2 note | built for a 40 MHz crystal (ESP-IDF default); boards with a 26 MHz ESP8684 need a rebuild with CONFIG_XTAL_FREQ_26=y |
|
| Arduino IDE | MicroCS-2.0.0.zip |
Sketch → Include Library → Add .ZIP Library |
- Add a browser-based firmware flasher for supported ESP32, STM32 and Raspberry Pi boards, with release integrity checks and a Studio-matched interface.
Interpreter hot-path restoration
- Apache NuttX as an optional OS (
MCS_OS_NUTTX, auto-detected through
__NuttX__):Thread.Run/RunOn/Every,WorkerandChannelrun on
NuttX pthreads, semaphores and critical sections (CPU pinning with
CONFIG_SMP). Newports/nuttxNuttX application (Kconfig, Make, CMake) that
builds themcsNSH command from the unix CLI; verified on NuttX 12.11.0
sim:nsh(single core and SMP) with the full C# thread suite
(make nuttx-test). 🧪 Opt-in GPIO character-device reads and writes are
simulator-tested; physical boards, interrupts and other native peripherals
are not yet verified or supported. The Make build handles empty and custom
configuration-header paths. On NuttX the default
MCS_THREAD_PRIORITYis -1 without round-robin so a busy script thread cannot
starve the shell. The shell module's internal enum constants were renamed
(SC_*) because NuttX defines aCODEmacro. - Fix
Directory.Delete(path, true)deadlocking with the threaded VFS lock by removing
entries outside directory-list callbacks. - Use exact digit generators by default on NuttX (
MCS_OWN_DTOA) for
shortest-round-trip and explicit decimal formatting, avoiding its printf
15-digit precision limit. - On NuttX, add a best-effort native stack reserve check for nested interpreter
callbacks (MCS_NUTTX_STACK_RESERVE); it does not guard all native or
compiler recursion, and target-specific stack sizing is still required. - Restore the pre-1.16 VM speed:
PUSHis a single compare against the stack
limit with a cold, out-of-line grow path; interpretersp/slots/frameare
real locals again (the internalexec_viewsindirection that forced them into
memory is removed and every re-entrant call-out reloads them); the shared
push-tail,ENTER_FASTand shared dispatch size trade-offs are now gated by
MCS_VM_COMPACT(default: on only without computed goto; set 1 on flash-tight
targets to trade speed for ~5 KB of flash). - Native calls take their argument vector from a small per-VM arena
(MCS_NATIVE_ARENA, default 32 slots, 8 inlowram, 0 inmin) instead of the heap when enabled. - Cut the compile-time cost of namespace-qualified type resolution: cheaper
name_islibrary lookup, plus per-compile memoization ofknown_type_name()
andtype_name()(keyed by enclosing class/scope; a few KB of transient
compile arena). Output is unchanged;tests/t35_type_scope.cscovers
same-named types in different namespaces, nested classes andusing. For VMs
with heap limits at or below 64 KiB, use the uncached lookup to protect the
application memory budget (compilation can be slower). - Inline float/int and float/float arithmetic and comparisons in the VM's speed
layout, including optimized superinstructions. The generic paths remain for
other types and operations.MCS_VM_COMPACT=1retains the smaller layout;
the flash cost on microcontrollers still needs measurement. Numeric edge
cases are covered bytests/t36_float_fastpath.cs. - Fit the 256 KiB Cortex-M0 reference builds with compact dispatch and the
runtime-only variant with heap-backed native arguments. Fit the G474 firmware
with compact dispatch and LTO; ESP32-C6 BLE defaults to
compact dispatch through menuconfig. These retain features and storage layout,
but may reduce runtime speed relative to the fast VM. - Add
-DMCS_STACK_STRESStest mode (relocate stack/frames on every growth,
poison the old block) andtests/t34_stack_relocation.cs.
Optional LVGL 8.x / 9.x binding
- New opt-in
MCS_ENABLE_LVGL: scripts call the LVGL C API with its C names (lv_button_create,LV_ALIGN_CENTER,lv_style_t, ...) on
LVGL 8.0 to 9.x. The name tables and wrappers are generated from the LVGL headers (tools/lvgl_gen); v8 and v9 spellings both work.
Events, timers, animations and async calls take lambdas; pointers are objects with identity and deleted objects raise
ObjectDisposedException; images and fonts load from the MicroCS file system through an LVGL drive. LVGL is not bundled and the firmware does the
port. See docs/LVGL.md. - Fix all-release LVGL builds at version boundaries: guard APIs unavailable before 8.3/9.1, adapt observer user data on 9.0/9.1, restore 9.0 screen aliases and support deprecated 9.6 APIs under strict warnings.
- Build support: CMake (
cmake/MicroCSLvgl.cmake), ESP-IDF and Zephyr Kconfig, Arduino (make_arduino.py --lvgl), PlatformIO,microcs.mk;
make mcs-lvgl/lvgl-test/fetch-lvgl/lvgl-api;mcs --lvgl[=WxH]in-memory display on the host; capabilityLvgl. - Studio: LVGL completion, hover and signature help (lazy-loaded data) and the LVGL graphics template category, including keyboard, calendar, canvas, dashboard and tree-walk examples.
- Prevent reuse of the same font wrapper after an explicit font destroy; add lifetime/GC stress and explicit cleanup tests. Font and style cleanup still belongs to the script or host.