Skip to content

Boards

Target Board Console Guards Notes
s3 ESP32-S3 (tested: N16R8 DevKitC-1) UART0 2 watchpoints per core + canaries 8 MB octal PSRAM used for big stacks
esp32 ESP32 WROOM-32 / WROVER-E UART0 2 watchpoints per core + canaries one image for both; PSRAM used if present
h7 STM32H743 (tested: DevEBox H743VIT6) RTT over ST-Link 14 MPU regions + canaries smallest and fastest; threads share its one core
pico2w Raspberry Pi Pico 2 W (RP2350) USB serial 8 MPU regions + canaries early port: no WiFi yet

ESP32-S3

  • Project: firmware/, env esp32s3. ESP-IDF 6.1 with FreeRTOS.
  • Memory: data stacks go to internal SRAM while at least 64 KB stays free for ESP-IDF, then spill to PSRAM.
  • Threads: Goose threads are pthreads. The main Goose task is pinned to core 1, and workers run on both cores.
  • RGB LED: GPIO48 on DevKitC-1 v1.0, GPIO38 on v1.1.
  • Flashing: if the board's USB-UART can't auto-reset, hold BOOT, tap RESET, and run the command again.

ESP32 (WROOM-32, WROVER-E)

  • Project: same firmware/ project as the S3, env esp32. Chip-specific settings live in firmware/sdkconfig.defaults.esp32.
  • WROOM-32: no PSRAM and about 295 KB of free heap when a program starts. A program with many data stacks may need --reserve 8K. Goose's 03_strings, with 16 stacks, does. A program with several workers may need --worker-reserve 4K, and --worker-stack 4K where the workers' calls fit in it: each worker takes a native stack, 16 KB as built, and its own data stacks (Sizing data stacks). A data stack is given while it leaves 8 KB free, or 64 KB in a networked program, where WiFi allocates as it runs.
  • Three error lines at every WROOM-32 boot are expected. The esp32 firmware also serves the WROVER-E, so it looks for PSRAM, finds none on a WROOM-32, and carries on without it:

    E (212) quad_psram: PSRAM ID read error: 0xffffffff, PSRAM chip not found or not supported
    E (214) esp_psram: PSRAM enabled but initialization failed. Bailing out.
    E cpu_start: Failed to init external RAM; continuing without it.
    
  • WROVER-E: 8 MB PSRAM, of which ESP-IDF maps 4 MB. PSRAM on the classic ESP32 is a 40 MHz quad SPI bus, so keep data that's used often in internal RAM. A cache-hostile sieve over 200 KB of PSRAM took 720 ms, against 12 ms in the H7's SRAM. In the benchmarks it computes as fast as the WROOM-32. A worker's native stack still comes from internal RAM: in the suite, what is left of it holds four, as many as its four-worker step needs. A finished worker's stack is freed as its thread ends, so the next round's workers find room (Optimizations, section 16).

  • No temperature sensor: chip_temp_c() returns −273.

STM32H743

  • Project: ports/stm32h7/, env h743. FreeRTOS (the kernel STM32Cube ships) on the STM32Cube HAL and newlib. The core runs at 400 MHz from the internal oscillator.
  • Console: printf goes to a SEGGER RTT buffer in RAM. MicroGoose flashes and reads it in a single OpenOCD session over the ST-Link, so no UART wiring is needed.
  • Memory: 512 KB AXI SRAM for data stacks. The native stack is in DTCM, with an MPU guard below it.
  • Pins: pin_* numbers are port × 16 + n (PA0 = 0, PB5 = 21, PE3 = 67).
  • Analog: ADC1 on 14 pins at 16 bits, the DAC on PA4 and PA5, and the temperature sensor, all scaled by VDDA as the chip measures it against its factory-calibrated reference. The ADC runs at 50 MHz, in spec for the rev V chips sold now; rev Y chips (before 2019) are rated for 36 MHz and are untested.
  • Threads: the program and its workers are FreeRTOS tasks sharing the one core in 1 ms time slices, so workers don't make a program faster, but a program can compute in one while another waits on a pin, a timer, a UART or CAN. A worker's native stack is 16 KB from the heap, with an MPU guard at its end while one of the 14 regions is free. Hardware calls from different tasks take turns; one that waits (uart_read, can_receive, event_wait, delay_ms) doesn't hold up the others. With no worker running, waits and delays work as they did before there were threads.
  • LED strips: on the PWM pins of TIM1–TIM4, one strip per timer, sent by the timer and DMA. The board has no RGB LED of its own.

