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.

Running TI-RTOS on IAR Embedded Workbench (6.10.3)

Other Parts Discussed in Thread: MSP430F5529, MSP430WARE

All:

Using instructions in SPRUHD3G "TI RTOS 1.21 Getting Started Guide" I have been able to make some progress on using TI-RTOS with F5529. However, I have some feedback and a question.

1. It would seem that TI could provide a workspace and project files for the examples. I have had to create both to get a relatively simple example to get going.

2. The tirtos and xdc support files needed to be copied into the c:\ti directory for "Configure Custom Argument Variables" of section 3.3.2 of the Getting Started Guide. If not, I was unable to make progress.

3. I needed to physically point to the xdc\include directory in the c:\ti directory. This took a little bit of time to even find. [C:\ti\xdctools_3_30_01_25_core\packages\xdc\platform\package ]

4. Once I did this, I was not able to see the nice list of TI examples showni in the figure of section 3.3.3, step 9 - instead, I had to physcially port the files needed. (I am using the GPIO example first.)

5. Under the options for "IARdemo" (section 3.3.3 step 10), I also needed to specify the processor under General Options.

When I build, I get an error that I need help with. I get pointed to a std.h file with the following line as an error:

 * 'xdc_target_types__' must be defined to name a target-specific header
 * file (e.g., ti/targets/std.h) that has definitions for the basic types:
 * xdc_Int8, xdc_Int16, ...
 *
 * For example, to build for a target in the ti.targets package you should
 * add the following option to your compiler's command line:
 *    -Dxdc_target_types__=ti/targets/std.h
 */
#error xdc_target_types__ must be defined to name a target-specific header containing definitions of xdc_Int8, xdc_Int16, ...

