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.

CODECOMPOSER: Low footprint CLI only install, suited for docker. [Feature request]

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: CCSTUDIO

Feature request

We are using CCS in a Ci setup using Azure pipelines and Docker.

I am fully aware of the commandline interface to CCS, that is what we are using.

I ask for a non GUI install, with minimal footprint.

Why

Installing CCS even with minimum settings, it still takes up 1.8 Gb of disk space.

Of this the compiler itself takes approx .2 Gb, Meaning we have 1.5 Gb installed only to parse the CLI commands, and the project file, and create a makefile. Seams like a lot of wasted space.

And why does this matter?

Well in a typical CI setup as ours, the build is done in the cloud, meaning on agent using a docker image. This means that each time a build is started the first step for the agent is to download the docker image.

And even with a non-optimized ubuntu base image, the CCS installation is 3/4 of this image.

The result is that for the entire build, including fetching sources from git repo and uploading result to artifactory, the download of the Docker image takes up 2/3 of the time.

Research

I have looked into if it is possible to reduce the installed size of CCS. And it is, but with a better support form the CCS installer it could be both way easier and even less footprint.

By trial and error i tried removing modules, and verified that the build still works.

CCS and compiler is installed by these commands

./CCS10.1.0.00010_linux-x64/ccs_setup_10.1.0.00010.run --mode unattended --prefix /ti/ccs1000/ --enable-components PF_C28
./ti_cgt_c2000_18.12.1.LTS_linux_installer_x86.bin  --mode unattended --prefix /ti/ccs1000/ccs/tools/compiler/

First and obvious step. We are using a fixed version of the C2000 compiler, so the newer version that the installer insist on installing together with CCS, can be removed.

Find below the resulting script to reduce install size. also attached as cccleaner.sh.txt (the .txt extensionas TI forum does not allow .sh)

#!/bin/sh

# This script is the result of a loong trial an error, cleanup exercise on the CCS V. 10.1
# It reduced the size of the instalation from 1.8 Gb down to 0.5 Gb (where the compiler itself takes 0.2 Gb)
# So still after this cleanup we use 0.3 Gb just to convert the .project files into a makefile to run the compiler.


## As far as I can tell the folowing tree plugins is required
# This is base eclipse req.
# - org.eclipse.platform.ide
# Apears to contain the com.ti.ccstudio.apps.*
# - com.ti.ccstudio.idemain.feature.group \
# The build complaints of missing Compiler def if this is missing
# - com.ti.ccstudio.c2000.feature.group
#
# then there are some plugins that will not uninstall, like the debugServer
# there seams to be some circular dependencies to/from org.eclipse.platform.ide
# I will leave those sticky plugins on the uninstall list, maybe in the future
# TI cleans up this dependency mess :-) (you are alowed to hope)

