ATmega32U4 Arduino Bootloader over FLIP

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

Hi, Firstly, I'm way out of my depth here, but trying to learn.

 

Is it possible to upload an Arduino Bootloader onto an ATmega32U4 using the FLIP software?

 

USB is connected and recognised with the USB bootloader clearly running.

 

The details:

 

We have a delivery of custom boards containing the ATmega32U4 connected to USB.

 

The end goal is push code written on the arduino platfrom.

 

Unfortunately our EE neglected to include an ISP header. So my options are soldering onto the tiny legs to connect a programmer.

Or seeing if i can burn a bootloader over FLIP.

 

There are other threads of people reportedly doing so: http://www.pic-control.com/loading-arduino-bootloader-to-brand-new-atmel-microcontroller/

 

But browsing around suggests otherwise.

 

I know i could write the software myself and upload to the application section. But we're working with quite a few existing libraries that i'd prefer to not have to port over myself.

 

Any help at all gladly received.

 

Thanks

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

As far as I know the Arduino environment also generates a hex file.

That hex file can be loaded using the flip software.

All you need to do is make sure that from your own code there is a way back into the DFU mode such that when triggered the device goes back to DFU mode and new code can be uploaded.

 

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

Rykkers wrote:
Is it possible to upload an Arduino Bootloader onto an ATmega32U4 using the FLIP software?
Almost certainly not. It is VERY difficult to get one bootloader to replace another. It basically needs room in the bootloader area not just for the existing bootloader itself but also a standalone bootloader bootloader (sometimes called a "secondary bootloader" or SBL). The 32U4 come supplied with DFU (the thing that FLIP talks too). I don't believe it has any provision for replacing DFU with something else and most DFU builds only just fit the BLS space available (often around the 4K mark) so there's no room for the "rug from under our own feet" SBL that would be required to switch it.

 

Bottom line is that you are going to need to ISP/JTAG these chips if you want the Arduino bootloader in them. If you are lucky all signals involved may be routed by thru-holes and you could make some kind of "pogo pins" jig to hold the boards on while they are re-flashed. Failing that some kind of "over chip clamp" might be able to clamp on and access all the pins required - but is the circuit design has reused anything normally used for ISp or JTAG for other connections you may be up the proverbial s*** creek. :-(

 

I guess Marcel's idea of using Flip/DFU to deliver the apps that Aruidno builds might be the best idea otherwise.

 

(PS in all my time reading Freaks (14+ years) I think I have only read twice of successful bootloader replaces bootloader strategies - but the designs had to plan for this to happen upfront (apart from anything else leaving room for the SBL that would replace the PBL)).

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

Agree 100% with Cliff.   One bootloader can't replace another.

 

But you should be able to access the JTAG or ISP pins.   Install the Arduino bootloader.   Treat the board as if it was a Leonardo from now on.

 

If this is a one-off product,   just upload the Arduino application code via Flip.   Forget about regular "Arduino bootloading".

 

David.

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

david.prentice wrote:
just upload the Arduino application code via Flip.
more

Release Note | Atmel Studio 7.0

[bottom of page 7]

Support for Flip-Compatible Bootloaders in atprogram and Programming Dialogue. The Connected Device Appears as a Tool.

AVR Downloader/UploaDEr - News: AVRDUDE 6.3 released [Savannah]

...

    - Atmel DFU, using FLIP protocol version 1 (AT90USB and ATmega*U* devices),
      or version 2 (Xmega devices)

...

edit :

dfu-programmer

 

edit2 : dfu-util

https://sourceforge.net/projects/dfu-util/

Debian -- Details of package dfu-util in buster

 

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Sat. Jan 18, 2020 - 10:23 AM