EmbeddedRelated.com
Forums
Memfault Beyond the Launch

length of S19 records

Started by Jordi Costa October 7, 2004
What is the maximum expected data length for S19 records ?

I found that program data records (S1, S2) are typically 32 data bytes long, while S0 record is including file path information (Codewarrior) and then could be very long.

Regards,

Jordi Costa



There is no length limitation defined for S-Records (to my knowledge).

The S0 record is a 'descriptive' one, and usually contains the file name.
With CodeWarrior, you can specify the maximum bytes per S-Record line
(SLINELEN), plus there are options in the burner utility to control the
content of your S-Records:
OUTPUT:
-Ns No S-Records
-Ns=p No Path in S0-Record
-Ns=9 No S9-Record
-Ns=8 No S8-Record
-Ns=7 No S7-Record
-Ns=0 No S0-Record

So if the S0 one is too long for you (for whatever reason), you can either
suppress it (-Ns=0); or cut down the lenght with -Ns=p

Erich

> -----Original Message-----
> From: Jordi Costa [mailto:]
> Sent: Donnerstag, 7. Oktober 2004 04:42
> To:
> Subject: [68HC12] length of S19 records >
> What is the maximum expected data length for S19 records ?
>
> I found that program data records (S1, S2) are typically 32
> data bytes long, while S0 record is including file path
> information (Codewarrior) and then could be very long.
>
> Regards,
>
> Jordi Costa >
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> $9.95 domain names from Yahoo!. Register anything.
> http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/dN_tlB/TM
> --------------------------
> ------~- > Yahoo! Groups Links





OK. Thank you.

----- Original Message -----
From: "Erich Styger" <>
To: <>
Sent: Thursday, October 07, 2004 2:02 PM
Subject: RE: [68HC12] length of S19 records >
> There is no length limitation defined for S-Records (to my knowledge).
>
> The S0 record is a 'descriptive' one, and usually contains the file name.
> With CodeWarrior, you can specify the maximum bytes per S-Record line
> (SLINELEN), plus there are options in the burner utility to control the
> content of your S-Records:
> OUTPUT:
> -Ns No S-Records
> -Ns=p No Path in S0-Record
> -Ns=9 No S9-Record
> -Ns=8 No S8-Record
> -Ns=7 No S7-Record
> -Ns=0 No S0-Record
>
> So if the S0 one is too long for you (for whatever reason), you can either
> suppress it (-Ns=0); or cut down the lenght with -Ns=p
>
> Erich
>
> > -----Original Message-----
> > From: Jordi Costa [mailto:]
> > Sent: Donnerstag, 7. Oktober 2004 04:42
> > To:
> > Subject: [68HC12] length of S19 records
> >
> >
> >
> > What is the maximum expected data length for S19 records ?
> >
> > I found that program data records (S1, S2) are typically 32
> > data bytes long, while S0 record is including file path
> > information (Codewarrior) and then could be very long.
> >
> > Regards,
> >
> > Jordi Costa
> >


"Erich Styger" <> wrote:

> There is no length limitation defined for S-Records (to my knowledge).

Old man pages say: "An S-record will be less than or equal to 78
bytes in length."

Google finds http://www.compusmart.ab.ca/rc/TechTips/srecords.html
but that's not the source where I found my copy of the document
several years ago.

I admit that many tools create/need longer lines.

Oliver
--
Oliver Betz, Muenchen


I am not aware that S-records have any inherent limitation except for the
size of the length descriptor (two bytes). However, there are two practical
limitations that Need to be considered:

1. A couple of lifetimes ago, S-records were almost always recorded on
punched cards which were 80 bytes (columns) in length. The 78 byte
limitation mentioned by Oliver probably descended from this.

2. If you are reading with ordinary stream I/O in C or similar languages,
input buffers are sometimes arbitrarily set to 256 bytes in length (an
implementation dependent 'feature'). Thus, S-record length should normally
be under this for good portability.

Finally, I prefer the form which yields 32 bytes of data when decoded simply
because it makes the address fields orderly. Most, well-designed, S-record
generators allow you to control the output data length.

Bob Smith --- Avoid computer viruses, Practice safe hex ---

-- Specializing in small, cost effective
embedded control systems --

