Page 1 of 1

bootloaderHID on atmega8535 ?

Posted: Tue Dec 22, 2009 9:57 pm
by solata10
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.

Re: bootloaderHID on atmega8535 ?

Posted: Wed Dec 23, 2009 11:42 pm
by christian
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.