Other Parts Discussed in Thread: SYSBIOS,
/** * main.c */ #include "device.h" #include "driverlib.h" #include <stdint.h> #include <stdlib.h> #include <stddef.h> #include <string.h> #include <stdio.h> #include <math.h> #include <ti/sysbios/BIOS.h> #include <ti/sysbios/knl/Task.h> #include <ti/sysbios/knl/Event.h> #include <ti/sysbios/knl/Semaphore.h> #include <ti/sysbios/knl/Clock.h> #include <ti/sysbios/heaps/HeapBuf.h> #include <ti/sysbios/heaps/HeapMem.h> #include <ti/sysbios/knl/Event.h> void func(void) { } int main(void) { Task_Params taskParams; Task_Params_init(&taskParams); taskParams.priority = 3; // // Initializes system control, device clock, and peripherals // Device_init(); Device_initGPIO(); // // Initializes PIE and clear PIE registers. Disables CPU interrupts. // and clear all CPU interrupt flags. // Interrupt_initModule(); // // Initialize the PIE vector table with pointers to the shell interrupt // Service Routines (ISR). // Interrupt_initVectorTable(); DEVICE_DELAY_US(1000); while (1) { } }
导入库后 运行以上代码 报错:
ti_sysbios_knl_Task_Params__init__S ./main.obj error #10234-D: unresolved symbols remain error #10010: errors encountered during linking; "C2000_Test.out" not built >> Compilation failure makefile:140: recipe for target 'C2000_Test.out' failed gmake[1]: *** [C2000_Test.out] Error 1 makefile:136: recipe for target 'all' failed gmake: *** [all] Error 2
在工程配置中 导入了XDC和BIOS
头文件也导入了 头文件导入不报错
C:\ti\xdctools_3_50_08_24_core\packages
C:\ti\bios_6_73_01_01\packages