bootloaderHID on atmega8535 ?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
solata10
Posts: 13
Joined: Sun Dec 13, 2009 3:09 pm

bootloaderHID on atmega8535 ?

Post by solata10 » Tue Dec 22, 2009 9:57 pm

hello,

i would like to run bootloaderHID on atmega8535, but i'm not sure if its possible.

i tried it :
1) uploaded bootloaderHID to my device
2) connected my device to computer, i get device not recognized
3) reconnected my device, this time holding down the "program" button, HID device gets detected
4) i upload my program using bootloaderHID command line tool, it says its ok
5) i reconect my device (not holding "program" button), and my uploaded program gets executed ok
6) i reconect my device and i hold down the "program" button, nothing, my uploaded program gets executed., bootloaderHID command line tool gets me device not found.

so it looks like the bootloaderHID was erased when i uploaded my program.
i went looking to the atmega8535 documentation, and it looks like it can only set 1kb aside for bootloader (http://www.atmel.com/dyn/resources/prod ... oc2502.pdf , page 235), am i right ?
so its not possible to make it work ?

another question. when i generate my hex file, (lets say for bootloaderHID) its 8kb, but avr-size reports its below 2kb .... what does this mean ? only 2kb of the main.hex will be copied to the device ?

thanks for your help.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: bootloaderHID on atmega8535 ?

Post by christian » Wed Dec 23, 2009 11:42 pm

That's 1k words which is 2k bytes, enough for the boot loader. Please use the lock bits to protect the boot loader from overwriting itself. There's no additional check in the boot loader.

The hex file may be 8k in size because it starts at 0 and goes up to the boot loader. The actual code is only 2k.

Post Reply