RobAIR2013-RICM5-Suivi/BurnBootloader: Difference between revisions

From air
Jump to navigation Jump to search
 
(13 intermediate revisions by 2 users not shown)
Line 5: Line 5:
This tutorial explains how to use an Arduino board (Arduino Uno) as an AVR ISP (in-system programmer). This allows you to use the board to burn the bootloader onto an AVR (the ATmega168 used in Arduino). This steps have been tested with Arduino 022 and Windows as OS. (Not the same in results on Linux :( )
This tutorial explains how to use an Arduino board (Arduino Uno) as an AVR ISP (in-system programmer). This allows you to use the board to burn the bootloader onto an AVR (the ATmega168 used in Arduino). This steps have been tested with Arduino 022 and Windows as OS. (Not the same in results on Linux :( )


Attention: This is not required for normal use of the Wild Thumper Controller (normally come with a bootloader).
Attention: This is not required for normal use of the [[Dagu Wild Thumper Controller Board]] (normally come with a bootloader).


This tutorials is based on the tutorials http://arduino.cc/en/Tutorial/ArduinoISP and http://letsmakerobots.com/node/32096. These instructions are based on Arduino 022 running on Windows (not successful results on Linux).
This tutorials is based on the tutorials http://arduino.cc/en/Tutorial/ArduinoISP and http://letsmakerobots.com/node/32096. These instructions are based on Arduino 022 running on Windows (not successful results on Linux).
Line 11: Line 11:
= Instructions =
= Instructions =


1. First, Replace the files arduino-0022\hardware\arduino\boards.txt and arduino-0022\hardware\tools\avr\etc\avrdude.conf by this two files:
* First, Replace the files ''arduino-0022\hardware\arduino\boards.txt'' and ''arduino-0022\hardware\tools\avr\etc\avrdude.conf'' by this two files: [[File:Boards.txt]] and [[File:Avrdude.conf.txt]]
Close the Arduino IDE.
Close the Arduino IDE.


2. Open the IDE. You will see three new boards:
* Open the IDE. You will see three new boards:

Open the ArduinoISP firmware (in Examples) to your Arduino board.
Open the ArduinoISP firmware (in Examples) to your Arduino board.


2. Select Tools > Board and Serial Port > Arduino Uno (the board that we are using as a programmer)
* Select '''Tools > Board''' and '''Tools > Serial Port > Arduino Uno''' (the board that we are using as a programmer)

{|
{|
| [[File:Select-arduino-uno.png|thumb|upright=2|alt=Connection]]
| [[File:Select-arduino-uno.png|thumb|upright=2|alt=Connection]]
|}
|}


3. Upload the ArduinoISP sketch into your programmer
* Upload the ArduinoISP sketch into your programmer

{|
{|
| [[File:Arduino-isp.jpg|thumb|upright=2|alt=Connection]]
| [[File:Arduino-isp.jpg|thumb|upright=2|alt=Connection]]
|}
|}


4. Disconnect the USB cable from the Arduino Uno.
* Disconnect the USB cable from the Arduino Uno.

5. Wire the Wild Thumper Controller with the Arduino Uno as shown in the picture


* Wire the Wild Thumper Controller with the Arduino Uno as shown in the picture
{|
{|
| [[File:Wildtrumper-board-isp-bootloader-burning.jpg|thumb|upright=1|alt=Connection]]
| [[File:Wildtrumper-board-isp-bootloader-burning.jpg|thumb|upright=1|alt=Connection]]
Line 39: Line 35:
|}
|}


6. Plug in your USB cable to the programmer (Arduino Uno). Select the item in the '''Tools > Board > DAGU product w/Atmega 168''', then the item '''Tools > Burn Bootloader > Arduino as ISP'''.
* Plug in your USB cable to the programmer (Arduino Uno). Select the item in the '''Tools > Board > DAGU product w/Atmega 168''', then the item '''Tools > Burn Bootloader > Arduino as ISP'''.

{|
{|
| [[File:Select-arduino-nano.png|thumb|upright=2|alt=Connection]]
| [[File:Select-arduino-nano.png|thumb|upright=2|alt=Connection]]
Line 46: Line 41:
|}
|}


* If this doesn't work, execute cmd.exe and execute the following command:
7. Now click on Burn Bootloader
C:\Users\....\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Users\...\arduino-0022\hardware/tools/avr/etc/avrdude.conf<br/>

-v -v -v -v -patmega168p -cstk500v1 -P\\.\COM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x00:m-Uhfuse:w:0xdd:m -Ulfuse:w:0xff:m -F
{|
| [[File:Select-burn-bootloader.png|thumb|upright=2|alt=Schema]]
|}

8. If this doesn't work, execute cmd.exe and execute the following command:

C:\Users\Liz\Desktop\arduino-0022\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Users\Liz\Desktop\arduino-0022\arduino- 0022\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega168p -cstk500v1 -P\\.\COM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x00:m -Uhfuse:w:0xdd:m -Ulfuse:w:0xff:m -F


You have to complete this command with the exactly location of the folder arduino-0022.
The bootloader have been burn!
The bootloader have been burn!


9. Close all Arduino IDE windows
* Close all Arduino IDE windows


10. Open arduino-0022\arduino-0022\lib\preferences.txt and change: ''upload.using=bootloader'' by ''upload.using=arduinoisp''
* Open arduino-0022\arduino-0022\lib\preferences.txt and change: ''upload.using=bootloader'' by ''upload.using=arduinoisp''


11. Open the Arduino IDE, open your sketch. Make sure '''Tools > Board is set''' to the target chip.
* Open the Arduino IDE, open your sketch. Make sure '''Tools > Board''' is set to the target chip.


12. Compile and upload the sketch
* Compile and upload the sketch

Latest revision as of 09:22, 10 May 2013

Burning the Arduino Bootloader onto an ATmega168PA using an Arduino Uno

Introduction

This tutorial explains how to use an Arduino board (Arduino Uno) as an AVR ISP (in-system programmer). This allows you to use the board to burn the bootloader onto an AVR (the ATmega168 used in Arduino). This steps have been tested with Arduino 022 and Windows as OS. (Not the same in results on Linux :( )

Attention: This is not required for normal use of the Dagu Wild Thumper Controller Board (normally come with a bootloader).

This tutorials is based on the tutorials http://arduino.cc/en/Tutorial/ArduinoISP and http://letsmakerobots.com/node/32096. These instructions are based on Arduino 022 running on Windows (not successful results on Linux).

Instructions

Close the Arduino IDE.

  • Open the IDE. You will see three new boards:

Open the ArduinoISP firmware (in Examples) to your Arduino board.

  • Select Tools > Board and Tools > Serial Port > Arduino Uno (the board that we are using as a programmer)
Connection
  • Upload the ArduinoISP sketch into your programmer
Connection
  • Disconnect the USB cable from the Arduino Uno.
  • Wire the Wild Thumper Controller with the Arduino Uno as shown in the picture
Connection
Schema
  • Plug in your USB cable to the programmer (Arduino Uno). Select the item in the Tools > Board > DAGU product w/Atmega 168, then the item Tools > Burn Bootloader > Arduino as ISP.
Connection
Schema
  • If this doesn't work, execute cmd.exe and execute the following command:
C:\Users\....\arduino-0022\hardware/tools/avr/bin/avrdude -CC:\Users\...\arduino-0022\hardware/tools/avr/etc/avrdude.conf
-v -v -v -v -patmega168p -cstk500v1 -P\\.\COM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x00:m-Uhfuse:w:0xdd:m -Ulfuse:w:0xff:m -F

You have to complete this command with the exactly location of the folder arduino-0022. The bootloader have been burn!

  • Close all Arduino IDE windows
  • Open arduino-0022\arduino-0022\lib\preferences.txt and change: upload.using=bootloader by upload.using=arduinoisp
  • Open the Arduino IDE, open your sketch. Make sure Tools > Board is set to the target chip.
  • Compile and upload the sketch