Ansersion 发表于 2021-8-21 10:11

【中科蓝讯AB32VG1 RISC-V评估板】求助:编译BTStack报错

<p>模板工程尝试编译蓝牙协议栈BTSTACK,勾选配置如下图所示</p>

<p></p>

<p>&nbsp;编译报如下错误:</p>

<pre>
<code>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: *** Error 1
make: *** Waiting for unfinished jobs....
make: *** Error 1
make: *** Error 1
make: *** Error 1
"make -j4 all2" terminated with exit code 2. Build might be incomplete.</code></pre>

<p>然后勾选了DFS继续编译,随后继续报如下错误(报错过长,仅展示报错部分)</p>

<pre>
<code>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_JOINABLE1
      |
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 */
      | </code></pre>

<p>请教大家要怎么解决这些问题</p>

Jacktang 发表于 2021-8-21 21:42

<p>启动程序,设置没有问题,调出RT-Thread Studio-SDK管理器,确保以下安装好</p>

<p>编译程序是否安装正确</p>

Ansersion 发表于 2021-8-22 09:58

Jacktang 发表于 2021-8-21 21:42
启动程序,设置没有问题,调出RT-Thread Studio-SDK管理器,确保以下安装好

编译程序是否安装正确

<p>模板程序是可以编译下载的,但是需要编译BTStack就报错了</p>

Jacktang 发表于 2021-8-22 21:55

Ansersion 发表于 2021-8-22 09:58
模板程序是可以编译下载的,但是需要编译BTStack就报错了

<p>建议重新下载安装btstack蓝牙协议栈</p>
页: [1]
查看完整版本: 【中科蓝讯AB32VG1 RISC-V评估板】求助:编译BTStack报错