Hex File Format Question

Status
Not open for further replies.

eepty

Full Member level 2
Joined
Oct 21, 2005
Messages
143
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Visit site
Activity points
2,611
Hi I am working on a bootloader and an application code for a microcontroller. I have finished both and they generated two seperated hex files. I know I can cascade the application hex after the bootloader hex so that I have a single hex file and burn it into the microcontroller.

The ending part of the hex on the bootloader:
Code:
:10287C00000000000000000000000000000000004C
:10288C00000000000000000000000000000000003C
:10289C00000000000000000000000000000000002C
:0400000300001CA934
:00000001FF

And on the application hex:
Code:
:10457C00A8080020A8080020B0080020B0080020DF
:10458C00B8080020B8080020C0080020C00800208F
:10459C00C8080020C8080020FFFFFFFF0000020031
:040000031000717DFB
:00000001FF

When I cascade the two hex files, on the bootloader hex, I have tried to
1.)just remove the last line:
Code:
:00000001FF
2.) or remove the last two lines:
Code:
:0400000300001CA934
:00000001FF

I found both method works...I know the meanning of
Code:
:00000001FF
is just "end of file" so I have to remove it. But what is the meaning of the second-to-last line?
Code:
:040000031000717DFB
 

It's the 'start segment address' record(type 03).
How this is related to your microprocessor I don't know. I would assume it defines the starting point of your program.

This 'Intel hex' format relates in original to the 80x86, and states the CS:IP pair of 4 bytes.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…