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.

[参考译文] 针对 GCC 问题构建 ti rtos (tirtos_cc13xx_cc26xx) makefile (错过 simplelink)

Guru**** 2589265 points
Other Parts Discussed in Thread: CC2650

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1007504/build-ti-rtos-tirtos_cc13xx_cc26xx-makefiles-for-gcc-issue-miss-simplelink

Thread 中讨论的其他器件:CC2650

大家好,

如何针对 GCC 问题生成 ti rtos (tirtos_cc13xx_cc26xx) makefile (丢失 ti.platforms.simplelink),redirect 分配软件包?

1.在我的环境中

C:\ti\xdctools_3_32_00_06_core>gmake -f C:\ti_tirtos_cc13xx_cc26xx_2_21_01_08\tirtos.示 例 mak gen="c:\temp"
在 c:\temp...中生成示例
秘书长的报告
请参阅 TI-RTOS 中的"TI-RTOS 示例"部分
"入门指南"、了解有关如何构建和加载示例的详细信息
IAR 工作平台和 CCS 中。

C:\temp\examples\GNU\CC2650_LAUNCHXL\empty>make
正在运行 Configuro...
JS:"c:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/Cmdr.xs、第51行:错误:xdc.tools.configuro:错误:找不到平台包'ti.platforms.simplelink'。 TI 平台不再作为 XDCtools (c:\ti\xdctools_3_32_00_06_core)的一部分提供。 请确保您使用的是3.30之前版本的 XDCtools、或者您添加了一个包含您的平台支持的产品、路径为"C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/packages;C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/tidrivers_cc13xx_cc26xx_2_21_01_01/packages;C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/bios_6_46_01_38/packages;C:/ti/tirtos_cc13xx_cc26xx_2_21_01_08/products/uia_2_01_00_01/packages;c:\ti\xdctools_3_32_00_06_core/packages。 检查此路径是否为包含必要平台支持的目录命名,以及平台名称是否拼写正确。
make:***[makefile:53:empty/linker.cmd]错误1.

2.

可以使用 gcc 来构建 cc13xx /ccc26xx 项目。

软件版本:

RTOS:

tirtos_cc13xx_cc26xx_2_21_01_08

simplelink:

BLE_SDK_2_02_05_02

CCS:

CCS v6.1.3

tirtos.mak

#
#  ======== tirtos.mak ========
#

#
# Set location of various cgtools
#
# These variables can be set here or on the command line.  Paths must not
# have spaces.  If using a Windows PC, the following can be used to determine
# a directory's DOS path (path without spaces):
#
#   1.  Open a command prompt.
#   2.  Navigate (cd) into the directory.
#   2.  Enter the following command:
#         > for %I in (".") do echo %~sI
#
#  The steps above should provide you with a path similar to the following:
#     Original Path:  c:\Program Files (x86)\IAR Systems\Embedded Workbench 7.2
#     DOS Path:       c:\PROGRA~2\IARSYS~1\EMBEDD~1.2
#
#  The final step is to replace all backslashes '\' in the path with forward
#  slashes '/'.
#     Correct Path:    c:/PROGRA~2/IARSYS~1/EMBEDD~1.2
#
DEFAULT_INSTALL_DIR      ?= c:/ti
CCS_COMPILERS_DIR        ?= $(DEFAULT_INSTALL_DIR)/ccsv6/tools/compiler

#
# Enable TI-RTOS to build for CCS.
# Set CCS_BUILD to true and modify path to toolchain
#
CCS_BUILD ?= false
TI_INSTALL_DIR           ?= $(CCS_COMPILERS_DIR)
ti.targets.arm.elf.M3    ?= $(TI_INSTALL_DIR)/gcc-arm-none-eabi-4_9-2015q3

#
# Enable TI-RTOS to build for IAR.
# Set IAR_BUILD to true and modify path to toolchain.
#
# The IAR_INSTALL_DIR must be set to point to the
# "Embedded Workbench x.y" directory in IAR Workbench.  This path MUST NOT
# contain spaces.  If using a Windows PC, see the comments above for steps to
# get the DOS path for a directory.
#
IAR_BUILD ?= false
IAR_INSTALL_DIR          ?= c:/iar
iar.targets.arm.M3       ?= $(IAR_INSTALL_DIR)/arm

#
# Enable TI-RTOS to build for GCC.
# Set GCC_BUILD to true and modify path to toolchain
#
GCC_BUILD ?= true
GCC_INSTALL_DIR          ?= $(CCS_COMPILERS_DIR)
gnu.targets.arm.M3       ?= $(GCC_INSTALL_DIR)/gcc-arm-none-eabi-6-2017-q1-update

#
# TI-RTOS and XDCTools settings
#
XDCTOOLS_INSTALL_DIR        ?= $(DEFAULT_INSTALL_DIR)/xdctools_3_32_00_06_core
export XDCTOOLS_JAVA_HOME   ?= $(DEFAULT_INSTALL_DIR)/ccsv6/eclipse/jre

