Next: , Previous: , Up: Uploading a program   [Contents][Index]


4.2.2 S-Record files

µPad can upload files containing S-Record data to the target device. Since S-Record files are ordinary text files they can be recognised by viewing them using a command like cat or by viewing them in a text editor. They comprise lines of text beginning with the character ‘S’. Figure 4.3 shows an example.

S011000064756D622D6C6F6F702E7372656384
S214FE00000C2B02F2EED002F001970007FFFF472608
S214FE0010FFFF01EE8002F0EE9002F0EEB002F0EE90
S20AFE0020D002F020FFE511
S208FFFFFC00FE0000FF
S804FE0000FD

Figure 4.3: An example of a short S-Record file

Most linkers however do not, by default, generate S-Record data. Therefore you will most likely have to convert the file you wish to upload. One way to do this, is to use the objcopy command which is shipped with GNU Binutils (see https://www.gnu.org/software/binutils). To do this, you would use a command similar to

objcopy input-file -O srec srecord-file

If you are using another toolchain, you will need to consult its documentation.