I am trying to program a few Atmega328 (not Atmega328p) with an ICSP. These are TQFP.
What I am trying to do is to upload the program to a fresh chip without having to first load the bootloader. I use a command like this
avrdude -v -p m328 -c usbtiny -U flash:w:blink.cpp.hex:i
avrdude says it is uploaded successfully, but the program does not actually run.
However, when I first burn the bootloader, using the Arduino GUI, then use the command line and programmer to upload the program, the program does run. I am confused about why this is because my understanding was that the bootloader was not needed if the programming was done using the programmer.
Why is the bootloader needed?
Secondly, if the bootloader is needed, is there a way to make avrdude do everything to load the bootloader and the program in one line?