Package: arduino-oxidizer
oxidizer (arduino-oxidizer)日本語版が使用できます ／ Japanese version is avaialbleA python tool to build Rust project for Arduino and write it.InstallationRequirementspython3pipcargoA rust project configurated to build for Arduino, or an elf file to writeIf you need to make a project for it, a templateloxygenK/arduino-on-rust_templateis available.avrdudeInstallationYou can install oxidizer withpippipinstallarduino-oxidizerNote: The package's name to install isarduino-oxidizer, notoxidizer.How to useBuild and write a Cargo project configured for ArduinoOxidizer builds the project usingcargo, and write to Arduino. The target ELF file is searched based oncargo.toml.oxidizer<Serialporttowrite>example$ cd /path/to/cargo/projects/root
$ oxidizer /dev/ttyUSB0
[i] Building 'some-nice-project' ...
[i] >> cargo build
    Updating crates.io index
    Finished dev [unoptimized + debuginfo] target(s) in 2.30s
[v] Building succeeded! Writing to Arduino...
[i] >> avrdude -C/etc/avrdude.conf -patmega328p -carduino -P/dev/ttyUSB0 -Uflash:w:target/avr-atmega
328p/debug/some-nice-project.elf:e

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

/* ...... */

avrdude: 4982 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.

[v] All works done!Build and write in release modeRun with the option--release(-r) , to build in release mode.$ cd /path/to/cargo/projects/root
$ oxidizer /dev/ttyUSB0 -r
[i] Building 'some-nice-project' in release mode...
[i] >> cargo build --release
    Updating crates.io index
    Finished release [optimized] target(s) in 2.42s

/* ...... */

avrdude done.  Thank you.

[✓] All works done!Write your own ELF fileRun with the option--skip-cargo(-s) and--elf-path(-e) , to skip building a cargo project, and write your own ELF file to Arduino.$ oxidizer --skip-cargo --elf-path my_own_elf_file.elf /dev/ttyUSB0
[i] >> avrdude -C/etc/avrdude.conf -patmega328p -carduino -P/dev/ttyUSB0 -Uflash:w:my_own_elf_file.elf:e

avrdude: AVR device initialized and ready to accept instructions

/* ...... */

avrdude done.  Thank you.

[✓] All works done!Other optionsVarious options is available:$ oxidizer --help
usage: oxidizer [-h] [--release] [--cargo-option [Option [Option ...]]]
                [--avrdude-option [Option [Option ...]]] [--avrdude-override] [--avrdude-quite]
                [--skip-cargo] [--elf-path ELF_PATH] [--no-color]
                target

A building helper for the Rust project for Arduino.

positional arguments:
  target                Specify the serial port to write.

optional arguments:
  -h, --help            show this help message and exit
  --release, -r         Let cargo build in release mode
  --cargo-option [Option [Option ...]], -c [Option [Option ...]]
                        Pass options to cargo. Type without '-'!
  --avrdude-option [Option [Option ...]], -a [Option [Option ...]]
                        Pass options to avrdude. Type without '-'!
  --avrdude-override, -A
                        override avrdude's option. Use with '-a'
  --avrdude-quite, -q   Use -q option when avrdude.
  --skip-cargo, -s      Skip building using cargo.
  --elf-path ELF_PATH, -e ELF_PATH
                        Specify ELF file's path. Use target/avr-
                        atmega328p/{debug,release}/{package_name}.elf as default.
  --no-color            Disable color output.OptionAbbreviationArgumentsDescription--release-rNothingBuild the cargo project in release mode.Cannot be used with--skip-cargo.--cargo-option-cOptions to pass to cargo(enumerate without-)Run cargo with additional options.--avrdude-option-aOptions to pass to avrdude(enumerate without-)Run avrdude with additional options.--avrdude-override-ANothingReplace the default options to pass to avrdude with the options specified in--avrdude-option.--skip-cargo-sNothingSkip building a cargo project. Use with--elf-path.--elf-path-eThe ELF file to writeSpecify the ELF file's path to write.--no-colorNothingNothingPrint logs without ASCII espace sequences.oxidizer (arduino-oxidizer)English version is available ／ 英語版が利用できますPythonで作成された、Rustで書かれたArduinoプロジェクトをビルド・書き込むためのツールです。インストール必要なものpython3pipcargoArduino用にビルドできるように構成されたRustのプロジェクト
