https://book.avr-rust.com/004-flashing-a-crate-to-chip.html
rustup override set nightly-2021-01-07
export AVR_CPU_FREQUENCY_HZ=16000000
cargo build -Z build-std=core --target avr-atmega328p.json --release
avrdude -p atmega328p -c arduino -P /dev/cu.usbserial-14120 -b 115200 -D -Uflash:w:target/avr-atmega328p/release/blink.elf:e
[profiles.release]
lto = true
(Toml)
ls /dev/tty* | grep usb
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably lgt8fx328p)
avrdude: reading input file "target/avr-atmega328p/release/blink.elf"
avrdude: writing flash (2748 bytes):
Writing | ################################################## | 100% 0.49s
avrdude: 2748 bytes of flash written
avrdude: verifying flash memory against target/avr-atmega328p/release/blink.elf:
avrdude: load data flash data from input file target/avr-atmega328p/release/blink.elf:
avrdude: input file target/avr-atmega328p/release/blink.elf contains 2748 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.37s
avrdude: verifying ...
avrdude: 2748 bytes of flash verified
avrdude: safemode: Fuses OK (E:00, H:00, L:00)
avrdude done. Thank you.