TIRTOS_INSTALL_VER          ?= tirtos_cc13xx_cc26xx_2_21_01_08
TIRTOS_INSTALL_DIR          ?= $(DEFAULT_INSTALL_DIR)/$(TIRTOS_INSTALL_VER)
TIDRIVERS_INSTALL_DIR       ?= $(TIRTOS_INSTALL_DIR)/products/tidrivers_cc13xx_cc26xx_2_21_01_01
BIOS_INSTALL_DIR            ?= $(TIRTOS_INSTALL_DIR)/products/bios_6_46_01_38
UIA_INSTALL_DIR             ?= $(TIRTOS_INSTALL_DIR)/products/uia_2_01_00_01
CC13XXWARE_INSTALL_DIR      ?= $(TIRTOS_INSTALL_DIR)/products/cc13xxware_2_04_03_17272
CC26XXWARE_INSTALL_DIR      ?= $(TIRTOS_INSTALL_DIR)/products/cc26xxware_2_24_03_17272

TIRTOS_PACKAGES_DIR         ?= $(TIRTOS_INSTALL_DIR)/packages
TIDRIVERS_PACKAGES_DIR      ?= $(TIDRIVERS_INSTALL_DIR)/packages
BIOS_PACKAGES_DIR           ?= $(BIOS_INSTALL_DIR)/packages
UIA_PACKAGES_DIR            ?= $(UIA_INSTALL_DIR)/packages

#
# Set XDCARGS to some of the variables above.  XDCARGS are passed
# to the XDC build engine... which will load tirtos.bld... which will
# extract these variables and use them to determine what to build and which
# toolchains to use.
#
# Note that not all of these variables need to be set to something valid.
# Unfortunately, since these vars are unconditionally assigned, your build line
# will be longer and more noisy than necessary (e.g., it will include CC_V5T
# assignment even if you're just building for C64P).
#
# Some background is here:
#     rtsc.eclipse.org/.../Command_-_xdc
#
XDCARGS= \
	profile=release \
	XDCTOOLS=$(XDCTOOLS_INSTALL_DIR) \
	TIRTOS=$(TIRTOS_INSTALL_DIR) \
	TIDRIVERS=$(TIDRIVERS_INSTALL_DIR) \
	BIOS=$(BIOS_INSTALL_DIR) \
	UIA=$(UIA_INSTALL_DIR) \
	CC13XXWARE=$(CC13XXWARE_INSTALL_DIR) \
	CC26XXWARE=$(CC26XXWARE_INSTALL_DIR)

ifeq ("$(CCS_BUILD)", "true")
XDCARGS += \
	ti.targets.arm.elf.M3=$(ti.targets.arm.elf.M3)
endif
ifeq ("$(IAR_BUILD)", "true")
XDCARGS += \
	iar.targets.arm.M3=$(iar.targets.arm.M3)
endif
ifeq ("$(GCC_BUILD)", "true")
XDCARGS += \
	gnu.targets.arm.M3=$(gnu.targets.arm.M3)
endif
export XDCARGS

#
# Set XDCPATH to contain necessary repositories.
#
XDCPATH = $(TIRTOS_PACKAGES_DIR);$(TIDRIVERS_PACKAGES_DIR);$(BIOS_PACKAGES_DIR);$(UIA_PACKAGES_DIR);
export XDCPATH

#
# Set XDCOPTIONS.  Use -v for a verbose build.
#
#XDCOPTIONS=v
export XDCOPTIONS

#
# Set XDC executable command
# Note that XDCBUILDCFG points to the tirtos.bld file which uses
# the arguments specified by XDCARGS
#
XDC = $(XDCTOOLS_INSTALL_DIR)/xdc XDCARGS="$(XDCARGS)" XDCBUILDCFG=./tirtos.bld
XS = $(XDCTOOLS_INSTALL_DIR)/xs

#######################################################
## Shouldn't have to modify anything below this line ##
#######################################################

help:
	@ echo Makefile to build components within TI-RTOS
	@ echo   goal              description
	@ echo  -----------------------------------------------------------------------------
	@ echo   all               Builds SYS/BIOS, UIA, and TI-RTOS drivers
	@ echo   drivers           Builds TI-RTOS drivers and other components in /packages
	@ echo   bios              Builds SYS/BIOS
	@ echo   uia               Builds UIA
	@ echo   clean             Cleans SYS/BIOS, UIA, and TI-RTOS drivers
	@ echo   clean-drivers     Cleans TI-RTOS drivers and other components in /packages
	@ echo   clean-bios        Cleans SYS/BIOS
	@ echo   clean-uia         Cleans UIA
	@ echo   examplesgen       Generates TI-RTOS examples and makefiles
	@ echo   help              Displays this description

all: bios uia drivers product

clean: clean-uia clean-drivers clean-bios clean-product

product:
	@ echo building tirtos packages ...
	@ $(XDC) -Pr ./packages

clean-product:
	@ echo cleaning tirtos packages ...
	@ $(XDC) clean -Pr ./packages

