file to big to upload

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
mako
Posts: 1
Joined: Sat Oct 03, 2009 10:33 am

file to big to upload

Post by mako » Sat Oct 03, 2009 10:38 am

hi, plz help
Im compiling the uspasploader
make its ok
but..

when I give >make flash to the atmega 168p,

avrdude: ERROR: address 0x4010 out of range at line 129 of main.hex
avrdude: write to file 'main.hex' failed

so checked size

avr-size main.hex
text data bss dec hex filename
0 2156 0 2156 86c main.hex

- what can I do to optimize this code and make it fit 2k?, and why is bigger for me and not for other people using this firmware?

thanks

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

Re: file to big to upload

Post by christian » Sun Oct 04, 2009 3:54 pm

If you can, use gcc 3. It compiles smaller code.

Other than that, you can omit some functionality (e.g. EEPROM access) or include a custom vector table without all the unused slots. The latter is a bit tricky, though.

Post Reply