New to s records

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

New to s records

3,665 Views
rhb3
Contributor II
Hello,
 
I'm working on my first freescale embedded project.  I'm writing my makefile for my project and I noticed that the linker.exe can output a s record directly of several different formats.  I'm  using the makefile approach (reference (CodeWarrior_Examples)\HC12\Makefile_Projects) as I find you can really control the build process all build switches, etc.  I'm not a GUI hater just more comfortable with CLI!  Now being only familiar with intel hex files and programming parts into EPROM or flash with that file format only I have some questions:
 
1) Which s record format should I use and why.  I actually have two different projects one using MC9S12E64 and 'E128.  So do I pick the s record size based on how much code space there could potentially be in that size part (different numberof bytes in address field of s record).  How does one go about this?
 
2) Do I really need a *.s19 file?  I find it a bit confusing that linker.exe creates s records and then burner.exe can create *.s19 files and connect directly to a programmer.  I plan to use the USB MULTILINK BDM to debug and program during development as that's what has been provided.  I want my makefile to "do it all" except for connecting to the board to flash the part.  I'd like to create the file that you'd actaully use a utility like burner or other to flash the part during the make process.
 
3) In the production environment (say 100 / day) what's a good way to program the final assembly?  I noticed the cyclone option was a standalong programmer.  What are some suggestions?
 
Clarification would be much appreciated to this s record newbie!
 
Labels (1)
0 Kudos
3 Replies

542 Views
Alban
Senior Contributor II
Hi,
 
Other sources of info on S-Record format:
 
 
 
or on Sourceforge for a converter:   http://srecord.sourceforge.net/
 
Cheers,
Alban.
0 Kudos

542 Views
rhb3
Contributor II
Thanks!
0 Kudos

542 Views
mjbcswitzerland
Specialist V

Hi rhb3

Motorola S19, S28, S37 (is that the lot - maybe there are more?) differ in the addressing range possible. If you are using a device with 64k then only 2 bytes are needed to address each location (a short pointer). Once you get above 64k then it is necessary to use three byte pointers and so on up.

There is nothing to stop you using S28 also for 64k projects - the S record will simply be slightly larger in size since there are three bytes (actually ascii hex bytes in the file format) instead of 2.

Most debuggers can handle all sorts of formats, especially ELF, which is generated by by most compilers so there is probably no reason to generate s-records for normal work. The s-records are useful when SW is distributed to be loaded by serial boot loaders and the like and for programming chips in programmers (it's a long time since I used such a device...). I think that you will find the the Codewarrior for your device will automatically recognise the format...

S-rec and Intel hex are the two, probably, most known such formats and it is also easy to convert from one to the other. If you know Intel hex then Motorola Hex is just as easy to get to know and understand.

Regards

Mark Butcher
www.mjbc.ch

0 Kudos