Porting PicoRuby to Another Microcontroller: ESP32
summary
Ports PicoRuby to ESP32 (both ESP32-C3 RISC-V and Xtensa boards) using ESP-IDF, cross-compiles to produce ribmruby.a build, links it into an R2P2 project to output R2P2.esp32.bin produced, and implements machine HAL changes for stdio (fixing CSI terminal behavior by byte-wise output and fflush). Addresses watchdog hangs, a require initialization bug, and stack overflows (increasing FreeRTOS task stack). About 10 gems ported enable SPI, ADC, filesystem and audio and a demo shows LED matrix, joystick and sound working — overall successful with source on GitHub.
AI-written summary · about
chapters (18)
- 0:00Introduction to PicoRuby
- 1:50Why PicoRuby is portable
- 2:34Introducing ESP32 microcontroller
- 4:00Porting procedure overview
- 4:47C compile link and archive basics
- 6:13Cross-compiling for ESP32
- 7:59Setting up ESP-IDF
- 9:45Building ribmruby.a
- 10:07Linking ribmruby.a
- 13:15Handling standard I/O
- 17:55Porting MRuby gems
- 20:57Troubleshooting porting issues
- 21:17Watchdog timer error
- 22:37Require function not working
- 23:17Stack overflow error
- 24:37CSI command not working
- 26:39Live demo of R2P2 on ESP32
- 29:23Summary and future contributions
related talks
30mPicoRuby as a Multi-VM Operating System
31mA Beginner's Complete Guide to Microcontroller Programming w..
29mPicoRuby for IoT: Connecting to the Cloud with MQTT
29mIntegration of PRK Firmware and R2P2
30mPicoruby and PRK Firmware
43mUsing Both Cores of Raspberry Pi Pico with C++OS
29mmake mruby more portable: Why and How
36mWrite once, run on every boards: portable mruby
