Page 2 of 2

Re: sixaxis_pair_emu.hex for at90usb82

Posted: Wed Jul 13, 2011 11:46 pm
by cTiger
when I set the chip type in FLIP, I can see FlashBuffer information 4KB.

could that be of any relevance ?

Re: sixaxis_pair_emu.hex for at90usb82

Posted: Thu Jul 14, 2011 12:00 am
by Matlo
What's the bootloader size?

What avr board is it?

Re: sixaxis_pair_emu.hex for at90usb82

Posted: Thu Jul 14, 2011 12:29 am
by cTiger
it's an arduino UNO (http://arduino.cc/en/Main/ArduinoBoardUno)

I don't know the bootloader size. for now the chip still has the default HEX


btw how did you skrink the program size ?
(i guess you used PROGMEM for the arrays?)

cTiger

Re: sixaxis_pair_emu.hex for at90usb82

Posted: Thu Jul 14, 2011 12:40 am
by cTiger
the chip is a ATmega8U2 but all tutorials say to use AT90USB82 (datasheet are similar)

Re: sixaxis_pair_emu.hex for at90usb82

Posted: Thu Jul 14, 2011 1:36 am
by cTiger
removing leds, hardcoding the Bdaddress({0x00, 0x11, 0x67, 0xD4, 0x16, 0x5F}) and using -ffunction-sections -fdata-sections -Wl,--gc-sections -mcall-prologues as extra flags might help you to go below 4k.

could you try ?

thanks

cT

Re: sixaxis_pair_emu.hex for at90usb82

Posted: Thu Jul 14, 2011 11:27 am
by Matlo
Yes I used PROGMEM to move arrays from the sram to the flash.

Your other ideas didn't helped.

We also could move arrays to the eeprom, but as it's only 512 bytes the flash will still remain above 4K.

I think it's a better idea to try to reduce the bootloader size: link.

I can't test that as I don't have an atmega8u2.

Re: sixaxis_pair_emu.hex for at90usb82

Posted: Sat Jul 16, 2011 2:00 pm
by cTiger
looks good. the bootloader is compiling and only takes 2k in memory. I just have to put it on the board and see if it works :)

crossing my fingers.

cTiger on the verge of bricking an arduino UNO