Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Intel 32 HEX format structure

Status
Not open for further replies.

yura717

Advanced Member level 2
Advanced Member level 2
Joined
Aug 24, 2009
Messages
692
Helped
90
Reputation
178
Reaction score
89
Trophy points
1,308
Location
USA
Activity points
4,608
Hello,
Please help to understand Intel hex format.
:020000040000FA
:20108000FB0500000000000000000000000000000000000000000000000000000000000050
:2010A000000000000000000000000000000000000000000000000000000000000000000030
:2010C0000000000000000000000000000000000000000000000000000000FFFF04BD24AC81
:2010E0000000000000000000000000040004000000000000000000000000000000000000E8
:2011000000000000000000000000000000000000000000000000051FD2B61C015E6F000039
:201120000000F89B0000FFFF01FF808E0000000000FF01FF0000050080FF0000000000008D
:20114000010011FE11FFFFFF000001FF43C8000043AF00000101FFFF4100BF6E80F780F11E
:2011600017170101437573746F6D6572204E616D652A2AFF3217AE802A2A2A2A2A2A2A2A32

first line is Extended Segment Address.
second line has 20 bytes of data at what address?
I wonder if exist some which can be used to analyze Intel hex records?
Thank you.
 

This is simple.
:NN - amount of bytes in followed string (20 is 32, 0x20 hex == 32 dec)
Then LLLL is a 2 bytes offset from HHHH pointer. HHHHLLLL is absolete address. For example, second string: 20 1080 mease 32 bytes starting from HHHH1080
HHHH pointer is defined in first string: 02 - fixed size of this pointer. For 32 bit it always will be 2 bytes (half). Than 0000, always. Than 04 is a command that we need to define this HHHH pointer and 0000 at the end of first string is that pointer value, so HHHH == 0x0000.
0xFA is CRC.
So, starting from second string we need to put 32 bytes to the 0x00001080 address. 0x50 is CRC.
Next string - 32 bytes to the 0x000010A0 address and so on
This is my HEX flasher code:
https://github.com/Virviglaz/MyLibraries/blob/master/Common/HEX_Flasher.c
https://github.com/Virviglaz/MyLibraries/blob/master/Common/HEX_Flasher.h
 
  • Like
Reactions: yura717

    yura717

    Points: 2
    Helpful Answer Positive Rating
This is simple.
:NN - amount of bytes in followed string (20 is 32, 0x20 hex == 32 dec)
Then LLLL is a 2 bytes offset from HHHH pointer. HHHHLLLL is absolete address. For example, second string: 20 1080 mease 32 bytes starting from HHHH1080
HHHH pointer is defined in first string: 02 - fixed size of this pointer. For 32 bit it always will be 2 bytes (half). Than 0000, always. Than 04 is a command that we need to define this HHHH pointer and 0000 at the end of first string is that pointer value, so HHHH == 0x0000.
0xFA is CRC.
So, starting from second string we need to put 32 bytes to the 0x00001080 address. 0x50 is CRC.
Next string - 32 bytes to the 0x000010A0 address and so on
This is my HEX flasher code:
https://github.com/Virviglaz/MyLibraries/blob/master/Common/HEX_Flasher.c
https://github.com/Virviglaz/MyLibraries/blob/master/Common/HEX_Flasher.h

Thank you,man!
Do you know how to recognaze entry point in intel hex file? /from which address, bootloader is going to excute the progrtam?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top