srec_ti_tagged(5)

🌸 srec_ti_tagged(5) β€” the TI-Tagged format, explained by your favorite Unix bestie 🌸

okay so this is a page from the File Formats Manual, and it's all about srec_ti_tagged β€” yes bestie, the Texas Instruments Tagged file format, no cap πŸ’…

✨ NAME ✨

srec_ti_tagged β€” the Texas Instruments Tagged (SDSMAC) file format. that's it, that's the name, periodt πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

so this format also goes by TI-Tagged or TI-SDSMAC, iykyk.

what's it for? literally uploading and downloading binary files between two computer systems 🫢 β€” typically between a computer system (think a PC, a Macintosh, or a workstation, main character energy) and an emulator or evaluation board for microcontrollers and microprocessors. iconic.

πŸ’œ The Lines

okay this is the part where things get a lil different from other object formats: the lines themselves? not especially significant, lowkey. the format consists of a number of tagged fields, and the lines are just a series of those fields strung together. slay.

here's the tag vibe check, every single one:

  • * β€” Data byte.
  • : β€” End of file.
  • 0 β€” File header (optional).
  • 7 β€” Checksum.
  • 8 β€” Dummy checksum (ignored).
  • 9 β€” Address.
  • B β€” Data word.
  • F β€” End of data record.
  • K β€” Program identifier (optional).

πŸŽ€ Data Byte

β”Œβ”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”
β”‚ B β”‚ n β”‚ n β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”˜

one (1) single byte of data. the nn is 8-bit big-endian hexadecimal. tiny but mighty πŸ’–

🌈 End of File

β”Œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”
β”‚ : β”‚ CRLF β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜

the end of data is indicated by this tag. then the end of line sequence follows it β€” LF on Unix systems, CRLF on PCs, because of course πŸ™ˆ

⭐ File Header

β”Œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 0 β”‚ length β”‚ filename β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

the optional start-of-file record begins with a tag character ('0') and a 12-character file header. the first four characters are the byte count of the file data. the remaining 8 characters are the name of the file, and they may be any ASCII characters, blank padded. cute AND functional 🧚

πŸ”₯ Checksum

β”Œβ”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”
β”‚ 7 β”‚ n β”‚ n β”‚ n β”‚ n β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”˜

the checksum is the 2s complement sum of the 8-bit ASCII values of characters, beginning with the first tag character and ending with the checksum tag character (7). the nnnn is 16-bit big-endian hexadecimal. math girlies rise πŸ‘‘

πŸ’€ Dummy Checksum

β”Œβ”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”
β”‚ 8 β”‚ n β”‚ n β”‚ n β”‚ n β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”˜

the checksum is the 2s complement sum of the 8-bit ASCII values of characters, beginning with the first tag character and ending with the checksum tag character (8). the nnnn is 16-bit big-endian hexadecimal. yes it's literally the same deal as above but with an 8 β€” and remember, this one is ignored, so don't come for me 😭

πŸ¦‹ Address

β”Œβ”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”
β”‚ 9 β”‚ n β”‚ n β”‚ n β”‚ n β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”˜

addresses may be given for any data byte, but none is mandatory β€” very "come as you are" of it. the file begins at 0000 if no address is given before the first data field. the nnnn is 16-bit big-endian hexadecimal ✨

🌸 Data Word

β”Œβ”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”
β”‚ B β”‚ a β”‚ a β”‚ b β”‚ b β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”˜

two bytes of data. the aa and bb are each 8-bit big-endian hexadecimal. double the data, double the slay 🫢

πŸ“ End of Record

β”Œβ”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”
β”‚ F β”‚ CRLF β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜

the end of line sequence (LF on Unix systems, CRLF on PCs) is escaped using this tag. and heads up: the checksum is reset to zero at this point. fresh start energy πŸ’…

🧚 Program Identifier

β”Œβ”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”
β”‚ K β”‚ n β”‚ n β”‚ n β”‚ n β”‚ text β”‚
β””β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜

the program identifier can contain a brief description of the program, or it can be empty (i.e. the text portion is optional). the nnnn length (hex) of the field includes the K, the length and the text; it is at least 5. so don't try to sneak in a shorter one, bestie, it's not gonna fly πŸ™ˆ

πŸ’– Size Multiplier

ngl this is the part that humbles you: in general, binary data will expand in sized by approximately 2.9 times when represented with this format. yeah. it gets big. it's giving "worth it though" 😭

πŸ”₯ EXAMPLE πŸ”₯

here's an example TI-Tagged file. it contains the data β€œHello, World[rq] to be loaded at address 0x0100.

K000590080B4865B6C6CB6F2CB2057B6F72B6C64*0A7F648F
:

and here is another example from the reference below πŸ‘‡

00050        7FDD4F
90000BFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFF7F400F
90010BFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFF7F3FFF
90020BFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFF7F3FEF
90030BFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFF7F3FDF
90040BFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFF7F3FCF
:

🌈 SEE ALSO 🌈

http://www.dataio.com/pdf/Manuals/Unifamily/981‐0014‐016.pdf β€” page 6-33, in case you wanna go straight to the source, iykyk πŸ“–

srec_cat version 1.65 Copyright (C) 1998... 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. fr fr, read the license 🫢

πŸ’œ MAINTAINER πŸ’œ

  • Scott Finneran β€” E-Mail: scottfinneran@yahoo.com.au
  • Peter Miller β€” E-Mail: pmiller@opensource.org.au

and that's the whole page, bestie πŸŽ€ β€” brought to you by the Reference Manual, SRecord, page srec_ti_tagged(5), running on version 1.65. go forth and tag your fields πŸ’…βœ¨

πŸ“¦ where this page comes from