/ti/ccs1000/ccs/eclipse/eclipse -application org.eclipse.equinox.p2.director \
-uninstallIU com.ti.arm.18.1.help.feature.group  \
-uninstallIU com.ti.c2000.18.1.help.feature.group  \
-uninstallIU com.ti.c2000.18.1.help.feature.group  \
-uninstallIU org.eclipse.help.feature.group  \
-uninstallIU com.ti.ccstudio.c5500.feature.group  \
-uninstallIU com.ti.ccstudio.c6000.feature.group  \
-uninstallIU com.ti.ccstudio.c7000.feature.group  \
-uninstallIU com.ti.ccstudio.cloudagent.linux.feature.group  \
-uninstallIU com.ti.ccstudio.debugserver.linux.feature.group  \
-uninstallIU com.ti.ccstudio.doc.linux.feature.group  \
-uninstallIU com.ti.ccstudio.msp430.feature.group  \
-uninstallIU com.ti.ccstudio.nodejs.linux.feature.group  \
-uninstallIU com.ti.ccstudio.tms470.feature.group  \
-uninstallIU com.ti.ccstudio.usersguide.feature.group  \
-uninstallIU com.ti.cgt.c2000.20.linux.feature.group  \
-uninstallIU com.ti.cgt.tms470.20.linux.feature.group  \
-uninstallIU com.ti.chromium.browser.feature.group  \
-uninstallIU com.ti.dvt.energytrace.feature.group  \
-uninstallIU com.ti.dvt2.analysis.suite.feature.group  \
-uninstallIU com.ti.dvt2.graph.visualization.feature.group  \
-uninstallIU com.ti.dvt2.profileanalysismanager.feature.group  \
-uninstallIU com.ti.dvt2.resource.explorer.feature.group  \
-uninstallIU com.ti.dvt2.rov.feature.group  \
-uninstallIU com.ti.dvt2.trace.ccs.feature.group  \
-uninstallIU com.ti.dvt2.trace.control.feature.group  \
-uninstallIU com.ti.dvt2.uia.feature.group  \
-uninstallIU com.ti.dvt2.via.ccs.feature.group  \
-uninstallIU com.ti.emulation.pack.linux.feature.group  \
-uninstallIU com.ti.tirex.feature.group  \
-uninstallIU com.ti.tirex4.feature.group \
-uninstallIU gnu.io.rxtx.feature.group  \
-uninstallIU org.eclipse.cdt.debug.ui.memory.feature.group  \
-uninstallIU org.eclipse.egit.feature.group  \
-uninstallIU org.eclipse.equinox.p2.user.ui.feature.group  \
-uninstallIU org.eclipse.help.feature.group  \
-uninstallIU org.eclipse.help.feature.group  \
-uninstallIU org.eclipse.help.feature.group  \
-uninstallIU org.eclipse.rtsc.xdctools.product.ui.feature.group  \
-uninstallIU org.eclipse.rtsc.xdctools.product_3.61.2.27.feature.group  \
-uninstallIU org.eclipse.tm.terminal.connector.cdtserial.feature.feature.group \
-uninstallIU com.ti.c2800.flash.feature.group \
-uninstallIU com.ti.c2000.support.linux.feature.group \
-uninstallIU com.ti.ccstudio.installer.linux64.feature.group \
-uninstallIU com.ti.cgt.dmed.linux.feature.group \
-uninstallIU com.ti.dbgtrc.webapp \
-uninstallIU com.ti.dsflash.linux.feature.group \
-uninstallIU com.ti.ccstudio.base.feature.group \
-uninstallIU com.ti.ccstudio.launcher.linux.feature.group \
-uninstallIU com.ti.ccstudio.p2tool.feature.group \
-uninstallIU com.ti.ccstudio.sysconfig.feature.group \
-uninstallIU com.ti.ccstudio.targetdb.props.default.linux.feature.group \
-uninstallIU com.ti.ccstudio.utils.cli.linux.feature.group \
-uninstallIU com.ti.ccstudio.workflow.feature.group \
-uninstallIU com.ti.ccstudio.p2appf.feature.group \
-uninstallIU org.eclipse.cdt.feature.group \
-uninstallIU org.eclipse.cdt.launch.remote.feature.group \
-uninstallIU org.eclipse.epp.mpc.feature.group \
-uninstallIU org.eclipse.equinox.p2.discovery.feature.feature.group \
-uninstallIU org.eclipse.equinox.p2.user.ui.feature.group \
-uninstallIU org.eclipse.gef.feature.group \
-uninstallIU org.eclipse.gmf.runtime.thirdparty.feature.group \
-uninstallIU org.eclipse.help.feature.group \
-uninstallIU org.eclipse.rse.feature.group \
-uninstallIU org.eclipse.tm.terminal.feature.feature.group \
-uninstallIU org.eclipse.cdt.build.crossgcc.feature.group \
-uninstallIU com.ti.targetcontent.feature.group \
-uninstallIU org.eclipse.help.feature.group \
-uninstallIU org.eclipse.equinox.p2.user.ui.feature.group \
-uninstallIU com.ti.gc.backplane.feature.group \
-uninstallIU com.ti.gc.pm.feature.group \
-uninstallIU com.ti.debug.server.feature.group \
-uninstallIU com.ti.tools.common.feature.group \


/ti/ccs1000/ccs/eclipse/eclipse -application org.eclipse.equinox.p2.garbagecollector.application -profile epp.package.cpp
#/ti/ccs1000/ccs/eclipse/eclipse -application org.eclipse.equinox.p2.director -listInstalledRoots


#then some brutal file deletion, there is a lot of cruft to get rid of here


rm /ti/ccs1000/ccs/eclipse/ccstudio
rm -rf /ti/ccs1000/xdctools*
rm -rf /ti/ccs1000/ccs/uninstal*
rm -rf /ti/ccs1000/ccs/tirex*
rm -rf /ti/ccs1000/ccs/install_*
rm -rf /ti/ccs1000/ccs/.install*
rm -rf /ti/ccs1000/ccs/doc
rm -rf /ti/ccs1000/ccs/utils/sysconfig*
rm -rf /ti/ccs1000/ccs/utils/bin/make-4.1.tar.bz2
rm -rf /ti/ccs1000/ccs/utils/tiobj2bin
rm -rf /ti/ccs1000/ccs/tools/node
rm -rf /ti/ccs1000/ccs/ccs_base/emulation
rm -rf /ti/ccs1000/ccs/ccs_base/cloudagent

