I am new to the Arduino world. Finding a strange issue with when I try to upload the sketches in Arduino IDE. It is giving me the following error:
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500v2_command(): unknown status 0x01
avrdude: stk500v2_disable(): failed to leave programming mode
I am getting this error in both Duemilanove as well as Mega 2560.
However, when I burn the bootloader using the programmer, and then try to upload the sketch, it works for the first time. If I try to upload the same sketch again, it throws the error mentioned above.