Can someone tell me how to add the info required?

 

  • Todd,

    #1.  I will take this suggestion back to the TI-RTOS team.

    #2.  I didn't need to copy anything.  I basically did section 3.3.1 which requires you do go do 3.2 then proceeded with 3.3.2

    #3.  I didn't need to do this.  Not sure why you needed to do this.

    #4.  3.3.3 showed up nicely for me.  I didn't need to port any files anywhere.

    #5.  The correct device was already there for me.  That's probably because I successfully created a project from the TI-RTOS example where as you are copy stuff around.

    I would suggest maybe go through the GSG again and follow it step by step.  I haven't run into the issues you have seen.  I successfully build a few program including the gpio one for the F5529.

    Judah

  • Judah:

    Thanks for your response - I went back to the GSG and found that I did not set up the tirtos.mak file as specified in section 3.2 "Creating Example Projects to Build via a Command Line" - however, after making changes, I still get an error, and I am a bit confused by it - do you know what the actual error is?

    I have stated false to CCS_BUILD

       and true to IAR_BUILD

    I have also pointed at the IAR_COMPILER_INSTALLATION_DIR

    Do I need to point at a different "export XDCTOOLS_JAVA_HOME (since I do not have CCS on this PC)?

    Also, do I need a different MSP430HEADERS (again, since I do not have CCS on this PC)?

     

    IAR Message:

    Error while running "c:/ti/xdctools_3_30_01_25_core/xs" 
    --xdcpath="c:/ti/tirtos_msp430_2_00_01_23/packages;c:/ti/tirtos_msp430_2_00_01_23/products/uia_2_00_00_28/packages;;c:/ti/tirtos_msp430_2_00_01_23/products/bios_6_40_01_15/packages;" iar.tools.configuro -c "C:\Program Files (x86)\IAR 
    Systems\Embedded Workbench 7.0\430" --cc "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\bin\icc430.exe" --device "MSP430F5529" --compileOptions "-f C:\f5529tiRtos/configPkg/compiler.opt.defs 
    --diag_suppress=Pa050 -DMSP430WARE -Ic:/ti/tirtos_msp430_2_00_01_23/products/MSP430Ware_1_80_01_03a/driverlib/MSP430F5xx_6xx -IC:\f5529tiRtos/USB_config -o C:\f5529tiRtos\Debug\Obj\ --no_cse --no_unroll --no_inline 
    --no_code_motion --no_tbaa --debug -D__MSP430F5529__ -e --double=32 --dlib_config \"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\lib\dlib\dl430xlsfn.h\" --core=430X --data_model=small -Ol --multiplier=32 
    --multiplier_location=4C0 --hw_workaround=CPU40 --hw_workaround=CPU39 --segment __data16=DATA16 --segment __data20=DATA20 --code_model=large" --linkOptions "-f C:\f5529tiRtos/configPkg/linker.cmd 
    c:/ti/tirtos_msp430_2_00_01_23/products/MSP430Ware_1_80_01_03a/driverlib/iar-MSP430F5529/iar-MSP430F5529.r43 -o C:\f5529tiRtos\Debug\Exe\tiRtos.d43 \"-IC:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\LIB\\\" -f \"C:\
    Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\config\linker\lnk430F5529.xcl\" -f \"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\config\linker\multiplier32_loc2.xcl\" -D_STACK_SIZE=200 -rt \"C:\Program 
    Files (x86)\IAR Systems\Embedded Workbench 7.0\430\lib\dlib\dl430xlsfn.r43\" -D_DATA16_HEAP_SIZE=0 -s __program_start -D_DATA20_HEAP_SIZE=0" --profile release --projFile "C:\f5529tiRtos\tiRtos.ewp"

  • Todd,

    This is known.  The TI-RTOS installation of XDCTOOLS installs the XDCTOOLS without JRE (to minize size of download).  What you need to do is you should rename your existing xdctools installation and then grab the installation at the link below that includes the JRE.  You want the Core with JRE.

    3.30.01.25 Core (Windows) 3.30.01.25 Core for Windows

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/rtsc/3_30_01_25/index_FDS.html

    Judah

  • Judah:

    OK, downloaded XDCTOOLS with JRE, still get the same error.

    Here are my options for IAR in the tirtos.mak file - do they seem correct?

    #
    # Enable TI-RTOS to build for IAR.
    # Set IAR_ENABLE to true and modify path to toolchain
    #
    IAR_BUILD ?= true
    IAR_COMPILER_INSTALLATION_DIR    ?= C:/Program Files (x86)/IAR Systems/Embedded Workbench 7.0
    IAR_MSP430HEADERS                ?= ${IAR_COMPILER_INSTALLATION_DIR}/inc
    iar.targets.msp430.MSP430X_small ?= $(IAR_COMPILER_INSTALLATION_DIR)/430

    #
    # TI-RTOS and XDCTools settings
    #
    XDCTOOLS_INSTALLATION_DIR   ?= $(DEFAULT_INSTALLATION_DIR)/xdctools_3_30_01_25
    export XDCTOOLS_JAVA_HOME   ?= $(DEFAULT_INSTALLATION_DIR)/xdctools_3_30_01_25/jre

    TIRTOS_INSTALLATION_DIR     ?= $(DEFAULT_INSTALLATION_DIR)/tirtos_msp430_2_00_01_23
    BIOS_INSTALLATION_DIR       ?= $(TIRTOS_INSTALLATION_DIR)/products/bios_6_40_01_15
    UIA_INSTALLATION_DIR        ?= $(TIRTOS_INSTALLATION_DIR)/products/uia_2_00_00_28
    MSP430WARE_INSTALLATION_DIR ?= $(TIRTOS_INSTALLATION_DIR)/products/MSP430Ware_1_80_01_03a
    MSP430HEADERS               ?= $(IAR_COMPILER_INSTALLATION_DIR)/430/include

  • Todd,

    I don't even have "export XDCTOOLS_JAVA_HOME" in my version of tirtos.mak.  I don't think that was there originally.

    I've attached my file here...0363.tirtos.mak.txt

    Had to name it with .txt so I could attach it here.

    Judah

  • Judah:

    I tried to model my tirtos.mak file after yours, but I still have that error.

    Do you know what that error is, and what is causing it? It is not intuitively obvious just what the problem is...

    Also, I ended up grabbing the "Legacy XDCtools" because it specifically stated that it had Java. Was that the right one?

     

  • The only time I've seen that error was when the path to xdctools was incorrect.

    You should grab the CORE with JRE (There's 2, 1 with it and 1 without.  It clearly states the one without).  That's why I said rename your existing one because it will install into the same directory name.

    The Legacy XDCTOOLS would work too, but then the path is just slightly different and you would need to modify your tirtos.mak to point to it correctly.

  • Todd,
    when I had that problem with XDCTOOLS_JAVA_HOME, I opened a Windows command window and there I set XDCTOOLS_JAVA_HOME. After that, I started IAR from the command line in the same command window and that worked for me.

  • Sorry, can you tell me the steps you went through to "set" the environment variable, and then what you invoked from the command window to get IAR up and running?

    It sounds like TI-RTOS has been run mostly from CCS environment, and it looks like very few who are in an IAR-only environment have tried to get it going...

  • I opened a Window command console and typed:
    set XDCTOOLS_JAVA_HOME==C:\ti\ccsv5\eclipse\jre
    If you don't have a CCS installation, you probably have a JRE installed under "C:\Program Files\Java" or "C:\Program Files (x86)\Java", which you can use instead.

    Then, I typed in that same command console:
    "D:\IAR\Embedded Workbench 6.5\common\bin\IarIdePm.exe"
    to start the IAR environment. You could probably set XDCTOOLS_JAVA_HOME in System in Control Panel, and then restart your PC. Then, you wouldn't have to start the IAR environment from a command console, but I haven't try that.

  • Thanks, but I still get the same error, and I have NO idea what that error is.

  • If you followed the steps from my post, then either the value set in the command window is somehow not reflected in the IAR environment or there is no JRE in the directory that you entered as a value for XDCTOOLS_JAVA_HOME. We can try printing the environment within IAR to look for XDCTOOLS_JAVA_HOME. Right-click on the project->Options...->Build Actions. Your Pre-build command line should contain something similar to:
    "$XDCROOT$/xs" --xdcpath="$XDCPATH$" iar.tools.configuro -c "$TOOLKIT_DIR$" ...
    Add the red part in front of the current line:
    C:\windows\system32\cmd.exe /C set & "$XDCROOT$/xs" --xdcpath="$XDCPATH$" iar.tools.configuro -c "$TOOLKIT_DIR$" ...
    Please post the complete output from the Build window.

    Can you also check that there is a subdirectory 'bin' with java.exe in the directory you set as a value for XDCTOOLS_JAVA_HOME?

  • Sasha:

    I added the "red part in front of the current line" and here is the complete output from the Build window:

    Building configuration: TiRtos - Debug
    Updating build tree...
    Performing Pre-Build Action
    Error while running C:\windows\system32\cmd.exe /C set & "c:/ti/xdctools_3_30_01_25/xs" 
    --xdcpath="c:/ti/tirtos_msp430_2_00_01_23/packages;c:/ti/tirtos_msp430_2_00_01_23/products/uia_2_00_00_28/packages;;c:/ti/tirtos_msp430_2_00_01_23/products/bios_6_40_01_15/packages;" iar.tools.configuro -c "C:\Program Files (x86)\IAR 
    Systems\Embedded Workbench 7.0\430" --cc "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\bin\icc430.exe" --device "MSP430F5529" --compileOptions "-f C:\f5529tiRtos/configPkg/compiler.opt.defs 
    --diag_suppress=Pa050 -DMSP430WARE -Ic:/ti/tirtos_msp430_2_00_01_23/products/MSP430Ware_1_80_01_03a/driverlib/MSP430F5xx_6xx -o C:\f5529tiRtos\Debug\Obj\ --no_cse --no_unroll --no_inline --no_code_motion --no_tbaa --debug 
    -D__MSP430F5529__ -e --double=32 --dlib_config \"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\lib\dlib\dl430xlsfn.h\" --core=430X --data_model=small -Ol --multiplier=32 --multiplier_location=4C0 --hw_workaround=CPU40 
    --hw_workaround=CPU39 --segment __data16=DATA16 --segment __data20=DATA20 --code_model=large" --linkOptions "-f C:\f5529tiRtos/configPkg/linker.cmd 
    c:/ti/tirtos_msp430_2_00_01_23/products/MSP430Ware_1_80_01_03a/driverlib/iar-MSP430F5529/iar-MSP430F5529.r43 -o C:\f5529tiRtos\Debug\Exe\TiRtos.d43 \"-IC:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\LIB\\\" -f \"C:\
    Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\config\linker\lnk430F5529.xcl\" -f \"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\config\linker\multiplier32_loc2.xcl\" -D_STACK_SIZE=200 -rt \"C:\Program 
    Files (x86)\IAR Systems\Embedded Workbench 7.0\430\lib\dlib\dl430xlsfn.r43\" -D_DATA16_HEAP_SIZE=0 -s __program_start -D_DATA20_HEAP_SIZE=0" --profile release --projFile "C:\f5529tiRtos\TiRtos.ewp"
     
    Total number of errors: 1
    Total number of warnings: 0

     

    And yes, there is a java.exe in C:\ti\xdctools_3_30_01_25\jre\bin

     

    Thanks for your help in this.

  • Todd,
    I can't see the actual error message. I am not sure if the command 'set' is failing or there is some other reason I don't the see the complete environment in the output. When I run the same command you ran, I get the output with environment variables:
    ...
    SystemDrive=C:
    SystemRoot=C:\Windows
    UATDATA=C:\Windows\SysWOW64\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77
    windir=C:\Windows
    X2DIR=C:\Program Files (x86)\zabkat\xplorer2_lite\
    XDCTOOLS_JAVA_HOME=C:/CCS6/ccsv6/eclipse/jre
    and when I had the error message related to XDCTOOLS_JAVA_HOME, it looked like this:
    c:/CCS6/xdctools_3_30_02_35_core_eng/xs: error: can't create session manager: can't find a JVM; try setting the environment variable 'XDCTOOLS_JAVA_HOME' to the absolute path of any 
    directory containing a 32-bit Java Runtime Environment (1.6 or greater); e.g., 'C:\Program Files (x86)\Java\jre7'.
    I don't see that message in your output but my guess is that's what you saw at least once before.

    I also realized that you are using the full version of XDCtools, so it's even more confusing why XDCtools can't find its own JVM. BTW, which version of Windows are you using? I am using Windows 7.

  • Sasha:

    That makes two of us who cannot see the error. I am using Windows 7 on the computer that has the problems.

  • The only way I can reproduce the lack of error messages is by going to Tools->Options->Messages and changing from "All" to "Messages". Can you check what's your setting there?

    If that doesn't help, and since you are using a full version of XDCtools, let's try removing XDCTOOLS_JAVA_HOME from the environment and see if it changes anything. The error message for an invalid XDCTOOLS_JAVA_HOME is different from missing XDCTOOLS_JAVA_HOME, so I am just hoping here that a different error message might show up.
    First check if XDCTOOLS_JAVA_HOME is defined in Control Panel->System->Advanced System Settings->Environment Variables. If it is, select it and Delete. You may need to reboot your PC after that. Then start, IAR IDE again and try building and see what's the output.

  • Sasha:

    Thanks for your post. I did check, and I had "Messages" selected rather than "All."

    I will not be able to get to the Java stuff until later - I will try to post something regarding the second part of your message.

    By the way, has TI tried to run TI-RTOS on a machine that is "IAR only?" (No CCS-related stuff on the machine.)

  • Sasha:

    There appears to be no change in the error message after deleting the JAVA_HOME from my path...

    Building configuration: TiRtos - Debug
    Updating build tree...
    Performing Pre-Build Action
    Error while running C:\windows\system32\cmd.exe /C set & "c:/ti/xdctools_3_30_01_25/xs" 
    --xdcpath="c:/ti/tirtos_msp430_2_00_01_23/packages;c:/ti/tirtos_msp430_2_00_01_23/products/uia_2_00_00_28/packages;;c:/ti/tirtos_msp430_2_00_01_23/products/bios_6_40_01_15/packages;" iar.tools.configuro -c "C:\Program Files (x86)\IAR 
    Systems\Embedded Workbench 7.0\430" --cc "C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\bin\icc430.exe" --device "MSP430F5529" --compileOptions "-f C:\f5529tiRtos/configPkg/compiler.opt.defs 
    --diag_suppress=Pa050 -DMSP430WARE -Ic:/ti/tirtos_msp430_2_00_01_23/products/MSP430Ware_1_80_01_03a/driverlib/MSP430F5xx_6xx -o C:\f5529tiRtos\Debug\Obj\ --no_cse --no_unroll --no_inline --no_code_motion --no_tbaa --debug 
    -D__MSP430F5529__ -e --double=32 --dlib_config \"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\lib\dlib\dl430xlsfn.h\" --core=430X --data_model=small -Ol --multiplier=32 --multiplier_location=4C0 --hw_workaround=CPU40 
    --hw_workaround=CPU39 --segment __data16=DATA16 --segment __data20=DATA20 --code_model=large" --linkOptions "-f C:\f5529tiRtos/configPkg/linker.cmd 
    c:/ti/tirtos_msp430_2_00_01_23/products/MSP430Ware_1_80_01_03a/driverlib/iar-MSP430F5529/iar-MSP430F5529.r43 -o C:\f5529tiRtos\Debug\Exe\TiRtos.d43 \"-IC:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\LIB\\\" -f \"C:\
    Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\config\linker\lnk430F5529.xcl\" -f \"C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.0\430\config\linker\multiplier32_loc2.xcl\" -D_STACK_SIZE=200 -rt \"C:\Program 
    Files (x86)\IAR Systems\Embedded Workbench 7.0\430\lib\dlib\dl430xlsfn.r43\" -D_DATA16_HEAP_SIZE=0 -s __program_start -D_DATA20_HEAP_SIZE=0" --profile release --projFile "C:\f5529tiRtos\TiRtos.ewp"
     
    Total number of errors: 1
    Total number of warnings: 0

     

  • Todd, please also remove the part of the command that I asked you to add: C:\windows\system32\cmd.exe /C set &.
    I am not really sure how to proceed without finding what the error really is. I was assuming that the error is related to XDCTOOLS_JAVA_HOME, but because you are using the full version of XDCtools, that is not likely to be the problem.
    You can try pasting the complete xs command line in a Windows command window, and make sure that you are in the project's top directory when you do it.

  • All:

    I have been successful with the latest versions ---

      IAR 6.20.1

      tirtos_msp430_2_10_01_38

      xdctools_3_30_04_52_core

    Here is a link: http://e2e.ti.com/support/embedded/tirtos/f/355/t/399661

     

  • Why are we spending a day in DOS trying to generate compatible IAR files and paths instead of learning how TI's RTOS functions.  I have tried to get all the characters typed correctly at the DOS cmd prompt and handle the environment variables but still it does not compile.  I will go back one more time next week and try again but wouldn't it be nice if you just supplied a folder with the IAR projects in a workspace with the TI RTOS located in an adjacent directory without all the long folder names that have to be typed at the command prompt.  I would have loved to have spent this time on learning TI's RTOS.  No reply required.  I will eventually figure out what I typed incorrectly or which step I failed to understand.