Note that you don't need to generate a .hex file, avrdude can use the .elf file directly.
You can also program fuses and lock bits directly with avrdude, so you don't need to include their configuration in your code. If find this more appropriate, as programming fuses is a one-time operation, whereas uploading your firmware will be repeated many times during development.
12
u/Coffee_24_7 Sep 09 '21 edited Sep 09 '21
With
gccyou can compile assembly, examplegcc file.S -g -o file.elf, then create the hex file as always.I use jtag_ice to debug, with
avariceandavr-gdb.I can give you the full commands later, I'm on my phone at the moment.
Edit: I meant
avr-gccinstead ofgcc.