更新到commit 5a465bf,在platform下编译,到clock_time.c时出错了,基本上可以确定是pthread.h里没有找到所需的类型定义引起的。
e:\workspace\ART\software\platform>scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build
arm-none-eabi-gcc -o build\components\pthreads\clock_time.o -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -ffunction-sections -fdata-sections -O0 -gdwarf-2 -DUSE_STDPERIPH_DRIVER -DRT_USING_MINILIBC -Iapplications -IE:\workspace\rt-thread\applications -I. -IE:\workspace\rt-thread -Idrivers -IE:\workspace\rt-thread\drivers -Ilibarduino -IE:\workspace\rt-thread\libarduino -ILibraries\STM32F4xx_StdPeriph_Driver\inc -IE:\workspace\rt-thread\Libraries\STM32F4xx_StdPeriph_Driver\inc -ILibraries\CMSIS\Device\ST\STM32F4xx\Include -IE:\workspace\rt-thread\Libraries\CMSIS\Device\ST\STM32F4xx\Include -ILibraries\CMSIS\Include -IE:\workspace\rt-thread\Libraries\CMSIS\Include -IE:\workspace\rt-thread\include -IE:\workspace\rt-thread\libcpu\arm\cortex-m4 -IE:\workspace\rt-thread\libcpu\arm\common -IE:\workspace\rt-thread\components\dfs -IE:\workspace\rt-thread\components\dfs\include -IE:\workspace\rt-thread\components\dfs\filesystems\romfs -IE:\workspace\rt-thread\components\dfs\filesystems\devfs -IE:\workspace\rt-thread\components\drivers\include -IE:\workspace\rt-thread\components\drivers\include -IE:\workspace\rt-thread\components\finsh -IE:\workspace\rt-thread\components\libc\minilibc -IE:\workspace\rt-thread\components\pthreads E:\workspace\rt-thread\components\pthreads\clock_time.c
In file included from E:\workspace\rt-thread\components\pthreads\clock_time.c:2:0:
E:\workspace\rt-thread\components\pthreads/pthread.h:197:15: warning: 'struct timespec' declared inside parameter list
E:\workspace\rt-thread\components\pthreads/pthread.h:197:15: warning: its scope is only this definition or declaration, which is probably not what you want
E:\workspace\rt-thread\components\pthreads/pthread.h:211:72: warning: 'struct timespec' declared inside parameter list
E:\workspace\rt-thread\components\pthreads/pthread.h:212:72: warning: 'struct timespec' declared inside parameter list
E:\workspace\rt-thread\components\pthreads/pthread.h:269:46: warning: 'struct timespec' declared inside parameter list
E:\workspace\rt-thread\components\pthreads/pthread.h:270:46: warning: 'struct timespec' declared inside parameter list
E:\workspace\rt-thread\components\pthreads/pthread.h:271:52: warning: 'struct timespec' declared inside parameter list
E:\workspace\rt-thread\components\pthreads\clock_time.c: In function 'clock_time_system_init':
E:\workspace\rt-thread\components\pthreads\clock_time.c:7:5: error: 'time_t' undeclared (first use in this function)
E:\workspace\rt-thread\components\pthreads\clock_time.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
E:\workspace\rt-thread\components\pthreads\clock_time.c:7:12: error: expected ';' before 'time'
E:\workspace\rt-thread\components\pthreads\clock_time.c:11:5: error: 'time' undeclared (first use in this function)
E:\workspace\rt-thread\components\pthreads\clock_time.c:22:5: error: invalid use of undefined type 'struct timeval'
E:\workspace\rt-thread\components\pthreads\clock_time.c:23:5: error: invalid use of undefined type 'struct timeval'
E:\workspace\rt-thread\components\pthreads\clock_time.c: At top level:
E:\workspace\rt-thread\components\pthreads\clock_time.c:26:37: warning: 'struct timespec' declared inside parameter list
E:\workspace\rt-thread\components\pthreads\clock_time.c: In function 'clock_time_to_tick':
E:\workspace\rt-thread\components\pthreads\clock_time.c:30:18: error: storage size of 'tp' isn't known
E:\workspace\rt-thread\components\pthreads\clock_time.c:35:14: error: 'NULL' undeclared (first use in this function)
E:\workspace\rt-thread\components\pthreads\clock_time.c:40:12: error: dereferencing pointer to incomplete type
E:\workspace\rt-thread\components\pthreads\clock_time.c:42:56: error: dereferencing pointer to incomplete type
E:\workspace\rt-thread\components\pthreads\clock_time.c:43:18: error: dereferencing pointer to incomplete type
E:\workspace\rt-thread\components\pthreads\clock_time.c:47:18: error: dereferencing pointer to incomplete type
E:\workspace\rt-thread\components\pthreads\clock_time.c:48:18: error: dereferencing pointer to incomplete type
E:\workspace\rt-thread\components\pthreads\clock_time.c: At top level:
E:\workspace\rt-thread\components\pthreads\clock_time.c:58:46: warning: 'struct timespec' declared inside parameter list
E:\workspace\rt-thread\components\pthreads\clock_time.c:58:5: error: conflicting types for 'clock_getres'
E:\workspace\rt-thread\components\pthreads/pthread.h:269:5: note: previous declaration of 'clock_getres' was here
E:\workspace\rt-thread\components\pthreads\clock_time.c: In function 'clock_getres':
E:\workspace\rt-thread\components\pthreads\clock_time.c:62:16: error: 'EINVAL' undeclared (first use in this function)
E:\workspace\rt-thread\components\pthreads\clock_time.c:66:5: error: dereferencing pointer to incomplete type
E:\workspace\rt-thread\components\pthreads\clock_time.c:67:5: error: dereferencing pointer to incomplete type
E:\workspace\rt-thread\components\pthreads\clock_time.c: At top level:
E:\workspace\rt-thread\components\pthreads\clock_time.c:72:46: warning: 'struct timespec' declared inside parameter list
E:\workspace\rt-thread\components\pthreads\clock_time.c:72:5: error: conflicting types for 'clock_gettime'
E:\workspace\rt-thread\components\pthreads/pthread.h:270:5: note: previous declaration of 'clock_gettime' was here
E:\workspace\rt-thread\components\pthreads\clock_time.c: In function 'clock_gettime':
E:\workspace\rt-thread\components\pthreads\clock_time.c:78:16: error: 'EINVAL' undeclared (first use in this function)
E:\workspace\rt-thread\components\pthreads\clock_time.c:85:4: error: dereferencing pointer to incomplete type
E:\workspace\rt-thread\components\pthreads\clock_time.c:85:2: error: invalid use of undefined type 'struct timeval'
E:\workspace\rt-thread\components\pthreads\clock_time.c:86:4: error: dereferencing pointer to incomplete type
E:\workspace\rt-thread\components\pthreads\clock_time.c:86:2: error: invalid use of undefined type 'struct timeval'
E:\workspace\rt-thread\components\pthreads\clock_time.c: At top level:
E:\workspace\rt-thread\components\pthreads\clock_time.c:91:52: warning: 'struct timespec' declared inside parameter list
E:\workspace\rt-thread\components\pthreads\clock_time.c:91:5: error: conflicting types for 'clock_settime'
E:\workspace\rt-thread\components\pthreads/pthread.h:271:5: note: previous declaration of 'clock_settime' was here
E:\workspace\rt-thread\components\pthreads\clock_time.c: In function 'clock_settime':
E:\workspace\rt-thread\components\pthreads\clock_time.c:99:16: error: 'EINVAL' undeclared (first use in this function)
E:\workspace\rt-thread\components\pthreads\clock_time.c:104:13: error: dereferencing pointer to incomplete type
E:\workspace\rt-thread\components\pthreads\clock_time.c:109:5: error: invalid use of undefined type 'struct timeval'
E:\workspace\rt-thread\components\pthreads\clock_time.c:110:5: error: invalid use of undefined type 'struct timeval'
scons: building terminated because of errors.