AVRUSBBoot Atmega16

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
x37v
Posts: 3
Joined: Wed Mar 05, 2008 2:09 am

AVRUSBBoot Atmega16

Post by x37v » Wed Mar 05, 2008 2:15 am

Hi, I'm trying to get AVRUSBBoot to work with an Atmega16.

The page claims that it has been tested with that chip but, i haven't had luck.

I've tested that USB does work with my circuit [I built and programmed it with the Powerswitch example], so I assume it must be something with the settings in the AVRUSBBoot project [for example, when I build the project 'checksize' fails, as it says:
*** code size 2078 exceeds limit of 2048

Anyways, has anyone got this working with the mega16? If so, do you have any advice?

Thanks,
Alex

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Post by Grendel » Thu Mar 06, 2008 3:48 am

The error says it all -- your code is to big to fit into the boot loader section by 30 bytes.

There are different ways of solving this:

- try to squeeze 30 bytes out of your code
- use a 16MHz crystal, the code path is 106 bytes smaller than the 12MHz path
- use an older version of WIN-AVR, creates smaller code

x37v
Posts: 3
Joined: Wed Mar 05, 2008 2:09 am

Post by x37v » Fri Mar 07, 2008 9:48 pm

hmm, so I was able to make the driver smaller by reducing length of the name of the device [as queried through USB], but it still isn't working.. I can get it to go into 'bootloader mode' as well as 'leave bootloader mode' [i verified this by making leds light or flash]. But, my host still does not recognize the device as being a valid USB device:
dmesg:
[11542.388000] usb 2-1: new low speed USB device using uhci_hcd and address 54
[11542.804000] usb 2-1: device not accepting address 54, error -71

horo
Rank 2
Rank 2
Posts: 63
Joined: Tue Mar 04, 2008 2:26 pm
Location: Berlin & Lindau, Germany

D+ and D-

Post by horo » Sat Mar 08, 2008 11:14 am

Hi,

your settings for D+ and D- are correct? For USBaspLoader I had to change USB_CFG_DMINUS_BIT - the default is PORT D4 in bootloaderconfig.h

Martin

x37v
Posts: 3
Joined: Wed Mar 05, 2008 2:09 am

Post by x37v » Thu Mar 13, 2008 11:11 pm

yes, I did change the bootloaderconfig.h to reflect the settings that i had working with the powerswitch example.

-Alex

Guest

Post by Guest » Wed Sep 03, 2008 4:47 pm

Grendel wrote: - use an older version of WIN-AVR, creates smaller code


...and where would I get _that_ from? sourceforge provides only the latest version ;)

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Post by Grendel » Wed Sep 03, 2008 9:15 pm

Anonymous wrote:...and where would I get _that_ from? sourceforge provides only the latest version ;)

Oh, rly ? :P

apollononnno
Rank 1
Rank 1
Posts: 25
Joined: Wed Jul 23, 2008 5:31 am
Location: JAPAN

mega164p

Post by apollononnno » Thu Sep 04, 2008 6:41 am

BootHID.hex
Last edited by apollononnno on Mon Sep 08, 2008 3:16 pm, edited 2 times in total.

Guest

Post by Guest » Thu Sep 04, 2008 9:32 am

Grendel wrote:http://sourceforge.net/project/showfiles.php?group_id=68108&package_id=66543


you're my hero :D

Post Reply