Unable to Burn Bootloader from pro mini as ISP to pro mini

Hi,

I'm trying to burn optiboot bootloader in a mini pro, using another minipro as isp programmer, but I'm unable to do it. I've checked with several boards so its not a faulty board problem, even though they are all chinese clones (not of the same batch).

Both boards can be programmed with no problem, but when I try to burn the bootloader (For now I'm trying to burn the default bootloader) I keep receiving this:

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM5 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53

  • Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/*
  • Copyright (c) 2007-2014 Joerg Wunsch*
  • System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"*
  • Using Port : COM5*
  • Using Programmer : stk500v1*
  • Overriding Baud Rate : 19200*
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
    avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x66
    avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x66
    avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x66
    avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x66
    avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x66
    avrdude done. Thank you.
    Error burning bootloader

I've followed all the oficial arduino tutorial about using as an ISP. I changed the option USE_OLD_STYLE_WIRING in the Arduino ISP example. And of course I've chosen the programer Arduino as ISP. I'm wiring both arduinos this way:

Programmer-Target
Vcc-Vcc
GND-GND
10-RST
11-11
12-12
13-13
With the recommended 1microf capacitor between GND and RST at the arduino programmer.

The error is exactly the same whether the target arduino is wired or not. Which makes me think there is no communication between arduinos at all. I think It may be some problem with the reset, but I've checked continuity, even I tried to use a different pin, and it just doesnt work.

If it helps, I'm using this FTDI cable with DTR : https://http2.mlstatic.com/programador-usb-serie-para-arduino-pro-mini-wifi-gps-gsm-D_NQ_NP_805834-MLM26501973455_122017-F.webp

I think I'm missing something, because I've done this in the past whith similar arduino pro minis, but I'm stuck.

The error is exactly the same whether the target arduino is wired or not[/quot

Open the ArduinoISP firmware (in Examples) to your Arduino board.
Select the items in the Tools > Board and Serial Port menus that correspond to the board you are using as the programmer (not the board being programmed).
Upload the ArduinoISP sketch.

Sometimes at this point I skip wiring the board to be programmed and do the following

Select the item in the Tools > Board menu that corresponds to the board on which you want to burn the bootloader (not the board that you're using as the programmer). See the board descriptions on the environment page for details.
Select the Arduino as ISP in the Tools>Programmer menu.
Use the Burn Bootloader command.

You should get something like this.

avrdude: AVR device initialized and ready to accept instructions

Now go ahead and wire the Pro Mini's and then.

Use the Burn Bootloader command.

kprims:
Open the ArduinoISP firmware (in Examples) to your Arduino board.
Select the items in the Tools > Board and Serial Port menus that correspond to the board you are using as the programmer (not the board being programmed).
Upload the ArduinoISP sketch.

Sometimes at this point I skip wiring the board to be programmed and do the following

Select the item in the Tools > Board menu that corresponds to the board on which you want to burn the bootloader (not the board that you're using as the programmer). See the board descriptions on the environment page for details.
Select the Arduino as ISP in the Tools>Programmer menu.
Use the Burn Bootloader command.

You should get something like this.

avrdude: AVR device initialized and ready to accept instructions

Now go ahead and wire the Pro Mini's and then.

Use the Burn Bootloader command.

As both arduino boards are exactly the same model, I dont have to change anything, apart from selecting "Arduino as ISP". And as I said, if I have no target board, I dont get:

"avrdude: AVR device initialized and ready to accept instructions"

Instead, it takes a while until I get the same message as I posted before:

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM5 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM5
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x66

avrdude done. Thank you.

Error burning bootloader

Are you sure you have the Arduino as ISP sketch loaded. If you can load it, that proves your FTDI is working correctly. No need to change anything in the Arduino AS ISP sketch as it will work with no modifications needed for Mini Pro's.

I can cause your failure if the ISP sketch isn't loaded.

I also used your Command with the Command Prompt and got the "avrdude: AVR device initialized and ready to accept instructions"

Yes totally, I uploaded the sketch example with no modification, and also with some modifications such as de "OLD WIRE STYLE" and nothing happens. My FTDI works correctly I can upload this or any sketch to any pro mini board.

I am running out of ideas. I have better luck with a Usbasp for a programmer, but I don't know of any reason why you shouldn't be able to make the Pro mini's work with "Arduino As ISP".

With the recommended 1microf capacitor between GND and RST at the arduino programmer

Remove the capacitor and try again.

I did it initially without the capacitor. I'm also without ideas. I'm starting to think that may be some problem with these chinese clones, but I havent found any similar problem :frowning: .

I uploaded a video to youtube trying to do what kprims suggested. At the end, I should have gotten "avrdude: AVR device initialized and ready to accept instructions". I dont know what to do! please help!

Did you change anything in either "boards.txt" or "programmers.txt" or something that might affect the "Arduinoisp" sketch?

When I watched your video, you selected the example sketch "Arduinoisp" and you already had the sketch open on your desktop.

I made some changes to the baud rate on my "Arduinoisp" sketch and then opened it again from the examples. The changes I made were still there.

Try starting over by shutting everything down and then reloading your "Arduinoisp" sketch.

kprims:
Did you change anything in either "boards.txt" or "programmers.txt" or something that might affect the "Arduinoisp" sketch?

When I watched your video, you selected the example sketch "Arduinoisp" and you already had the sketch open on your desktop.

I made some changes to the baud rate on my "Arduinoisp" sketch and then opened it again from the examples. The changes I made were still there.

Try starting over by shutting everything down and then reloading your "Arduinoisp" sketch.

In fact, I reinstalled the whole arduino platform. The Arduinoisp sketch was already open but since I reinstalled the platform I haven made any change. But now that you mention it, I do have made some changes. First, I dont remember what was the process, but I did some changes to be able to program the ESP8266. Also I installed other package boards, such as minicore and Optiboot 8.0 (since I want to change the bootloader for a faster one).

This changes do remain after reinstalling the arduino platform, maybe the problem could be in those changes, isnt it?

Also I installed other package boards, such as minicore and Optiboot 8.0 (since I want to change the bootloader for a faster one).

I think using MiniCore is the way to go, a lot of people are using it with no problems.

If you can, remove any changes you made using Optiboot 8.0.

You do NOT need to "install" Optiboot if you are trying to update an installed platform that already uses some form of Optiboot. In fact, you should almost certainly NOT install Optiboot using the board manager. The Optiboot github repository these days is mostly useful as a sorce-code repository, for anyone who needs to make a highly customized version for some reason. Or an improvement to Optiboot itself.

kprims:
I think using MiniCore is the way to go, a lot of people are using it with no problems.

If you can, remove any changes you made using Optiboot 8.0.

GitHub - Optiboot/optiboot: Small and Fast Bootloader for Arduino and other Atmel AVR chips

I deleted optiboot 8.0 and still same behaviour...

Start fresh, restart Windows, restart the IDE 1.8.7, and plug in the Pro Mini.
Give us a printout of a successful "Arduino as ISP" sketch load as well as the failure printout from burning bootloader following the successful load. Nothing connected to the Pro Mini except your FTDI.

Ok, this is what I get when I burn the ArduinoISP example:

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM5
Using Programmer : arduino
Overriding Baud Rate : 57600
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino
Hardware Version: 2
Firmware Version: 1.16
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\WIN8~1.1\AppData\Local\Temp\arduino_build_990778/ArduinoISP.ino.hex"
avrdude: writing flash (4402 bytes):

Writing | ################################################## | 100% 1.22s

avrdude: 4402 bytes of flash written
avrdude: verifying flash memory against C:\Users\WIN8~1.1\AppData\Local\Temp\arduino_build_990778/ArduinoISP.ino.hex:
avrdude: load data flash data from input file C:\Users\WIN8~1.1\AppData\Local\Temp\arduino_build_990778/ArduinoISP.ino.hex:
avrdude: input file C:\Users\WIN8~1.1\AppData\Local\Temp\arduino_build_990778/ArduinoISP.ino.hex contains 4402 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.91s

avrdude: verifying ...
avrdude: 4402 bytes of flash verified

avrdude done. Thank you.

And this is what I get when I try to burn the bootloader on an arduino pro mini 5v 16 mhz:

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM5 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM5
Using Programmer : arduino
Overriding Baud Rate : 19200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xca
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x66
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x66

avrdude done. Thank you.

Error while burning bootloader.

Try selecting different Arduino's to "Burn Bootloader" like Uno or Nano, just to see if we can change the failure. Since you should only have the programmer hooked up it will not hurt anything. We are just looking for "avrdude: AVR device initialized and ready to accept instructions". Wouldn't hurt to change the Arduino used as ISP.

I checked all programmers and none work. I Tested several boards and it is exactly the same answer. Except from esp8266 which shows java null pointer exceptions:

java.lang.NullPointerException
at cc.arduino.packages.uploaders.SerialUploader.burnBootloader(SerialUploader.java:362)
at processing.app.Editor.lambda$handleBurnBootloader$61(Editor.java:2385)
at java.lang.Thread.run(Thread.java:748)
Error while burning bootloader.

I wanted you to try burning a bootloader to a Uno or Nano using your Pro Mini as a programmer.

Sorry I couldn't help you, but I am all out of ideas for now. If you come up with new information I will try to help.

kprims:
I wanted you to try burning a bootloader to a Uno or Nano using your Pro Mini as a programmer.

Sorry I couldn't help you, but I am all out of ideas for now. If you come up with new information I will try to help.

Yes I did it, I mean with the pro mini as programmer I changed the target in the menu to a nano, uno, etc. All this with nothing phisically connected to the pro mini programmer (Aside from the ftdi).

Thanks for your help. Im under the impression that if I use another pc it has to work, Im trying to get one. Then I'll tell you what happens.

Thanks. Good luck and let us know what happens.

I did a fresh reinstall. Now I get different stuff following exactly the same steps as mentioned before:

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM5 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m

avrdude: Version 6.3-20171130
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM5
Using Programmer : arduino
Overriding Baud Rate : 19200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x15
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Error quemando bootloader
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
Hardware Version: 4744608
Firmware Version: 0.4611299
Topcard : STK502
Vtarget : 1.8 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done. Thank you.