)如何在Linux环境下编DSP的汇编或线性汇编程序?在Codec Engine安装路径下/packages/config.bld文件里var C64P = xdc.useModule(‘ti.targets.C64P’);
之后添加:
C64P.extensions[“.sa”] = {
suf: “.sa”, typ: “asm:-fl”
}
或
C64P.extensions[“.asm”] = {
suf: “.asm”, typ: “asm:-fa”
}
-------------------------------------------------------------------------------------------------
Ben,
You can add your own extensions to the XDC build system that direct how
a source file is transformed into object code. This is done by adding
code to the config.bld script. (The doc section describing this is
pasted below.) Here's an example:
linear assembly file extension: .sa (choose whatever you like)
config.bld snippet:
var C64P = xdc.useModule('ti.targets.C64P');
C64P.extensions[".sa"] = {
suf: ".sa", typ: "asm:-fl"
};
package.bld fragment:
var exe = Pkg.addExecutable("argstest", target, target.platform,
{profile : "debug"})
exe.addObjects(['argstest.c', 'linasm.sa']);
Documentation from ti.targets.Itarget:
//! File extensions recognized by TI targets
override config xdc.bld.ITarget.Extension extensions[string] = ..
ITarget.extensions
XDC
specified in xdc.bld.ITarget
DETAILS
This is a user modifiable table used to customize file extensions
recognized by each target.
For example, to add a new assembly language extension, say ".s64", to
the target ti.targets.C64P, add the following lines to the build model
startup script:
var C64P = xdc.module('ti.targets.C64P');
C64P.extensions[".s64"] = {
suf: ".s64", typ: "asm"
};
Note that individual targets may add additional language types.
TI_SPECIFICS
For TI targets, the typ string field of an xdc.bld.ITarget.Extension
structure may be of the form ":" where is one of
"asm", "c", "cpp", and is the language option to used to
identify the source language of a source file. This allows one to
explicitly control the language flag passed to the compiler based on a
source file's extension; in particular, one can define separate source
extensions for "linear" and "scheduled" assembly files, or simply cause
".s62" files to be treated as "linear" assembly rather than "scheduled"
assembly.
For example,
tiTargets.C62.extensions[".s62"] = {suf: ".s62", typ:
"asm:-fl"};
causes all ".s62" files to be treated as linear assembly.
If no ':' appears in the typ string, a default will be used: "-fa" for
"asm" files "-fc" for "c" files, and "-fp" for "cpp" files.