Linking AVR programs with Cargo
问题 I have a Rust project which I am currently compiling and linking by hand: rustc --target=avr-atmel-none src/main.rs --emit=obj -o _build/main.rs.o -C opt-level=3 avr-gcc -Os -Wl,--gc-sections -mmcu=atmega328p -o _build/image.elf _build/main.rs.o avr-objcopy -Oihex -R.eeprom _build/image.elf _build/image.hex I would like to automate this with Cargo, so I started by setting avr-gcc as the linker, by adding the following to .cargo/config : [build] target = "avr-atmel-none" [target.avr-atmel-none