pic xc8 bootloader questions

Thread Starter

bug13

Joined Feb 13, 2012
2,002
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:
:10000000FFEF00F0FF00FF00FACF0EF0FBCF0FF084
...
...
:108E800000253032580025303264000A0D00000001
:08FFF000FF00FF00FF00FF000D
:08FFF800ACF1CAFBFFF9FFF1B7
: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?
 

Papabravo

Joined Feb 24, 2006
21,159
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:
:10000000FFEF00F0FF00FF00FACF0EF0FBCF0FF084
...
...
:108E800000253032580025303264000A0D00000001
:08FFF000FF00FF00FF00FF000D
:08FFF800ACF1CAFBFFF9FFF1B7
: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?
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.
 
Top