I try to enable the fuse of CLKOUT in Arduino Nano, so I setup ArduinoISP with an Uno with Arduino IDE and change the board.txt of low fuses of arduino nano from 0xFF to 0x3F (divided by 8 clock out from PB0), then program the new bootloader into the arduino nano. I saw the 2MHz clock out from PB0. (This part is correct.)
But I used to program the arduino nano with the following command in Windows
avrdude -c arduino -p atmega328p -C ../avrdude.conf -b 115200 -P COM6 -U flash:w:blink.hex
now it doesn't work. The error messages are
avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x12 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x12 . . .
If I change the low fuses back to 0xFF, everything is working again (except no CLKOUT).
If programming through Arduino is not a good idea, I am willing to change to other methods (I am buying a USBasp programmer). But I am suspicious that the problem is something else. Suggestions are welcome.