网上找到的CCS .dat文件中的第二位数据格式的说明,都是说数据格式是1-4,没有9的说明,这是我的CCS帮助文档中找到的最新说明。
Code Composer data file
A text file that contains one line of header information and stores the data as one sample per line. The legacy file format supported these formats :
-
Hexadecimal
-
Integer
-
Long
-
Float
The new scheme which is backwards compatible supports a larger set of data types. GEL_MemoryListSupportedTypes() GEL API could be used to list complete set of supported data types in the new scheme
The header information for data files uses this syntax:
MagicNumber Format StartingAddress PageNum Length [NewFormat]
-
MagicNumber—fixed at 1651.
-
Format—a number from 1 to 4, indicating the format of the samples in the file.
This number represents a data format: (1) hexadecimal, (2) integer, (3) long, (4) float, or (9) Use new scheme
-
StartingAddress—starting address of the block that was saved.
-
PageNum—page number the block was taken from.
-
Length—number of samples in the block.
-
NewFormat—Format (9); the new scheme. This is optional when usign the legacy formats 1 - 4
All header values are assumed to be TI-style hexadecimal values.
This is an example of a Code Composer data file:
1651 1 800 1 10
0x0000
0x0000
0x0000
0x0000
0x0000
0x0000
0x0000
0x0000
0x0000
0x0000
0x0000
0x0000
0x0000
Note: Code Composer expects five-digit numbers of information to read in 4-digit values. While the data is known to be hexadecimal, Code Composer expects the first digit to be a zero. Code Composer does this so that hexadecimal numbers beginning with letters (that is, F800) are not misread as labels. For example, when reading data in hexadecimal format from a data file, the first digit may be truncated.
Look at this input data:
0022
0022
0033
8AC
FC94
13
895
AB9 ...
When reading this data, Code Composer actually reads data as:
0022
0033
08AC
0C94
0003
0095
00B9 ...
But if you test Code Composer IDE with five-digit data input, (by adding zeroes at the beginning where necessary), the output is consistent with the input: