RTSC以及XDCtools介绍与应用



RTSC(RTSC, pronounced "rit-see")是一个基于C的编程模型,用于开发创建或实施嵌入式平台实时软件组件。XDCtools包含使用RTSC的工具和运行时组件。

网站:http://rtsc.eclipse.org/docs-tip/Main_Page

XDC(eXpress DSP Components)是一个为嵌入式实时系统提供可重用组件(称作:包)的标准。

XDC includes tools and standards forAPI development, static configuration, and packaging.

RTSC用户被分成"consumers" and "producers." Consumers integrate target content packages—DSP algorithms,device drivers, TCP/IP stacks, real-time OSes, and so on—into their ownapplications. Producers create the packages used by consumers.

Command line:

XDCtools仅有两个核心命令:

Command - xdc

eXpanDed C package build command

Command - xs

XDCscript interpreter

xdc - which is used to produce packages, and

xs - which is used to run commands delivered in packages.

Use:

可以使用如下命令打开CDOC参考帮助文档

xs xdc.tools.cdoc.sg

另外提供一些其他的实用库

Each of the commands shown in the tablebelow is run using the xs utility above.

 

Command - xdc.tools.cdoc   Package documentation tool

Command - xdc.tools.cdoc.sg      Interactive package documentation tool(交互式包文档工具)

Command - xdc.tools.check Repository compatibility check tool(库兼容性检测)

Command - xdc.tools.closure       Closure tool

Command - xdc.tools.configuro  Target content configuration tool(目标配置工具)

Command - xdc.tools.path   Package path display tool

Command - xdc.tools.path.sg       Interactive Package Path browser tool

Command - xdc.tools.repoman    Repository management tool

Command - xdc.tools.repoman.sg       Interactive repository management tool

 

所有使用RTSC包的程序都需要一个configuration文件,这个文件声明被使用的包,并被xdc.tools.configuro读取,来生成静态C数据结构,这是连接成程序所必须的。

Configuration文件采用JavaScript语法,关于更多可参考

http://rtsc.eclipse.org/docs-tip/The_XDCscript_Language

配置脚本(configuration scripts.cfg的文件)列出程序所需组件,RTSC配置框架使用这些脚本生成构建程序所必须的文件,如下图:

 

示例:

一个“hello world c程序

hello.c 
 

#include<xdc/std.h>

#include<xdc/runtime/System.h>

 

int main() {

   System_printf("Hello World!\n");

   return (0);

}

第一个#include是所有使用RTSCC程序必须的,定义基本类型

第二个#include使C代码可以使用 xdc.runtime.System module提供的System_printf() function

配置文件如下

hello.cfg 
var System =xdc.useModule("xdc.runtime.System");

注意:如果没有使用xdc.runtime.System包里的函数的话,包含此包会引起连接错误。

在编译之前你还要制定目标和平台

  • target identifies a specific compiler and anISA and runtime model supported by the compiler. For example, the TI C6000compiler for the C64+ ISA running in big endian mode.

  • platform identifies the hardware executionenvironment as seen by your application. For example, a DM6446 EVM with 64 MBof DDR2 external memory.

    下图展示了xdc命令的格式

xs xdc.tools.configuro -t ti.targets.C64 -p ti.platforms.evmDM642 –c /home/DVRRDK_03.00.00.00/ti_tools/xdc/xdctools_3_23_03_53/ hello.cfg

上述命令将会产生2个输出文件:hello/compiler.opthello/linker.cmdhello/linker.cmd还有其他文件

  • this linker command file names all libraries that must be passed to thelinker to link your application

  • hello/compiler.opt

  • this text file contains compiler options required to build C source thatreference values defined byhello.cfg

由于编译和链接过程依赖于所使用的工具链,下面介绍如何在C/C++编译和链接的过程中使用comlier.optlinker.cmd

gmake all" and to build and run the application type"gmake test". When you run "gmake test", the last linedisplayed is the output of the application:

 

Hello World!

The following example makefile illustrates how tointegrate RTSC configuration with the TI Code Gen Tools compiler and linker.The makefile runs configuro and uses the compiler.opt and linker.cmd files generated by configuro as part of the compile and link steps.

CGTOOLS = C:/CCStudio_v3.3/C6000/cgtools
CC = $(CGTOOLS)/bin/cl6x
LNK = $(CGTOOLS)/bin/lnk6x
RTS = $(CGTOOLS)/lib/rts6400.lib
CONFIG = hello
XDCTARGET = ti.targets.C64
XDCPLATFORM = ti.platforms.sim6xxx:TMS320C6416
 
.PRECIOUS: %/compiler.opt %/linker.cmd
 
%/compiler.opt: %/linker.cmd ;
%/linker.cmd : %.cfg
        xs xdc.tools.configuro -c $(CGTOOLS) -t $(XDCTARGET) -p $(XDCPLATFORM) $<
 
%.obj : %.c $(CONFIG)/compiler.opt
        $(CC) -@$(CONFIG)/compiler.opt -c $<
 
hello.out : hello.obj $(CONFIG)/linker.cmd
        $(LNK) -o hello.out -c hello.obj $(CONFIG)/linker.cmd $(RTS)
 
test: hello.out
        @$(CGTOOLS)/bin/load6x $<

 

  • 1
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
CC1310 XDCTools是用于CC1310芯片的软件开发工具。根据引用的建议,您可以访问官方网站下载较老版本的XDCTools,然后按照指示进行安装。通常情况下,TI的软件安装目录会在ti文件夹内,您可以将XDCTools安装到该文件夹中以便统一查找。 然而,引用提到,使用较新版本的XDCTools可能与CC1310所支持的TI_RTOS版本不兼容。因此,在安装XDCTools时,您需要注意选择与CC1310所支持的TI_RTOS版本兼容的版本。 具体的安装步骤和下载链接可能因为时间和版本的不同而有所变化,请您参考TI官方提供的文档和下载页面获得最新的安装指南和下载链接。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [CC3200 调试记录——XDCtools版本导致的编译不过](https://blog.csdn.net/u011770970/article/details/105837867)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *3* [RTSC以及XDCtools介绍应用](https://blog.csdn.net/guo8113/article/details/23841299)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值