avr-hal
avr-hal copied to clipboard
Can only flash Nano with argument 'uno'
I'm having issues flashing Nano boards with ravedude. On a Uno, it works with having the runner in .cargo/config.toml as
runner = "ravedude Uno -cb 57600"
but with the Nano, it fails to find the port, so I have to specify this (this isn't an issue, but I'm adding the info in case it for some reason is useful). With the Nano, I'm using
runner = "ravedude nano -cb 57600 --port=/dev/ttyUSB0"
and it gives me the following message:
Programming target/avr-atmega328p/debug/testing-nano.elf => /dev/ttyUSB0
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x74
avrdude: opening programmer "arduino" on port "/dev/ttyUSB0" failed
I'm able to flash it using the Arduino IDE. I've tried this on Manjaro Linux and Windows. I'm using ravedude v0.1.4 and avrdude v7.0. I'm using nightly-2022-07-10. The project is generated using the avr-hal-template. What I find strange is that I am able to flash it using the following .cargo/config.toml
[build]
target = "avr-specs/avr-atmega328p.json"
[target.'cfg(target_arch = "avr")']
runner = "ravedude uno -cb 57600 --port=/dev/ttyUSB0"
[unstable]
build-std = ["core"]
where I've simply changed nano to uno in the runner.
Any idea what the issue might be?
I've made it work by cloning the repository and using ravedude compiled from that source code with the argument nano-new, so my board seems to be using the new bootloader. Any idea when this new feature will be released via cargo?
Here you go: https://github.com/Rahix/avr-hal/releases/tag/ravedude-0.1.5 :)
Thank you!