Bootloader test
Posted: Fri Feb 01, 2008 12:53 am
Here is the bootloader for Atmega32 to test:
see latest version down the thread
Fuses must be set so that Bootblock size is 1024 words and Atmega32 jumps to Bootblock on reset. In PonyProg it looks like this:
I made a mistake when taking this screenshot. BootLock11 MUST be checked to prevent the bootloader from overwriting itself accidentally
A MegaDrum firmware file must be modified slightly: three bytes, 0xF0 0x7F 0x40, must be prepended and one byte, 0xF7, must be appended and rename the *.hex file to *.syx, e.g. see this file:
Now you can upload this file using MIDI-OX. But before doing this you MUST set 'Low Level Output Buffers' to at least 60000 (in MIDI-OX menu go Options->Configure Buffers and set Output, NOT Input, Buffers to 60000).
After you programmed the bootloader into Atmega32, reset MegaDrum while holding the key LEFT. It'll ask you to press the key DOWN. If you changed you mind you can reset MegaDrum again without holding any keys and it will boot an old firmware. If you press the key DOWN, it'll erase the old firmware and will wait for the Sysex with a new firmware. Now in MIDI-OX go to Actions->Send->SysEx File... and choose the firmware *.syx file you've prepared beforehand. The update will take around 5 seconds and after it's finished MegaDrum will reset itself and boot the new firmware.
I tested it with 16MHz version and it appears to work fine.
see latest version down the thread
Fuses must be set so that Bootblock size is 1024 words and Atmega32 jumps to Bootblock on reset. In PonyProg it looks like this:
I made a mistake when taking this screenshot. BootLock11 MUST be checked to prevent the bootloader from overwriting itself accidentally
A MegaDrum firmware file must be modified slightly: three bytes, 0xF0 0x7F 0x40, must be prepended and one byte, 0xF7, must be appended and rename the *.hex file to *.syx, e.g. see this file:
Now you can upload this file using MIDI-OX. But before doing this you MUST set 'Low Level Output Buffers' to at least 60000 (in MIDI-OX menu go Options->Configure Buffers and set Output, NOT Input, Buffers to 60000).
After you programmed the bootloader into Atmega32, reset MegaDrum while holding the key LEFT. It'll ask you to press the key DOWN. If you changed you mind you can reset MegaDrum again without holding any keys and it will boot an old firmware. If you press the key DOWN, it'll erase the old firmware and will wait for the Sysex with a new firmware. Now in MIDI-OX go to Actions->Send->SysEx File... and choose the firmware *.syx file you've prepared beforehand. The update will take around 5 seconds and after it's finished MegaDrum will reset itself and boot the new firmware.
I tested it with 16MHz version and it appears to work fine.