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.

CCS/CODECOMPOSER: Is there a lightweight way to build CCS projects for automated building and testing?

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

I have a project targeting the C5515, set up in Code Composer Studio. I can build and run it just fine on the desktop (Ubuntu 18.04.1 or Windows 10). But I'd like to be able to use a CI system like Gitlab's to automatically build it and perhaps in the future, load it onto the target system and run tests. Ideally I want to be able to build, load and run firmware in a fully automated way from a headless server.

There are instructions for running Code Composer from the command line which is helpful. But this still means I have to install and run Code Composer on a headless system, probably inside a Docker container, and have it drag in a tonne of dependencies I don't really need (like an entire desktop GUI system). It's not clear to me how I would even run Code Composer to set it up to use the TI CGT toolchain.

Is there some alternative, lightweight way to do this kind of automated building and testing?

  • Hi Jason,

    Jason Heeris82 said:
    Is there some alternative, lightweight way to do this kind of automated building and testing?

    The CCS/Eclipse build system is makefile based. When you build a CCS project, the CCS project manager will generate makefiles based off the project metadata and the call gmake under the hood.

    http://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_project-management.html#build-rebuild-project

    If you wish to make your build system as lightweight as possible, you can take that those generated makefiles and simply call gmake directly on the makefiles. You would need a copy of gmake and also any other dependencies needed for the build (code generation tools, xdctools, TI-RTOS, etc). But at least you don't need to install the whole CCS Eclipse environment for just builds.

    But without the full CCS install, I'm not sure how you intend to load and run the firmware. Command-line tools for loading/running like DSS/loadti require a full CCS installation and tools like UniFlash is not support on your device. Perhaps 3rd party tools like Flashburn is an option.

    Hope this helps

    ki

  • Ki-Soo Lee said:
    you can take that those generated makefiles and simply call gmake directly on the makefiles

    If I'm understanding you right, those makefiles are generated by CCS. So I would need to either run CCS manually or make sure the makefiles are also checked in to source control. That could work, although the purist in me doesn't like the idea of checking in generated files since they can easily get out of sync etc.

    Command-line tools for loading/running like DSS/loadti require a full CCS installation and tools like UniFlash is not support on your device.

    I was not aware of this. It's a bit... disappointing to me that TI haven't really considered CI practises in the workflow for their tools. I had a quick look into using other toolchains but, as you point out, actually flashing an image is the sticking point for a lot of it.

  • Jason Heeris82 said:
    If I'm understanding you right, those makefiles are generated by CCS. So I would need to either run CCS manually or make sure the makefiles are also checked in to source control.

    Yes, that is correct. The best option here would be to have CCS generate the makefiles once and then you would maintain them afterwards (modify the makefiles directly yourself) and check them into version control. 

    Jason Heeris82 said:
    I was not aware of this. It's a bit... disappointing to me that TI haven't really considered CI practises in the workflow for their tools. I had a quick look into using other toolchains but, as you point out, actually flashing an image is the sticking point for a lot of it.

    We do offer lightweight CI tool options, but they are newer tools that focus on our newer devices, which (unfortunately) C55x is not a part of.

    Thanks

    ki

  • I've also found that there are Docker files (and images) for Ubuntu + CCS(7,8), which might help.

    Is it possible to actually flash the device from the command line via CCS?

  • There is a utility called loadti, which is a command-line loader:

    http://dev.ti.com/tirex/#/?link=Development%20Tools%2FIntegrated%20Development%20Environments%2FCode%20Composer%20Studio%2FDebug%2FDocuments%2FUser's%20Guides%2Floadti

    Note that you mention flashing the device. CCS/loadti supports out-of-the-box flashing of internal flash on many of our MCUs but not for C55x. There is often an alternate way to flash. For example:

    http://processors.wiki.ti.com/index.php/C5515_Boot-Image_Programmer#How_to_program_a_boot_image_onto_C5515_EVM

    In those cases, loadti would not work out of the box (though you may be able to write a DSS script that can be called from the command-line)

  • Ki-Soo Lee said:
    We do offer lightweight CI tool options, but they are newer tools that focus on our newer devices, which (unfortunately) C55x is not a part of.

    Oh, I forgot to ask about this. Where can I see some more info about those tools? And which generation of device do they support? I'm specifically interested in low power DSP, which is why I'm on the C5515 right now. Would the C6000 series have such tools available?

  • UniFlash is the tool that I was thinking of:
    www.ti.com/.../UNIFLASH

    It is more lightweight and has a command-line option. But it does not support DSP