I'm trying to get USBaspLoader.2010-07-27 working on an ATmega2560, in the bootloader area. There seems to be some problem with the device descriptor location in Flash (progmem), despite having ...
Code: Select all
#define USB_CFG_DRIVER_FLASH_PAGE 3
(My ATmega2560 bootloader is of course installed at 0x3E000.)
In my OS X system logs, I'm seeing ...
The USB Family found a device at port 2 of hub @ 0x26400000 with a bad USB device descriptor (0xffffffffffffffff, 0x0 )
... which does seem to suggest that empty flash data from the wrong address page is being used.
I see in usbdrv/usbportability.h the following ...
Code: Select all
#ifdef __HAS_ELPM__
# define PROGMEM __farflash
#else
# define PROGMEM __flash
#endif
... and ...
Code: Select all
#if USB_CFG_DRIVER_FLASH_PAGE
# define USB_READ_FLASH(addr) pgm_read_byte_far(((long)USB_CFG_DRIVER_FLASH_PAGE << 16) | (long)(addr))
#else
# define USB_READ_FLASH(addr) pgm_read_byte(addr)
#endif
... but I am not confident that these are being used (detected) as intended. (And I'm not sure how to test for that. I tried, but failed. :-/ )
I'm running on an iMac, under OS X 10.8, with CrossPack-AVR-20120217 (avr-gcc version 4.5.1.)
Thanks in advance for any help.
Gruvin.