Raspberry Pi Pico 2 W

An early port. It runs the Goose samples that fit its RAM, threads included, and the hardware API except the DAC and CAN, which the RP2350 doesn't have. It has no WiFi yet. --emulate runs it in picoem (see emulators).

  • Project: ports/rp2350/, env pico2w. The Pico SDK 2.3.1 and FreeRTOS through a community PlatformIO platform (maxgerhardt/platform-raspberrypi, pinned to a commit). The first build downloads about 2 GB of tools and takes about 4 minutes.
  • Console: USB serial, on the board's own USB port. A program waits up to 10 seconds after it starts for the PC to open the port, so its first lines aren't lost; with no PC it starts after the wait. microgoose monitor restarts the program with picotool.
  • Flashing: picotool, over the same USB cable. MicroGoose asks the running program to switch to the bootloader, so there's no BOOTSEL button to hold. A board whose program has crashed may need it: hold BOOTSEL while plugging it in, then run the command again.
  • Memory: 520 KB of SRAM for the heap and data stacks, and no PSRAM. The three samples that need more skip it, as on the H7.
  • Overflow guards: the first 8 data stacks get an MPU region over their guard, so the first store past a stack's end faults; any more get a canary, checked every 100 ms and when the program ends. A native call stack overflow trips the stack limit FreeRTOS sets for each task. Either is reported on the console and ends the program.
  • When the board stops answering: a watchdog restarts it if it's stuck for 2 seconds. If that follows a fault it couldn't report at the time, the next boot reports it, with the usual end line, and doesn't start the program again until it's flashed or microgoose monitor restarts it. microgoose monitor follows the board through such a restart.
  • Threads: the program and its workers are FreeRTOS tasks on one of the two cores, sharing it in 1 ms time slices, as on the H7.
  • Randomness: os.random_seed(), os.random_bytes() and hw_random() take the RP2350's hardware random number generator.
  • Pins: the header's GPIO0–22 and 26–28. GPIO23–25 and 29 run the WiFi chip. The hardware API lists which pins each peripheral takes.
  • Not available yet: WiFi and import net;, the green LED (it's on the WiFi chip), and the second core.

No board: emulators

--emulate runs a target's firmware in an emulator of its chip instead of on a board. It is the same image that would be flashed:

microgoose run hello/main.goose --target esp32 --emulate

The emulator is a separate install. --emulate looks for it before it builds, and says where to get it if it isn't there.

Target Emulator Modelled as Install, then put it on PATH or set
s3 Espressif's QEMU (qemu-xtensa-softmmu) the N16R8: 16 MB flash, 8 MB octal PSRAM MG_QEMU to qemu-system-xtensa
esp32 Espressif's QEMU, as above the WROOM-32: 4 MB flash, no PSRAM MG_QEMU
h7 Renode 1.17.1 or later the STM32H743 MG_RENODE to renode
pico2w picoem, patched, through mg-picoem the RP2350, with the console on UART0 MG_PICOEM to mg-picoem, which python ports/rp2350/picoem/build.py DIR builds from source (needs git and Rust 1.85 or later)
  • ESP32s: MicroGoose writes the whole flash chip (bootloader, partition table, app), as flashing would, to build/emulate/<target>.flash.bin, boots it in QEMU and reads UART0. QEMU's PSRAM model is quad unless told otherwise; for s3 MicroGoose switches it to octal, as on the N16R8.
  • H7: on a board, OpenOCD reads the RTT console over the ST-Link. In Renode, ports/stm32h7/renode/mg_rtt.py does the same job with a watchpoint on the buffer's write offset.
  • Pico 2 W: picoem has no releases and models no USB device, so MicroGoose carries a small runner for it, mg-picoem, and a patch to picoem (ports/rp2350/picoem/, whose README lists what the patch changes). --emulate builds the pico2w_uart env instead of pico2w: the same program and port with the console on UART0, and doubles done by libgcc instead of the SDK's routines on the RP2350's double coprocessor, which picoem doesn't model as the chip runs it. The runner starts core 0 at the image's vector table, past the bootrom; core 1 waits in the bootrom, as the port uses one core. Of the stock samples, the 22 the board runs pass there, threads included, and 02_memory, 21_raytrace and 22_image_filters skip it, as on the board, for needing more than its 520 KB of RAM. 23_mandelbrot_threads takes about 4 minutes there, for its doubles. The threads example and the starter program of microgoose new run to their end.
  • What it shows: output. Every stock sample a board runs prints the same bytes in its emulator as on the board and the PC. A data stack overflow hits the hardware guard: a watchpoint on the ESP32s, an MPU region on the H7. picoem doesn't enforce the MPU, so on pico2w an overflow isn't stopped at the stack's end: it runs on until it leaves RAM. CI runs the samples on every pull request, for all four targets, and the overflow on all but pico2w.
  • What it doesn't: timing. None of the emulators is cycle-accurate, so micros() and the samples' timings are not the chip's (the sieve reports 49 ms in Renode against 12 ms on the H7). Nor does it show WiFi (import net;), GPIO, LED strips, the ADC, the DAC or the temperature sensor.
  • The S3's eFuses: QEMU's eFuses start blank, and a real S3's are not: the factory programs the ADC's calibration into them, and ESP-IDF reads it at start-up. With them blank it measures the ADC instead, which QEMU doesn't model, so a program that uses import mcu; would stop while the chip boots. For s3, MicroGoose gives QEMU an eFuse file, build/emulate/s3.efuse.bin, that is blank except for BLK_VERSION_MAJOR = 1, the field that says the calibration is there. The calibration values themselves stay 0, and so do the MAC address and the flash encryption and secure boot bits. Up to 0.2.1 the file wasn't there, and those programs stopped at boot.
  • Waiting on the H7: Renode doesn't model the STM32H7's cycle counter, which is that port's clock on a board. Every millisecond the firmware checks that the counter has moved, and where it hasn't, its 1 ms tick moves the clock instead. So delay_ms() and waits with a timeout return in Renode, and the starter program microgoose new writes runs to its end. The clock there moves 1 ms at a time: micros() is always a multiple of 1000. Up to 0.2.1 those waits never returned in Renode.

In a browser: Velxio

Velxio simulates an ESP32 in the browser, wired to LEDs, buttons, knobs, servos, NeoPixels and displays on a canvas, so you can see a program's pins as well as its output. microgoose velxio builds a program for the classic ESP32 and writes what Velxio loads:

microgoose new lights --example velxio/traffic
microgoose velxio lights/main.goose
  • lights-esp32.bin: the whole flash chip, as for --emulate, without its erased tail (Velxio fills that back in). Load it with File > Upload firmware.
  • lights-circuit.zip: the diagram.json beside the program, as a project for File > Import project. Without one, add an ESP32 DevKit V1 board by hand.

The velxio/ examples (traffic, dimmer, rainbow) come with their circuits; see examples/velxio/README.md. They have run in Velxio's open-source build (its container image, November 2026), with GPIO, pin interrupts, the ADC, PWM to an LED and a servo, and a WS2812 through RMT all showing on the canvas. Velxio runs the firmware in its own QEMU, so timing is approximate, and a PWM pin at 100% duty (held high, its wave stopped) shows as off.

The MicroGoose dimmer example in Velxio: a potentiometer read by the ESP32's ADC sets an LED's PWM brightness and a servo's angle, and the serial monitor prints the knob's position

The velxio/dimmer example: the ADC reads the knob, and PWM drives the LED and the servo.

Not supported: Arduino Nano (ATmega328P)

Stock Goose needs 64-bit double, assumes 8-byte pointers, and needs more than 30 KB of flash even for hello world. The Nano offers 32-bit double, 2 KB of RAM and 30 KB of flash. The measurements are in Findings.

Adding a board

Any 32-bit MCU with roughly 64 KB of flash and 64 KB of RAM should work. A port provides:

  1. a PlatformIO project (ports/<name>/platformio.ini) that compiles src/app.c and src/goose_runtime.c with -include mg_prefix.h and -Dmain=goose_main;
  2. the POSIX pieces the runtime uses: mmap/mprotect/munmap for data stacks, clock_gettime, nanosleep, sysconf, and stubs for signals, dl* and (if there's no RTOS) pthreads. ports/stm32h7/src/mg_h7.c is a complete example, with pthreads on FreeRTOS;
  3. the mg_* HAL functions from Hardware API;
  4. an entry in TARGETS in microgoose/core.py.