convert Srecord file to absolute

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

convert Srecord file to absolute

3,034 Views
jah
Contributor I
for the S record files codewarrior 3.1 generates is there a routine to decode the srecord into address and data.

i am aware of c:\program files\metrowerks\cw08v3.1\prog\decoder.exe

is there anything more fancy that i can download, some sort of hex editor able to decode a s record file in to absolute code and have the start adr of each module easy to read.
Labels (1)
0 Kudos
3 Replies

509 Views
jah
Contributor I
decode.c does a great job but the bad is it lists the s record line than the assoiciated lines of absolute. i guess not bad but better if it never listed the s record. anything download off the net that does this
0 Kudos

509 Views
Geezer
Contributor I
The reason that decoder.exe has such a lame output is that a S-record file is very dumb. All it basically knows is "these bytes go there", and doesn'r care, nor should it care, about what they are, code, or string, or jump tables, or...

A relocatle assembler is going to concatenate all the .o files, THEN generate other things. All boundaries are usually lost.

I don't know what you're trying to accomplish by reversing an S-file... but what's wrong with .lst and .map files, which have way more information?

Al
0 Kudos

509 Views
rocco
Senior Contributor II
Hi, Jah:

A S-record (.s19) file is already absolute. The 5th through 8th characters of each S1 line is the hex address, and the rest of the line, excluding the last two characters (the checksum), is the hex data.

I don't see how it can be separated into modules, however, since there is no indication in an S-record file of where a module would begin/end.

But what you are after could probably be done from the .abs file, since it contains the symbolic information used by the debugger. But I have never found the internal format of an .abs file documented anywhere.
0 Kudos