$ git clone https://github.com/k-mana/pico-mruby.git --recursive
または
$ git clone https://github.com/k-mana/pico-mruby.git
$ cd pico-mruby
$ git submodule update --init --recursive
$ sudo apt install cmake build-essential gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib python3 rake
$ cd pico-mruby
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .
- Bash
$ ./build.sh
- コマンドプロンプト
> .\build.bat
- PowerShell
> powershell -ExecutionPolicy RemoteSigned .\build.ps1
引数にdockerを渡すとdockerイメージをビルドします。
デフォルトはUSBシリアル
- build/src/hello_world/hello_world.uf2
- スクリプトまたはバイトコードを埋め込んだサンプルです。
- build/src/pico_mirb/pico_mirb.uf2
- REPL(Read-Eval-Print Loop)
- build/src/pico_mruby/pico_mruby.uf2
- USBマスストレージにcode.rbまたはcode.mrbが存在する場合は自動的に実行します。
- 実行する優先順位は以下です。
- code.mrb
- code.rb
- REPL
- USBマスストレージに書き込むと自動的に再起動します。
- code.rbまたはcode.mrbの実行中にシリアル入力をするとREPLモードになります。
$ git clone https://github.com/k-mana/pico-mruby.git --recursive
or
$ git clone https://github.com/k-mana/pico-mruby.git
$ cd pico-mruby
$ git submodule update --init --recursive
$ sudo apt install cmake build-essential gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib python3 rake
$ cd pico-mruby
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .
- Bash
$ ./build.sh
- Command prompt
> .\build.bat
- PowerShell
> powershell -ExecutionPolicy RemoteSigned .\build.ps1
Passing docker as an agrgument will build a docker iamge.
Default is USB Serial.
- build/src/hello_world/hello_world.uf2
- Sample with embedded script or bytecode
- build/src/pico_mirb/pico_mirb.uf2
- REPL(Read-Eval-Print Loop)
- build/src/pico_mruby/pico_mruby.uf2
- If code.rb or code.mrb exists in the USB mass storage, it will be executed automatically.
- The priorities to execute are as follows:
- code.mrb
- code.rb
- REPL
- Writing to USB mass storage will automatically reboot the system.
- If you make a serial input while code.rb or code.mrb is running, it will enter REPL mode.