drivers:
	@ echo building tirtos drivers...
	@ $(XDCTOOLS_INSTALL_DIR)/gmake -f $(TIDRIVERS_INSTALL_DIR)/drivers.mak \
	  XDC_INSTALL_DIR=$(XDCTOOLS_INSTALL_DIR) \
	  BIOS_INSTALL_DIR=$(BIOS_INSTALL_DIR) \
	  $(XDCARGS) -C $(TIDRIVERS_INSTALL_DIR)

clean-drivers:
	@ echo cleaning tirtos drivers...
	@ $(XDCTOOLS_INSTALL_DIR)/gmake -f $(TIDRIVERS_INSTALL_DIR)/drivers.mak \
	  XDC_INSTALL_DIR=$(XDCTOOLS_INSTALL_DIR) \
	  BIOS_INSTALL_DIR=$(BIOS_INSTALL_DIR) \
	  $(XDCARGS) -C $(TIDRIVERS_INSTALL_DIR) clean

bios:
	@ echo building bios ...
	@ $(XDCTOOLS_INSTALL_DIR)/gmake -f $(BIOS_INSTALL_DIR)/bios.mak \
	  XDC_INSTALL_DIR=$(XDCTOOLS_INSTALL_DIR) \
	  BIOS_SMPENABLED=0 \
	  $(XDCARGS) -C $(BIOS_INSTALL_DIR)

clean-bios:
	@ echo cleaning bios ...
	@ $(XDCTOOLS_INSTALL_DIR)/gmake -f $(BIOS_INSTALL_DIR)/bios.mak \
	  XDC_INSTALL_DIR=$(XDCTOOLS_INSTALL_DIR) \
	  BIOS_SMPENABLED=0 \
	  -C $(BIOS_INSTALL_DIR) clean

uia:
	@ echo building uia ...
	@ $(XDCTOOLS_INSTALL_DIR)/gmake -f $(UIA_INSTALL_DIR)/uia.mak \
	  XDC_INSTALL_DIR=$(XDCTOOLS_INSTALL_DIR) \
	  BIOS_INSTALL_DIR=$(BIOS_INSTALL_DIR) \
	  $(XDCARGS) -C $(UIA_INSTALL_DIR)

clean-uia:
	@ echo cleaning uia ...
	@ $(XDCTOOLS_INSTALL_DIR)/gmake -f $(UIA_INSTALL_DIR)/uia.mak \
	  XDC_INSTALL_DIR=$(XDCTOOLS_INSTALL_DIR) \
	  BIOS_INSTALL_DIR=$(BIOS_INSTALL_DIR) \
	  -C $(UIA_INSTALL_DIR) clean

validate-paths:
ifneq (1, $(words $(ti.targets.arm.elf.M3)))
	$(error Toolchain path must not have spaces, please update the TI_INSTALL_DIR variable.)
endif

ifneq (1, $(words $(iar.targets.arm.M3)))
	$(error Toolchain path must not have spaces, please update the IAR_INSTALL_DIR variable.)
endif

ifneq (1, $(words $(gnu.targets.arm.M3)))
	$(error Toolchain path must not have spaces, please update the GCC_INSTALL_DIR variable.)
endif

examplesgen: validate-paths
ifneq ("$(DEST)","")
	@ echo generating examples in $(DEST) ...
ifeq ("$(CCS_BUILD)", "true")
	@ $(XS) examples.examplesgen \
	    --productGroup="CC13XX_CC26XX" \
	    --toolchain="TI" \
	    --toolchainDir="$(ti.targets.arm.elf.M3)" \
	    --output="$(DEST)/examples"
endif

ifeq ("$(IAR_BUILD)", "true")
	@ $(XS) examples.examplesgen \
	    --productGroup="CC13XX_CC26XX" \
	    --toolchain="IAR" \
	    --toolchainDir="$(iar.targets.arm.M3)" \
	    --output="$(DEST)/examples"
endif

ifeq ("$(GCC_BUILD)", "true")
	@ $(XS) examples.examplesgen \
	    --productGroup="CC13XX_CC26XX" \
	    --toolchain="GNU" \
	    --toolchainDir="$(gnu.targets.arm.M3)" \
	    --output="$(DEST)/examples"
endif

	@ echo ***********************************************************
	@ echo Please refer to "Examples for TI-RTOS" section in the TI-RTOS
	@ echo "Getting Started Guide" for details on how to build and load the examples
	@ echo into IAR WorkBench and CCS.
else
	@ echo Specify destination path like this: DEST="YOURPATH". Use UNIX style path "C:/examples"
endif

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    我看到您修改了 tirtos.mak 以使用 GCC 构建。 此故障可能是由于我们不支持具有 BLE 协议栈的 GCC、因此在这种情况下、我的操作非常有限。 抱歉。

    此致、

    拉斐尔

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Desouza、

    是否有其它 ti 平台(进程、微控制器)支持?

    Tiva 似乎具有有限的支持