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.

MSP432P401R: 使用gcc编译,build TI-RTOS时出现的两个问题

Part Number: MSP432P401R

我使用gcc+clion+openOCD的工具链试图对包含了TI-RTOS的项目进行了build操作,出现以下几个问题:

1. 在ti/posix/gcc/sys/types.h中出现#error "When compiling with TI-POSIX, you must define -std=c99 (or later). You must not define _POSIX_SOURCE or _POSIX_C_SOURCE."

然而,我在项目的cmakelists.txt中已经 set(CMAKE_C_STANDARD 11),在整个项目的文件中也没有发现#define _POSIX...;

2. ti/posix/gcc/sys/types.h中许多结构体与编译环境中的arm-none-eabi\include\sys\_pthreadtypes.h中的重名冲突;

请问第一个问题是写法问题吗?这两个编译报错我应该怎么做?

  • 更正:第一个问题中在titos中的ti/gnu/targets/arm/libs/install-native/arm-none-eabi/include/sys/features.h发现了

    _POSIX_C_SOURCE和_POSIX_SOURCE

    但是这里是sdk自带内容,这种冲突我应该怎么办?

  • 我使用gcc+clion+openOCD的工具链试图对包含了TI-RTOS的项目进行了build操作

    抱歉,目前没有安装该工具链。若是您想使用GCC编译的话,可以直接在SDK内找到对应的工程,并导入CCS

    如在CCS内直接点击 Project-->import project