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/CC1310: How to move projects from Simplelink 2.20 to 2.30 (along with CCS 8.1 to 8.3)?

Part Number: CC1310

Tool/software: TI-RTOS

I was recently forced to tear down and rebuild my CCS environment and decided to upgrade to CCS 8.3 and the corresponding 2.30 simplelink. When I pulled an existing project from a git repository (that had built a hundred times with 8.1/2.20) I got these kinds of messages during a build:

                 from /home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/kernel/tirtos/packages/ti/sysbios/rts/gnu/ReentSupport.c:50:
/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/source/ti/posix/gcc/sys/types.h:72:2: error: #error "When compiling with TI-POSIX, you must define -std=c99 (or later). You must not define _POSIX_SOURCE or _POSIX_C_SOURCE."
 #error "When compiling with TI-POSIX, you must define -std=c99 (or later). You must not define _POSIX_SOURCE or _POSIX_C_SOURCE."
  ^~~~~
/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/source/ti/posix/gcc/sys/types.h:91:3: error: conflicting types for 'pthread_attr_t'
 } pthread_attr_t;

What's the story with this? How is one supposed to move from one version of CCS and SImplelink libraries to another without these kinds of backwards compatibility issues biting?

(I searched for a half dozen subsets of the strings above but found nothing relevant)

  • Hi Pete,

    In your project's properties, under CCS Build -> GNU Compiler -> Language, is the C language standard set to C99?
  • That has no effect. I'd been using C99 features forever. But no, it wasn't set but it is now. I'm literally unable to build a product image because of this bug and I'm working on something way way more important than setting up an 8.1/2.20 system in order to build the other product, so I'm just hosed for the time being.
  • In your *.cfg file, verify that the following configuration is present:

    // ==> FROM <==
    var Settings = xdc.useModule('ti.sysbios.posix.Settings');
    Settings.supportsMutexPriority = true;
    
    // ==> TO <==
    var Settings = xdc.useModule('ti.posix.tirtos.Settings');
    Settings.enableMutexPriority = true;

    And that the include paths in the project properties are as follows:

    // ==> FROM <==
    TIRTOS: <SDK_INSTALL_DIR>/kernel/tirtos/packages/ti/sysbios/posix
    
    // ==> TO <==
    CCS Compiler: <SDK_INSTALL_DIR>/source/ti/posix/ccs
    GCC Compiler: <SDK_INSTALL_DIR>/source/ti/posix/gcc

    depending if you are using the CCS compiler or the GCC compiler.

  • Thank you, Severin. I couldn't find anything matching the .cfg file "from" or "to" settings you mentioned so I simply appended the "To" (i.e. var Settings = xdc.useModule('ti.posix.tirtos.Settings'); and

    Settings.supportsMutexPriority = true;)  to my .cfg file. In project properties I already have this under GNU compiler directories:

    "${COM_TI_SIMPLELINK_CC13X0_SDK_INSTALL_DIR}/source/ti/posix/gcc"

    Is this the right thing?

    With the two lines pasted into the main .cfg file I now get this after a  "clean project" followed by "build project":

    **** Build of configuration Debug for project Gateway-WIFI-MASTER-MERGE ****
    
    /home/psoper/rt1/ti/ccsv8/utils/bin/gmake -k -j 12 all -O 
     
    Building file: "../gateway.cfg"
    Invoking: XDCtools
    "/home/psoper/rt1/ti/xdctools_3_50_08_24_core/xs" --xdcpath="/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/source;/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/kernel/tirtos/packages;/home/psoper/rt1/ti/ccsv8/ccs_base;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.M3 -p ti.platforms.simplelink:CC1310F128 -r release -c "/home/psoper/rt1/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major" --compileOptions "-mcpu=cortex-m3 -march=armv7-m -mthumb -mfloat-abi=soft -DSECURE_OPTION -DCRASH_DEBUG -DBOARD_GATEWAY_REV2 -DJSMN_STRICT -DDeviceFamily_CC13X0 -I\"/home/psoper/rt1/dev/gen2-gateway-merge-target/jsmn\" -I\"/home/psoper/rt1/dev/gen2-gateway-merge-target/service\" -I\"/home/psoper/rt1/dev/gen2-gateway-merge-target\" -I\"/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/source/ti/posix/gcc\" -I\"/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include/newlib-nano\" -I\"/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include\" -I\"/home/psoper/rt1/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include\" -I\"/home/psoper/rt1/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include\" -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -Werror  " "../gateway.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring gateway.xm3g from package/cfg/gateway_pm3g.cfg ...
    subdir_rules.mk:17: recipe for target 'build-1436523279-inproc' failed
    js: "/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/source/ti/posix/tirtos/Settings.xs", line 80: Error: Task.enableIdleTask must be set to true
    gmake: *** [package/cfg/gateway_pm3g.xdl] Error 1
    js: "/home/psoper/rt1/ti/xdctools_3_50_08_24_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake[1]: *** [build-1436523279-inproc] Error 1
    /home/psoper/rt1/dev/gen2-gateway-merge-target/scripts/pre-build.sh
     
    Building file: "../gateway.cfg"
    Invoking: XDCtools
    "/home/psoper/rt1/ti/xdctools_3_50_08_24_core/xs" --xdcpath="/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/source;/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/kernel/tirtos/packages;/home/psoper/rt1/ti/ccsv8/ccs_base;" xdc.tools.configuro -o configPkg -t gnu.targets.arm.M3 -p ti.platforms.simplelink:CC1310F128 -r release -c "/home/psoper/rt1/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major" --compileOptions "-mcpu=cortex-m3 -march=armv7-m -mthumb -mfloat-abi=soft -DSECURE_OPTION -DCRASH_DEBUG -DBOARD_GATEWAY_REV2 -DJSMN_STRICT -DDeviceFamily_CC13X0 -I\"/home/psoper/rt1/dev/gen2-gateway-merge-target/jsmn\" -I\"/home/psoper/rt1/dev/gen2-gateway-merge-target/service\" -I\"/home/psoper/rt1/dev/gen2-gateway-merge-target\" -I\"/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/source/ti/posix/gcc\" -I\"/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include/newlib-nano\" -I\"/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/include\" -I\"/home/psoper/rt1/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include\" -I\"/home/psoper/rt1/ti/ccsv8/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include\" -ffunction-sections -fdata-sections -g -gdwarf-3 -gstrict-dwarf -Wall -Werror  " "../gateway.cfg"
    configuring gateway.xm3g from package/cfg/gateway_pm3g.cfg ...
    subdir_rules.mk:17: recipe for target 'build-1436523279-inproc' failed
    js: "/home/psoper/rt1/ti/simplelink_cc13x0_sdk_2_30_00_20/source/ti/posix/tirtos/Settings.xs", line 80: Error: Task.enableIdleTask must be set to true
    gmake: *** [package/cfg/gateway_pm3g.xdl] Error 1
    js: "/home/psoper/rt1/ti/xdctools_3_50_08_24_core/packages/xdc/tools/Cmdr.xs", line 52: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake[2]: *** [build-1436523279-inproc] Error 1
    gmake[1]: *** [build-1436523279] Error 2
    gmake[1]: Target 'main-build' not remade because of errors.
    gmake: *** [all] Error 2
    subdir_rules.mk:14: recipe for target 'build-1436523279' failed
    makefile:171: recipe for target 'all' failed
    
    **** Build Finished ****
    Regards,

  • "${COM_TI_SIMPLELINK_CC13X0_SDK_INSTALL_DIR}/source/ti/posix/gcc" looks good.

    The *.cfg seems to throw a fit. You can see the error message saying "Error: Task.enableIdleTask must be set to true".

    Could you upload the *.cfg file here so I could take a look?
  • Yes, I saw that, but don't begin to appreciate the meaning. I've multiplied my understanding of (a small sliver of) the TI tool chain and some of the MCUs by a factor of a hundred in the past few months, but I feel like the guy arriving at the airport at Katmandu saying "look at me, I'm a real mountain climber". :-) 

    Since yesterday some other circumstances forced me to set up a CCS 8.1/Simplelink 2.20 environment and when I created a project out of the same source directory as with yesterday's episode it would not build. So my bridge is fully burned and my next move is to copy my updated source code files into a directory that does build and then clean up the git mess that creates.

    But it would be great to understand what I fouled up in an earlier step by simply importing the code from the CCS 8.1 project earlier as a CCS 8.3 project and hitting this build problem that caused me to start the thread. Here is the .cfg file (but I had already deleted the two added lines when trying to go back to 8.1, so you won't see them at the end).

    OK, first time doing an "insert file" and what I see below is a big dark gray circle on lighter gray background. So here goes nothing. If this is unreadable I'll try again. 

    gateway.cfg

  • I can feel you frustration, having CCS projects under version control has never been smooth and is usually discouraged because of this...

    I'm going to take a look at your *.cfg file to see if I can reproduce your issue. But, I fear that the easiest "solution" here would be to open up an empty project from the 2.30 SDK and move your source files to that project from the previous project.

    Edit:
    I think I found out what the problem is. Initially, you are compiling TI-RTOS without POSIX, but somewhere in your code you are compiling code which uses POSIX (for whatever reason). This obviously won't work. So, we enabled POSIX in your TI-RTOS configuration, but your *.cfg is configured without idle task (Task.enableIdleTask = false;) which POSIX requires. This again throws an error. This can be fixed by enabling idle task again (Task.enableIdleTask = true;).

    Now, my question is this: Are you using POSIX or referencing UNIX system headers, such as unistd.h, in your application? Something is triggering the initial error. If you are fine by using POSIX, then did you mean to disable the idle task? What is your reason for doing so? If there aren't any good reason, then you can enable idle task which fixes the second error.
  • I didn't mean to disable the idle task and don't know how that happened. I inherited this code and don't know the details. I may have an include of unistd.h someplace. But it's very encouraging to hear you mention the "take an empty project and layer your source into it" as this is what I've been considering. This code started with SimpleLink 1.6 and I would like to get it's environment into a known state, so with these tips I think I'm on my way. Thanks very much.
  • I removed a properties include path posix (only: no substitution) of other paths, cleaned some unresolved linker references up by deleting their mentions in .cproject, and for some reason was forced to remove all asm statements.The asm statements in the code were completely superfluous and on the list to be nuked anyway, so that wasn't a problem. Whew!