s19 header information

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s19 header information

Jump to solution
5,762 Views
e_taylor
Contributor III

hello:

 

what data is contained in the s19 header?

 

 

thanks!!

 

 

ed

Labels (1)
0 Kudos
1 Solution
2,575 Views
J2MEJediMaster
Specialist I

Any good document on the S-record format should explain what goes into the file. See the attached document.

 

---Tom

 

View solution in original post

0 Kudos
11 Replies
2,576 Views
J2MEJediMaster
Specialist I

Any good document on the S-record format should explain what goes into the file. See the attached document.

 

---Tom

 

0 Kudos
2,575 Views
kef
Specialist I

Tom,

 

Codewarrior puts into S0 header full path to and the name of generated *.abs file. Full path can be quite long, also it can be way longer than specified 20 chars of module name field, like specified here http://forums.freescale.com/freescale/attachments/freescale/16BITCOMM/7249/1/S_RECORD.TXT

 


          S0 Record  The type of record is 'S0' (0x5330).  The address


                     field is unused and will be filled with zeros
                     (0x0000).  The header information within the data
                     field is divided into the following subfields.

                                  mname      is char[20] and is the
                                             module name.
                                  ver        is char[2] and is the
                                             version number.

                                  rev        is char[2] and is the
                                             revision number.
                                  description is char[0-36] and is a
                                             text comment.

Is there simple way to set S0 fields in Codewarrior (for HC12)? Burner doesn't seem to have commands for this. If it's not possible to set ver, rev and description, then maybe it's possible to configure something so that S0 record length is reduced to carry only *.abs file name, without full path?

Thanks

0 Kudos
2,575 Views
J2MEJediMaster
Specialist I

Have you looked at the S12(X) Build Tools Utilities manual, specifically the chapter on the Burner Utility? It sounds like you have. I would attempt the following, in no particular order, based on my read of the burner commands:

 

1) Try using the LEN = x command to restrict the size of all S-Record lines to x bytes per line.

 

2) If your S-Record file has only, say, that one S0 line and the rest of the lines are S1, trying forcing the suppression of the S0 record by using RECORD = S1, which will have the burner only generate only S1 records.

 

3) Use HEADER = "Your string here" to encode version information.

 

I have not tried these myself, YMMV, the usual caveats apply.

 

---Tom

 

 

0 Kudos
2,575 Views
kef
Specialist I

Thank you very much, Tom

 

Somehow I treated "No Path is S0-Record" option like it would not put anything into S0. Burner -Ns=p option is what I wanted. Now to put some useful information into S0, I can change linker output file name tp something meaningful, and S0 length doesn't have to be too long. Thanks.

 

Regarding "header = "filename"" command. I think it has nothing to do with S0. When I use it, burner complains with this message B1000, couldnt open header file. Looks like header command should be uend to some some commands to S-records files burner hardware.

 

Best Regards

0 Kudos
2,575 Views
Limestone
Contributor III

Hi!

 

I am sorry, but I have to reopen this thread.

 

I have a similar situatoion.  I will write a simple PC-side bootloader application that will communicate with something similar to the "AN2295 bootlader"

 

The  application will know the prevoius version in my MCU and will then open the new S19 file to check its version. Therefore, I want to be able to set eith er ver, rev and/or description in the S19 throu CW. How can this be accomplished?

 

Best regards

Martin

 

0 Kudos
2,575 Views
bigmac
Specialist III

Hello Martin,

 

Since the current version/revision information needs to be stored in flash, for future reference, this data would already be available within the new S19 file, within a S1 record.  Assuming this data is placed at a specific flash address, the required record can be easily determined from the address information within the record.

 

With careful placement and linking order, maybe this record can become one of the first S1 records received during the download process.

 

Regards,

Mac

 

0 Kudos
2,575 Views
kef
Specialist I

Mac, 

 

I think burner can be told to put some S1/S2 addresses first or next, and linking order could be any. For example to force 0x4010..0xFFFF first, 0x4000..0x400F next, *.bbl file could have something like this inside:

 

len=0xBFF0
origin = 0x004010

destination = 0x4010

SENDBYTE 1 "%ABS_FILE%"

 

len=0x10
origin = 0x004000

destination = 0x4000

SENDBYTE 1 "%ABS_FILE%"

 

0 Kudos
2,575 Views
kef
Specialist I

As far as I know you can:

1) put into S0 record application file name + full path . You may change application file name from default Project.abs to something more useful in linker settings.

2) put to S0 record application file name, no path

3) turn off S0 record generation

 

If you need something else, I think you should use some additional tools.

 

You could try changing application name to something like myproject_ver9.9.9.

*.abs file name extension at the end seems to be not necessary. Debugger is able to load elf file even without file name extension.

If you change application name, then please don't forget *.map file name also will change. You should probably replace Project.map in Linker Files  with new_application_name.map. Maybe there's an option to specify map file name, I don't know.

0 Kudos
2,575 Views
Limestone
Contributor III

Hi and thanks for your response!

 

I searched for "S0 record application" both on this forum and on google and did not find anything useful.

 

I could of course write a simple application of my own to modify the S0 line, but I thought there already was a tool for this.

 

Best regards

M

0 Kudos
2,575 Views
kef
Specialist I

I thought it's obvious (sorry if it wasn't) that CodeWarrior Burner application is that one which takes ELF file (*.abs) and generates S records from it.

You can tell burner to not generate S0 records or  generate S0 records with or without full path to ELF file. Please inspect all available Burner options. Project standrard settings -> Burner for HC12 -> Options. You may check Configure S-Records. Then uncheck all "No Sx-Record" options. Check "No S0-Record" to suppress S0 record. Or check/uncheck "No Path in S0-Record" to enable/disable full path in S0 record.

Hope it is more clear now.

I also don't know application that would manipulate S0 record contents. It is not hard to write one though.

 

0 Kudos
2,575 Views
e_taylor
Contributor III

thanks tom!!

 

ed

0 Kudos