または書き込みたいelfファイルよろしければloxygenK/arduino-on-rust_templateをどうぞ（ダイマ）avrdudeインストールpipでインストールできます:pipinstallarduino-oxidizer注意: インストールするパッケージ名はoxidizerではなく**arduino-oxidizer**です。使い方Arduino用に構成されたCargoプロジェクトをビルド・書き込みoxidizerは、cargoを用いてビルドを行い、avrdudeを用いてArduinoへ書き込みを行います。
書き込むELFファイルはCargo.tomlから読み込んだプロジェクト名を元に検索されます。oxidizer<書き込み先のシリアルポート>例$ cd /path/to/cargo/projects/root
$ oxidizer /dev/ttyUSB0
[i] Building 'some-nice-project' ...
[i] >> cargo build
    Updating crates.io index
    Finished dev [unoptimized + debuginfo] target(s) in 2.30s
[v] Building succeeded! Writing to Arduino...
[i] >> avrdude -C/etc/avrdude.conf -patmega328p -carduino -P/dev/ttyUSB0 -Uflash:w:target/avr-atmega
328p/debug/some-nice-project.elf:e

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

/* ...... */

avrdude: 4982 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.

[v] All works done!Cargoプロジェクトをリリースモードでビルド・書き込み--release（-r）をつけて実行すると、リリースモードでビルドされます。$ cd /path/to/cargo/projects/root
$ oxidizer /dev/ttyUSB0 -r
[i] Building 'some-nice-project' in release mode...
[i] >> cargo build --release
    Updating crates.io index
    Finished release [optimized] target(s) in 2.42s

/* ...... */

avrdude done.  Thank you.

[✓] All works done!自作のELFファイルを書き込む--skip-cargo（-s）と--elf-path（-e）を指定して実行すると、Cargoプロジェクトのビルドをスキップし、自作のELFファイルを書き込むことができます。$ oxidizer --skip-cargo --elf-path my_own_elf_file.elf /dev/ttyUSB0
[i] >> avrdude -C/etc/avrdude.conf -patmega328p -carduino -P/dev/ttyUSB0 -Uflash:w:my_own_elf_file.elf:e

avrdude: AVR device initialized and ready to accept instructions

/* ...... */

avrdude done.  Thank you.

[✓] All works done!他のオプション様々なオプションを利用できます:$ oxidizer --help
usage: oxidizer [-h] [--release] [--cargo-option [Option [Option ...]]]
                [--avrdude-option [Option [Option ...]]] [--avrdude-override] [--avrdude-quite]
                [--skip-cargo] [--elf-path ELF_PATH] [--no-color]
                target

A building helper for the Rust project for Arduino.

positional arguments:
  target                Specify the serial port to write.

optional arguments:
  -h, --help            show this help message and exit
  --release, -r         Let cargo build in release mode
  --cargo-option [Option [Option ...]], -c [Option [Option ...]]
                        Pass options to cargo. Type without '-'!
  --avrdude-option [Option [Option ...]], -a [Option [Option ...]]
                        Pass options to avrdude. Type without '-'!
  --avrdude-override, -A
                        override avrdude's option. Use with '-a'
  --avrdude-quite, -q   Use -q option when avrdude.
  --skip-cargo, -s      Skip building using cargo.
  --elf-path ELF_PATH, -e ELF_PATH
                        Specify ELF file's path. Use target/avr-
                        atmega328p/{debug,release}/{package_name}.elf as default.
  --no-color            Disable color output.オプション省略形引数説明--release-rなしCargoプロジェクトをリリースモードでビルドします。--skip-cargoと同時に指定することはできません。--cargo-option-cCargoに渡すオプション(-なしで列挙)Cargoでビルドする際に、追加でオプションをつけて実行します。--avrdude-option-aavrdudeに渡すオプション(-なしで列挙)avrdudeでビルドする際に、追加でオプションをつけて実行します。--avrdude-override-Aなしavrdudeでビルドする際、規定のコマンドを--avrdude-optionで指定されたものに置き換えます。--skip-cargo-sなしCargoでのビルドをスキップします。--elf-pathと一緒に使用します。--elf-path-eArduinoに書き込むELFファイルへのパス書き込むELFファイルのパスを指定します。--no-colorなしなしASCIIエスケープシーケンスなしで出力を行います。