我是这样做的: 1)、安装BC45至C:, 2)、将uC/OS-II解压 3)、在BC45的安装目录BC45BIN下建立一个文件夹uCOS-II,然后将uC/OS-II解压目 录SOFTWAREuCOS-IISOURCE下的os_core.c、os_flag.c、os_mbox.c、os_mem.c、os _mutex.c、os_q.c、os_sem.c复制至该文件夹。 4)、将uC/OS-II解压目录下的SOFTWAREuCOS-IIEX1_x86LBC45WORK里的INCLUDES. H、OS_CFG.H、OS_CPU.H、PC.H、UCOS_II.H五个头文件复制到BC45的安装目录BC45IN CLUDE下,然后将SOFTWAREuCOS-IIEX1_x86LBC45WORK下的OS_CPU_A.ASM、OS_CP U_C.C、PC.C、UCOS_II.C复制至BC45的安装目录BC45BIN下。并将刚复制过来的UCOS _II.C里的文件包含代码: #include "softwareucos-iisourceos_core.c" #include "softwareucos-iisourceos_flag.c" #include "softwareucos-iisourceos_mbox.c" #include "softwareucos-iisourceos_mem.c" #include "softwareucos-iisourceos_mutex.c" #include "softwareucos-iisourceos_q.c" #include "softwareucos-iisourceos_sem.c" #include "softwareucos-iisourceos_task.c" #include "softwareucos-iisourceos_time.c" 改成: #include "BC45BINuCOS-IIos_core.c" #include "BC45BINuCOS-IIos_flag.c" #include "BC45BINuCOS-IIos_mbox.c" #include "BC45BINuCOS-IIos_mem.c" #include "BC45BINuCOS-IIos_mutex.c" #include "BC45BINuCOS-IIos_q.c" #include "BC45BINuCOS-IIos_sem.c" #include "BC45BINuCOS-IIos_task.c" #include "BC45BINuCOS-IIos_time.c" 把TEST.C复制至BC45BIN下,按F9编译,两遍通过,无语法错误,有26个linker错误。 比如:linker error:undefined symbol _OSTimeDly in module test.c linker error:undefined symbol _PC_DispChar in module test.c linker error:undefined symbol _OSSemPost in module test.c 等一共26个. 我修改了INCLUDES.H文件还是不行.从错误上说是不是ucos-II.c没包含进来? 求教!多谢!
|