国产毛片a精品毛-国产毛片黄片-国产毛片久久国产-国产毛片久久精品-青娱乐极品在线-青娱乐精品

查看: 6771|回復: 5
打印 上一主題 下一主題

S19文件格式

[復制鏈接]
跳轉到指定樓層
樓主
發表于 2009-6-19 00:49:56 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
關鍵詞: 格式 , 文件
S19是moto當年創立的,跟Intel的hex對著干
其實S19可以攜帶更多的信息,比如調試信息等
下面是轉的一個老外發的帖子,很簡潔明了的介紹了S19文件格式


S-Record Format
   
    A file in Motorola S-record format is an ASCII file. There are three different
    formats:

        S19     for 16-bit address
        S2      for 24-bit address
        S3      for 32-bit address

   
    The files consist of optional symbol table information, data specifications
    for loading memory, and a terminator record.

        [ $$ {module_record}
        symbol records
        $$ [ module_record ]
        symbol_records
        $$]
        header_record
        data_records
        record_count_record
        terminator_record


Module Record (Optional)

    Each object file contains one record for each module that is a component of it. This
    record contains the name of the module. There is one module record for each relocatable
    object created by the assembler. The name of the relocatable object module
    contained in the record comes from the IDNT directive. For absolute objects created
    by the linker, there is one module record for each relocatable object file linked,
    plus an additional record whose name comes from the NAME command for the
    linker.

    Example:

        $$ MODNAME


Symbol Record (Optional)

    As many symbol records as needed can be contained in the object module. Up to 4
    symbols per line can be used, but it is not mandatory that each line contain 4
    symbols. A module can contain only symbol records.

    Example:

        APPLE $00000 LABEL1 $ODOC3
        MEM $OFFFF ZEEK $01947

    The module name associated with the symbols can be specified in the
    module_record preceding the symbol records.

    Example:

        $$MAIN

    Symbols are assumed to be in the module named in the preceding module_record
    until another module is specified with another module_record. Symbols defined by
    the linker's PUBLIC command appear following the first module record, which
    indicates the name of the output object module specified by the linker's NAME
    command.


*****************************************************************************************

Header Record (SO)

    Each object module has exactly one header record with the following format:

        S00600004844521B

    Description:

        S0         Identifies the record as a header record
        06         The number of bytes following this one
        0000       The address field, which is ignored
        484452     The string HDR in ASCII
        1B         The checksum



*****************************************************************************************

Data Record (S1)

    A data record specifies data bytes that are to be loaded into memory. Figure 1
    shows the format for such a record. The columns shown in the figure represent half
    of a byte (4 bits).

                ---------------------------------------------
                |  1 2  3 4   5 6 7 8   9 ... 40    41 42   |
                |                                           |
                |  S ID byte   load    data...data checksum |
                |       count address   1      n            |
                ---------------------------------------------
            Figure 1: Data Record Formatter 16-Bit Load Address


        Column      Description

        1           Contains the ASCII character S, which indicates the start of
                    a record in Motorola S-record format.

        2           Contains the ASCII character identifying the record type.
                    For data records, this character is 1.

        3 to 4      Contain the count of the number of bytes following this one
                    within the record. The count includes the checksum and the
                    load address bytes but not the byte count itself.

        5 to 8      Contain the load address. The first data byte is to be loaded
                    into this address and subsequent bytes into the next sequential
                    address. Columns 5 and 6 contain the high-order address
                    byte, and columns 7 and 8 contain the low-order address byte.

        9 to 40     Contain the specifications for up to 16 bytes of data.

        41 to 42    Contain a checksum for the record. To calculate this, take the
                    sum of the values of all bytes from the byte count up to the
                    last data byte, inclusive, modulo 256. Subtract this result
                    from 255.


*****************************************************************************************

