Burning the Bootloader

Everything about the Arduino bootloader one can find here: https://www.arduino.cc/en/Hacking/Bootloader?from=Tutorial.Bootloader
For the Paper-Arduino-Clones we have to burn the bootloader on our ATmega chip. There are differnet ways to do so:


With the Arduino IDE

For burning the bootloader on the Paperduino-UNO, or on the Paper-Leonardo you need to connect the following pins on your Paperduino-UNO with your ISP programmer (in-system programmer):

  • 11 - MOSI
  • 12 - MISO
  • 13 - SCK
  • Reset
  • Ground
  • + 5V

After connecting the programmer to your computer select in the Arduino IDE in Tools/Programmer your programmer and than klick Tools/Burn Bootloader.


With an AVR programmer

On the foto you see the ISP programmer with an ISP adapter board. But you could also build your own modified wire like that on the Mini Bootloader project. Anyway here are the connection of an original ISP header.

Cause my ISP programmer has a different protokoll as the originale AVR-ISP programmer I had to modifie the programmers.txt file.
In that folder(on Linux):

/usr/share/arduino/hardware/arduino

The third line has to change to:

avrisp.protocol=stk500v2

With the Paper-USBasp programmer

It is simelar to the AVR ISP programmer, just select the USBasp programmer and burn.

Here is a manual for building your own Paper-USBasp programmmer.


With a Paperduino-UNO

The Paperduino-UNO was designed for cloneing and that's why you can use your Paperduino-UNO fot burning bootloder, too. Just load the ArduinoISP - in the examples - on your Paperduino-UNO. After that, turn off the auto reset by removeing the auto reset jumper. And than connect the pins like that:

  • 13 to 13
  • 12 to 12
  • 11 to 11
  • 10 to Reset
  • Ground to Ground
  • +5V to +5V

… and than burn!


The AVRdude

Burning the bootloader on an Atmega328p chip of a Paperduino-Uno or a Paper-Duino-Pi with an AVR ISP programmer in command line (Linux).

Go to the folder with the bootloader:

$ cd /usr/share/arduino/hardware/arduino/avr/bootloaders/optiboot/

Run avrdude :

$ sudo avrdude -p m328p -c stk500v2 -P /dev/ttyACM0 -U flash:w:optiboot_atmega328.hex:i

More at the AVRdude page.
When using an Atmega328 (without p) use “-p m238”.


Burning an Atmega328 (without P)

The Atmega328 has a different signature than the Atmega328p (p stands for picoPower). When using the Atmega328 for an Arduino Uno and burn with the IDE one has to change the avrdude.conf file. An other possibility is to burn with the avrdude and use -F for sciping the signature check.
Open the file:

 $ sudo nano /usr/share/arduino/hardware/tools/avrdude.conf

or (depends on the Arduino version):

 $ sudo nano /usr/share/arduino/hardware/tools/avr/etc/avrdude.conf

search with control W for the Atmega328p signature:

 0x1e 0x95 0x0F

and replace it with the Atmega328 signature:

 0x1e 0x95 0x14

Save and close (contr O and contr X)
Now you can burn the Atmega328 with the Arduino IDE (Arduino Uno).



~~DISCUSSION~~