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.

best practices for a CCS TI-RTOS that needs to support multiple targets?

Other Parts Discussed in Thread: CC1310, CC2650

I have a TI RTOS that currently is configured for the CC1310 Launchpad but I need to also support builds for CC1310 custom boards (with a different chip variant and DIO connections) and for CC2650 targets, both the launchpad and the sensor tag.

What are the best practices to create a project that supports multiple targets? Should I use the same file structure but with #ifdefs in the board-specific files (so instead of CC1310_LAUNCXL.c, there will be a file that includes this one and also the corresponding ones for CC2650, etc, #ifdef'ed)? What about the linker cmd file?

ccfg.c is also a bit problematic, because it is a link to <startup_files/ccfg.c>, and the startup_files directory is specific to the CC1310, so for CC2650 I will need a different set of project properties. Maybe this can be done with separate build configurations.

Any help on how to do this cleanly will be appreciated.

Thanks, Sivan Toledo

  • Sivan,

    Using the same project for multiple targets and/or platforms isn't recommended. A project can only have a single target and platform at a time. You'd have to edit the project settings to change the target and platform each time you want to build. It will get old fast.

    Not to mention that there are different platform specific files that are needed, and if they are part of your project, then CCS will automatically build them (not what you want)

    Why are you trying to do this? Do you have a lot of common source files that will be shared?

    I would recommend having multiple projects which share the same sources. Each project will be configured for a particular platform and target, and contain the platform specific board files needed.

    Then, you can have all of your common source files in a single location, and then _link_ those common sources to each project.

    This way, if you make a change to any of the shared source files, you only need to make that change once. Since those common sources are linked to all of the projects, it means all projects are pointing to the same copy of the file(s) and so the update will be "seen" by all projects.

    Building is then easy at that point. Just select all of the projects in CCS and click the "build" button.

    Steve
  • Thanks a lot Steve. I did not think of linking the files to maintain a single set of master files. And yes, the projects share a lot of files.

  • Ok great. Please mark this thread as "answered" if this resolved your issue.

    Thanks,

    Steve
  • It did, thanks a lot. I marked your answer as verified.