Bootloader on Leonardo

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello everyone,

 

I'm a newbie in the Atmel world and have started with an Arduino Leonardo board (ATmega32u4) for which I have built an application using the LUFA class library.

Now I want to include a firmware update function into my VisualBasic App on the PC to be able to do firmware updates from the Windows-PC via USB.

 

After searching forums and blogs there are still things that are not clear to me.

I hope someone can help me with some bootloader related questions:

 

1.) Which bootloader is initially flashed into the Leonardo Boards?

2.) Generally, is there a way to determine which bootloader is present in an AVR device?

3.) Some posts state that you need an ISP programmer to flash the bootloader. I guess that's only true when you have messed up the device and don't have access through USB any more.

My understanding is that as long as the device is not messed up somehow, avrdude or Arduino IDE can be used to flash a new bootloader via USB. Is this understanding correct?

4.) It is also said that AVR devices initially come with the Atmel DFU bootloader. LUFA comes with it's own DFU bootloader. Why would someone want to not use the Atmel DFU bootloader?

My assumption is that some do it because Atmel is closed source and LUFA is open source. Other reasons?

 

It would be great if someone could help me getting a better understanding on how things work in the AVR world.

Thanks in advance.

Pirmin

Last Edited: Wed. Oct 22, 2014 - 02:29 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Pirmin,

 

1) The Leonardo comes with the Arduino "Caterina" bootloader (https://github.com/arduino/Ardui...) which is just a modified version of my LUFA CDC class bootloader. That bootloader speaks the ancient AVR109 bootloader protocol via a virtual serial port, so should be very easy to use from Visual Basic.

 

2) Check the VID and PID of the bootloader when you plug it into the host (use the Microsoft "USBView" utility, available online) - the LUFA documentation lists what VID and PID map to what bootloader.

 

3) Yes, you only need an external programmer if you want to change/fix the bootloader already installed on the part.

 

4) Mostly just the open source part - this way people can customize it for their board, such as adding status LEDs.

 

- Dean

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

use the Microsoft "USBView" utility, available online

Dean means this:

 

http://www.nirsoft.net/utils/usb...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Arduino Leonardo board (ATmega32u4)

Gosh, two Moderators missed that this is in the Xmega Forum.

 

The question itself must have really caught your attention!

 

JC 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:

Arduino Leonardo board (ATmega32u4)

Gosh, two Moderators missed

 

And Jay you missed that (apparently) Dean is no longer a moderator. Probably too busy trying to buy a house... section 32s and all that. cheeky

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My mistake.

 

I've tried to post my reply 4 times.  angry  angry  angry  angry

 

I think I made a mistake the first time.

 

I quit.

 

ABCMiniUser is listed as a Moderator on a number of Forums.

I thought that was Dean.

If it is/was Dean, then perhaps the fact that the list of forum Moderators needs to be updated could be added to the Wiki for the items that need some attention.

 

I'm not re-posting my image of the Main Forum Page showing the Forums and their list of Moderators, as I think that is trashing my posts.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I agree with you Jay. Even eivind is still appearing. Dean's status is reflected below his avatar which is what I am taking as "gospel".

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello everyone,

 

don't understand what posts 4-7 are about.... Did I use the wrong forum?

 

Anyway, many thanks to Dean for the explanations and thanks to Clawson for the link.

 

Pirmin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

4) Mostly just the open source part - this way people can customize it for their board, such as adding status LEDs.

But, isnt our dfu also open (aka part of asf?) I can find the uc3 one, but maybe not the mega...

:: Morten

 

(yes, I work for Atmel, yes, I do this in my spare time, now stop sending PMs)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Pirman,

 

Welcome to the Forum.

 

Your initial post was in the Xmega Forum, which is for particular family of processors, (not the Mega in the Leonardo).

 

Ross (yes) moved the Thread tot he Arduino Forum, which is a better fit for the question and uC involved.

 

The /Off Topic posts were me hassling Dean and Cliff for not moving your Thread when they answered it.

 

Hopefully Dean and Cliff have answered your question and gotten you back on track.

 

If not, ask away.  I won't derail your Thread again.

 

JC

 

 

 

Last Edited: Thu. Oct 23, 2014 - 12:37 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm still a moderator in some forums - but frankly due to time constraints and the new site usability I'm not on here much any more so moderator status is a bit wasted on me.

 

meolsen wrote:
But, isnt our dfu also open (aka part of asf?) I can find the uc3 one, but maybe not the mega...

 

The MEGA one is closed source - binary blobs only.

 

- Dean

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

abcminiuser wrote:

I'm still a moderator in some forums

So why doesn't it say that under your avatar "raving lunatic" Dean?  The moderator lists on the main page are "broken".

 

Cheers,

 

Ross

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm sorry, maybe this is none of my concerns... but why there are so much talks between moderators about moderation of the forum in technical tread? I came here to read about hardware question and spent so much time to read and try to understand what are you talking about and if it is associated with topic starter's question.

 

I'm sorry again.

Last Edited: Thu. Oct 23, 2014 - 10:57 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry but doesn't your post just add to the off-topic "noise"??

 

If the OP is concerned about this thread let me know and I will see if I can work out how the thread splitting on this new forum works. (to be honest it may just be easier to delete the off-topic posts!)

 

Moderator

 

PS sorry for yet more off-topic noise ;-)