where should i start to write a custom Bootloader?

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

where should i start to write a custom Bootloader? Can someone point out a simple bootloader tutorial to begin with?

Last Edited: Mon. May 11, 2015 - 03:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You should start in the very tutorial forum you wrongly posted into!

 

There's a thread in Tutorial about bootloaders. (though it is specifically only for AVR8 and more specifically the GCC C compiler).

 

In the meantime I will move this to a general programming forum - as you haven't actually said what kind of AVR or ARM you are talking about I'll initially move this to the Studio forum as it covers all types of CPU.

 

Moderator
 

Last Edited: Mon. May 11, 2015 - 03:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You should start by studying the many existing bootloaders that are already available - is there really nothing that meets your requirements?

 

There is no point in reinventing the wheel - especially when you have no prior wheel-building experience!

 

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

I started in Atmega 8 i went through the thread and document in (http://www.avrfreaks.net/forum/f...) . But i couldn't find a simple sample code to start with. I am using avr-gcc .

Last Edited: Mon. May 11, 2015 - 03:59 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ganeshredcobra wrote:

But i couldn't find a simple sample code to start with...

Can you type "mega 8 bootloader" into www.google.com and hit enter? Sheesh... I hope I don't sound like a jerk when I post stuff like this.

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

But i couldn't find a simple sample code to start with. I am using avr-gcc

But if you are using GCC the manual has a virtually ready made bootloader for you. See boot_program_page() here:

 

http://www.nongnu.org/avr-libc/u...

 

All you need wrapped around that is some comms and a for() loop to step through the SPM pages.

 

But like Andy and Some Guy say - what's the merit in writing yet another one when Google will find you 50 in about 3 seconds?

 

Also what's the point in an 8K chip? Why not just ISP it to reprogram it anyway? Are you talking about some volume product that is going to be deployed with 7.5K of code that may need replacing to lots of sites where the user has no access to ISP?

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

ganeshredcobra wrote:
But i couldn't find a simple sample code to start with.

This doesn't make sense: you say you want to write your own, yet you expect to be given a complete & working example!!

 

surprise