Porting BootloadHID to mega64 BOOTLOADER_ADDRESS ??
Porting BootloadHID to mega64 BOOTLOADER_ADDRESS ??
Hi !
I'm trying to port the BootloadHID to the mega64.
The entry BOOTLOADER_ADDRESS is unclear to me, i do not understand, why it is pointing to 0x1800 on the mega8 in my opinion this must be 0x0C00. I never worked with code in the bootblock area.
Who can explain me what BOOTLOADER_ADDRESS is used for.
Regards,
Dirk
P.S.: The USB stack is a piece of great work, im currently using ist to emulate a Keyboard, Mouse and some data Transfer which works perfect on the mega64
I'm trying to port the BootloadHID to the mega64.
The entry BOOTLOADER_ADDRESS is unclear to me, i do not understand, why it is pointing to 0x1800 on the mega8 in my opinion this must be 0x0C00. I never worked with code in the bootblock area.
Who can explain me what BOOTLOADER_ADDRESS is used for.
Regards,
Dirk
P.S.: The USB stack is a piece of great work, im currently using ist to emulate a Keyboard, Mouse and some data Transfer which works perfect on the mega64
Last edited by STB on Mon Mar 24, 2008 6:11 pm, edited 1 time in total.
I managed it myself.
For all other who want to use it with the mega64, only a few changes are to apply.
Makefile:
main.c
change to:
Regards,
Dirk
For all other who want to use it with the mega64, only a few changes are to apply.
Makefile:
Code: Select all
DEVICE = atmega64
BOOTLOADER_ADDRESS = F800
main.c
Code: Select all
GICR = (1 << IVCE); /* enable change of interrupt vectors */
GICR = (1 << IVSEL); /* move interrupts to boot flash section */
(...)
GICR = (1 << IVCE); /* enable change of interrupt vectors */
GICR = (1 << IVSEL); /* move interrupts to boot flash section */
change to:
Code: Select all
MCUCR = (1 << IVCE); /* enable change of interrupt vectors */
MCUCR = (0 << IVSEL); /* move interrupts to application flash section */
(...)
MCUCR = (1 << IVCE); /* enable change of interrupt vectors */
MCUCR = (1 << IVSEL); /* move interrupts to boot flash section */
Regards,
Dirk
Likewise problem
Hello,
i have an analog problem: I want to use BootloadHID on a mega16 with a 16Mhz crystal. I already changed the frequency in bootloaderconfig.h to "#define USB_CFG_CLOCK_KHZ 16000".
Looking at the documentation of the mega64 i got out, why to use MCUCR instead of GICR on a mega64 (just searched for IVCE and voila), but concerning the BOOTLOADER_ADDRESS i'm lost.
Regards
Johannes
i have an analog problem: I want to use BootloadHID on a mega16 with a 16Mhz crystal. I already changed the frequency in bootloaderconfig.h to "#define USB_CFG_CLOCK_KHZ 16000".
Looking at the documentation of the mega64 i got out, why to use MCUCR instead of GICR on a mega64 (just searched for IVCE and voila), but concerning the BOOTLOADER_ADDRESS i'm lost.
Regards
Johannes
It works :D
With the settings provided by Dirk it correctly shows up on my mac. On my linux box i still get an error about not correctly assigning an address; but as the device is intended to run with the mac it's no problem. - Tomorrow i will take an oscilloscope and look at the crystal if it's within the 1% tolerance mentioned in "bootloaderconfig.h".
Many thanks,
Johannes
Many thanks,
Johannes
Crystals never have deviations of more than several 100 ppm. That's certainly within the tolerance (of much less than 1% for crystal clocks, BTW).
If it works on one computer but not on another, you probably have voltage level problems on D+ and D-. Please have a look at the zener diodes and voltage levels.
If it works on one computer but not on another, you probably have voltage level problems on D+ and D-. Please have a look at the zener diodes and voltage levels.