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.

RTOS/TMS320C6678: How to build a static library for codes that uses the interfaces from SYSBIOS and other packages via CCS?

Part Number: TMS320C6678
Other Parts Discussed in Thread: SYSBIOS,

Tool/software: TI-RTOS

Situation:

  1. I have some codes that called interfaces that provided by packages like SYSBIOS, XDCtools, PDK, NDK, etc.. which are all from Processor-SDK. And I want to build these codes as a static library so I can share it between multiple programs.
  2. I know the packages like PDK are build totally in command line interface and xdc program is used for building. But I am not familiar with the command line interface of xdctools. (Is there a program that used for building is named

So I am wondering if there is an easier way to build the static library.

Question:

  1. How to build a static library inside the CCS GUI for the codes that uses the interfaces from SYSBIOS, XDCtools, etc.?
  2. If question 1 is impossible, then how to build the library from the command line? Is there any reference document? Where should I start for this?

  • Canfoderiskii,

    If I understand correctly, you want to have one CCS project which builds the SYS/BIOS kernel along with all the other packages defined in the configuration script (*.cfg). Then, in your other CCS projects, which build an executable, you want to link against one kernel project. Have I got this correct?

    I'm assuming that each CCS project you currently have, contains a config script. You would like to factor out this config script into the one kernel project. Correct?

    Start by creating a new CCS Project. Be sure to specify the device. In the Advanced settings, change the output type to Static Library. In the project templates, select Empty RTSC-Configuration Project.

    Project > New CCS Project
    Target: TMS320C6678
    Project Name: my_kernel
    Advanced settings > Output type > Static Library
    Project templates and examples > Empty RTSC-Configuration Project
    Next

    Select your XDCtools version. Unselect all the products and select only the product you want. Type in the target name (get this from an existing project). Select your platform project (the menu takes a while to load). You might need to type in the platform instance name. Click Finish.

    Now you can drag-and-drop a config script from one of your other projects into your new kernel project. At this point, it should build. I would inspect the build output and make sure it matches the build output from an existing project. You might need to define some compiler symbols.

    In your executable project, add a project dependency to the kernel project.

    Project > Properties
    Project References
    my_kernel > Select

    Any libraries needed by the executable which are not covered by the kernel configuration will have to be added to the link command.

    If your executable project has a config script, then you need to delete this.

    Is this what you are looking for?

    ~Ramsey

  • Yes, that's what i/m looking for. Thank you so much.

    I missed the `Advanced settings` because by default the `Project templates and examples` is displayed, and this is why the projects I created are always executable projects.

    Maybe next version of CCS can tweak this part of UI in `New CCS Project`, because the expanding point like `Advanced settings` & `Project templates and examples` is small and is not so outstanding.
  • I just come up with another question:

    If I want to group my codes as a RTSC repository which contains packages and modules, where should I start?
    - The content of the link [http://rtsc.eclipse.org/docs-tip/Main_Page] seems a little old and out of date.

    If I want my RTSC repo is able to be added from CCS GUI just like the way I add the sysbios, xdctools, etc., what else do I need?
    - I found that all the TI official repository has a folder named `eclipse`, and I think this is the key to this question, but I don't know where to start for this. Do I need the knowledge about making plugin for eclipse?
  • Canfoderiskii,

    The RTSC-Pedia web site is a good resource. It is maintained and contains current information.

    It is unclear to me if you want to "consume" a RTSC package or if you want to "produce" a package. If you are including a package in your configuration script and building an executable, then you are consuming the package. But, if you are developing code and building a package, then you are producing it.

    To consume a package, simply add the module in your configuration script (xdc.useModule()), and add the repository to your package path:

    Project > Properties
    CCS General > RTSC (tab)
    Add...
    Select repository from file-system > Select
    Browse...

    Remember, the repository is the folder which contains the top-level RTSC package folder. For example:

    Package name: my.toolbox
    Physical location: C:/user/repo/my/toolbox
    Repository: C:/user/repo/

    If you are producing packages and want to build them using CCS, you can create a makefile project to do so. The project directory becomes the repository. Create the project as follows:

    File > New > Project...
    C/C++ > C++ Project
    Next

    Project name: RTSC
    User default location > Select
    Project type > Makefile project > Empty Project
    Toolchains > -- Other Toolchain --
    Finish

    Now you have an empty project which will build using a Makefile. Make the following changes to support the RTSC build flow. This will use the CCS tool chain for building your packages.

    Project > Properties
    C/C++ Build > Builder Settings (tab)
    Use default build command > Unselect
    Build command: ${XDCROOT}/gmake

    Project > Properties
    C/C++ Build > Environment

    Add the following variables:

    XDC_INSTALL  ${XDCROOT}
    TARGET       ti.targets.elf.C66=${ccs_install_root}/tools/compiler/ti-cgt-c6000_8.1.3

    Now add the following files to your project.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/355/1715.Makefile
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/355/0702.config.bld

    Create your package folder in your project.

    File > New > Folder
    RTSC > Select (as parent folder)
    Folder name: my/toolbox
    Finish

    Finally, add the following files to your new package folder.

    3173.Util.c
    5430.Util.h
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/355/2425.package.bld
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/355/3782.package.xdc
    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/355/5148.package.xs

    Now you are ready to build your package. Just click the build icon in the CCS toolbar.

    ~Ramsey

  • Thank you so much.