Hi,
I've two Arduino Nano clones. My problem with bootloaders in a sentence: I can either upload sketches via USB/FTDI (see nr 1 below) or have the Nanos not forget the ArduinoISP sketch after power loss (see nr 2 and 3 below).
Both nano were shipped with a bootloader that made it possible to upload sketches with Arduino IDE 1.6.8 via USB. So, FTDI/USB driver is up to date and working fine. However, these bootloaders seem to have a known error: the ArduinoISP sketch is "forgotten" as soon as the power is disconnected.
What I tried:
-
I used "Nano1" to burn the "Board: Arduino Nano ATmega328 bootloader" to "Nano2" via ArduinoISP sketch. No error messages, bootloader replaced on Nano2. However, the ArduinoISP sketch is still lost on power off.
-
Than I burned "Board: ATmega328 Optiboot @ 38,400baud w/ 8MHz Int. RC Osc." - maybe I installed that some time ago. boards.txt settings
atmega328_384_8.name=ATmega328 Optiboot @ 38,400baud w/ 8MHz Int. RC Osc.
atmega328_384_8.upload.protocol=arduino
atmega328_384_8.upload.maximum_size=30720
atmega328_384_8.upload.speed=115200
atmega328_384_8.upload.tool=avrdude
atmega328_384_8.bootloader.tool=avrdude
atmega328_384_8.bootloader.low_fuses=0xFF
atmega328_384_8.bootloader.high_fuses=0xDA
atmega328_384_8.bootloader.extended_fuses=0x05
atmega328_384_8.bootloader.path=optiboot
atmega328_384_8.bootloader.file=optiboot/optiboot_atmega328_384_8.hex
atmega328_384_8.bootloader.unlock_bits=0x3F
atmega328_384_8.bootloader.lock_bits=0x0F
atmega328_384_8.build.mcu=atmega328p
atmega328_384_8.build.f_cpu=16000000L
atmega328_384_8.build.core=arduino
atmega328_384_8.build.variant=standard
atmega328_384_8.build.board=AVR_ATMEGA328_384_8
Bootloader successfully replaced on Nano2. Uploading ArduinoISP via Nano1 worked fine. The sketch survives the power disconnection. I can burn bootloaders and upload sketches to other devices. Surprisingly, I cannot upload sketches to Nano2 via USB/FTDI.
- I tried the MiniCore Bootloader "Board: ATmega328 -> 328p".
Boards.txt
##########################
#### ATmega328/A/P/PA ####
##########################
328.name=ATmega328
328.upload.tool=avrdude
328.upload.protocol=arduino
328.upload.maximum_size=32256
328.upload.maximum_data_size=2048
328.bootloader.tool=avrdude
328.bootloader.unlock_bits=0x3f
328.bootloader.lock_bits=0x0f
328.bootloader.high_fuses=0xd6
328.build.core=arduino:arduino
328.build.board=AVR_ATmega328
328.build.variant=standard
# Variants
328.menu.variant.modelP=328P / 328PA
328.menu.variant.modelP.build.mcu=atmega328p
328.menu.variant.modelNonP=328 / 328A
328.menu.variant.modelNonP.build.mcu=atmega328
# Brown out detection
328.menu.BOD.2v7=2.7v
328.menu.BOD.2v7.bootloader.extended_fuses=0xfd
328.menu.BOD.4v3=4.3v
328.menu.BOD.4v3.bootloader.extended_fuses=0xfc
328.menu.BOD.1v8=1.8v
328.menu.BOD.1v8.bootloader.extended_fuses=0xfe
328.menu.BOD.disabled=Disabled
328.menu.BOD.disabled.bootloader.extended_fuses=0xff
# Compiler link time optimization
328.menu.LTO.Os=Disabled (default)
328.menu.LTO.Os.compiler.c.extra_flags=
328.menu.LTO.Os.compiler.c.elf.extra_flags=
328.menu.LTO.Os.compiler.cpp.extra_flags=
328.menu.LTO.Os.ltoarcmd=avr-ar
328.menu.LTO.Os_flto=Enabled
328.menu.LTO.Os_flto.compiler.c.extra_flags=-Wextra -flto
328.menu.LTO.Os_flto.compiler.c.elf.extra_flags=-w -flto
328.menu.LTO.Os_flto.compiler.cpp.extra_flags=-Wextra -flto
328.menu.LTO.Os_flto.ltoarcmd=avr-gcc-ar
# Clock frequencies
328.menu.clock.16MHz_external=16 MHz external
328.menu.clock.16MHz_external.upload.speed=115200
328.menu.clock.16MHz_external.bootloader.low_fuses=0xf7
328.menu.clock.16MHz_external.bootloader.file=optiboot_flash/{build.mcu}/optiboot_flash_{build.mcu}_{upload.speed}_{build.f_cpu}.hex
328.menu.clock.16MHz_external.build.f_cpu=16000000L
328.menu.clock.20MHz_external=20 MHz external
328.menu.clock.20MHz_external.upload.speed=115200
328.menu.clock.20MHz_external.bootloader.low_fuses=0xf7
328.menu.clock.20MHz_external.bootloader.file=optiboot_flash/{build.mcu}/optiboot_flash_{build.mcu}_{upload.speed}_{build.f_cpu}.hex
328.menu.clock.20MHz_external.build.f_cpu=20000000L
328.menu.clock.18_432MHz_external=18.432 MHz external
328.menu.clock.18_432MHz_external.upload.speed=115200
328.menu.clock.18_432MHz_external.bootloader.low_fuses=0xf7
328.menu.clock.18_432MHz_external.bootloader.file=optiboot_flash/{build.mcu}/optiboot_flash_{build.mcu}_{upload.speed}_{build.f_cpu}.hex
328.menu.clock.18_432MHz_external.build.f_cpu=18432000L
328.menu.clock.12MHz_external=12 MHz external
328.menu.clock.12MHz_external.upload.speed=57600
328.menu.clock.12MHz_external.bootloader.low_fuses=0xf7
328.menu.clock.12MHz_external.bootloader.file=optiboot_flash/{build.mcu}/optiboot_flash_{build.mcu}_{upload.speed}_{build.f_cpu}.hex
328.menu.clock.12MHz_external.build.f_cpu=12000000L
328.menu.clock.8MHz_external=8 MHz external
328.menu.clock.8MHz_external.upload.speed=38400
328.menu.clock.8MHz_external.bootloader.low_fuses=0xf7
328.menu.clock.8MHz_external.bootloader.file=optiboot_flash/{build.mcu}/optiboot_flash_{build.mcu}_{upload.speed}_{build.f_cpu}.hex
328.menu.clock.8MHz_external.build.f_cpu=8000000L
328.menu.clock.8MHz_internal=8 MHz internal
328.menu.clock.8MHz_internal.upload.speed=38400
328.menu.clock.8MHz_internal.bootloader.low_fuses=0xe2
328.menu.clock.8MHz_internal.bootloader.file=optiboot_flash/{build.mcu}/optiboot_flash_{build.mcu}_{upload.speed}_{build.f_cpu}.hex
328.menu.clock.8MHz_internal.build.f_cpu=8000000L
328.menu.clock.1MHz_internal=1 MHz internal
328.menu.clock.1MHz_internal.upload.speed=9600
328.menu.clock.1MHz_internal.bootloader.low_fuses=0x62
328.menu.clock.1MHz_internal.bootloader.file=optiboot_flash/{build.mcu}/optiboot_flash_{build.mcu}_{upload.speed}_{build.f_cpu}.hex
328.menu.clock.1MHz_internal.build.f_cpu=1000000L
Bootloader replaced on Nano2 but the same as nr. 2 before. I cannot upload sketches via USB/FTDI.
How can I burn a bootloader two these Nanos so that I can both upload sketches via USB/FTDI and have the Nanos keep the ArduinoISP sketch?
Thanks & best