我正在使用 CLion 作为 IDE。构建后的输出是一个可执行文件example
。我想要实现的是从中制作.hex
文件并通过avrdude
. 我在这里阅读并尝试了一些可能的解决方案
xxd -p example | tr -d '\n' > example.hex
和
avrdude -u -c usbasp-clone -p atmega8 -P /dev/bus/usb/001/006 -U flash:w:example.hex
但avrdude
输出
avrdude: input file example.hex auto detected as invalid format
avrdude: invalid input file format: -1
avrdude: read from file 'example.hex' failed
这里有什么想法吗?