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.

Can't build TI_RTOS

Other Parts Discussed in Thread: MSP430F149, MSP430DRIVERLIB, MSP430F5529, MSP430F6459, MSP430F5527, MSP430FR6989, MSP430FR5969

Hello

I installed „tirtos_msp43x_setupwin32_2_16_00_08“ on WIN10, directory C:\ti. While trying to rebuild TI-RTOS for MSP430F149 I followed instructions from „TI-RTOS 2.16 User’s Guide, 8.1.1 Building TI-RTOS for CCS“.

I tried commands as advised, but:

C:\>cd\ti

C:\ti>% cd <tirtos_install>

DNS server failure.

C:\ti>% ../<xdctools>/gmake -f tirtos.mak all

Access is denied.

Can someone help me?

 

Regards,

Marjan

  • Hi Marjan,

    One thing you can try is to check the security permissions on gmake to make sure that your user account has execute permissions and make sure that you have read and write permissions on your TIRTOS install directory. If those are fine, make sure you are in your TIRTOS install directory before running gmake.

    For example, If you are using the default names:
    C:\> cd ti
    C:\ti> cd tirtos_msp43x_2_16_00_08
    C:\ti\tirtos_msp43x_2_16_00_08> ../xdctools_3_31_01_33_core/gmake -f tirtos.mak all

    Gilbert
  • Hi Gilbert,

    Thank you for your help. I forgot to omit "<" and ">" characters: I'm lacking SW know-how, period. Will try to better myself. But there is still a problem:

    C:\ti\tirtos_msp43x_2_16_00_08> ../xdctools_3_31_01_33_core/gmake -f tirtos.mak all
    DNS server not authoritative for zone.

    Is this all about my user account (administrator rights) execute permissions and read and write permissions on my TIRTOS install directory? Even via administrator account I can't change write permissions. I need to find a way to allow writing to files.

    Regards

    Marjan

  • Can you confirm for me that you are using the Windows command prompt and not an alternative terminal application like cygwin or mingw?

    Also, when running commands on command prompt, you should use "\" instead of "/" or else it won't run. I apologize that I made a typo when writing out my example and that may have thrown you off.
    For example:
    C:\ti\tirtos_msp43x_2_16_00_08> ..\xdctools_3_31_01_33_core\gmake -f tirtos.mak all
  • Hi Gilbert

    Thank you very much for your time and straightforward advice. 

    I needed to edit tirtos.mak with command prompt editor to insert my stuff; Building TI-RTOS runs when commands are correctly written.

    C:\ti\tirtos_msp43x_2_16_00_08>..\xdctools_3_31_01_33_core\gmake -f tirtos.mak

    Builds everything correctly, but there are problems with

    C:\ti\tirtos_msp43x_2_16_00_08>..\xdctools_3_31_01_33_core\gmake -f tirtos.mak all

    building bios ...

    The system cannot find the path specified.

    gmake: *** [bios] Error 1

    Do yo have any hints?

    Best regards

    Marjan

    PS: And now I'm at the beginning;

  • If you open up your tirtos.mak for editing, what is your BIOS_INSTALL_DIR set to? Can you confirm for me that there exists an installation of BIOS in C:\ti\tirtos_msp43x_2_16_00_08\products? It may help to post your tirtos.mak file.

    Gilbert
  • Hi Gilbert,

    I believe tirtos.mak BIOS_INSTALL_DIR is OK.

    And this is my file:

    #
    #  ======== 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.5
    ti.targets.arm.elf.M4F        ?= $(TI_INSTALL_DIR)/ti-cgt-arm_5.2.5

    #
    # 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 ?= true

    #
    # 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 := MSP430F5529,MSP430FR5969,MSP430FR6989,MSP430F149
    #
    # 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

    I've  already corrected:

    CCS_BUILD                     ?= true
    TI_INSTALL_DIR                ?= $(CCS_COMPILERS_DIR)
    ti.targets.msp430.elf.MSP430X ?= $(TI_INSTALL_DIR)/ti-cgt-msp430_4.4.5          (from msp430_4.4.3)
    ti.targets.arm.elf.M4F        ?= $(TI_INSTALL_DIR)/ti-cgt-arm_5.2.5                             (from arm_5.2.2)

    Best regards

    Marjan

  • You are seeing the build fail because you are using an unsupported MSP430 device, as indicated by the error messages shown below:

    You would probably need to edit the msp43xOptions.xs to get it to work, but I would not recommend it, as the recommend device memory configuration for SYS/BIOS is 8KB or more of RAM while the MSP430F149 only has 2KB.

    It would be easier to get one of our supported MCU's such as MSP430F5529, MSP430FR5969, or MSP430FR6989 as they have been tried and tested.

  • Hi Gilbert

    Thank you for your time and advice. I'll try with one of suggested MSP's.

    Best regards

    Marjan

  • Hi Marjan,

    Thank you for being understanding. If you have any further questions, you are welcome to open up a new thread. For now, it would be appreciated if you could mark this thread as answered.

    Thanks,
    Gilbert