Problem with burning bootloader from Pro Micro to Uno

I was unable to load Grbl to my Uno board and read that the problem was most likely with the bootloader. I tried to burn it with Pro Micro, but failed.

My steps:

  1. Modify the programmers.txt to add Arduino as ISP (Leonardo).
  2. Load ArduinoISP sketch.
  3. Change reset pin to 10 from SS and upload to Pro Micro.
  4. Connect ICSP on Uno to Leonardo, with Reset on Uno going to pin 10 on Pro Micro.
  5. Select Arduino as ISP (Leonardo) as a programmer.
  6. Burn bootloader.

It returns with an error:

Using Port : com1
Using Programmer : arduino
avrdude: ser_open(): can't open device "\.\com1": Cannot find file.

Note that my Pro Micro is on COM8, I have turned COM1 off just to be sure...

I have managed to update the bootloader with avrdude run from command line, now grbl uploads just fine.

Suspect you made a mistake in the programmers.txt, forgetting the extra params line

arduinoasisp.name=Arduino/Leo as ISP 
arduinoasisp.communication=serial
arduinoasisp.protocol=arduino
arduinoasisp.speed=19200
arduinoasisp.program.protocol=arduino
arduinoasisp.program.speed=19200
arduinoasisp.program.tool=avrdude
arduinoasisp.program.extra_params=-P{serial.port} -b{program.speed}

The programmers.txt addition I have found somewhere did not include those lines, so it is good to know they are needed.

Jabberwock:
The programmers.txt addition I have found somewhere did not include those lines, so it is good to know they are needed.

Was probably pre-1.6.0, then - that stuff used to be hardcoded.

I use Pro Micro and Leonardo all the time as ISP programmers and have never made an edit to programmers.txt. Just use the plain ole "Arduino as ISP" programmer selection in the tools menu, and use the example ArduinoISP sketch modified to change SS to 10. I have seen several people mention this seemingly unnecessary edit to programmers.txt to add "Arduino as ISP (Leonardo)" and have wondered about it. I just verified avoiding that edit works fine with 1.0.6 and 1.6.5. Is this idea of editing programmers.txt to make an "Arduino as ISP (Leonardo)" entry from extremely old versions of the IDE or from outdated tutorials?

But I did try to use Arduino as ISP first, as I was completely unaware any changes are needed. It did not work, although I cannot remember now whether it was the same error (with COM1) or another one.

The addon in programmers.txt is needed on windows only. Its purpose is to make avrdude use -c arduino instead of -c stk500v1. The combo windows/avrdude does not assert DTR when communicating with the arduino using the virtual serial port. The cores for Leo, Micro refuse to send anything over usbserial if DTR is not set (cfr CDC.cpp). One difference between the arduino protocol and the stk500v1 protocol is that the former will briefly deassert DTR before programming. A side effect is that after this operation DTR stays asserted and the Leo, Micro... will happily communicate.

Thank you for that explanation, I was wondering what that was all about.