Page 1 of 1

file to big to upload

Posted: Sat Oct 03, 2009 10:38 am
by mako
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

Re: file to big to upload

Posted: Sun Oct 04, 2009 3:54 pm
by christian
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.