본문 바로가기
Microchip PIC

Intel HEX file format

by 소나무기운 2022. 2. 3.
반응형

[2022/02/05] 처음 시작

 

 

소나무 기운 ,  전자제품 개발/생산

Intel HEX file format

MPLAB X IDE 를 이용하여 XC8로 컴파일을 하게되면 Intel hex file로 파일이 출력 됩니다.

 

Intel HEX file format에 대해서 간단히 알아보죠.

 

format 예제

:BBAAAATTHHHH..........................HHCC
:100E00008731372F080008007E1487314E01961E67

헥사파일은 이런 모양으로 생겼어요.

HEX file sample

 

 

HEX 파일 내용 설명

위에 표시한 내용을 설명해 볼께요.

:       레코드 시작 문자, Record Start Character

BB    

구분자 내용
: Record Start Character
레코드의 시작 문자
BB Two digit byte count specifying the number of data bytes in this record
현재 레코드의 데이터 수
AAAA Four digit starting address of this data record
데이터 레코드의 시작 주소 ( 8bit PIC에서는 14bit워드를 사용하므로 실제 주소의 2배를 한 값이 된다.)
TT Two digit record type
00 = data record
01 = End of File record
10 = Segment Address Record
11 = Extended Linear Addresss record
HH Data bytes
데이터
CC Two digit checksum calculated as 2's complement of all preceding bytes in data record except the colon.
콜론 이후 모든데이터의 2의 보수로 계산된 2자리 체크썸 값.

 

 

 

마무리

motorola hex도 있어요. 지금은 많이 사용하지 않는듯 합니다.

 

 

 

참고문헌

 
 

 

 

틀린 부분이나 질문은 댓글 달아주세요.

즐거운 하루 보내세요. 감사합니다.

 

 

 

반응형

댓글