Data Record (S2)


    A data record specifies data bytes that are to be loaded into memory. Figure 2
    shows the format for such a record. The columns shown in the figure represent half
    of a byte (4 bits).


                ----------------------------------------------------
                |  1 2   3 4   5 6 7 8 9 10   11 ...  42   43 44   |
                |                                                  |
                |  S ID  byte     load        data...data checksum |
                |        count   address       1      n            |
                ----------------------------------------------------
                Figure 2: Data Record Format for 24-Bit Load Address

        Column      Description

        1           Contains the ASCII character S, which indicates the start of
                    a record in Motorola S-record format.

        2           Contains the ASCII character identifying the record type.
                    For data records, this character is 2.

        3 to 4      Contain the count of the number of bytes following this one
                    within the record. The count includes the checksum and the
                    load address bytes but not the byte count itself.

        5 to 10     Contain the load address. The first data byte is to be loaded
                    into this address and subsequent bytes into the next sequential
                    address. Columns 5 and 6 contain the high-order address
                    byte, and columns 9 and 10 contain the low-order address byte.

        11 to 42    Contain the specifications for up to 16 bytes of data.

        43 to 44    Contain a checksum for the record. To calculate this, take the
                    sum of the values of all bytes from the byte count up to the
                    last data byte, inclusive, modulo 256. Subtract this result
                    from 255.


*****************************************************************************************

Data Record (S3)


    A data record specifies data bytes that are to be loaded into memory. Figure 3
    shows the format for such a record. The columns shown in the figure represent half
    of a byte (4 bits).

                ----------------------------------------------------------
                |  1 2   3 4   5 6 7 8 9 10 11 12   13 ... 44    45 46   |
                |                                                        |
                |  S ID  byte        load          data...data  checksum |
                |        count      address         1      n             |
                ----------------------------------------------------------
                Figure 3: Data Record Format for 32-Bit Load Address

    Column          Description

    1               Contains the ASCII character S, which indicates the start of
                    a record in Motorola S-record format.

    2               Contains the ASCII character identifying the record type.
                    For data records, this digit is 3 for 32-bit addresses.

    3 to 4          Contain the count of the number of bytes following this one
                    within the record. The count includes the checksum and the
                    load address bytes but not the byte count itself.

    5 to 12         Contain the load address. The first data byte is to be loaded
                    into this address and subsequent bytes into the next sequential
                    address. Columns 5 and 6 contain the high-order address
                    byte, and columns 11 and 12 contain the low-order address byte.

    13 to 44        Contain the specifications for up to 15 bytes of data.

    45 to 46        Contain a checksum for the record. To calculate this, take the
                    sum of the values of all bytes from the byte count up to the
                    last data byte, inclusive, modulo 256. Subtract this result
                    from 255.
沙發
 樓主| 發表于 2009-6-19 00:50:07 | 只看該作者
*****************************************************************************************

Record Count Record (S5)


    The record count record verifies the number of data records preceding it. Figure 4
    shows the format for such a record. The columns shown in the figure represent half
    of a byte (4 bits).

                --------------------------------------
                |  1 2   3 4      5 6 7 8     9 10   |
                |                                    |
                |  S ID  byte    # of data  checksum |
                |        count    records            |
                --------------------------------------
                Figure 4: Record Count Record Format

    Column          Description

    1               Contains the ASCII character S, which indicates the start of
                    a record in Motorola S-record format.

    2               Contains the ASCII character 5, which indicates a record
                    count record.

    3 to 4          Contain the byte count, ASCII string 03.

    5 to 8          Contain the number of data records in this file. The high-
                    order byte is in columns 5 and 6.

    9 to 10         Contain the checksum for the record.

    Example:

        S503010DEE

    The example above shows a record count record indicating a total of 269 records
    (0x010D) and a checksum of 0xEE.



*****************************************************************************************

Terminator Record for 32-bit address (S7)

    A terminator record specifies the end of the data records. Figure 5 shows the
    format for such a record. The columns shown in the figure represent half of a byte
    (4 bits).

                -------------------------------------
                |  1 2   3 4      5...12    13 14   |
                |                                   |
                |  S ID  byte     load     checksum |
                |        count   address            |
                -------------------------------------
                Figure5: Terminator Record Format for 32-Bit Load Address

    Column          Description

    1               Contains the ASCII character S, which indicates the start of
                    a record in Motorola S-record format.

    2               Contains the ASCII character 7, which indicates a 32-bit
                    load address.

    3 to 4          Contain the byte count, ASCII string 04.

    5 to 12         Contain the load address that is either set to zero or to the
                    starting address specified in the END directive or START
                    command (there are no data bytes).

    13 to 14        Contain the checksum for the record.

