recordtype 3 in bootloader

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

Hi gents,

I am in the process of making my own ISP and everything works fine with generic applications thus far but I am unsure how to handle a bootloader application with the second last line of my hex file with a recordtype of 3.

Last 3 lines:

:06F9E80050413A203100FD
:040000030000E00019
:00000001FF

Should I just ignore this or write it as a data type (recordtype 0).

Wiki explains this as: "[recordtype] 03, Start Segment Address Record." I thought all start addresses were set through the fuses as I have done in the past with existing programmers.

Any advice on how I should handle this?

EDIT: I Reviewed wiki and looked at srec'd bootloader and application files that begin to include record types 4 and 5 also. I guess I can disregard these record types as they only relate to how to read the hex file, not for how to store the data of type 00.
Ryan.

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

You can ignore 03's but you will have to handle 02's if there may be more than 64K of flash (as that's how .hex gets past 16 bit addressing).

Just out of interest which AVR tool generated that file you quote? As AVRs have a fixed entry of 0x0000 or BOOTRST-addr then putting execution addresses into hex files makes little sense.

I suppose this was bootloader code and the execution point 0xE000 is one of the BOOTSZ options so perhaps it does make sense to say "this isn't normal app code but bootloader code"? In fact a bootloader never wants to see a hex file that says "I'm a bootloader" so if this is really what it's saying you might have a warning LED or something to say "hey buddy, you are feeding me the wrong kind of file!".

(shame you don't get to see it until the END of the file though - yet another argument for not doing the iHex processing in the bootloader!)