3D Robotics

Reloading the Arduino bootloader

If at any point you've managed to crash the ArduPilot code so badly that you've nuked the bootloader, don't worry: you can reload it. You'll need an AVR programmer. The best way to reload the bootloader is with the Arduino IDE, which is pretty straightforward. Just plug in your AVR programmer and select Burn Bootloader/ w/ AVRISP mk II. If you've already loaded AVR Studio, you may get an error in Arduino that says it can't find the USB. That's because of a driver conflict with the AVR Studio driver. Follow this workaround to reload the correct driver. It is also possible to load the bootloader with AVR Studio. Follow these instructions.
E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Hmm.  Dunno if I missed something when I was reading the information about loading the bootloader.  But apparently you CANNOT have the ftdi cable connected while burning the bootloader.  I removed the ftdi cable, connected vcc and gnd.  And now appears to be loading the bootloader.  

  • I'm talking about Ardupilot not Ardupilot Mega.  But my guess is that doesn't really matter.  I see the port for 1AT168 and the other one 1AT45.  I believe the 1AT168 is for the 368P and the 1AT45 is for the mux (ATiny).  Doesn't matter in that the port is an ISP port.

     

    Unfortunately I don't have an AVR ISP II, but I do have the parallel programmer.  All I get is Invalid device signature.  Sounds like a communications issue.  The only reason I bring that up is because I just successfully flashed my Duemilanove with the same programmer.

  • 3D Robotics

    Yes, there is an ISP port for both the Atmega1280/2560 and the Atmega328. If you've got an AVR programmer (AVR ISP II etc) you should be able to burn the bootloader no problem.

  • Is the port on the Ardupilot an ISP port?  Can I burn the bootloader using a Parallel Programmer?  I totally hosed it by making the mistake and trying to load the sweep (example) sketch from the Arduino IDE.  I actually did the same to my Duemilanove board.  I was able to recover/reflash my bootloader on the Duemilanove board using the parallel programmer and the Arduino IDE.  Although when I tried to re-flash my bootloader on the Ardupilot, it told me the chip was unrecognized.  

     

    Ideas?

  • Problem solved.

    The USB cable was faulty. I have now uploaded ArduPilot 2.1 to the board.

    Time to start tinkering!

    Thank you for all the tips!
  • Thanks Reto!
  • Paul: just in case you buy the AVRISP prog board from the url, you placed (http://www.virtualvillage.co.uk/items/item.aspx?itemid=4763814&...), it should be ok BUT you would still need to adapt the pin out of the 10 pin ISP cable that comes with this AVRSP to a 6 PIN plug ! If you need a schematic of the 10 pin to 6 pin, I can provide that from the adapter I received.
    But Chris is much better advice on the problem you try to solve right now. Follow his advices and do not try to burn anything, unless he advises to! Good luck with your board.
  • Sorry my bad. It is the MUX light (not Battery!)
  • 3D Robotics
    Paul. That LED flashing behavior is just a LED test routine that Sparkfun runs at the factory. It means that everything's working right.

    What the "battery light"? ArduPilot doesn't have one. Please identify it using this post as a reference.
  • None at all. My soldering isn't great, but it's not that bad.

    When I power up the board, the yellow and blue lights flash... yellow then blue. This sequence increases in frequency (I think they flash about 6 times in all) and then repeats.

    One other thing: The red power light always comes on when I power up, but the battery light only comes on now and then (when I unplug and re-plug the power supply)

    I'm using a BEC as the power source, set to 5V.
This reply was deleted.