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.

Files needed for standalone application using TI-RTOS

Other Parts Discussed in Thread: CC2650, SYSBIOS

Hi,

I am trying to make a standalone project using TI-RTOS for the CC2650 (we started off with the TI-MAC sample application).

What I mean is that we need to version all the files that are required for the project to build including the TI-RTOS. I am not sure whether I need to include the source files or if only library files are sufficient for the project to link properly.

The company is in the medical field and needs to version all the files for the quality review proces.

If we change the location of the TI-RTOS files, how do we link them back in our project to be found by the compiler and linker?

TI-RTOS version used in the TI-MAC example: 2.11.01.09


Thank you in advance

Michel

  • What compiler are you using (TI, GCC or IAR)? We have a couple different ways to do this. I need to know the toolchain to give you the best approach though.

    Todd
  • The compiler needed for the TI-MAC example is from IAR.

    Michel
  • I'm working up a description for you (and others). It will be available by ~Weds next week. We have most of it written for CCS. I need to finish (and test!) the IAR portion. Does that work out for you?

    Todd
  • Very good.
    Thank you.
  • Hi Todd,
    Any update on the estimated time of release of the description?
    Thanks
  • Sorry, we are still debating how to do it for IAR. It should be this week.

    Todd

  • Hi Todd,
    Just checking if this was still in the works.
    Thanks
  • Sorry! I'll get it this today/tomorrow. Also, thanks for helping out on all the other threads.

    Todd
  • Hi Michel,

    Try this out. If you have any problems or feedback, let me know.


    Todd

    6406.CannedCfgs_forum.pdf

    5102.builds.zip

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/355/3010.imports.mak

  • Hi Todd,

    Thank you very much for the instructions.

    So I've tried running them but I didn't get very far.

    The problematic step: Building the shared config files with a makefile

    I am using TI-MAC 1.5.2 which came with TI-RTOS 2.11.01.09

    I've attached the .errorlog file that was output in the destination folder
    From what I can see, some of the paths to different products are incorrect.

    It's searching for specific versions in the tirtos products folder
    bios_6_46_00_23 (I have 6_41_02_41)
    tidrivers_cc13xx_cc26xx_2_20_00_08/packages (the tidrivers_cc... doesn't exist)
    uia_2_00_06_52 (I have 2_00_02_39)

    Here are the steps that I followed:
    I installed TI-MAC (this installed TI-RTOS). I used the default folder for installation (c:\ti\.... )
    After reading your instructions, I copied the tirtos and xdctools folder into my project folder
    I copied the imports.mak file into the copied tirtos folder
    Modified the imports.mak file to match the proper paths
    Ran gmake from the builds folder

    Is the problem caused by the compiler trying to fetch the wrong folders (if so, can I change them)?
    Do I need to upgrade the version of TI-RTOS to be able to use TI-RTOS as a stand-alone library in my application? I would prefer keeping the version installed with the TI-MAC stack

    Thanks for the help
    Michel
  • Hi Michel,

    Stay with your version. I'll give you updated instructions for your version. It will probably have to be tomorrow though.

    This is what you are looking for though...correct?

    Todd
  • Hi Todd,

    No worries about the delay. I'm glad it's moving forward.

    I didn't get through the whole process, but I think it's what we need.

    Just to confirm, we want to copy the whole project folder (including ti-rtos and xdctools) and put them somewhere else without having to install TI-RTOS or the TI-MAC stack.

    In our case, we're versioning all the files which are required for the quality review process. Somebody else on the team has to be able to checkout the versioned files and compile the whole project without any errors.

    Michel
  • https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/355/0572.imports.mak

    1830.builds.zip

    Michel,

    Ok. Try the modified imports.mak and makefiles in builds.zip for the tirtos_simplelink_2_11_01_09 release. In this version, there is no $TIRTOS$ in the custom arguments, so you need the full path for the compiler.opts.def and linker.cmd files (slides 7 and 8 on the pdf file).  For example

    Replace the

    $PROJ_DIR$/configPkg/compiler.opt.defs

    with

    C:/ti/tirtos_simplelink_2_11_01_09/builds/CC26xx/custom/iar/compiler.opt.defs

    Also, I removed the gcc directory from the builds.zip since we did not support GCC in that release.

    Todd

  • Hi Todd,

    Everything worked this time!!

    I feel a little silly because my previous issue could have been easily fixed by changing the paths in the makefile or the iar folder.

    I'm also attaching your original instructions with some comments.

    The only feature that would be really nice (I've also written in the comments on the slides), would be to replace the prebuild step command with another one that would re-compile TI-RTOS from its "new" location and custom configuration.

    Thanks a lot!!

    Michel

    8308.TIRTOS_standalone.pdf

  • So I just figured out how to make everything automatic with the pre-build step (no need to go into the command prompt anymore).

    Delete the pre-built command line step in the Build options and replace it with this (the double quotes are important):
    "$XDCROOT$/gmake" --directory="PLACE_YOUR_CUSTOM_BUILDS_DIRECTORY_HERE"

    In my case, since I moved the complete TI-RTOS folder into my project folder, it was a relative path that looked like this :
    "$PROJ_DIR$/../../OTS/tirtos_simplelink_2_11_01_09/builds/CC26xx/custom/iar"

    So my pre-build command is now (without any typos) :
    "$XDCROOT$/gmake" --directory="$PROJ_DIR$/../../OTS/tirtos_simplelink_2_11_01_09/builds/CC26xx/custom/iar"

  • Cute idea. I'll try it out.
  • I have one more question. I don't think it's worth making a new thread just for that, so I'll just ask the question here.

    So I got the standalone version working, but as I was committing the files, I noticed that the products\sysbios folder was huge. I tried removing it (I kept a backup) and I recompiled. To my surprise it worked.

    I made sure that my project doesn't link to anything in the C:\ti folder and everything still seems to work fine. And I delete the contents of the builds folder to make sure that I am indeed rebuilding all the files.

    My question is:
    Am I correct to assume that the only folder that I really need is the CC26xxware_.... folder for the code to compile? Or am I going to run into trouble later?

  • Hi Michel,

    Something is fishy. Did you remove
    1. the custom\iar\package\cfg\custom_prm3.src\sysbios directory (where custom holds the custom.cfg file or whatever you named it)
    or
    2. the <tirtos>/products/bios_<version> directory?

    Both are needed.

    You still need the latter for headers (e.g. Task.h, etc.).

    The former has the built kernel library. Namely it has custom\iar\package\cfg\custom_prm3.src\sysbios\rom_sysbios.arm3 (assuming you are using the kernel in ROM). Note this file is listed in the custom\iar\linker.cmd file which you added to your IAR project settings. Note: Even though the kernel is in ROM, there is some extra stuff that gets built and placed in the library.

    I've never looked to close at the \iar build remnants...you're right it is rather large (~22.2 MB). The CCS ones is only ~8MB. For the future release that includes this, we will try to remove the unnecessary build remnants and just leave the lib, linker file and a couple other files needed for ROV and System Analyzer (for CCS).

    Todd
  • HI Todd,

    You are absolutely right, it was wrong. I made a copy of the folder and then started removing the files and folders. I forgot to change the paths in the imports.mak file (so it was still using all the files in my original working folder).

    Through that process I figured out a way to remove absolute paths in the build process (making the ti-rtos location only dependent on the project itself). By looking through GNU make documentation, I found the $(CURDIR) variable.

    Here is my imports.mak file (renamed to .txt to please the e2e server :P ) for anybody that would want to use relative references instead of absolute.

    1348.imports.txt

    There is now a new problem since I deleted the folders:
    The ROV stopped working in IAR. I previously had a menu in IAR for TI-RTOS debugging, it just disappeared. I currently get a warning message that XDCTOOLS_JAVA_HOME is not found in the environment variables (when the debugger is loading).

     I am currently trying to revert my changes to see what causes the TI-RTOS menu to disappear (it is working in my original folder right after I followed the instructions, just not in the one where I deleted the folders). I'll keep adding the folders back, but any clue on which ones are needed for ROV to work?

    Michel

  • Hi Michel,

    ROV needs the builds\CC26xx\custom\iar\package\cfg\custom_prm3.rov.xs file for sure (note: name is derived from cfg name). The relative vs absolute change might be causing some grief also.

    XDCTOOLS_JAVA_HOME is not found...I need to look at that one. I'm not sure what you removed to get that message.

    Todd
  • Hi Todd,

    So I had reverted some changes and was able to get the ROV back. Didn't bother looking into this any further but the problem came back. Restoring the folder to its previous state helped the first time but it doesn't anymore. I compared the original tirtos folder with the one in my project and they are identical.

    I made a search for XDCTOOLS_JAVA_HOME in the TI folder and found it was mentioned in the XDC release notes.
    It seems to refer to the jre folder located in xdctools (which exists in my xdc folder).

    I also found the actual use in a main.xs file (line 283 and below). Here is the path:
    ......... \xdctools_3_30_06_67_core\packages\xdc\tools\configuro\Main.xs

    Any clue how to fix this problem?

    Edit: the builds\CC26xx\custom\iar\package\cfg\custom_prm3.rov.xs file exists and that wasn't the problem the first time around (not sure if it would be a problem now).


    Michel