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.

LAUNCHXL-CC1352R1: Build error with CMake and GCC

Part Number: LAUNCHXL-CC1352R1
Other Parts Discussed in Thread: CC1352R

Hello,


I am trying to build a cc1352r project using CMake and GCC since CMake support was sort of added in simplelink sdk v6. However, I can't avoid getting the following error:

#error "When compiling with TI-POSIX, you must define -std=c99 (or later). You must not define _POSIX_SOURCE or _POSIX_C_SOURCE."

In the attachment, you can find a full build log output. Any ideas on how to solve this?


Best Regards,
Aleksa

aleksa@aleksa:~/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/build$ make
[ 33%] Building C object CMakeFiles/uart2echo.elf.dir/tirtos7/main_tirtos.c.o
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:73: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/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:92:3: error: conflicting types for 'pthread_attr_t'
 } pthread_attr_t;
   ^~~~~~~~~~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:75:3: note: previous declaration of 'pthread_attr_t' was here
 } pthread_attr_t;
   ^~~~~~~~~~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:95:18: error: conflicting types for 'pthread_condattr_t'
 typedef uint32_t pthread_condattr_t;
                  ^~~~~~~~~~~~~~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:186:3: note: previous declaration of 'pthread_condattr_t' was here
 } pthread_condattr_t;         /* a condition attribute object */
   ^~~~~~~~~~~~~~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:97:15: error: conflicting types for 'pthread_key_t'
 typedef void *pthread_key_t;
               ^~~~~~~~~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:190:20: note: previous declaration of 'pthread_key_t' was here
 typedef __uint32_t pthread_key_t;        /* thread-specific data keys */
                    ^~~~~~~~~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:103:3: error: conflicting types for 'pthread_mutexattr_t'
 } pthread_mutexattr_t;
   ^~~~~~~~~~~~~~~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:169:3: note: previous declaration of 'pthread_mutexattr_t' was here
 } pthread_mutexattr_t;
   ^~~~~~~~~~~~~~~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:107:15: error: conflicting types for 'pthread_t'
 typedef void *pthread_t;
               ^~~~~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:32:20: note: previous declaration of 'pthread_t' was here
 typedef __uint32_t pthread_t;            /* identify a thread */
                    ^~~~~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:117:3: error: conflicting types for 'pthread_cond_t'
 } pthread_cond_t;
   ^~~~~~~~~~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:176:20: note: previous declaration of 'pthread_cond_t' was here
 typedef __uint32_t pthread_cond_t;       /* identify a condition variable */
                    ^~~~~~~~~~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:122:3: error: conflicting types for 'pthread_mutex_t'
 } pthread_mutex_t;
   ^~~~~~~~~~~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:154:20: note: previous declaration of 'pthread_mutex_t' was here
 typedef __uint32_t pthread_mutex_t;      /* identify a mutex */
                    ^~~~~~~~~~~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:124:18: error: conflicting types for 'pthread_once_t'
 typedef uint32_t pthread_once_t;
                  ^~~~~~~~~~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:195:3: note: previous declaration of 'pthread_once_t' was here
 } pthread_once_t;       /* dynamic package initialization */
   ^~~~~~~~~~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/time.h:51:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:48,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/signal.h:76:7: error: redefinition of 'union sigval'
 union sigval {
       ^~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/signal.h:6:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/signal.h:48,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/time.h:51,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:48,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/signal.h:42:7: note: originally defined here
 union sigval {
       ^~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/time.h:51:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:48,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/signal.h:90:8: error: redefinition of 'struct sigevent'
 struct sigevent {
        ^~~~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/signal.h:6:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/signal.h:48,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/time.h:51,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:48,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/signal.h:47:8: note: originally defined here
 struct sigevent {
        ^~~~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:49:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sched.h:71:8: error: redefinition of 'struct sched_param'
 struct sched_param {
        ^~~~~~~~~~~
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:23:0,
                 from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/sched.h:48:8: note: originally defined here
 struct sched_param {
        ^~~~~~~~~~~
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:0:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:57:0: warning: "PTHREAD_CREATE_JOINABLE" redefined
 #define PTHREAD_CREATE_JOINABLE     0
 
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:47:0: note: this is the location of the previous definition
 #define PTHREAD_CREATE_JOINABLE  1
 
In file included from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:0:
/home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:58:0: warning: "PTHREAD_CREATE_DETACHED" redefined
 #define PTHREAD_CREATE_DETACHED     1
 
In file included from /home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/types.h:239:0,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/sys/types.h:49,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/source/ti/posix/gcc/pthread.h:47,
                 from /home/aleksa/ti/simplelink_cc13xx_cc26xx_sdk_6_40_00_13/examples/nortos/CC1352R1_LAUNCHXL/drivers/cmake_sample/uart2echo_rtos/tirtos7/main_tirtos.c:40:
/home/aleksa/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/include/sys/_pthreadtypes.h:46:0: note: this is the location of the previous definition
 #define PTHREAD_CREATE_DETACHED 0
 
make[2]: *** [CMakeFiles/uart2echo.elf.dir/build.make:76: CMakeFiles/uart2echo.elf.dir/tirtos7/main_tirtos.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/uart2echo.elf.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

  • Hi Aleksa, 

    As the error suggests, you need to provide the C99 define. This is to ensure the correct types are used in the source. 

    This error message is generated from types.h found in the path [SDK_PATH]/soure/ti/posix/gcc/sys/

    Regards,

    Sid

  • I've provided c99 define, that's not the issue.

    I was able to work around this by adding:
     

    #undef _POSIX_C_SOURCE
    #undef _POSIX_SOURCE
    

    in the ~/ti/ccs1040/ccs/tools/compiler/gcc-arm-none-eabi-7-2017-q4-major/include/sys/features.h, where these two symbols are defined. But this is not a long-term solution obviously.

    I would prefer not to update the CCS version unless it's required.

  • Hi Aleksa, 

    The image that I posted with the snippet from types.h header file from the SDK does mention that you need to undefine the macros that you have undefined. What you have done seems to be the correct way of handling the error and to ensure the correct variable types are used. 
    Regards,
    Sid