When I try building driverlib for MSP430F5659 with TIRTOS 2.16 I get the following error:
C:\ti\tirtos_msp43x_2_16_00_08>..\xdctools_3_32_00_06_core\gmake.exe -f tirtos.mak build-ccs-msp430-driverlib
gmake[1]: Entering directory `c:/ti/tirtos_msp43x_2_16_00_08/products/msp430_driverlib_2_21_00_08a'
gmake[2]: Entering directory `c:/ti/tirtos_msp43x_2_16_00_08/products/msp430_driverlib_2_21_00_08a/driverlib'
"Building for MSP430F5659 for the MSP430F5xx_6xx Family"
gmake[3]: Entering directory `c:/ti/tirtos_msp43x_2_16_00_08/products/msp430_driverlib_2_21_00_08a/driverlib'
"making library directory"
The syntax of the command is incorrect.
gmake[3]: *** [mklib] Error 1
gmake[3]: Leaving directory `c:/ti/tirtos_msp43x_2_16_00_08/products/msp430_driverlib_2_21_00_08a/driverlib'
gmake[2]: *** [MSP430F5659] Error 2
gmake[2]: Leaving directory `c:/ti/tirtos_msp43x_2_16_00_08/products/msp430_driverlib_2_21_00_08a/driverlib'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `c:/ti/tirtos_msp43x_2_16_00_08/products/msp430_driverlib_2_21_00_08a'
gmake: *** [build-ccs-msp430-driverlib] Error 2
Going through e2e, I modified tirtos.mak, and verified the following:
- My system is Windows 7, 64-bit
- The compiler path is valid ti-cgt-msp430_4.4.7 (see below)
- oddly enough, when I run '..\xdctools_3_32_00_06_core\gmake.exe -f tirtos.mak all', no error occurs, but no 'MSP430F5659.lib' is created under C:\ti\tirtos_msp43x_2_16_00_08\products\msp430_driverlib_2_21_00_08a\driverlib\MSP430F5xx_6xx\ccs
- The build fails even for 'MSP430DEVLIST:=MSP430F5529
- There are no whitespaces after makefile lines
- My PATH does not include cywin.exe nor msys.exe
Please advise.
Here is my makefile:
#
# ======== 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 ?= true
TI_INSTALL_DIR ?= $(CCS_COMPILERS_DIR)
ti.targets.msp430.elf.MSP430X ?= $(TI_INSTALL_DIR)/ti-cgt-msp430_4.4.7
ti.targets.arm.elf.M4F ?= $(TI_INSTALL_DIR)/ti-cgt-arm_5.2.7
#
# Enable TI-RTOS to build for IAR.
# Set IAR_BUILD to true and modify path to toolchain.
#
# The IAR_MSP430/ARM_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_MSP430_INSTALL_DIR ?= c:/iar
iar.targets.msp430.MSP430X_small ?= $(IAR_MSP430_INSTALL_DIR)/430
IAR_MSP430HEADERS ?= $(IAR_MSP430_INSTALL_DIR)/430/inc
IAR_ARM_INSTALL_DIR ?= c:/iar
iar.targets.arm.M4F ?= $(IAR_ARM_INSTALL_DIR)/arm
IAR_MSP432HEADERS ?= $(IAR_ARM_INSTALL_DIR)/arm/inc/TexasInstruments
#
# Enable TI-RTOS to build for GCC.
# Set GCC_BUILD to true and modify path to toolchain
#
GCC_BUILD ?= false
GCC_INSTALL_DIR ?= $(CCS_COMPILERS_DIR)
gnu.targets.arm.M4F ?= $(GCC_INSTALL_DIR)/gcc-arm-none-eabi-4_8-2014q3
#
# Enable TI-RTOS to build for MSP430/MSP432 devices.
# Set MSP430_BUILD or MSP432_BUILD to false to skip building TI-RTOS for the
# respective device family.
#
MSP430_BUILD ?= true
MSP432_BUILD ?= false
#
# 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_msp43x_2_16_00_08
TIRTOS_INSTALL_DIR ?= $(DEFAULT_INSTALL_DIR)/$(TIRTOS_INSTALL_VER)
TIDRIVERS_INSTALL_DIR ?= $(TIRTOS_INSTALL_DIR)/products/tidrivers_msp43x_2_16_00_08
BIOS_INSTALL_DIR ?= $(TIRTOS_INSTALL_DIR)/products/bios_6_45_01_29
UIA_INSTALL_DIR ?= $(TIRTOS_INSTALL_DIR)/products/uia_2_00_05_50
MSP430DRIVERLIB_INSTALL_DIR ?= $(TIRTOS_INSTALL_DIR)/products/msp430_driverlib_2_21_00_08a
MSP430GRLIB_INSTALL_DIR ?= $(TIRTOS_INSTALL_DIR)/products/msp430_grlib_2_00_00_17
MSP430USBLIB_INSTALL_DIR ?= $(TIRTOS_INSTALL_DIR)/products/msp430_usblib_5_00_01
MSP432DRIVERLIB_INSTALL_DIR ?= $(TIRTOS_INSTALL_DIR)/products/msp432_driverlib_3_10_00_09
MSP430HEADERS ?= $(DEFAULT_INSTALL_DIR)/ccsv6/ccs_base/msp430/include
MSP432HEADERS ?= $(DEFAULT_INSTALL_DIR)/ccsv6/ccs_base/arm/include
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
#
# To build TI-RTOS driver libraries for other MSP430 devices; simply append the
# device names to MSP430DEVLIST (separated by commas)
# MSP430DEVLIST := MSP430F5529,MSP430F5527,MSP430F6459,etc...
#
MSP430DEVLIST := MSP430F5659
#
# To build TI-RTOS driver libraries for other MSP432 devices; simply append the
# device names to MSP432DEVLIST (separated by commas)
# MSP432DEVLIST := MSP432P401R,etc...
#
MSP432DEVLIST := MSP432P401R
#
# 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) \
MSP430DRIVERLIB=$(MSP430DRIVERLIB_INSTALL_DIR) \
MSP430GRLIB=$(MSP430GRLIB_INSTALL_DIR) \
MSP430USBLIB=$(MSP430USBLIB_INSTALL_DIR) \
MSP432DRIVERLIB=$(MSP432DRIVERLIB_INSTALL_DIR) \
MSP430DEVLIST="$(MSP430DEVLIST)" \
MSP432DEVLIST="$(MSP432DEVLIST)"
ifeq ("$(CCS_BUILD)", "true")
ifeq ("$(MSP430_BUILD)", "true")
XDCARGS += \
ti.targets.msp430.elf.MSP430X=$(ti.targets.msp430.elf.MSP430X) \
MSP430HEADERS=$(MSP430HEADERS)
endif
ifeq ("$(MSP432_BUILD)", "true")
XDCARGS += \
ti.targets.arm.elf.M4F=$(ti.targets.arm.elf.M4F) \
MSP432HEADERS=$(MSP432HEADERS)
endif
endif
ifeq ("$(IAR_BUILD)", "true")
ifeq ("$(MSP430_BUILD)", "true")
XDCARGS += \
iar.targets.msp430.MSP430X_small=$(iar.targets.msp430.MSP430X_small) \
IAR_MSP430HEADERS=$(IAR_MSP430HEADERS)
endif
ifeq ("$(MSP432_BUILD)", "true")
XDCARGS += \
iar.targets.arm.M4F=$(iar.targets.arm.M4F) \
IAR_MSP432HEADERS=$(IAR_MSP432HEADERS)
endif
endif
ifeq ("$(GCC_BUILD)", "true")
XDCARGS += \
gnu.targets.arm.M4F=$(gnu.targets.arm.M4F) \
MSP432HEADERS=$(MSP432HEADERS)
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 ccs-ms430-driverlib Builds MSP430 driverlib CCS libraries
@ echo iar-msp430-driverlib Builds MSP430 driverlib IAR libraries
@ 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 clean-msp430-driverlib Cleans MSP430 driverlib libraries
@ 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
build-ccs-msp430-driverlib:
@ $(MAKE) -C $(MSP430DRIVERLIB_INSTALL_DIR) PARTS='$(MSP430DEVLIST)' \
IPATH='$(MSP430HEADERS)' COMPILER=ccs \
TOOLPATH='$(ti.targets.msp430.elf.MSP430X)'
build-iar-msp430-driverlib:
@ $(MAKE) -C $(MSP430DRIVERLIB_INSTALL_DIR) PARTS='$(MSP430DEVLIST)' \
IPATH='$(IAR_MSP430HEADERS)' COMPILER=iar \
TOOLPATH='$(iar.targets.msp430.MSP430X_small)'
clean-msp430-driverlib:
@ $(MAKE) -C $(MSP430DRIVERLIB_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.msp430.elf.MSP430X)))
$(error Toolchain path must not have spaces, please update the TI_INSTALL_DIR variable.)
endif
ifneq (1, $(words $(iar.targets.msp430.MSP430X_small)))
$(error Toolchain path must not have spaces, please update the IAR_MSP430_INSTALL_DIR variable.)
endif
ifneq (1, $(words $(iar.targets.arm.M4F)))
$(error Toolchain path must not have spaces, please update the IAR_ARM_INSTALL_DIR variable.)
endif
ifneq (1, $(words $(gnu.targets.arm.M4F)))
$(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="MSP430" \
--toolchain="TI" \
--toolchainDir="$(ti.targets.msp430.elf.MSP430X)" \
--deviceFamily="MSP430" \
--output="$(DEST)/$(TIRTOS_INSTALL_VER)_examples/MSP430"
@ $(XS) examples.examplesgen \
--productGroup="MSP430" \
--toolchain="TI" \
--toolchainDir="$(ti.targets.arm.elf.M4F)" \
--deviceFamily="MSP432" \
--output="$(DEST)/$(TIRTOS_INSTALL_VER)_examples/MSP432"
endif
ifeq ("$(IAR_BUILD)", "true")
@ $(XS) examples.examplesgen \
--productGroup="MSP430" \
--toolchain="IAR" \
--toolchainDir="$(iar.targets.msp430.MSP430X_small)" \
--deviceFamily="MSP430" \
--output="$(DEST)/$(TIRTOS_INSTALL_VER)_examples/MSP430"
@ $(XS) examples.examplesgen \
--productGroup="MSP430" \
--toolchain="IAR" \
--toolchainDir="$(iar.targets.arm.M4F)" \
--deviceFamily="MSP432" \
--output="$(DEST)/$(TIRTOS_INSTALL_VER)_examples/MSP432"
endif
ifeq ("$(GCC_BUILD)", "true")
@ $(XS) examples.examplesgen \
--productGroup="MSP430" \
--toolchain="GNU" \
--toolchainDir="$(gnu.targets.arm.M4F)" \
--deviceFamily="MSP432" \
--output="$(DEST)/$(TIRTOS_INSTALL_VER)_examples/MSP432"
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