codec engine下使用线性汇编

本文介绍如何在Linux环境中配置CodecEngine以支持DSP线性汇编(.sa)及传统汇编(.asm)文件的编译。通过修改config.bld文件添加特定扩展,使XDC构建系统能够正确处理这些源文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

)如何在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 "<cmd>:<langOpt>" where <cmd> is one of
"asm", "c", "cpp", and <langOpt> 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. 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

听海拉拉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值