https://github.com/yuuu/picoruby-esp32
This is a component that can be used with ESP-IDF, allowing you to add PicoRuby to your project.
https://github.com/yuuu/picoruby-esp32
esp-idf-component esp32 picoruby ruby
Last synced: 8 months ago
JSON representation
This is a component that can be used with ESP-IDF, allowing you to add PicoRuby to your project.
- Host: GitHub
- URL: https://github.com/yuuu/picoruby-esp32
- Owner: yuuu
- License: mit
- Created: 2024-11-30T20:15:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-28T21:13:27.000Z (over 1 year ago)
- Last Synced: 2025-01-28T22:23:23.997Z (over 1 year ago)
- Topics: esp-idf-component, esp32, picoruby, ruby
- Language: CMake
- Homepage:
- Size: 26.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PicoRuby on ESP32
This is a component that can be used with ESP-IDF, allowing you to add [PicoRuby](https://github.com/picoruby/picoruby) to your project.
## Getting Started
### Preparation
Prepare your project by referring to [this page](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/index.html#).
### Installation
Clone this repository into the `components` directory of your project using Git Submodule.
```sh
$ git submodule add https://github.com/yuuu/picoruby-esp32.git components/picoruby-esp32
```
### Setup
Run the following shell script to build PicoRuby:
```sh
$ ./components/picoruby-esp32/install.sh
```
Open your `main/CMakeLists.txt` file in an editor. Add `picoruby-esp32` to the `REQUIRES` field.
```cmake
idf_component_register(
SRCS "main.c"
REQUIRES picoruby-esp32 # <-- add
PRIV_REQUIRES spi_flash
INCLUDE_DIRS ""
)
```
Call `picoruby_esp32()` from your C source code.
```c
#include "picoruby-esp32.h"
void app_main(void)
{
picoruby_esp32();
}
```
### Build
Build the project using the `idf.py` command.
```sh
$ . $(YOUR_ESP_IDF_PATH)/export.sh
$ idf.py set-target $(YOUR_ESP_TARGET) # example: idf.py set-target esp32c3
$ idf.py build
```
### Flash and Monitor
Flash the firmware and monitor the output using the `idf.py` command. PicoRuby Shell will start.
```sh
$ idf.py flash
$ idf.py monitor
```
## Example
Refer to this project for examples.
## Supported Environment
Currently, this project is tested in the following environment only:
- **Build OS**:
- macOS
- **Device**:
- ESP32-DevKitC(esp32)
- M5Stamp C3 Mate(esp32c3)
## License
[picoruby-esp32](https://github.com/yuuu/picoruby-esp32) is released under the [MIT License](https://github.com/yuuu/picoruby-esp32/blob/main/LICENSE).