# Keep 3 out of a bunch so move-copy-delete
mv /ti/ccs1000/ccs/ccs_base/DebugServer/bin /ti/ccs1000/ccs/ccs_base/DebugServer/bin2
mkdir /ti/ccs1000/ccs/ccs_base/DebugServer/bin
cp /ti/ccs1000/ccs/ccs_base/DebugServer/bin2/libti_xpcom.so /ti/ccs1000/ccs/ccs_base/DebugServer/bin
cp /ti/ccs1000/ccs/ccs_base/DebugServer/bin2/libXPCOMUtility.so /ti/ccs1000/ccs/ccs_base/DebugServer/bin
cp /ti/ccs1000/ccs/ccs_base/DebugServer/bin2/libDirectoryService.so /ti/ccs1000/ccs/ccs_base/DebugServer/bin
rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/bin2

rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/propertyDB
rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/drivers
rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/CacheInfo
rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/scripts
rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/schemas

rm -rf /ti/ccs1000/ccs/ccs_base/common/uscif
rm -rf /ti/ccs1000/ccs/ccs_base/common/targetdb/Modules/ihwa
rm /ti/ccs1000/ccs/ccs_base/common/bin/*.tar.gz
rm /ti/ccs1000/ccs/ccs_base/common/bin/libxerces-c*
rm /ti/ccs1000/ccs/ccs_base/common/bin/libsetup_parser.so
rm -rf /ti/ccs1000/ccs/ccs_base/common/install
rm -rf /ti/ccs1000/ccs/ccs_base/common/analysis
rm -rf /ti/ccs1000/ccs/ccs_base/common/IDE
rm -rf /ti/ccs1000/ccs/ccs_base/dvt*
rm -rf /ti/ccs1000/ccs/ccs_base/scripting
rm -rf /ti/ccs1000/ccs/ccs_base/c2000
rm -rf /ti/ccs1000/ccs/ccs_base/tiva
rm -rf /ti/ccs1000/ccs/ccs_base/eclipse
rm -rf /ti/ccs1000/ccs/ccs_base/doc
rm -rf /ti/ccs1000/ccs/ccs_base/arm

# this one does not take any significant space it is more the irony of a .desktop file in this CLI optomized world
rm "ccs1000/Code Composer Studio 10.1.0.desktop"

#!/bin/sh

# This script is the result of a loong trial an error, cleanup exercise on the CCS V. 10.1
# It reduced the size of the instalation from 1.8 Gb down to 0.5 Gb (where the compiler itself takes 0.2 Gb)
# So still after this cleanup we use 0.3 Gb just to convert the .project files into a makefile to run the compiler.


## As far as I can tell the folowing tree plugins is required
# This is base eclipse req.
# - org.eclipse.platform.ide
# Apears to contain the com.ti.ccstudio.apps.*
# - com.ti.ccstudio.idemain.feature.group \
# The build complaints of missing Compiler def if this is missing
# - com.ti.ccstudio.c2000.feature.group
#
# then there are some plugins that will not uninstall, like the debugServer
# there seams to be some circular dependencies to/from org.eclipse.platform.ide
# I will leave those sticky plugins on the uninstall list, maybe in the future
# TI cleans up this dependency mess :-) (you are alowed to hope)

/ti/ccs1000/ccs/eclipse/eclipse -application org.eclipse.equinox.p2.director \
-uninstallIU com.ti.arm.18.1.help.feature.group  \
-uninstallIU com.ti.c2000.18.1.help.feature.group  \
-uninstallIU com.ti.c2000.18.1.help.feature.group  \
-uninstallIU org.eclipse.help.feature.group  \
-uninstallIU com.ti.ccstudio.c5500.feature.group  \
-uninstallIU com.ti.ccstudio.c6000.feature.group  \
-uninstallIU com.ti.ccstudio.c7000.feature.group  \
-uninstallIU com.ti.ccstudio.cloudagent.linux.feature.group  \
-uninstallIU com.ti.ccstudio.debugserver.linux.feature.group  \
-uninstallIU com.ti.ccstudio.doc.linux.feature.group  \
-uninstallIU com.ti.ccstudio.msp430.feature.group  \
-uninstallIU com.ti.ccstudio.nodejs.linux.feature.group  \
-uninstallIU com.ti.ccstudio.tms470.feature.group  \
-uninstallIU com.ti.ccstudio.usersguide.feature.group  \
-uninstallIU com.ti.cgt.c2000.20.linux.feature.group  \
-uninstallIU com.ti.cgt.tms470.20.linux.feature.group  \
-uninstallIU com.ti.chromium.browser.feature.group  \
-uninstallIU com.ti.dvt.energytrace.feature.group  \
-uninstallIU com.ti.dvt2.analysis.suite.feature.group  \
-uninstallIU com.ti.dvt2.graph.visualization.feature.group  \
-uninstallIU com.ti.dvt2.profileanalysismanager.feature.group  \
-uninstallIU com.ti.dvt2.resource.explorer.feature.group  \
-uninstallIU com.ti.dvt2.rov.feature.group  \
-uninstallIU com.ti.dvt2.trace.ccs.feature.group  \
-uninstallIU com.ti.dvt2.trace.control.feature.group  \
-uninstallIU com.ti.dvt2.uia.feature.group  \
-uninstallIU com.ti.dvt2.via.ccs.feature.group  \
-uninstallIU com.ti.emulation.pack.linux.feature.group  \
-uninstallIU com.ti.tirex.feature.group  \
-uninstallIU com.ti.tirex4.feature.group \
-uninstallIU gnu.io.rxtx.feature.group  \
-uninstallIU org.eclipse.cdt.debug.ui.memory.feature.group  \
-uninstallIU org.eclipse.egit.feature.group  \
-uninstallIU org.eclipse.equinox.p2.user.ui.feature.group  \
-uninstallIU org.eclipse.help.feature.group  \
-uninstallIU org.eclipse.help.feature.group  \
-uninstallIU org.eclipse.help.feature.group  \
-uninstallIU org.eclipse.rtsc.xdctools.product.ui.feature.group  \
-uninstallIU org.eclipse.rtsc.xdctools.product_3.61.2.27.feature.group  \
-uninstallIU org.eclipse.tm.terminal.connector.cdtserial.feature.feature.group \
-uninstallIU com.ti.c2800.flash.feature.group \
-uninstallIU com.ti.c2000.support.linux.feature.group \
-uninstallIU com.ti.ccstudio.installer.linux64.feature.group \
-uninstallIU com.ti.cgt.dmed.linux.feature.group \
-uninstallIU com.ti.dbgtrc.webapp \
-uninstallIU com.ti.dsflash.linux.feature.group \
-uninstallIU com.ti.ccstudio.base.feature.group \
-uninstallIU com.ti.ccstudio.launcher.linux.feature.group \
-uninstallIU com.ti.ccstudio.p2tool.feature.group \
-uninstallIU com.ti.ccstudio.sysconfig.feature.group \
-uninstallIU com.ti.ccstudio.targetdb.props.default.linux.feature.group \
-uninstallIU com.ti.ccstudio.utils.cli.linux.feature.group \
-uninstallIU com.ti.ccstudio.workflow.feature.group \
-uninstallIU com.ti.ccstudio.p2appf.feature.group \
-uninstallIU org.eclipse.cdt.feature.group \
-uninstallIU org.eclipse.cdt.launch.remote.feature.group \
-uninstallIU org.eclipse.epp.mpc.feature.group \
-uninstallIU org.eclipse.equinox.p2.discovery.feature.feature.group \
-uninstallIU org.eclipse.equinox.p2.user.ui.feature.group \
-uninstallIU org.eclipse.gef.feature.group \
-uninstallIU org.eclipse.gmf.runtime.thirdparty.feature.group \
-uninstallIU org.eclipse.help.feature.group \
-uninstallIU org.eclipse.rse.feature.group \
-uninstallIU org.eclipse.tm.terminal.feature.feature.group \
-uninstallIU org.eclipse.cdt.build.crossgcc.feature.group \
-uninstallIU com.ti.targetcontent.feature.group \
-uninstallIU org.eclipse.help.feature.group \
-uninstallIU org.eclipse.equinox.p2.user.ui.feature.group \
-uninstallIU com.ti.gc.backplane.feature.group \
-uninstallIU com.ti.gc.pm.feature.group \
-uninstallIU com.ti.debug.server.feature.group \
-uninstallIU com.ti.tools.common.feature.group \


/ti/ccs1000/ccs/eclipse/eclipse -application org.eclipse.equinox.p2.garbagecollector.application -profile epp.package.cpp
#/ti/ccs1000/ccs/eclipse/eclipse -application org.eclipse.equinox.p2.director -listInstalledRoots


#then some brutal file deletion, there is a lot of cruft to get rid of here


rm /ti/ccs1000/ccs/eclipse/ccstudio
rm -rf /ti/ccs1000/xdctools*
rm -rf /ti/ccs1000/ccs/uninstal*
rm -rf /ti/ccs1000/ccs/tirex*
rm -rf /ti/ccs1000/ccs/install_*
rm -rf /ti/ccs1000/ccs/.install*
rm -rf /ti/ccs1000/ccs/doc
rm -rf /ti/ccs1000/ccs/utils/sysconfig*
rm -rf /ti/ccs1000/ccs/utils/bin/make-4.1.tar.bz2
rm -rf /ti/ccs1000/ccs/utils/tiobj2bin
rm -rf /ti/ccs1000/ccs/tools/node
rm -rf /ti/ccs1000/ccs/ccs_base/emulation
rm -rf /ti/ccs1000/ccs/ccs_base/cloudagent

# Keep 3 out of a bunch so move-copy-delete
mv /ti/ccs1000/ccs/ccs_base/DebugServer/bin /ti/ccs1000/ccs/ccs_base/DebugServer/bin2
mkdir /ti/ccs1000/ccs/ccs_base/DebugServer/bin
cp /ti/ccs1000/ccs/ccs_base/DebugServer/bin2/libti_xpcom.so /ti/ccs1000/ccs/ccs_base/DebugServer/bin
cp /ti/ccs1000/ccs/ccs_base/DebugServer/bin2/libXPCOMUtility.so /ti/ccs1000/ccs/ccs_base/DebugServer/bin
cp /ti/ccs1000/ccs/ccs_base/DebugServer/bin2/libDirectoryService.so /ti/ccs1000/ccs/ccs_base/DebugServer/bin
rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/bin2

rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/propertyDB
rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/drivers
rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/CacheInfo
rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/scripts
rm -rf /ti/ccs1000/ccs/ccs_base/DebugServer/schemas

rm -rf /ti/ccs1000/ccs/ccs_base/common/uscif
rm -rf /ti/ccs1000/ccs/ccs_base/common/targetdb/Modules/ihwa
rm /ti/ccs1000/ccs/ccs_base/common/bin/*.tar.gz
rm /ti/ccs1000/ccs/ccs_base/common/bin/libxerces-c*
rm /ti/ccs1000/ccs/ccs_base/common/bin/libsetup_parser.so
rm -rf /ti/ccs1000/ccs/ccs_base/common/install
rm -rf /ti/ccs1000/ccs/ccs_base/common/analysis
rm -rf /ti/ccs1000/ccs/ccs_base/common/IDE
rm -rf /ti/ccs1000/ccs/ccs_base/dvt*
rm -rf /ti/ccs1000/ccs/ccs_base/scripting
rm -rf /ti/ccs1000/ccs/ccs_base/c2000
rm -rf /ti/ccs1000/ccs/ccs_base/tiva
rm -rf /ti/ccs1000/ccs/ccs_base/eclipse
rm -rf /ti/ccs1000/ccs/ccs_base/doc
rm -rf /ti/ccs1000/ccs/ccs_base/arm

# this one does not take any significant space it is more the irony of a .desktop file in this CLI optomized world
rm "ccs1000/Code Composer Studio 10.1.0.desktop"

  • Hello Martin,

    I assume you wish to work with CCS projects (instead of a wholly makefile based system) and need the ability to build CCS projects using the headless project commands. Are you also interested in debug (via DSS)? Or strictly just a build environment only?

    Thanks

    ki

  • Yes I am using CCS projects, and they are not makefile defined. My reference to makefiles is about what happens when you start a build is CCS, CCS will read your configuration in the project file, and generate some makefiles, and call make, and in the GUI version it will also capture and parse the ouput from the make/compiler commands, giving you a list of warnings a.s.o.

    To maybe make it more clear

    I have two setups,

    1. my desktop: with a fully fledged GUI version, with debugger, editor, c indexer and all the bells and whistles.
    2. My build pipeline, a 100% build only installation, no debug no whatsoever only build.

    In my build pipeline I call two commands.

    eclipse -noSplash -data $(build.BinariesDirectory) -application com.ti.ccstudio.apps.projectImport -ccs.overwrite -ccs.location dsp/Delfino
    eclipse -nosplash -data $(build.BinariesDirectory) -application com.ti.ccstudio.apps.projectBuild -ccs.autoImport -ccs.buildType full -ccs.projects Delfino -ccs.configuration Release
  • Thank you for the clarification.

    I have filed an enhancement request for this. Tracking link: https://sir.ext.ti.com/jira/browse/EXT_EP-10259

    Thanks

    ki