SREC (file format)

SREC (file format)

The Motorola S-record format is an ASCII encoding for binary data. It is also known as the SREC or S19 format. The format has several advantages over binary formats. The ASCII encoding allows the files to be edited with a text editor. Also, each record contains a checksum to identify data that has been corrupted during transmission. [ [http://www.die.net/doc/linux/man/man5/srec.5.html srec - Linux man page] ]

The format was created in the 1970s for the Motorola 6800 processor. It is used by software development tools to encode binary data, especially executable code, for embedded processors.

A similar encoding, with slightly different ASCII formatting, termed Intel HEX, is used with Intel processors.

Format

An SREC format file consists of a series of ASCII records. All hexadecimal (hex) numbers are Big Endian. The records have the following structure:
# Start code, one character, an "S".
# Record type, one digit, "0" to "9", defining the type of the data field.
# Byte count, two hex digits, indicating the number of bytes (hex digit pairs) that follow in the rest of the record (in the address, data and checksum fields).
# Address, four, six, or eight hex digits as determined by the record type for the memory location of the first data byte.
# Data, a sequence of 2"n" hex digits, for "n" bytes of the data.
# Checksum, two hex digits - the one's complement of the least significant byte sum of the values represented by the two hex digit pairs for the byte count, address and data fields.

There are eight record types, listed below:The S0 record data sequence contains vendor specific data rather than program data. The record count in the S5 record is stored in the 2-byte address field. The address field of the S7, S8, or S9 records may contain a starting address for the program. [ [http://www.freescale.com/files/archives/doc/ref_manual/M68000PRM.pdf MC68000 Family Programmer’s Reference Manual] Appendix C]

Example

S00F000068656C6C6F202020202000003C S11F00007C0802A6900100049421FFF07C6C1B787C8C23783C6000003863000026 S11F001C4BFFFFE5398000007D83637880010014382100107C0803A64E800020E9 S111003848656C6C6F20776F726C642E0A0042 S5030003F9 S9030000FC

References

External links

* [http://srecord.sourceforge.net/ SRecord] is a collection of tools for manipulating SREC format files


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • List of file formats — This is an incomplete list, which may never be able to satisfy particular standards for completeness. You can help by expanding it with reliably sourced entries. See also: List of file formats (alphabetical) This is a list of file formats… …   Wikipedia

  • Intel HEX — Das Intel HEX Format ist ein Datenformat zur Speicherung und Übertragung von binären Daten. Es wird heute hauptsächlich verwendet, um Programmierdaten für Mikrocontroller bzw. Mikroprozessoren, EPROMs und ähnliche Bausteine zu speichern. Es kann… …   Deutsch Wikipedia

  • Intel HEX — is a file format for conveying binary information for applications like programming microcontrollers, EPROMs, and other kinds of chips. It is one of the oldest file formats available for this purpose, having been in use since the 1970s. Fact|date …   Wikipedia

  • Portable Executable — Переносимый исполняемый файл Расширение .exe, .dll, .ocx, .sys, .scr, .drv, .cpl Сигнатура MZ (опционально), PE Разработан Microsoft Тип формата двоичный, исполняемый, объектный …   Википедия

  • Intel HEX — Для улучшения этой статьи желательно?: Викифицировать статью. Найти и оформить в виде сносок ссылки на авторитетные источники, подтверждающие написанное …   Википедия

  • MZ (формат) — У этого термина существуют и другие значения, см. MZ. MZ Расширение .exe .dll Сигнатура MZ или ZM Разработан Microsoft Тип формата исполнимый модуль Расширен из .COM …   Википедия

  • Intel HEX — es un formato de archivo para la programación de microcontroladores, EPROMs y otros circuitos integrados. Datando de los años 70[cita requerida], está entre los formatos más viejos con esta finalidad. Consiste en un archivo de texto cuyas… …   Wikipedia Español

  • Formula1 — Formule 1 Pour les articles homonymes, voir F1 (homonymie). Formule 1 …   Wikipédia en Français

  • Formula 1 — Formule 1 Pour les articles homonymes, voir F1 (homonymie). Formule 1 …   Wikipédia en Français

  • Formule1 — Formule 1 Pour les articles homonymes, voir F1 (homonymie). Formule 1 …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”