*****************************************************************************************

Terminator Record for 24-bit address (S8)


    A terminator record specifies the end of the data records. Figure 6 shows the
    format for such a record. The columns shown in the figure represent half of a byte
    (4 bits).

                ----------------------------------------
                |  1 2   3 4    5 6 7 8 9 10   11 12   |
                |                                      |
                |  S ID  byte       load      checksum |
                |        count     address             |
                ----------------------------------------
                Figure 6: Terminator Record Format for 24-Bit Load Address

    Column          Description

    1               Contains the ASCII character S, which indicates the start of
                    a record in Motorola S-record format.

    2               Contains the ASCII character 8, which indicates a 24-bit
                    load address.

    3 to 4          Contain the byte count, ASCII string 04.

    5 to 10         Contain the load address, which is either set to zero or to the
                    starting address specified in the END directive or START
                    command. There are no data bytes.

    11 to 12        Contain the checksum for the record.

    Example:

        S804000AF0001

    The previous example shows a terminator record with a 24-bit load address of
    0x000AF0 and a checksum of 0x01.


*****************************************************************************************

Terminator Record for 16-bit address (S9)


    A terminator record specifies the end of the data records. Figure 7 shows the
    format for such a record. The columns shown in the figure represent half of a byte
    (4 bits).

                -------------------------------------
                |  1 2   3 4    5 6 7 8      9 10   |
                |                                   |
                |  S ID  byte    load      checksum |
                |        count  address             |
                -------------------------------------
                Figure 7: Terminator Record Format for 16-Bit Load Address


    Column         Description

    1               Contains the ASCII character S, which indicates the start of
                    a record in Motorola S-record format.

    2               Contains the ASCII character 9, which indicates a 16-bit
                    load address.

    3 to 4          Contain the byte count, ASCII string 04.

    5 to 8          Contain the load address, which is either set to zero or to the
                    starting address specified in the END directive or START
                    command (there are no data bytes).

    9 to 10         Contain the checksum for the record.



*****************************************************************************************
板凳
發表于 2009-6-19 01:16:11 | 只看該作者
我記得曾經做過,現在忘了~~~
地板
發表于 2009-6-28 11:10:27 | 只看該作者
Good!
地下室
發表于 2009-8-25 13:27:40 | 只看該作者
that's good
6
發表于 2009-9-5 21:30:10 | 只看該作者
ST的ST7用的就是這個S19文件格式,還真沒有好好看過它的格式,謝謝啦!
您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

關于我們  -  服務條款  -  使用指南  -  站點地圖  -  友情鏈接  -  聯系我們
電子工程網 © 版權所有   京ICP備16069177號 | 京公網安備11010502021702
快速回復 返回頂部 返回列表
主站蜘蛛池模板: 欧美一级视频免费观看| 中文字幕一宅男撸撸666| 国产AV视频二区在线观看| 色欲AV精品人妻一二三区| 欧美日本韩国一二区视频| 中国老太60old mantv| 视频国产一区| 亚洲图片综合区另类图片| 一区二区三区视频观看| 久久xxxx| 亚洲字幕在线观看| 三级黄色片在线播放| 四虎成人免费影院网址| 深夜免费| 在线视频第一页| 美国CERANETWORK超清| 日本美女黄色一级片| 日本草草视频| 睡男神的这件小事小说在线阅读| 最新众筹嫩模大尺度写真视频| 暖暖的视频完整视频免费韩国| 亚洲成人国产精品| 日韩性视频| 四虎1515hhc0m| 啊…嗯啊好深男男小黄文| 特黄特色大片免费播放器9| 欧美一级xxxx俄罗斯一级| 我爱我爱色成人网| 一个人免费视频| 国产在线精品视频免费观看| 亚瑟天堂久久一区二区影院| 四虎影视永久免费| 亚洲一级大黄大色毛片| 一级毛片在线看| 美女张开腿让我了一夜| 一级毛片毛片毛片毛毛片| 日本韩国伦理片| 喂奶milkboobspuppy| 国产精品 中文字幕 亚洲 欧美| 亚洲精品婷婷无码成人A片在线| 网红毛片|