模板工程尝试编译蓝牙协议栈BTSTACK,勾选配置如下图所示
编译报如下错误:
make -j4 all2
riscv64-unknown-elf-gcc "../rt-thread/src/clock.c"
riscv64-unknown-elf-gcc "../rt-thread/src/components.c"
riscv64-unknown-elf-gcc "../rt-thread/src/device.c"
riscv64-unknown-elf-gcc "../rt-thread/src/idle.c"
In file included from D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rtthread.h:24,
from D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rthw.h:20,
from ../rt-thread/src/components.c:20:
D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rtdebug.h:18:2: error: #error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)"
18 | #error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)"
| ^~~~~
In file included from D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rtthread.h:24,
from ../rt-thread/src/device.c:18:
D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rtdebug.h:18:2: error: #error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)"
18 | #error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)"
| ^~~~~
In file included from D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rtthread.h:24,
from D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rthw.h:20,
from ../rt-thread/src/clock.c:20:
D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rtdebug.h:18:2: error: #error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)"
18 | #error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)"
| ^~~~~
In file included from D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rtthread.h:24,
from D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rthw.h:20,
from ../rt-thread/src/idle.c:20:
D:\installed\RT-ThreadStudio\workspace\test4\rt-thread\include/rtdebug.h:18:2: error: #error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)"
18 | #error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)"
| ^~~~~
make: *** [rt-thread/src/subdir.mk:57: rt-thread/src/clock.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [rt-thread/src/subdir.mk:57: rt-thread/src/components.o] Error 1
make: *** [rt-thread/src/subdir.mk:57: rt-thread/src/device.o] Error 1
make: *** [rt-thread/src/subdir.mk:57: rt-thread/src/idle.o] Error 1
"make -j4 all2" terminated with exit code 2. Build might be incomplete.
然后勾选了DFS继续编译,随后继续报如下错误(报错过长,仅展示报错部分)
make -j4 all2
riscv64-unknown-elf-gcc "../rt-thread/src/clock.c"
riscv64-unknown-elf-gcc "../rt-thread/src/components.c"
riscv64-unknown-elf-gcc "../rt-thread/src/device.c"
riscv64-unknown-elf-gcc "../rt-thread/src/idle.c"
riscv64-unknown-elf-gcc "../rt-thread/src/ipc.c"
riscv64-unknown-elf-gcc "../rt-thread/src/irq.c"
riscv64-unknown-elf-gcc "../rt-thread/src/kservice.c"
riscv64-unknown-elf-gcc "../rt-thread/src/mem.c"
riscv64-unknown-elf-gcc "../rt-thread/src/memheap.c"
riscv64-unknown-elf-gcc "../rt-thread/src/mempool.c"
riscv64-unknown-elf-gcc "../rt-thread/src/object.c"
riscv64-unknown-elf-gcc "../rt-thread/src/scheduler.c"
riscv64-unknown-elf-gcc "../rt-thread/src/thread.c"
riscv64-unknown-elf-gcc "../rt-thread/src/timer.c"
riscv64-unknown-elf-gcc "../rt-thread/components/libc/termios/posix_termios.c"
riscv64-unknown-elf-gcc "../rt-thread/components/libc/pthreads/mqueue.c"
riscv64-unknown-elf-gcc "../rt-thread/components/libc/pthreads/pthread.c"
riscv64-unknown-elf-gcc "../rt-thread/components/libc/pthreads/pthread_attr.c"
riscv64-unknown-elf-gcc "../rt-thread/components/libc/pthreads/pthread_barrier.c"
riscv64-unknown-elf-gcc "../rt-thread/components/libc/pthreads/pthread_cond.c"
In file included from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\_pthreadtypes.h:23,
from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\types.h:223,
from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\time.h:28,
from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\stat.h:9,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/libc/libc_stat.h:17,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtlibc.h:15,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtdef.h:1149,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtthread.h:25,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rthw.h:20,
from ../rt-thread/components/libc/pthreads/pthread.c:13:
D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\components\libc\pthreads/sched.h:19:5: error: expected identifier before numeric constant
19 | SCHED_OTHER = 0,
| ^~~~~~~~~~~
In file included from ../rt-thread/components/libc/pthreads/pthread.c:14:
D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\components\libc\pthreads/pthread.h:29: warning: "PTHREAD_CREATE_JOINABLE" redefined
29 | #define PTHREAD_CREATE_JOINABLE 0x00
|
In file included from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\types.h:223,
from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\time.h:28,
from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\stat.h:9,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/libc/libc_stat.h:17,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtlibc.h:15,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtdef.h:1149,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtthread.h:25,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rthw.h:20,
from ../rt-thread/components/libc/pthreads/pthread.c:13:
d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\_pthreadtypes.h:47: note: this is the location of the previous definition
47 | #define PTHREAD_CREATE_JOINABLE 1
|
In file included from ../rt-thread/components/libc/pthreads/pthread.c:14:
D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\components\libc\pthreads/pthread.h:30: warning: "PTHREAD_CREATE_DETACHED" redefined
30 | #define PTHREAD_CREATE_DETACHED 0x01
|
In file included from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\types.h:223,
from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\time.h:28,
from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\stat.h:9,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/libc/libc_stat.h:17,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtlibc.h:15,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtdef.h:1149,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtthread.h:25,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rthw.h:20,
from ../rt-thread/components/libc/pthreads/pthread.c:13:
d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\_pthreadtypes.h:46: note: this is the location of the previous definition
46 | #define PTHREAD_CREATE_DETACHED 0
|
In file included from ../rt-thread/components/libc/pthreads/pthread.c:14:
D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\components\libc\pthreads/pthread.h:32: warning: "PTHREAD_EXPLICIT_SCHED" redefined
32 | #define PTHREAD_EXPLICIT_SCHED 0
|
In file included from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\types.h:223,
from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\time.h:28,
from d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\stat.h:9,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/libc/libc_stat.h:17,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtlibc.h:15,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtdef.h:1149,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rtthread.h:25,
from D:\installed\RT-ThreadStudio\workspace\test3\rt-thread\include/rthw.h:20,
from ../rt-thread/components/libc/pthreads/pthread.c:13:
d:\installed\rt-threadstudio\repo\extract\toolchain_support_packages\risc-v\risc-v-gcc\10.1.0\riscv64-unknown-elf\include\sys\_pthreadtypes.h:43: note: this is the location of the previous definition
43 | #define PTHREAD_EXPLICIT_SCHED 2 /* set from provided attribute object */
|
请教大家要怎么解决这些问题
引用: Jacktang 发表于 2021-8-21 21:42 启动程序,设置没有问题,调出RT-Thread Studio-SDK管理器,确保以下安装好 编译程序是否安装正确
模板程序是可以编译下载的,但是需要编译BTStack就报错了
引用: Ansersion 发表于 2021-8-22 09:58 模板程序是可以编译下载的,但是需要编译BTStack就报错了
建议重新下载安装btstack蓝牙协议栈