Reply by Glenn Richmond July 15, 20032003-07-15
Hi Martijn,
 
I think the last line is probably a checksum for the record, similar to the
s-record format. As for the other question, i think it would depend on the
compiler... Intel Hex isn't custom made for flash, so it wouldn't
normally be an issue.
 
Glenn.

-----Original Message-----
From: Martijn Broens [mailto:martijn@mart...]
Sent: Tuesday, 15 July 2003 9:30 p.m.
To: msp430@msp4...
Subject: [msp430] iHex format


Hi all,

A small question about a .hex file format. I've generated the .hex of
the fet example that toggles the led. It gave me the following output.:

/* Fet140_1.hex 
            : 10 1100 00 B240805A2001D2D32200D2E321003C40    D9
            : 10 1110 00 50C33C53FE23F93F3140000AB0125E11    28
            : 10 1120 00 0C9318243C4000020E4330120000B012     11
            : 10 1130 00 80113C4000023E409C1130120000B012     71
            : 10 1140 00 621121523C4000023E409C1130120000      CE
            : 10 1150 00 B0126211B012001130405C11FF3F1C43     0D
            : 10 1160 00 30410A121D4104000F4C0A4D1D830A93    A1
            : 10 1170 00 0524EF4E00001F531E53F73F3A413041    04
            : 10 1180 00 0A121D4104000F4C0A4D1D830A930424    CA
            : 0C 1190 00 CF4E00001F53F83F3A413041A1              |
            : 02  FFFE 00 1811D8
|
            : 00  1118 01 D6
|
            : 00  0000 01 FF
|
            |  |    |        |   |
|
            |  |    |        |   data
checksum
            |  |    |        record type (00a 01=eof)
            |  |   start address
            |  number of data bytes in this record
            intel hex record identifier
*/
can anyone tell me what the last line means? Further would it be
possible that a line starts at for example $1190 and then crosses the
segment boundary? I.e. end at $1205?? Or would these last 5 bytes be on
a separate line starting at $1200

thanks,
Martijn








 <http://www.ediets.com/start.cfm?code0504&media=atkins>" target="_blank" rel="nofollow">http://rd.yahoo.com/M4081.3551198.4824677.1261774/D=egroupweb/S05005378:HM/A63535/R=0/SIGps6rfef/*http://www.ediets.com/start.cfm?code0504&media=atkins>
click here	
 
<http://us.adserver.yahoo.com/l?M4081.3551198.4824677.1261774/D=egroupmail/S=:HM/A63535/randG3492755>
	

.



">http://docs.yahoo.com/info/terms/> . 







Beginning Microcontrollers with the MSP430

Reply by Paul Curtis July 15, 20032003-07-15
Hi Martijn,

> A small question about a .hex file format.
I've generated the 
> .hex of the fet example that toggles the led. It gave me the 
> following output.:
>  
>             : 02  FFFE 00 1811D8
> |
>             : 00  1118 01 D6
> |
>             : 00  0000 01 FF
> |
>             |  |    |        |   |
> |
>             |  |    |        |   data
> checksum
>             |  |    |        record type (00a 01=eof)
>             |  |   start address
>             |  number of data bytes in this record
>             intel hex record identifier
> */
> can anyone tell me what the last line means? 

It's an EOF record.  This is used for a number of purposes:

(a) To tell a loader that the hex file has been received in total
(b) The address field can be used as an "entry address" to auto-start
the program after download
(c) Some loaders/generators use the EOF record to encapsulate a CRC-16
over *all* loaded data, giving more security than a simple 8-byte
checksum

> Further would it 
> be possible that a line starts at for example $1190 and then 
> crosses the segment boundary? 

Yes, it can, of course.

> I.e. end at $1205?? Or would 
> these last 5 bytes be on a separate line starting at $1200

No, it depends upon the generator.  The start address and length can be
anything.  Addresses of individual records don't even need have strictly
increasing address order.  Intel Hex can be used for scatterloading just
as S-records can be.

-- Paul.

Reply by Martijn Broens July 15, 20032003-07-15
Hi all,
 
A small question about a .hex file format. I've generated the .hex of
the fet example that toggles the led. It gave me the following output.:
 
/* Fet140_1.hex 
            : 10 1100 00 B240805A2001D2D32200D2E321003C40    D9
            : 10 1110 00 50C33C53FE23F93F3140000AB0125E11    28
            : 10 1120 00 0C9318243C4000020E4330120000B012     11
            : 10 1130 00 80113C4000023E409C1130120000B012     71
            : 10 1140 00 621121523C4000023E409C1130120000      CE
            : 10 1150 00 B0126211B012001130405C11FF3F1C43     0D
            : 10 1160 00 30410A121D4104000F4C0A4D1D830A93    A1
            : 10 1170 00 0524EF4E00001F531E53F73F3A413041    04
            : 10 1180 00 0A121D4104000F4C0A4D1D830A930424    CA
            : 0C 1190 00 CF4E00001F53F83F3A413041A1              |
            : 02  FFFE 00 1811D8
|
            : 00  1118 01 D6
|
            : 00  0000 01 FF
|
            |  |    |        |   |
|
            |  |    |        |   data
checksum
            |  |    |        record type (00a 01=eof)
            |  |   start address
            |  number of data bytes in this record
            intel hex record identifier
*/
can anyone tell me what the last line means? Further would it be
possible that a line starts at for example $1190 and then crosses the
segment boundary? I.e. end at $1205?? Or would these last 5 bytes be on
a separate line starting at $1200
 
thanks,
Martijn