[chbot] Bootloader(AVR)
Richard Jones
rjtp at ihug.co.nz
Mon Aug 3 22:04:37 BST 2009
Hi Jimmy,
I use the DL5NEG bootloader. I've slightly modified it to run at 9600 baud
with a 16MHz xtal on an ATMega8. The bootloader occupies uses 2k flash, I
would prefer a 1K bootloader. I did not do an exhaustive search, the DL5NEG
bootloader was the first one I found that met my requirements. I can email
you the modified source and a hex file if you wish. I find it handy for the
target software to call the boot loader for reprogramming, remember to
disable all the interrupts that you have enabled first. You can do this in
'C' as follows:
printf_P( PSTR("Jumping to Bootloader\n\n") );
timer_close();
asm volatile("LDI r30,0" "\n\t" ); // indirect jump to byte address 0x1c00
, word address 0xe00
asm volatile("LDI r31,14" "\n\t" );
asm volatile("IJMP " "\n\t");
Alternatively you can reset the target.
Let us know how you get on.
Richard
On Mon, 3 Aug 2009 22:04:57 +1200, jimmy allen <jimmy1248 at gmail.com> wrote:
> I have been looking around for a boot-loader for AVRs to hopefully
> make them easier to program.I have looked at Arduino and that looks
> farily easy to build one.
> I was wonder what everyone ideas are on them and which one I should use.
> I have a couple ATtiny2313 and am planning on getting an ATMEG8 which
> i will be able to use.
> Also i can use the ones that sicom has.
> I have serial, parallel and USB interface that i can use.
>
>
> hopefully some good ideas can come out of this
>
> jimmy
>
> _______________________________________________
> Chchrobotics mailing list Chchrobotics at lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/chchrobotics
> web site: http://kiwibots.org
> When replying, please edit your Subject line to reflect new content.
More information about the Chchrobotics
mailing list