http://www.smithmachineworks.com/embedprod.html Robert L. (Bob) Smith
Smith Machine Works, Inc.
9900 Lumlay Road
Richmond, VA 23236 804/745-2608
----- Original Message -----
From: "Oliver Betz" <>
To: <>
Sent: Thursday, October 07, 2004 9:44 AM
Subject: RE: [68HC12] length of S19 records > "Erich Styger" <> wrote:
>
> > There is no length limitation defined for S-Records (to my knowledge).
>
> Old man pages say: "An S-record will be less than or equal to 78
> bytes in length."
>
> Google finds http://www.compusmart.ab.ca/rc/TechTips/srecords.html
> but that's not the source where I found my copy of the document
> several years ago.
>
> I admit that many tools create/need longer lines.
>
> Oliver
> --
> Oliver Betz, Muenchen > --
------
> Yahoo! Groups Links
>
> a.. To



Strictly speaking the size of an s-record is determined by the 1 byte
data length field. However, the length includes the address bytes and
the checksum byte. Thus the maximum true data length is s-record
dependent. Hence:

S1 - max data bytes = 252
S2 - max data bytes = 251
S3 - max data bytes = 250

Regards
Dave Jordi Costa wrote:

> What is the maximum expected data length for S19 records ?
>
> I found that program data records (S1, S2) are typically 32 data bytes
> long, while S0 record is including file path information (Codewarrior)
> and then could be very long.
>
> Regards,
>
> Jordi Costa >
>
> <http://promotions.yahoo.com/ydomains2004/index.html" target="_blank" rel="nofollow">http://us.ard.yahoo.com/SIG910m8e4/M)4855.5468653.6549235.3001176/D=groups/S06554205:HM/EXP97228531/A#76776/R=0/SIGldm1jvc/*http://promotions.yahoo.com/ydomains2004/index.html >
>
> >.




At 07:02 AM 10/7/04, you wrote: >I am not aware that S-records have any inherent limitation except for the
>size of the length descriptor (two bytes). However, there are two practical
>limitations that Need to be considered:

The length descriptor is one byte, at least for S19 format. >Finally, I prefer the form which yields 32 bytes of data when decoded simply
>because it makes the address fields orderly.

Not only that, but limiting the file to 32 bytes means that each S1 entry
won't slop over the end of the line when you print or display the file. I
don't know how interesting that is to anybody else, but I spend enough time
poking around in the S19 files to make that useful to me.

Gary Olmstead
Toucan Technology
Ventura CA


Thanks for all the input. To summarize the answers:

....Old man pages say: "An S-record will be less than or equal to 78
bytes in length."

....S-records were almost always recorded on
punched cards which were 80 bytes (columns) in length.

....limiting the file to 32 bytes means that each S1 entry
won't slop over the end of the line when you print or display the file.

... There is no length limitation defined for S-Records

....the size of an s-record is determined by the 1 byte
data length field. However, the length includes the address bytes and
the checksum byte. Thus the maximum true data length is s-record
dependent. Hence:

S1 - max data bytes = 252
S2 - max data bytes = 251
S3 - max data bytes = 250

... The S0 record is a 'descriptive' one, and usually contains the file name.

My interest was to determine the minimum safe buffer required in a bootloader. S0 is not a problem because could be filtered during generation or when sending or receiving the file data.

Regards,

Jordi




Hi Jordi,

I am sure we can find some additional S19 length opinions / specifications
if you need a few more for diversity :-)

Doron
Nohau Corporation
HC12 In-Circuit Emulators
www.nohau.com/emul12pc.html

At 20:09 07/10/2004 +0200, you wrote:

>Thanks for all the input. To summarize the answers:
>
>....Old man pages say: "An S-record will be less than or equal to 78
>bytes in length."
>
>....S-records were almost always recorded on
>punched cards which were 80 bytes (columns) in length.
>
>....limiting the file to 32 bytes means that each S1 entry
>won't slop over the end of the line when you print or display the file.
>
>... There is no length limitation defined for S-Records
>
>....the size of an s-record is determined by the 1 byte
>data length field. However, the length includes the address bytes and
>the checksum byte. Thus the maximum true data length is s-record
>dependent. Hence:
>
> S1 - max data bytes = 252
> S2 - max data bytes = 251
> S3 - max data bytes = 250
>
>... The S0 record is a 'descriptive' one, and usually contains the file name.
>
>My interest was to determine the minimum safe buffer required in a
>bootloader. S0 is not a problem because could be filtered during
>generation or when sending or receiving the file data.
>
>Regards,
>
>Jordi





Memfault Beyond the Launch