pic xc8 bootloader questions

Discussion in 'General Electronics Chat' started by bug13, Oct 29, 2015.

  1. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
    Hi guys

    I am teaching myself about bootloader in pic with xc8 compiler. This tutorial from Microchip is a very good start, but I have some questions. Which the tutorial doesn't give much explanation.

    In the following code of a hex file I generated
    Code (Text):
    1.  
    2. :10000000FFEF00F0FF00FF00FACF0EF0FBCF0FF084
    3. ...
    4. ...
    5. :108E800000253032580025303264000A0D00000001
    6. :08FFF000FF00FF00FF00FF000D
    7. :08FFF800ACF1CAFBFFF9FFF1B7
    8. :00000001FF
    If I select project -> property -> linker -> runtime category -> format hex file for download.

    I should get every line start with :10, means 16 bytes. excpet the last line, which is end of file. And the one line before last line, which is the 8 bytes config data.

    So why is the second line before last is only 8 bytes, not 16 bytes?
     
  2. bug13

    Thread Starter Well-Known Member

    Feb 13, 2012
    1,208
    38
  3. Papabravo

    Expert

    Feb 24, 2006
    10,137
    1,786
    It is only 8 and not 16 because that is all that is required. Lines beginning with :10 is just a convention, not a requirement. You could begin each line with :18 or :20 or anything convenient for the compiler. The loader has to be flexible enough to take whatever it sees.
     
Loading...