I have a custom CCA that utilizes an ATMEGA328 but with an external clock of 1MHz that I originally burned the ADABOOT bootloader on using an Arduino Nano. Everything worked as expected, only issue is I noticed the boot up time is a little long and after some research it seems that putting the Opti bootloader on may help with this.
Thus, I am trying to burn the opti bootloader onto my CCA, this time using an Elegoo Uno R3. I successfully was able to upload the ArduinoISP sketch onto the Uno but when I go to burn the bootloader I get the following error:
avrdude: Version 6.3-20190619
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 : COM7
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_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x03
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x03
avrdude done. Thank you.
Error while burning bootloader.
I'm wondering if there is some sort of communication error since my custom CCA has the other bootloader on with different boards.txt settings than the default
When I perform the loopback test I don't get an echo on the serial monitor. I see both the "Rx" and "Tx" lights blink on the Uno, not sure if something is up there... Do you need to have a certain sketch uploaded for that to work?
I did not, I see that requires cutting a trace on the Uno. Why wouldn't have this been an issue with the original Nano board I used to burn the bootloader originally?
I see that, unfortunately I don't have any components on hand to do it that way. Interesting why the how to on burning a bootloader doesn't mention this.... I'll give it a shot.
Optiboot, the bootloader that should be on your Nano, times-out after one second. That's also the timeout for avrdude. If the board runs a bit fast or avrdude runs a bit slow everything works. Otherwise, it too would have needed auto-reset to be disabled.
In other words, you got lucky.
Instructables? Blog? (Please don't be an Arduino webpage.)
Still riding the struggle bus... Cut the trace for the auto reset on the Uno, confident i'm successful because i wasn't able to upload the code to the uno without jumping it again.
After that I tried to burn the bootloader once again and now i get this:
avrdude: Version 6.3-20190619
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 : COM7
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x4b
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x4b
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x4b
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x4b
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x4b
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x4b
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x4b
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x4b
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x4b
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x4b
avrdude done. Thank you.
Error while burning bootloader.
Yes, I did... Here is some updates, I was able to play with the settings in the Arduino ISP sketch and board.txt file and got it to burn the bootloader.
Now my problem is it won't let me upload a sketch, I get this error:
Using Port : COM6
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x7a
I think the issue is that Overriding Baud Rate of 115200... I don't understand where it is getting that value from. It's not in the Uno portion of the Boards.txt file nor is it in the Arduino ISP code I had used. I feel like if i can change that then i'll be in business.
You do realize that when you do "burn bootloader" the port needs to be set to the port that has the Uno running ArduinoAsISP on it, and to upload a sketch, it needs to be changed to the port that actually has your new board on it?
Overriding Baud Rate : 115200
Which bootloader did you use, exactly? MiniCore has optiboots built for a wide variety of CPU clock speeds and upload baudrates, but I think that the maximum upload rate with a 1MHz clock is going to be 9600bps. You certainly won't get 115200... (this means that I'm not sure that Optiboot will be any faster that Adaboot...)
Yes, but they're two different USB cables because the the one for the uno is your typical usb to usb but by custom board uses an ftdi cable. The computer just assigns them different COM numbers.
Although i went back and tried to load the Adaboot one i had used originally and still seem to be having issues for some reason.
Also i misspoke earlier, I'm using a 2 Mhz resonator.
My understanding was the optiboot had some sort of fast start feature that the others don't which made it faster.... regardless, it isn't uploading the sketch.