Bootloader

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not sure if this is correct forum, but I'll fire away anyway :)

Anyone got any good tutorials or something that gives a good explanation how to create and setup bootloaders ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For this generic question, the AVR forum would be better. I haven't looked at bootloaders. You might want to look at Dean's buttload project about how he uses a butterfly to be a programmer, but I don't know the details, he make just make the butterfly into an ISP programmer -- I don't now.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

okey, thanx. I'll give it a look

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

okey, thanx. I'll give it a look

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I got into a bootloader recently too. I looked for the source code to as many different bootloaders as possible. I then compared and contrasted them. I now understand the issues involved. I also took bits and pieces of bootloaders to assemble into my own.

Remember, the bootloader is only 1/2 of the puzzle. There is the PC side too! Probably it is worthwhile using a bootloader that is pre-written and has a standard PC program to match it.

Also, remember that size IS an issue, sometimes. Small devices have to cram it all into 512 (or less?) BYTES. OTOH, the smallest bootloader section on the M128 (my usual device) is 1024 bytes, so I can add a bunch of extra functionality (like auto baud detection) at the expense of larger size.

-Tony

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

blader wrote:
Not sure if this is correct forum, but I'll fire away anyway :)

Anyone got any good tutorials or something that gives a good explanation how to create and setup bootloaders ?

Maybe you can look on bootloader projects and ask questions to the author.

I wrote the bootloader for the widest range of AVRs, from ATtiny13 until ATmega2561.

It supports also a one wire UART connection (two wire cable to the PC).

Its a generic bootloader, which needs only very little changes to adapt it for any AVR derivate:

https://www.avrfreaks.net/index.p...

To setup the fuse bits, you must enable at least 256 words of boot space.
On AVRs without boot space, you must set the SPM enable fuse.

If you want to burn the reset disable fuse, you should at first burn the bootloader and check, that it works.
Otherwise you need a high voltage programmer for reprogramming.

Peter