我用的IAR8.11.3 下载官网最新的SDK库,编译什么都好着。因为线程函数不好找,我就把例程修改成创建任务的形式了,然后编译就出错
提示
Fatal Error[Li001]: could not open file "C:\ti\simplelink_cc13x0_sdk_3_10_00_11\kernel\tirtos\builds\CC1310_LAUNCHXL\release\iar\package\cfg\release_prm3.src\sysbios\ c:\ti\simplelink_cc13x0_sdk_3_10_00_11\kernel\tirtos\builds\CC1310_LAUNCHXL\release\iar\linker.cmd 7
rom_sysbios.arm3"
Error while running Linker
我把我修改的内容全部取消掉,还原回原例程也不行,错误不能清除。我卸载重装SDK文件没有变化。显示内容
pthread_t thread;
pthread_attr_t attrs;
struct sched_param priParam;
int retc;
/* Call driver init functions */
Board_init();
/* Initialize the attributes structure with default values */
pthread_attr_init(&attrs);
/* Set priority, detach state, and stack size attributes */
priParam.sched_priority = 1;
retc = pthread_attr_setschedparam(&attrs, &priParam);
/* 修改线程的分离状态属性 Attr线程属性变量 PTHREAD_CREATE_DETACHED 分离启动*/
/* 若成功返回0,若失败返回-1 */
retc |= pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED);
/*线程栈的大小*/
retc |= pthread_attr_setstacksize(&attrs, THREADSTACKSIZE);
if (retc != 0) {
/* failed to set attributes */
while (1) {}
}
retc = pthread_create(&thread, &attrs, mainThread, NULL);
if (retc != 0) {
/* pthread_create() failed */
while (1) {}
}
// Task_Params taskParams;
// //Create task with priorty 15
// Task_Params_init(&taskParams);
// taskParams.stackSize = 512;
// taskParams.stack = &taskStack;
// taskParams.priority = 15;
// Task_create((Task_FuncPtr)MainTask,&taskParams,NULL);
BIOS_start();
新装之后的SDK主函数如图,不是TI出厂的SDK
rom_sysbios.arm3
Alvin Chen:
线程:
C:\ti\simplelink_cc13x0_sdk_3_10_00_11\examples\rtos\CC1310_LAUNCHXL\drivers\empty
多任务:
C:\ti\simplelink_cc13x0_sdk_3_10_00_11\examples\rtos\CC1310_LAUNCHXL\sysbios\mutex
你重新按照SDK试试吧。
user6009907:
回复 Alvin Chen:
请问是重新安装SDK还是重新打开文件?
user6009907:
回复 user6009907:
System_printf("Running task1 function\n");
编译过了,下载进去打印不出东西,是什么原因?