This is a component that can be used with ESP-IDF, allowing you to add PicoRuby to your project.
Prepare your project by referring to this page.
Clone this repository into the components directory of your project using Git Submodule.
$ git submodule add https://github.com/picoruby/picoruby-esp32.git components/picoruby-esp32Open your main/CMakeLists.txt file in an editor. Add picoruby-esp32 to the REQUIRES field.
idf_component_register(
SRCS "main.c"
REQUIRES picoruby-esp32 # <-- add
PRIV_REQUIRES spi_flash
INCLUDE_DIRS ""
)Call picoruby_esp32() from your C source code.
#include "picoruby-esp32.h"
void app_main(void)
{
picoruby_esp32();
}Build the project using the idf.py command.
$ . $(YOUR_ESP_IDF_PATH)/export.sh
$ idf.py set-target $(YOUR_ESP_TARGET) # example: idf.py set-target esp32c3
$ idf.py buildFlash the firmware and monitor the output using the idf.py command. PicoRuby Shell will start.
$ idf.py flash
$ idf.py monitorRefer to this project for examples.
Currently, this project is tested in the following environment only:
- Build OS:
- Linux
- macOS
- Device:
- ESP32-DevKitC(esp32)
- M5Stamp C3 Mate(esp32c3)
picoruby-esp32 is released under the MIT License.