偶然看到TI的文档的截图
那么如果要是 有POSIX支持的SDK下面编程,一定很爽,于是对比了一下TI提供的工程实例,首先是头文件
有了头文件支持,但是编译还是过不去
于是看配置文件
里面有一个 POSIX configuration于是赶紧再ble的工程添加它
就是下面的这个配置
/* ================ POSIX configuration ================ */
var Settings = xdc.useModule('ti.posix.tirtos.Settings');
if (Program.build.target.$name.match(/iar/)) {
/*
* For the IAR target, the 'ti.posix.tirtos.Settings' uses the
* MultithreadSupport module. By default, the MultithreadSupport module
* use the '--threaded_lib' library which provides a separate 'errno'
* per thread and makes other rts libraries reentrant. This library has
* a larger footprint which can be a problem for some apps, so we
* override the default and disable it here.
*/
var MultithreadSupport =
xdc.useModule('ti.sysbios.rts.iar.MultithreadSupport');
MultithreadSupport.enableMultithreadSupport = false;
}
然后在主函数里面添加上线程创建的函数
编译成功!