MSP430FR6047: 如何移植TI-RTOS

Part Number: MSP430FR6047
Other Parts Discussed in Thread: MSP430FR6989, MSP430FR5994, MSP430FR5969, MSP430F5529

我看官方的手册说rtos不支持mspfr6047,但是目前项目很需要使用操作系统,所以尝试移植了一下。
根据rtos手册8.2章节,在tirtos.mak中添加了MSP430FR6047的支持:MSP430DEVLIST := MSP430F5529,MSP430FR5969,MSP430FR5994,MSP430FR6989,MSP430FR6047,rebuilding后使用CCS导入FR6989的工程,将设备类型改为MSP430FR6047,在编译时有如下报错:error: ti.catalog.msp430.MSP430: "C:/ti/tirtos_msp43x_2_20_00_06/products/bios_6_46_00_23/packages/ti/catalog/msp430/MSP430.xs", line 7756: ti.catalog.msp430.MSP430 : Device MSP430FR6047 is not supported。请问TI的专家我该如何修改

  • 您好

    已经收到了您的案例,调查需要些时间,感谢您的耐心等待

  • 您好,

    Device MSP430FR6047 is not supported

    对于不支持的器件,请参考TI-RTOS 2.20 User's Guide "Rebuilding MSPWare's driverlib for TI-RTOS and its Drivers" 内容。

    从示例中看,型号间没有逗号,您重新确认一下格式。

  • 您好,我一开始是按照手册中说的每个型号用空格隔开,但是编译的时候会报错。tirtos_msp43x_2_20_00_06中自带的tirtos.mak本身也是用逗号隔开的,而且上方有用逗号隔开的注释,我使用这种方式是可以成功rebuild的,但是在编译工程时会报我上面提到的错误。

  • 您好,      

    我使用这种方式是可以成功rebuild的

    那么您看到重新生成的lib文件了吗?

    Creating-TI_2D00_RTOS-Projects-for-Other-MSP430-Devices-_2D00_-Texas-Instruments-Wiki.pdf

  • 我并没有生成fr6047的lib文件

  • 补充一下我的编译日志和tirtos.mak
    编译.txt

    #
    #  ======== 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)/ccs930/ccs/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_16.9.11.LTS
    ti.targets.arm.elf.M4F        ?= $(TI_INSTALL_DIR)/ti-cgt-arm_15.12.1.LTS
    
    #
    # 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_9-2015q3
    
    #
    # 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)/ccs930/ccs/eclipse/jre
    
    #TIRTOS_INSTALL_VER          ?= tirtos_msp43x_2_20_00_06
    TIRTOS_INSTALL_DIR          ?= $(DEFAULT_INSTALL_DIR)/tirtos_msp43x_2_20_00_06
    TIDRIVERS_INSTALL_DIR       ?= $(TIRTOS_INSTALL_DIR)/products/tidrivers_msp43x_2_20_00_08
    BIOS_INSTALL_DIR            ?= $(TIRTOS_INSTALL_DIR)/products/bios_6_46_00_23
    UIA_INSTALL_DIR             ?= $(TIRTOS_INSTALL_DIR)/products/uia_2_00_06_52
    
    MSP430DRIVERLIB_INSTALL_DIR ?= $(TIRTOS_INSTALL_DIR)/products/msp430_driverlib_2_70_01_01a
    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_21_00_05
    
    MSP430HEADERS               ?= $(DEFAULT_INSTALL_DIR)/ccs930/ccs/ccs_base/msp430/include
    MSP432HEADERS               ?= $(DEFAULT_INSTALL_DIR)/ccs930/ccs/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 := MSP430F5529,MSP430FR5969,MSP430FR5994,MSP430FR6989,MSP430FR6047
    
    #
    # 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:
    #     http://rtsc.eclipse.org/docs-tip/Command_-_xdc#Environment_Variables
    #
    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)" \
    	MSP430DRIVERLIB_INCLUDE=$(MSP430DRIVERLIB_INSTALL_DIR)/driverlib/MSP430F5xx_6xx
    
    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   build-ccs-msp430-driverlib   Builds MSP430 driverlib CCS libraries
    	@ echo   build-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)/examples/MSP430"
    
    	@ $(XS) examples.examplesgen \
    	    --productGroup="MSP430" \
    	    --toolchain="TI" \
    	    --toolchainDir="$(ti.targets.arm.elf.M4F)" \
    	    --deviceFamily="MSP432" \
    	    --output="$(DEST)/examples/MSP432"
    endif
    
    ifeq ("$(IAR_BUILD)", "true")
    	@ $(XS) examples.examplesgen \
    	    --productGroup="MSP430" \
    	    --toolchain="IAR" \
    	    --toolchainDir="$(iar.targets.msp430.MSP430X_small)" \
    	    --deviceFamily="MSP430" \
    	    --output="$(DEST)/examples/MSP430"
    
    	@ $(XS) examples.examplesgen \
    	    --productGroup="MSP430" \
    	    --toolchain="IAR" \
    	    --toolchainDir="$(iar.targets.arm.M4F)" \
    	    --deviceFamily="MSP432" \
    	    --output="$(DEST)/examples/MSP432"
    endif
    
    ifeq ("$(GCC_BUILD)", "true")
    	@ $(XS) examples.examplesgen \
    	    --productGroup="MSP430" \
    	    --toolchain="GNU" \
    	    --toolchainDir="$(gnu.targets.arm.M4F)" \
    	    --deviceFamily="MSP432" \
    	    --output="$(DEST)/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
    

  • 您好,

         请参考C:/ti/tirtos_msp43x_2_20_00_06/docs/Getting_Started_Guide_msp43x.pdf  “1.5 What Boards and Devices Have TI-RTOS Driver Examples”

         

    For MSP43x devices, TI-RTOS drivers are prebuilt only for MSP430F5529, MSP430FR5969, and
    MSP432P401R devices. TI-RTOS drivers for other MSP43x devices must be added into the TI-RTOS
    build system. See "Rebuilding MSPWare's driverlib for TI-RTOS and its Drivers" in the TI-RTOS User’s
    Guide (SPRUHD4) for details. 

  • 您好,我是根据上述手册进行rebuild的,但是编译过程中没有报错,最终也没有生成msp430fr6047.lib文件,编译日志和tirtos.mak文件我已上传,能否帮我查看一下原因

  • 您好,

        对于FR6047的USS应用程序,时序要求非常高,TI-RTOS无法支持USS应用程序的高时序要求,因此不建议将USS应用程序与任何RTOS结合使用。 

       您为什么必须选择在TI-RTOS上使用FR6047?

       此外,如果需要有关FR6047与TI-RTOS的进一步帮助,请提供公司邮箱,公司名称及项目相关信息。

        FR6047所有支持资源都包含在安装包中:C:\ti\tirtos_msp43x_2_20_00_06