Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

srec_stewie(5) [debian man page]

srec_stewie(5)							File Formats Manual						    srec_stewie(5)

NAME
srec_stewie - Stewie's binary file format DESCRIPTION
If you have a URL for documentation of this format, please let me know. Any resemblance to the Motorola S-Record is superficial, and extends only to the data records. The header records and termination records are completely different. None of the other Motorola S-Records record type are available. The Records All records start with an ASCII capital S character, value 0x53, followed by a type specifier byte. All records consist of binary bytes. The Header Record Each file starts with a fixed four byte header record. +-----+------+------+------+ |0x53 | 0x30 | 0x30 | 0x33 | +-----+------+------+------+ The Data Records Each data record consists of 5 fields. These are the type field, length field, address field, data field, and the checksum. The lines always start with a capital S character. +-----+------+---------------+---------+------+----------+ |0x53 | Type | Record Length | Address | Data | Checksum | +-----+------+---------------+---------+------+----------+ Type The type field is a one byte field that specifies whether the record has a two-byte address field (0x31), a three-byte address field (0x32) or a four-byte address field (0x33). The address is big-endian. Record Length The record length field is a one byte field that specifies the number of bytes in the record following this byte. Address This is a 2-, 3- or 4-byte address that specifies where the data in the record is to be loaded into memory. Data The data field contains the executable code, memory-loadable data or descriptive information to be transferred. Checksum The checksum is a one byte field that represents the least significant byte of the one's complement of the sum of the values repre- sented by the bytes making up the record's length, address, and data fields. The Termination Record Each file ends with a fixed two byte termination record. +-----+------+ |0x53 | 0x38 | +-----+------+ Size Multiplier In general, binary data will expand in sized by approximately 1.2 times when represented with this format. EXAMPLE
Here is an hex-dump example file. It contains the data "Hello, World[rq] to be loaded at address 0. 0000: 53 30 30 33 53 31 10 00 00 48 65 6C 6C 6F 2C 20 S003S1...Hello, 0010: 57 6F 72 6C 64 0A 9D 53 38 World..S8 COPYRIGHT
srec_cat version 1.58 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Peter Miller The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use the 'srec_cat -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'srec_cat -VERSion License' command. AUTHOR
Peter Miller E-Mail: pmiller@opensource.org.au //* WWW: http://miller.emu.id.au/pmiller/ Reference Manual SRecord srec_stewie(5)

Check Out this Related Man Page

srec_mos_tech(5)						File Formats Manual						  srec_mos_tech(5)

NAME
srec_mos_tech - MOS Technology file format DESCRIPTION
The MOS Technology format allows binary files to be uploaded and downloaded between between a computer system (such as a PC, Macintosh, or workstation) and an emulator or evaluation board for microcontrollers and microprocessors. The Lines Each line consists of 5 fields. These are the length field, address field, data field, and the checksum. The lines always start with a semicolon (;) character. The Fields +--+--------+---------+------+----------+------+ |; | Length | Address | Data | Checksum | CRLF | +--+--------+---------+------+----------+------+ Length The record length field is a 2 character (1 byte) field that specifies the number of data bytes in the record. Typically this is 24 or less. Address This is a 2-byte address that specifies where the data in the record is to be loaded into memory, big-endian. Data The data field contains the executable code, memory-loadable data or descriptive information to be transferred. Checksum The checksum is an 2-byte field that represents the least significant two bytes of the the sum of the values represented by the pairs of characters making up the record's length, address, and data fields, big-endian. End of File The final line should have a data length of zero, and the data line count in the address field. The checksum is not the usual checksum, it is instead a repeat of the data line count. Size Multiplier In general, binary data will expand in sized by approximately 2.54 times when represented with this format. EXAMPLE
Here is an example MOS Technology format file. It contains the data "Hello, World" to be loaded at address 0. ;0C000048656C6C6F2C20576F726C640454 ;0000010001 COPYRIGHT
srec_cat version 1.58 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Peter Miller The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use the 'srec_cat -VERSion License' command. This is free software and you are welcome to redistribute it under certain conditions; for details use the 'srec_cat -VERSion License' command. AUTHOR
Peter Miller E-Mail: pmiller@opensource.org.au //* WWW: http://miller.emu.id.au/pmiller/ KIM-1 User Manual - Appendix F - Paper Tape Format (The following information is reproduced from http://users.telenet.be/kim1-6502/6502/usrman.html#F just in case it vanishes from the Web.) The paper tape LOAD and DUMP routines store and retrieve data in a specific format designed to insure error free recovery. Each byte of data to be stored is converted to two half bytes. The half bytes (whose possible values are 0 to F HEX) are translated into their ASCII equivalents and written out onto paper tape in this form. Each record outputted begins with a ";" character (ASCII 3B) to mark the start of a valid record. The next byte transmitted (18HEX) or (24 decimal) is the number of data bytes contained in the record. The record's starting address High (1 byte, 2 characters), starting address Lo (1 byte, 2 characters), and data (24 bytes, 48 characters) follow. Each record is terminated by the record's check-sum (2 bytes, 4 characters), a carriage return (ASCII 0D), line feed (ASCII 0A), and six "NULL" characters (ASCII 00). (NULL characters cause a blank area on the paper tape.) The last record transmitted has zero data bytes (indicated by ;00) The starting address field is replaced by a four digit Hex number repre- senting the total number of data records contained in the transmission, followed by the records usual check-sum digits. An "XOFF" charac- ter ends the transmission. ;180000FFEEDDCCBBAA0099887766554433221122334455667788990AFC ;0000010001 During a "LOAD" all incoming data is ignored until a ";" character is received. The receipt of non ASCII data or a mismatch between a records calculated check-sum and the check-sum read from tape will cause an error condition to be recognized by KIM. The check-sum is cal- culated by adding all data in the record except the ";" character. The paper tape format described is compatible with all other MOS Technology, Inc. software support programs. Reference Manual SRecord srec_mos_tech(5)
Man Page