I am using CLion as IDE. After building the output is an executable file example
. What I would like to achieve is make .hex
file from it and upload it to my AVR via avrdude
. I read and tried some possible solutions here
xxd -p example | tr -d '\n' > example.hex
and
avrdude -u -c usbasp-clone -p atmega8 -P /dev/bus/usb/001/006 -U flash:w:example.hex
but avrdude
outputs
avrdude: input file example.hex auto detected as invalid format
avrdude: invalid input file format: -1
avrdude: read from file 'example.hex' failed
Any ideas here?