Datasheet 搜索 > DSP数字信号处理器 > TI(德州仪器) > TMS320C6748BZCE3 数据手册 > TMS320C6748BZCE3 用户编程技术手册 5/13 页


¥ 138.799
TMS320C6748BZCE3 用户编程技术手册 - TI(德州仪器)
制造商:
TI(德州仪器)
分类:
DSP数字信号处理器
封装:
LFBGA-361
描述:
TMS320C6748定点和浮点DSP TMS320C6748 Fixed- and Floating-Point DSP
Pictures:
3D模型
符号图
焊盘图
引脚图
产品图
页面导航:
应用领域在P13
导航目录
TMS320C6748BZCE3数据手册
Page:
of 13 Go
若手册格式错乱,请下载阅览PDF原文件

SPRA177A
Using C to Access Data Stored in Program Memory on the TMS320C54x DSP 5
If you encounter difficulties either loading the project or building the code, it is most likely a path
problem with your Code Composer Studio setup. A pre-built executable file
.\example\Debug\example.out has been provided which should produce the above Stdout
window when run on a VC5416 DSP. Use the File->Load Program menu command in Code
Composer Studio to directly load this executable file.
Here is what the function main() does. First, it reads string1 and string2 using the
PFUNC_strRead() function, and prints them to the Stdout window. Next, it overwrites string1
with the string2 using PFUNC_strWrite(), and then reads string1 back and prints it to Stdout. It
next reads string3 using the PFUNC_blkRead() function, and overwrites string2 with string3
using PFUNC_blkWrite(). Note that the terminating null character of a string is included in the
block length. Finally, main() reads the first 16-bit word in string1 using PFUNC_wordRead(),
and then overwrites this word in string1 with the value "5." The first word in string1 originally had
the value "115," which is the numerical value of the ASCII character 's', the first letter in the word
'string.'
Note that the string tmp_string must be declared of sufficient length to hold the copied program
memory strings. The PFUNC functions do not cross-check source and destination lengths, and
will overwrite other data if the destination length is smaller than the source string length or block
size.
Constructing the Program Memory Data Values
The program memory data values are best constructed using assembly language. The file
table.asm shows an example of how to do this. This particular example shows three strings
which are to be stored in program memory. If non-string data is desired (i.e. 16-bit words),
simply use the .int directive in place of the .char directive when declaring the data. The .sect
directive places this data in the initialized section called "table". The "table" section is linked to
program memory in the linker command file vc5416.cmd. The .def directive allows the named
labels to be accessed by code in other source files.
Note that the terminating zero has been manually added to the strings, since termination of
strings by a trailing zero (null character) is a C-language convention. The assembler does not
automatically add the zero. If non-string data is being stored in program memory, the
terminating zero is not needed.
References
1. TMS320C54x Optimizing C Compiler User's Guide (SPRU103)
2. TMS320C54x DSP Mnemonic Instruction Set (SPRU172)
器件 Datasheet 文档搜索
AiEMA 数据库涵盖高达 72,405,303 个元件的数据手册,每天更新 5,000 多个 PDF 文件