我在simple_peripheral这个实例的mian函数里面添加一个线程,但是出现了标题的错误,在mian文件中也包含了pthread的头文件,为什么会出现这种问题呢?
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.
您好,
希望您能提供一下您的main.c里的修改过部分,这样我们可能能进一步了解您尝试将任务添加到项目中的部分与原因。
目前来说我们假设你修改的这些不包括pthread.h,但是任务初始化应该看起来非常类似于 SimplePeripheral_createTask,就像按照 BLE5-Stack User's Guide 的 Tasks 部分中的说明。
您好,
虽然我们还是希望您能提供相应代码并且按照我们的代码文本配置发给我们,我们也发现了原始问题可能是BLE工程配置文件 (*.cfg for TI-RTOS, *.syscfg for TI-RTOS7)没有启用Posix配置。
/* ================ 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; }