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.

Build Clean doesn't work using external builder

Other Parts Discussed in Thread: TMS320F28377D, SYSBIOS

Hi All,

We use scons to control our builds.  I'm setting up a CCS project to run my scons command when I build.  It works fine for "Build Project", but it does not work for "Clean Project".  When I execute "Clean Project",  the Console clears, but no new text is output to the console and the object files are not deleted.

How can I get this to work?  Screen shots of my build setup are below.  I'm running Code Composer  Version: 6.1.1.00022.

Thanks,

Matt

  • Matt Ellis1 said:
    I'm setting up a CCS project to run my scons command when I build.  It works fine for "Build Project", but it does not work for "Clean Project".  When I execute "Clean Project",  the Console clears, but no new text is output to the console and the object files are not deleted.

    Matt,

    Can you provide the full output seen in the CCS build console both when you Build Project and Clean Project? You can save them to a text file and attach here. Maybe that will give some clues as to why the -c option is not working.

    I personally don't have experience with using scons in CCS, but it appears that it does not use a Makefile or equivalent (with make rules) for the build. Is that correct? 

  • Thanks for your reply. Attached is my build output when I perform a "Build Project" from within CCS. This is correct. When I do a "Build Clean", the console is cleared and there is no text in the console.

    Note that I am able to do both a full build and a build clean using the scons commands from a command prompt. I think the problem is that for some reason CCS is not executing my "Build Command" when I do a Build Clean. When I do a Build Project from CCS, the console shows my scons build command exactly as I entered it into CCS. When I do a build clean, I expect to see the same scons build command except with -c added to the end.

    Thanks again for your help!



    **** Build of configuration Config 01 for project PCS ****

    cmd /c scons --config_map=pcs:1 --jobs=4 --no_unit_test --nolint
    scons: dir.\site_scons
    scons: Reading SConscript files ...
    Parsing configurations for pcs
    Using windows compiler on windows
    scons: done reading SConscript files.
    scons: Building targets ...
    "C:/program-files-nospaces/ti/xdctools_3_30_06_67\xs.exe" --xdcpath="C:/program-files-nospaces/ti/bios_6_42_01_20\packages;" xdc.tools.configuro -o components\charger\PCS\PCS_P-1_A-1_U-1\configPkg -t ti.targets.C28_float -p ti.platforms.tms320x28:TMS320F28377D -r debug -c "C:/program-files-nospaces/ti/cg2000_6_4_6" --compileOptions "-g --optimize_with_debug" components\charger\PCS\pcs.cfg
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring pcs.x28FP from package/cfg/pcs_p28FP.cfg ...
    generating custom ti.sysbios library makefile ...
    Starting build of library sources ...
    making C:/TeslaGit/firmware/components/charger/PCS/src/sysbios/sysbios.a28FP ...
    gmake[1]: Entering directory `C:/TeslaGit/firmware/components/charger/PCS/src/sysbios'
    cl28FP C:/program-files-nospaces/ti/bios_6_42_01_20/packages/ti/sysbios/BIOS.c ...
    asm28FP C:/program-files-nospaces/ti/bios_6_42_01_20/packages/ti/sysbios/family/c28/Hwi_asm.s28 ...
    asm28FP C:/program-files-nospaces/ti/bios_6_42_01_20/packages/ti/sysbios/family/c28/Hwi_disp_asm.s28 ...
    asm28FP C:/program-files-nospaces/ti/bios_6_42_01_20/packages/ti/sysbios/family/c28/IntrinsicsSupport_asm.s28 ...
    asm28FP C:/program-files-nospaces/ti/bios_6_42_01_20/packages/ti/sysbios/family/c28/TaskSupport_asm.s28 ...
    ar28FP BIOS.obj c28_Hwi_asm.obj c28_Hwi_disp_asm.obj c28_IntrinsicsSupport_asm.obj c28_TaskSupport_asm.obj ...
    gmake[1]: Leaving directory `C:/TeslaGit/firmware/components/charger/PCS/src/sysbios'
    Build of libraries done.
    cl28FP package/cfg/pcs_p28FP.c ...
    "C:/program-files-nospaces/ti/cg2000_6_4_6\bin\cl2000.exe" -v28 --large_memory_model --unified_memory --gen_func_subsections --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --fp_mode=relaxed --opt_level=3 --opt_for_speed=0 --advice:performance=all --keep_asm --c_src_interlist --preproc_with_compile --c99 --c++03 --relaxed_ansi --define=CPU1 --display_error_number --diag_remark=2170 -d__STDC_LIMIT_MACROS -Dxdc__strict -DCPU1 -DASSEMBLY_ID=1U -DBUILD_APP_MOD=0 -DBUILD_PROTO_MOD=0 -DBUILD_TYPE=2U -DCOMPONENT_BRANCH_ORIGIN=0U -DCOMPONENT_BRANCH_REVISION=0U -DCOMPONENT_ID=27U -DCOMPONENT_MAJOR_VERSION=254U -DLOCAL_BUILD=1 -DPCBA_ID=1U -DPLATFORM_BRANCH_ORIGIN=0U -DPLATFORM_BRANCH_REVISION=0U -DPLATFORM_MAJOR_VERSION=0U -DPLATFORM_VEHICLE_TYPE=0U -DSHAREDSOURCES_SVN_REVISION=0 -DSHAREDSOURCES_SVN_URL_HASH=0xFFFFFFFFU -DSVN_APP=0 -DSVN_DATE=0 -DSVN_DATE_PROTO=0 -DSVN_PROTO=0 -DSVN_TIME=0 -DSVN_TIME_PROTO=0 -DUSAGE_ID=1U -IC:\program-files-nospaces\ti\cg2000_6_4_6\include -IC:\program-files-nospaces\ti\bios_6_42_01_20\packages\ti\bios\include -Icomponents\charger\PCS\PCS_P-1_A-1_U-1 -Icomponents\charger\PCS\include -Icomponents\charger\PCS\include\pcba\1 -Icomponents\charger\PCS\include\F2837xD -Icomponents\charger\PCS\include\library -Icomponents\charger\PCS\include\device -Icomponents\charger\PCS\platform\hal\include -Icomponents\charger\PCS\platform\hal\ti\F2837XD -Icomponents\charger\PCS\platform\hal\ti\F2837XD\vendor\include -Icomponents\charger\PCS\systemFrameworks\include -Icomponents\charger\PCS\xcp -Icomponents\charger\PCS\PCS_P-1_A-1_U-1\C:/program-files-nospaces/ti/cg2000_6_4_6\include -Icomponents\charger\PCS\PCS_P-1_A-1_U-1\C:/program-files-nospaces/ti/cg2000_6_4_6\lib -Icomponents\charger\PCS\PCS_P-1_A-1_U-1\C:/program-files-nospaces/ti/xdctools_3_30_06_67\packages -Icomponents\charger\PCS\PCS_P-1_A-1_U-1\C:/program-files-nospaces/ti/bios_6_42_01_20\packages -Icomponents\charger\PCS\PCS_P-1_A-1_U-1\C:/program-files-nospaces/ti/bios_6_42_01_20\packages\include -Icomponents\charger\PCS\lint -Igenerated-headers -Icomponents\charger\PCS\PCS_P-1_A-1_U-1\include -IC:\program-files-nospaces\ti\cg2000_6_4_6\lib -IC:\program-files-nospaces\ti\xdctools_3_30_06_67\packages -IC:\program-files-nospaces\ti\bios_6_42_01_20\packages -IC:\program-files-nospaces\ti\bios_6_42_01_20\packages\include -frcomponents\charger\PCS\PCS_P-1_A-1_U-1 -fscomponents\charger\PCS\PCS_P-1_A-1_U-1 -ftcomponents\charger\PCS\PCS_P-1_A-1_U-1 --cmd_file=C:\TeslaGit\firmware\components\charger\PCS\PCS_P-1_A-1_U-1\configPkg\compiler.opt -c components\charger\PCS\source\pcs.c
    "C:/program-files-nospaces/ti/cg2000_6_4_6\bin\cl2000.exe" -v28 --large_memory_model --unified_memory --gen_func_subsections --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --fp_mode=relaxed --opt_level=3 --opt_for_speed=0 --advice:performance=all --keep_asm --c_src_interlist --run_linker --warn_sections --reread_libs --rom_model --stack_size=0x200 --define=CPU1 --diag_suppress=16002 -ocomponents\charger\PCS\PCS_P-1_A-1_U-1\PCS_P-1_A-1_U-1_GIT-19d955c.out -mcomponents\charger\PCS\PCS_P-1_A-1_U-1\PCS_P-1_A-1_U-1_GIT-19d955c.map -lcomponents\charger\PCS\PCS_P-1_A-1_U-1/configPkg/linker.cmd -lC:/program-files-nospaces/ti/cg2000_6_4_6/lib/rts2800_fpu32.lib -llibs/vendor/ti/c2000/C28X_IQMath_library/v160/lib/IQmath_fpu32.lib components\charger\PCS\PCS_P-1_A-1_U-1\pcs.obj components\charger\PCS\cmd\F2837xD_Headers_BIOS_cpu1.cmd components\charger\PCS\cmd\pcs_F28377D.cmd
    <Linking>


    **** Build Finished ****
  • Matt Ellis1 said:
    Note that I am able to do both a full build and a build clean using the scons commands from a command prompt. I

    Can you show what the clean command and its output looks like when executed from command prompt?

  • Here is the output from a clean command from the command prompt.  Note that it executes the same command as a build except with -c added to the end.

    c:\Git\firmware> cmd /c scons --config_map=pcs:1 --jobs=4 --no_unit_test --nolint -c
    scons: dir.\site_scons
    scons: Reading SConscript files ...
    Parsing configurations for pcs
    Using windows compiler on windows
    scons: done reading SConscript files.
    scons: Cleaning targets ...
    Removed components\charger\PCS\PCS_P-1_A-1_U-1\pcs.obj
    Removed components\charger\PCS\PCS_P-1_A-1_U-1\pcs.asm
    Removed components\charger\PCS\PCS_P-1_A-1_U-1\PCS_P-1_A-1_U-1_GIT-19d955c.out
    Removed components\charger\PCS\PCS_P-1_A-1_U-1\PCS_P-1_A-1_U-1_GIT-19d955c.map
    Removed components\charger\PCS\PCS_P-1_A-1_U-1\PCS_P-1_A-1_U-1_GIT-19d955c.hex
    Removed components\charger\PCS\PCS_P-1_A-1_U-1\PCS_P-1_A-1_U-1_GIT-19d955c.mxp
    Removed components\charger\PCS\PCS_P-1_A-1_U-1\PCS_P-1_A-1_U-1_GIT-19d955c_CRC.hex
    scons: done cleaning targets.

  • Matt,

    Without having scons installed, i've created a test project with the same build settings as yours, and it does seem to behave as you would expect.

    Build Project action output:

    **** Build of configuration Debug for project zz ****

    cmd /c scons --config_map=pcs: --jobs=4 --no_unit_test --nolint
    'scons' is not recognized as an internal or external command,
    operable program or batch file.

    **** Build Finished ****

    Clean Project action output:

    **** Clean-only build of configuration Debug for project zz ****

    cmd /c scons --config_map=pcs: --jobs=4 --no_unit_test --nolint -c
    'scons' is not recognized as an internal or external command,
    operable program or batch file.

    **** Build Finished ****

    Can you send us your <workspace>/.metadata/.log file?  There might be an uncaught exception somewhere that's preventing the clean-build from running.

    Thanks,

    - Baltasar

  • Oh, i have just reproduced your problem.

    CCS suppresses the 'clean' command if it doesn't find the build-configuration directory (PCS/Config 01/ in your case), or if that directory is empty.  This was done to avoid unnecessarily launching gmake and causing it to display confusing error messages, when cleaning a project which has never been built.  For the next CCS release (6.2.0), I will modify this to only happen during "managed" builds (when the "Generate makefiles automatically" checkbox is checked).

    Until then, you can work around this problem by adding any empty file into your PCS/Config 01/ folder:

    Thanks,

    - Baltasar

  • Baltasar,

    Thanks very much; that fixed it!  I appreciate your help.

    Regards,

    Matt

  • Hi,

    i am trying to figure out how to use an Sconstruct file to run a project build within ccs. I am not that much familiar with CCS and will highly appreciate any help that you are able to provide. Attached is a specific  Sconstruct file that i will like to use but i have no clue how to do it.


    Thanks

    Thierry

    SConstruct.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    import subprocess
    import os
    def projName(extension):
    return env['vars']['buildDir'] + '/' + env['vars']['projName'] + extension
    env = Environment()
    env['vars'] = {}
    # Version information - user changes this regularly
    env['vars']['verMajor'] = 1
    env['vars']['verMinor'] = 1
    env['vars']['appType'] = "App"
    SConscript(['../tools/common/SConscript'])
    env['vars']['sourcesC'] = []
    env['vars']['sourcesCC'] = []
    env['vars']['sourcesAsm']= []
    env['vars']['projName'] = 'MTC'
    env['vars']['isTestBuild'] = ARGUMENTS.get('unittest', '0').lower()
    env['vars']['buildType'] = ARGUMENTS.get('BUILD_TYPE', 'debug').upper()
    env['vars']['hwRev'] = ARGUMENTS.get('HW_REV', 'reva').lower()
    env['vars']['platformDir'] = 'platform/HalCoGen' + env['vars']['hwRev']
    env['vars']['buildDir'] = env['vars']['buildType']
    env['vars']['nowECCPath'] = os.path.abspath(env['vars']['buildDir']) + '/../../tools/nowECC.exe'
    env['vars']['sourcesDir'] = [
    'app/appsrc',
    'app/autogen/canautogen',
    'app/capi',
    'lib/sharedmathlibrary/MathLibSrc',
    'lib/can-proto/src',
    'lib/can-proto/src/server'
    ]
    env['CPPPATH'] = [
    'lib/flashapi/include',
    'lib/sharedmathlibrary/MathLibHdr',
    'app/autogen/canautogen',
    'app/capi',
    'drivers',
    'app/apphdr',
    'lib/can-proto/inc',
    env['vars']['platformDir'] +'/include'
    ]
    env['LIBPATH'] = [
    'lib/flashapi'
    ]
    env['LIBS'] = [
    'rtsv7R4_T_be_v3D16_eabi.lib',
    'F021_API_CortexR4_BE_L2FMC_V3D16_NDS.lib'
    ]
    env['CFLAGS'] = [
    '-mv7R4',
    '--define=CCS',
    '--code_state=16',
    '--float_support=VFPv3D16',
    '--abi=eabi',
    '-O3',
    '--gen_func_subsections=on',
    '-g',
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX