avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude -C/etc/avrdude/avrdude.conf -v -patmega168 -carduino -P/dev/ttyUSB0 -b19200 -D -Uflash:w:/home/dietrich/Projekte/Source/rust-arduino-blink/target/avr-atmega168/release/rust-arduino-blink.elf:e
ravedude nano --open-console --baudrate 57600 -P /dev/ttyUSB0 target/avr-atmega168/release/rust-arduino-blink.elf
Board Arduino Nano
Programming target/avr-atmega168/release/rust-arduino-blink.elf => /dev/ttyUSB0
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
arduino-hal
support as well in the meantime
Cargo.toml
to e72faada6bb7f67990216525aeb2132bbb3d53e9, you should be able to use it just like you'd do for the Arduino Nano (with ATmega328P)
[dependencies.arduino-uno]
git = "https://github.com/Rahix/avr-hal"
features=["arduino-nano"]
rev = "e72faada6bb7f67990216525aeb2132bbb3d53e9"
and change the features to features = ["nano168"]
what should work after that does not work before?
as the two chips are almost identical, most likely nothing. But to keep everything clean I'd want to have the 168 version be handled separate, ontop of its own HAL layer. This means if there ever are any differences to care for, it is easy to differentiate the two.
❯ cargo run
Updating git repository `https://github.com/Rahix/avr-hal.git`
error: no matching package named `arduino-uno` found
location searched: https://github.com/Rahix/avr-hal.git?rev=e72faada6bb7f67990216525aeb2132bbb3d53e9
perhaps you meant: arduino-hal
required by package `rust-arduino-blink v0.1.0 (/home/dietrich/Projekte/Source/rust-arduino-blink)`
avr-hal
... Sorry :(avr-hal
recently... Maybe check https://github.com/Rahix/avr-hal#repository-structure to familiarize yourself with the new layout if you intend to update your own projects)
cargo generate --git https://github.com/Rahix/avr-hal-template.git --branch wip
and then selecting Nano168
as the board. If I didn't mess anything up, cargo run
should be enough with that to make your board blink (might need to set a port with cargo run -- -P /dev/ttyFOO
).
cargo run --bin test-nano168
Finished dev [optimized + debuginfo] target(s) in 0.02s
Running `ravedude nano168 -cb 57600 -P /dev/ttyUSB0 target/avr-atmega168/debug/test-nano168.elf`
Board Nano Clone (ATmega168)
Programming target/avr-atmega168/debug/test-nano168.elf => /dev/ttyUSB0
cargo run
(after I pasted the code from your example)
profile=minimal
in toolchain.toml do?