I thought I'd finally learn rust and what better than to do it on the trusted 328.
I followed the AVR-Rust guidebook:
rustup toolchain install nightly
rustup component add rust-src --toolchain nightly
git clone https://github.com/avr-rust/blink.git
cd blink
rustup override set nightly
export AVR_CPU_FREQUENCY_HZ=16000000
cargo build -Z build-std=core --target avr-atmega328p.json --release
Then I try to flash it:
avrdude -patmega328p -c avrispmkii -P usb:69:98 -b115200 -D -Uflash:w:target/avr-atmega328p/release/blink.elf:e
And I get the following error:
avrdude: verification error, first mismatch at byte 0x0006
0x10 != 0x51
avrdude: verification error; content mismatch
- I tried to flash a equivalent C program and it works.
- I tried another board, same result.