Help needed with dual channel firmware

Firmware gurus,

I’m trying to modify mode levels in STAR off time. When I try to flash after changing medium and high mode pwm levels I get the following error message from averdude. I’ve never seen this before and have no ideas what to do. Interesting thing is that I can flash it fine if I disable dual channel. Any ideas?

Thanks,

Brian

C:\avrusb>avrdude -p t13 -c usbasp -u -Uflash:w:siz.4.hex:a -Ulfuse:w:0x75:m -Uh
fuse:w:0xFF:m

avrdude: warning: cannot set sck period. please check for usbasp firmware update
.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9007
avrdude: NOTE: “flash” memory has been specified, an erase cycle will be perform
ed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: warning: cannot set sck period. please check for usbasp firmware update
.
avrdude: reading input file “siz.4.hex”
avrdude: input file siz.4.hex auto detected as Intel Hex
avrdude: ERROR: address 0x0404 out of range at line 65 of siz.4.hex
avrdude: read from file ‘siz.4.hex’ failed

avrdude done. Thank you.

It means the file you’re flashing is too big to write to the mcu.

Try changing your optimization settings in your compiler

Yup PD you are correct! That file will need to be compiled for optimized size, this can be found in the tool chain gcc section of the Amtel suite.

To that note, is there a good reason not to size optimize by default?

Absolutely correct, keep forgetting to set that. All good now, thanks guys!

For our purposes I don’t think so, with that in mind I always set for -OS. I think that there may be some advantages for debugging advanced code or maybe even speed execution reasons not to do it, but with our little flashlight programs there seems to be no advantage in not optimizing for space (besides, hardly any of them will fit without it!).