Repository navigation
MicroCS 1.12.1 — Reliable uploads on ESP32 native USB; Studio templates for U8g2, peripheral settings and DMA
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 / RP2040-Zero | microcs-1.12.1-<board>.uf2 |
hold BOOTSEL, plug in, copy the file to the RPI-RP2 drive |
| ESP32 / ESP32-S3 / ESP32-C2 / ESP32-C3 / ESP32-C6 | microcs-1.12.1-<chip>.bin |
esptool.py --chip <chip> write_flash 0 microcs-1.12.1-<chip>.bin |
| STM32 Nucleo-F401RE / F411RE / F446RE / G474RE / L476RG / H743ZI | microcs-1.12.1-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-1.12.1-blackpill_f411ce.bin |
USB DFU (hold BOOT0, reset): dfu-util -a 0 -s 0x08000000:leave -D microcs-1.12.1-blackpill_f411ce.bin, or ST-LINK; console = USART1 (PA9 TX, PA10 RX) via a USB-serial adapter |
| Linux x64 | mcs-1.12.1-<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 |
|
| 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-1.12.1.zip |
Sketch → Include Library → Add .ZIP Library |
- Reliable uploads on ESP32 USB-Serial-JTAG (ESP32-C3 / C6 / S3 / H2 native USB). Saving a
script from Studio sometimes stalled ("upload stalled - retrying slower") because ESP-IDF's
USB-Serial-JTAG driver silently drops received bytes when its 256-byte buffer is full —
which happened while LittleFS erased a flash block or while the console waited on UART0.
Fixes:put <f> <len> <window>— the device acknowledges every window with\x04MORE
(MCS_SHELL_PUT_WINDOW, 256), so the host can never overrun it (Studio and
tools/mcs_remote.pyuse it; older firmware still gets the plain stream); the ESP32 console
installs the driver with a 4 KB receive buffer (MCS_ESP32_USB_RXBUF) and sleeps on the USB
port instead of UART0 while a USB host is attached.
RP2040 was never affected: TinyUSB holds the host off (USB NAK) instead of dropping bytes. - Studio templates for U8g2 / U8x8 displays. A new U8g2 displays category with 20
scripts that together cover the whole API: hello, every bus (I2C,SoftI2C,SPI,
SoftSPI,Soft3WireSPI, 8080 / 6800,KS0108), all shapes, text / alignment / font metrics,
fonts from files andbyte[], XBM bitmaps and icons, rotation / flip / contrast / sleep /
draw colours / clipping, page mode (Draw,FirstPage/NextPage),Print, buttons and
text bars, the built-in menus (scripted withSetMenuInput), a custom menu with
GetMenuEvent, the u8log terminal, a dashboard, a clock, an animation with
UpdateDisplayArea, buffer screenshots (GetBuffer,Dump,WriteBufferXBM), U8x8 text and
status screens, two displays. Snippetsu8g2,u8frame,u8page,u8x8; Studio completion,
signature help and hover for everyU8g2/U8x8member.tests/studio/test_templates.js
runs them on the simulated SSD1306 with a u8g2 build (new CI step). - Studio templates for peripheral settings and DMA. 17 new ready-to-run templates in two
new categories: Peripheral settings (what the board supports, button / LED / open-drain
GpioConfig, I2C, SPI and UART on your own pins,PwmConfig,AdcConfig, board options and
reusable settings) and DMA (DmaBuffer,SPI.WriteAsyncin the background, a
double-buffered display loop,I2C.WriteReadAsync,UART.ReadAsyncwith timeout / cancel,
QSPI.ReadAsync,Dma.Copy/Fill). New snippetsgpiocfg,i2ccfg,spicfg,uartcfg,
dmabuf,spiasync. Studio now has 169 C# templates and 61 snippets; CI runs every one on the
simulated board.