Chip45 Bootloader

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

Hey, can anyone help me with this. I was looking in the chip45boot make file and they have this:

# Boot block section for ATmega8, 1k block size
#LDSECTION  = --section-start=.text=0x1C00

# Boot block section for ATmega128, 2k block size
#LDSECTION  = --section-start=.text=0x1F800

Now i want to add another for the ATmega64 but im a little confused. In the ATmega8 data sheet it says for a 1K bootloader that the start is 0xC00 and for the Atmega128 for 2K, 0xF800 so why in the above code is it 0x1C00 and 0x1F800?

Thanks

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

Because GNU works in terms of BYTES while the AVR code addressing works in terms of WORDS. So 0x1C00=0xE00<<1 and 0x1F800=0xFC00<<1. So take the word addresses given in the PDF and double them to get the byte address to specify to the GNU linker.

Cliff

Edit: sorry, corrected the sums

Last Edited: Tue. Sep 12, 2006 - 01:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks Cliff.. About 30min after i post i realised this DUMB mistake. It got be because 1K Word bootloader starts at 0xF800... so when i looked at it, and didn't notice the word part, i thought it was the same. Sigh... Its always the little errors that stuff you around. Thanks for you help Cliff

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

Just a little correction:

0x1C00 = 0x0700 << 1
0x1F800 = 0xFC00 << 1

Regards, Peter

[edit]
0x0E00 = 0x0700 << 1

Last Edited: Tue. Sep 12, 2006 - 01:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just a little correction? "0x1c00 = 0x0700 << 1"
??
Surely
0x0e00 = 0x0700 << 1
or
0x1c00 = 0x0700 << 2

Just goes to show you, it's impossibel to proffread your own wrok.

Four legs good, two legs bad, three legs stable.

Last Edited: Tue. Sep 12, 2006 - 03:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ouuuuups....!!! (Shame over me..!!!)

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

xxxxxxxxxxxxxxx

Last Edited: Mon. May 23, 2011 - 02:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xxxxxxxxxxxxxx

Last Edited: Mon. May 23, 2011 - 02:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, I havn't!

But I've written a own version, which does handle intel hex files as produced by the compiler, instead of motorola s-records. Furthermore my version does support both UARTS up to 115200 baud, without transmit-delays between record lines.

So far, my hex-bootloader is written only for the ATMega128 and not yet fully tested. But it should work with view adaptions also for other CPUs! It does fit into 4 kByte (2kWords) if only one UART is enabled. I haven't done a lot of optimisations for code size, probably it would be possible to squeeze it even into 2 kByte.

I think my code is not yet ready to post it here. But if anybody is interested in my hex-bootloader, please P.M. me, I can send you a code snapshot.

Of course I would appreciate any feedback and hints for bugs, or improvements which I could merge into my version.

Peter

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

xxxxxxxxxx

Last Edited: Mon. May 23, 2011 - 02:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

xxxxxxxxxxxxxxx

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

@svopp2000: would you please stop blowing kisses... I'm getting all hot and bothered ;)

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!