This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
CCS中导出的dat文件用记事本打开后头文件是这样:1651 9 40000 1 2710 2 数据保存的方式是16-unsigned,这个是什么意思呢 特别是9和2
9是一个新的数据格式,2是数据长度。
关于这个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—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:
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:
When reading this data, Code Composer actually reads data as:
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: