atmega32u2 HID bootloader.

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

As I understand it there are 3 versions of the bootloader for this device (HID, DFU, and CDC). I ordered a  breakout board from the net and when I connected it via USB an ATMEGA 32u2 usb device showed up. I tried to use FLIP but it will not run. FLIP claims I'm missing the JVM but that is obviously not the case. I'm hoping to use the boot-loader for production allowing users to upload new firmware. Adding drivers and dealing with broken coded is not going to go over well. I guess this leads me to three questions.

 

1) How can I tell what version of the boot-loader is pre installed? I can't contact the German company as I lack the required skill to communicate. Being I didn't install anything and it just showed up in device manger, I'm guessing this is the HID version.

 

2) Assuming the above is correct, Is there anything out there that will flash a hex file other then FLIP.

 

3) If the above is no, how can I get this busted FLIP to understand that I already have JVM installed?

 

Info:  (english button is broke)

http://dokuwiki.ehajo.de/bausaet...

 

Last Edited: Fri. Dec 22, 2017 - 05:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Small update, found a program called dfu-programmer that gives me memory errors. It does find the device ok but has an error that I'm not following. Unless that means there is no flash loaded?

 

32u2 dump --debug 300
     target: atmega32u2
    chip_id: 0x2ff0
  vendor_id: 0x03eb
    command: dump
      quiet: false
      debug: 300
device_type: AVR
------ command specific below ------

dfu.c:414: dfu_device_init( 1003, 12272, 0028FE98, true, false )
dfu.c:431: found device at USB:3,0
dfu.c:663: Found DFU Inteface: 0
dfu.c:293: dfu_abort( 0028FE98 )
dfu.c:204: dfu_get_status( 0028FE98, 0028FE44 )
dfu.c:230: ==============================
dfu.c:232: status->bStatus: OK (0x00)
dfu.c:233: status->bwPollTimeout: 0x0001 ms
dfu.c:235: status->bState: dfuIDLE (0x02)
dfu.c:236: status->iString: 0x00
dfu.c:237: ------------------------------
dfu.c:688: State: dfuIDLE (2)
atmel.c:756: atmel_read_flash( 0028FE98, 0028FDAC, 0, false )
atmel.c:1041: atmel_select_memory_unit( 0028FE98, 0 )
atmel.c:1055: Ignore Select Memory Unit for non GRP_AVR32 device.
Reading 0x7000 bytes...
atmel.c:1100: atmel_select_page( 0028FE98, 0 )
atmel.c:1114: Selecting page 0, address 0x0.
dfu.c:142: dfu_download( 0028FE98, 4, 0028FCE4 )
dfu.c:204: dfu_get_status( 0028FE98, 0028FCE4 )
dfu.c:230: ==============================
dfu.c:232: status->bStatus: OK (0x00)
dfu.c:233: status->bwPollTimeout: 0x0001 ms
dfu.c:235: status->bState: dfuIDLE (0x02)
dfu.c:236: status->iString: 0x00
dfu.c:237: ------------------------------
dfu.c:142: dfu_download( 0028FE98, 6, 0028FCDE )
dfu.c:844: -EIO: USB I/O error 0xfffffffb (-5)
atmel.c:717: dfu_download failed
atmel.c:828: Error reading block 0x0 to 0x3FF: err -1.
ERROR
Memory read error, use debug for more info.
commands.c:619: ERROR: could not read memory, err -5.

 

Last Edited: Fri. Dec 22, 2017 - 05:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

S_K_U_N_X wrote:
... Is there anything out there that will flash a hex file other then FLIP.
AVRDUDE 6.3

 

AVR Downloader/UploaDEr - News: AVRDUDE 6.3 released

http://savannah.nongnu.org/forum/forum.php?forum_id=8461

...

 

* New programmers supported:

...

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

...

 


http://www.nongnu.org/avrdude/

 

Edit: 2nd URL

 

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

Last Edited: Fri. Dec 22, 2017 - 06:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess I could use AVRDUDE but I'm really after something that looks a bit more user friendly. Most users run when they here command line. How hard would it be to write a HID boot loader using HIDAPI? Or I guess I could write a front-end.

Last Edited: Fri. Dec 22, 2017 - 08:23 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

S_K_U_N_X wrote:
How hard would it be to write a HID boot loader using HIDAPI?
A HID loader is not difficult.

The following HID loader matches the Teensy HID bootloader :

PJRC

PJRC

Command Line Teensy Loader app, for Makefiles, Open Source projects, and advanced users

https://www.pjrc.com/teensy/loader_cli.html

S_K_U_N_X wrote:
Or I guess I could write a front-end.
The C# front-end for atprogram.exe :

Microchip Technology Inc

Microchip Technology

Application Notes

AN2466 Using Atmel-ICE for AVR® Programming In Mass Production

http://www.microchip.com/wwwappnotes/appnotes.aspx?appnote=en599598

...

The application note introduces Atmel-ICE setup, driver installation, user guide of the Atmel Studio command line utility (atprogram.exe), and provide a PC programming tool project written in C#. The Visual C# example project can be downloaded along with this application note and run with the ATmega328PB Xplained Mini kit.

...

 

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

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

gchapman, this will do, thank you.