Bugs in ArduinoISP

Hi

I have picked up a couple of obvious bugs in ArduinoISP. While they may not be an issue now (I dont have anything bigger than a 328 to test), this could be a problem on bigger chips like the 644 and 1280.

typedef struct param {
  uint8_t devicecode;
  uint8_t revision;
  uint8_t progtype;
  uint8_t parmode;
  uint8_t polling;
  uint8_t selftimed;
  uint8_t lockbytes;
  uint8_t fusebytes;
  int flashpoll;
  int eeprompoll;
  int pagesize;
  int eepromsize;
  int flashsize;
}
  • flashpoll could and should be uint8_t
  • eeprompoll should be uint16_t (i assume time cant be negative)
  • pagesize and eepromsize should be uint16_t (i assume size cant be less than 0)
  • flashsize should be uint32_t given it expects 4 bytes, again cant be less than zero

The biggest potential problem is with flashsize, as currently it limits it to 32kb.

Cheers

leppie

Thanks for this. Can you post an issue / patch to the Google Code project? http://code.google.com/p/arduino/issues/list

Will do.