This project demonstrates how to burn an Arduino Nano bootloader through an Arduino Uno from the command line.
Software:
- You must have the Arduino IDE installed and working.
Hardware:
- the Arduino Nano board you wish to burn a bootloader to
- a working Arduino Uno board that you don't mind overwriting
- the cable to connect it to your computer
- 6 M/F jumper wires to connect the Nano to the Uno
- Connect the Uno to your computer.
- Connect the Nano to a working Uno following the Connection Guide below.
- At the command line:
$ cd nano_bootloader
$ make
Nano | Uno |
---|---|
ICSP #1 MISO | D12 |
ICSP #2 5V | 5V |
ICSP #3 SCK | D13 |
ICSP #4 MOSI | D11 |
ICSP #5 RST | D10 |
ICSP #6 GND | GND |
make help -- show usage
make isp -- upload sketch to make the Uno into an ISP
make bootloader -- burn the bootloader to the Nano
make blink -- upload the Blink.ino sketch to the Nano
make -- isp + bootloader + blink
There are three steps involved in burning the bootloader:
The directory isp
contains the sketch ArduinoISP.ino
that will make the Arduino Uno into an ISP as well as the Makefile
to upload it to the board. The sketch is found in the Arduino IDE at Files > Examples > ArduinoISP > ArduinoISP
, modified here to successfully compile using avr-g++. You can see the sketch comments for additional information.
The bootloader
directory contains a Makefile
to burn the bootloader to the Nano. The variable values were found by burning the bootloader using the Arduino IDE with verbose output enabled. (Arduino > Preferences > Show verbose output during > compilation/upload
).
The blink
directory contains the Blink.ino
sketch and the Makefile
to upload it to the board to confirm the bootloader was successfully burned and the board is in good working order.
- Chinese clone of Arduino Nano with chip CH340G: how to fix it
- How to Burn a Bootloader Clone Arduino Nano 3.0
- Program Arduino Nano Via Uno With ICSP
- Arduino as ISP to change the bootloader and burn sketches
This project depends on Arduino-Makefile and uses an example sketch from the Arduino IDE.
- Code:
git clone https://github.com/alissa-huskey/nano_bootloader.git
- Home: https://github.com/alissa-huskey/nano_bootloader