Page 1 of 1
[Solved] USB Bootloader for ATMega 64
Posted: Sat Jan 02, 2010 4:38 am
by Rukus
Does anyone have a USB Boot loader like bootloadHID or anything along those lines for the ATmega 64. I tried several of the ones available here on this website, however I wasn't able to get it to work. I kept getting "Device not Recognised". I modified the proper terms I thought, but couldn't get it running. I have another HID application running on it now and it has no problems so the hardware is right.
Re: USB Bootloader for ATMega 64
Posted: Sun Jan 03, 2010 6:36 am
by Rukus
I'm able to get bootloadHID.2008-11-26 to enumerate only if I comment out the 2 MCUCR lines below. If I uncomment them it won't enumerate. I have BootRST, and BootSZ1 programmed and the memory settings in AVR Studio for (Flash .bootloader 0x7800). It appears like the interupt vectors are getting stepped on or something. Any help would be appreciated.
Code: Select all
int main(void)
{
/* initialize hardware */
bootLoaderInit();
/* jump to application if jumper is set */
if(bootLoaderCondition()){
uchar i = 0, j = 0;
#ifndef TEST_MODE
//MCUCR = (1 << IVCE); /* enable change of interrupt vectors */
//MCUCR = (1 << IVSEL); /* move interrupts to boot flash section */
#endif
initForUsbConnectivity();
do{ /* main event loop */
usbPoll();
#if BOOTLOADER_CAN_EXIT
if(exitMainloop){
#if F_CPU == 12800000
break; /* memory is tight at 12.8 MHz, save exit delay below */
#endif
if(--i == 0){
if(--j == 0)
break;
}
}
#endif
}while(bootLoaderCondition());
}
leaveBootloader();
return 0;
}
Re: USB Bootloader for ATMega 64
Posted: Sun Jan 03, 2010 6:50 am
by Rukus
Found the problem. I read somewhere that the memory area should be defined as ".bootloader". Once I changed this to ".text", everything is working as published. I now have the bootloader working on a mega64
Re: [Solved] USB Bootloader for ATMega 64
Posted: Fri Oct 01, 2010 5:47 pm
by ps2chiper
Could you post your bootloader and what board it is for?