ardai@teda.UUCP (Mike Ardai) (09/27/90)
I am looking for information on the extended Intel Hex format. Specifically, how does it handle addresses larger than 20 bits? Thanks in advance for any info. /mike -- \|/ Michael L. Ardai Teradyne EDA East --- ------------------------------------------------------------------------- /|\ ...!sun!teda!ardai (preferred) or ardai@bu-pub.bu.edu
amichiel@rodan.acs.syr.edu (Allen J Michielsen) (09/27/90)
In article <14451@teda.UUCP> ardai@teda.UUCP (Mike Ardai) writes: >I am looking for information on the extended Intel Hex format. >Specifically, how does it handle addresses larger than 20 bits? The coding of the extended intel hex format is as follows (working in hex) :10030000ffffffffffffffffffff00 :10031000ffffffffffffffffffff00 This decodes to (logically) :10 0300 00 data.... 00 The first set :10 is the number of data points. (i.e. 10) This value may be anything between 00 & FF but is generally like 20 or so. The second set is the offset address (0300 for example) On the second line, the offset increments an amount equal to the number or previous data point +10 in this case (0300). The set 00 is the non end set. At the end of the file this becomes 01. The next 20 characters in this case fffffffffffffffffff are example hex data. The last set is in this case 00 the checksum for the data line. Now the argument can start-- depending on what manufacturers interpretation of the intel 'standard' is used the following may be true (from my experience, others are also possible I suppose and just as arbitrary....). The check sum should (in my opinion) be the hex value required to max the sum total of the entire line (ignoring the : of course) to the next even multiple of 100 hex. Some mfg's do not inlcude the non-data information, and this case that is 10030000. The other common change is to use something other than 100 as the divisor. Hope this helps al -- Al. Michielsen, Mechanical & Aerospace Engineering, Syracuse University InterNet: amichiel@rodan.acs.syr.edu amichiel@sunrise.acs.syr.edu Bitnet: AMICHIEL@SUNRISE
andrew@earwax.pd.uwa.oz.au (Andrew Williams) (09/29/90)
In <14451@teda.UUCP> ardai@teda.UUCP (Mike Ardai) writes: >I am looking for information on the extended Intel Hex format. >Specifically, how does it handle addresses larger than 20 bits? >Thanks in advance for any info. >/mike The standard intel hex record format types are: Data Record: Byte 1 --- ':' delimiter Byte 2,3 --- ASCII hex of number of bytes of DATA (not bytes of ASCII hex) Byte 4,5 --- ASCII hex of most significant byte of start address Byte 6,7 --- ASCII hex of least significant byte of start address Byte 8,9 --- ASCII zeroes ('00')-- ie signal data record Bytes 10-.. ASCII hex data. Each byte of data encoded in 2 bytes as hex ASCII Last 2 bytes: ASCII hex of checksum. (My data gives it as the negative of the modulo 256 binary sum of ALL the hex ASCII values in the record.) End of File Record: Byte 1 --- ':' delimiter Byte 2,3 --- ASCII '00' = record length (ie no data in this record) Byte 4,5 --- ASCII hex of most sig. byte of address (usually '00' ) Byte 6,7 --- ASCII hex of least sig. byte of address (usually '00') Byte 8,9 --- ASCII '01'. indicates end of file. Byte 10,11 --- checksum, as above (will = 'FF' if address field is 0000) Extended Adress Record: Byte 1 --- ':' delimiter Byte 2,3 --- ASCII '02' = record length Byte 4,5 --- ASCII '00' Byte 6,7 --- ASCII '00' Byte 8,9 --- ASCII '02' - signify extended address record (** see below) Byte 10,11 --- ASCII hex of most sig. byte of segment base address Byte 12,13 --- ASCII hex of least sig. byte of segment base address Byte 14,15 --- ASCII hex of checksum, as usual. The file consists of the records described above, with each record seperated by a CR, LF combination. To set the full 24 bit address, any data is preceded by the 'Extended address Record', which sets the current segment address (just like an Intel segment register- the segment address is shifted 4 bits right and added to the 16 bit start addresses in the data records). The file must be ended with the 'end of file' record. An example file would be: :060000002345afb1d077eb :00000001ff This would put the 6 bytes of data (23 45 af b1 d0 and 77) at address 00000 (the segment register is assumed to be 0000 unless changed, at least on the EPROM programmer I've used). All of the above information was taken from the instructions of the XP640 programmer (I can't remember the manufacturer offhand!), but the format of the extended address record in the instructions appeared to be nonsense, so I 'guessed' what the authors were trying to say- if it doesn't work, email me, and I'll quote it to you verbatim! >\|/ Michael L. Ardai Teradyne EDA East >--- ------------------------------------------------------------------------- >/|\ ...!sun!teda!ardai (preferred) or ardai@bu-pub.bu.edu Andrew Williams, Physics Department, University of Western Australia. (I haven't got a disclaimer, so I add this instead!!)