Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RT-Thread Nano
stm32CubeMX导出项目编译失败
发布于 2019-08-15 18:58:50 浏览:2449
订阅该版
[tocm] 我参考 [https://www.rt-thread.org/document/site/tutorial/nano/cube/nano-mx5/](https://www.rt-thread.org/document/site/tutorial/nano/cube/nano-mx5/) 生成只支持rt-thread的kernel的项目,生成模式是st4stm32, 理论上clion可以导入 编译发现错误,我不使用rt-thread没有问题,可以编译, linux下clion的编译方式可以看 [https://github.com/ziyouchutuwenwu/dev_init/blob/master/embedded/stm32/stm32_clion_openocd.md](https://github.com/ziyouchutuwenwu/dev_init/blob/master/embedded/stm32/stm32_clion_openocd.md) 以下为错误信息 ```In file included from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtlibc.h:22:0, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtdef.h:1016, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:23, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_fdset.h:43:17: error: conflicting types for 'fd_mask' typedef long fd_mask; ^~~~~~~ In file included from /usr/include/newlib/sys/types.h:68:0, from /usr/include/newlib/time.h:28, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_stat.h:82, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtlibc.h:15, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtdef.h:1016, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:23, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /usr/include/newlib/sys/select.h:34:23: note: previous declaration of 'fd_mask' was here typedef unsigned long fd_mask; ^~~~~~~ In file included from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtlibc.h:22:0, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtdef.h:1016, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:23, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_fdset.h:44:0: warning: "NFDBITS" redefined # define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */ In file included from /usr/include/newlib/sys/types.h:68:0, from /usr/include/newlib/time.h:28, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_stat.h:82, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtlibc.h:15, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtdef.h:1016, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:23, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /usr/include/newlib/sys/select.h:35:0: note: this is the location of the previous definition # define NFDBITS (sizeof (fd_mask) * 8) /* bits per mask */ In file included from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtlibc.h:22:0, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtdef.h:1016, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:23, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_fdset.h:51:16: error: redefinition of 'struct _types_fd_set' typedef struct _types_fd_set { ^~~~~~~~~~~~~ In file included from /usr/include/newlib/sys/types.h:68:0, from /usr/include/newlib/time.h:28, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_stat.h:82, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtlibc.h:15, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtdef.h:1016, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:23, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /usr/include/newlib/sys/select.h:42:16: note: originally defined here typedef struct _types_fd_set { ^~~~~~~~~~~~~ from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtdef.h:1016, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:23, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_fdset.h:53:3: error: conflicting types for '_types_fd_set' } _types_fd_set; ^~~~~~~~~~~~~ In file included from /usr/include/newlib/sys/types.h:68:0, from /usr/include/newlib/time.h:28, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_stat.h:82, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtlibc.h:15, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtdef.h:1016, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:23, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /usr/include/newlib/sys/select.h:44:3: note: previous declaration of '_types_fd_set' was here } _types_fd_set; ^~~~~~~~~~~~~ In file included from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtlibc.h:22:0, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtdef.h:1016, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:23, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_fdset.h:60:0: warning: "FD_ZERO" redefined # define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p))) In file included from /usr/include/newlib/sys/types.h:68:0, from /usr/include/newlib/time.h:28, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_stat.h:82, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtlibc.h:15, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtdef.h:1016, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:23, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /usr/include/newlib/sys/select.h:51:0: note: this is the location of the previous definition # define FD_ZERO(p) (__extension__ (void)({ \ make[3]: *** [CMakeFiles/rt-demo.elf.dir/build.make:232:CMakeFiles/rt-demo.elf.dir/Middlewares/Third_Party/RT-Thread/bsp/board.c.obj] 错误 1 ```
查看更多
7
个回答
默认排序
按发布时间排序
921742079
2019-08-15
这家伙很懒,什么也没写!
[i=s] 本帖最后由 921742079 于 2019-8-15 20:03 编辑 [/i] 重新搞了几次,现在错误提示是这个 ``` [ 10%] Building C object CMakeFiles/rt-demo.elf.dir/Middlewares/Third_Party/RT-Thread/bsp/lpc824_blink/Libraries/common/board/board_lpc.c.obj In file included from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rtthread.h:21:0, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/rthw.h:18, from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/board.c:11: /home/mmc/projects/embedded/rt-demo/Inc/rtconfig.h:7:28: fatal error: RTE_Components.h: No such file or directory #include "RTE_Components.h" ^ compilation terminated. make[2]: *** [CMakeFiles/rt-demo.elf.dir/build.make:232:CMakeFiles/rt-demo.elf.dir/Middlewares/Third_Party/RT-Thread/bsp/board.c.obj] 错误 1 make[2]: *** 正在等待未完成的任务.... In file included from /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/lpc824_blink/Libraries/common/board/board_lpc.c:36:0: /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/bsp/lpc824_blink/Libraries/common/board/board_lpc.h:35:18: fatal error: chip.h: No such file or directory #include "chip.h" ^ compilation terminated. make[2]: *** [CMakeFiles/rt-demo.elf.dir/build.make:245:CMakeFiles/rt-demo.elf.dir/Middlewares/Third_Party/RT-Thread/bsp/lpc824_blink/Libraries/common/board/board_lpc.c.obj] 错误 1 make[1]: *** [CMakeFiles/Makefile2:73:CMakeFiles/rt-demo.elf.dir/all] 错误 2 make: *** [Makefile:84:all] 错误 2 ```
yqiu
2019-08-15
这家伙很懒,什么也没写!
整个目录结构都改掉了 :o
921742079
2019-08-16
这家伙很懒,什么也没写!
cubemx导出的目录结构,在mdk和clion的是不一样的,但是不影响
921742079
2019-08-16
这家伙很懒,什么也没写!
又测试了几次,win下用cubemx生成的项目缺少mdk5的那个s汇编文件,linux下却头文件,反复生成几次都一样,算了,不折腾了
921742079
2019-08-16
这家伙很懒,什么也没写!
[i=s] 本帖最后由 921742079 于 2019-8-16 11:47 编辑 [/i] 删除cubemx固件目录下的固件,重新下载,重新生成,还是不行,一样
921742079
2019-08-16
这家伙很懒,什么也没写!
cubemx生成的mdk5的需要小改动一下,st4stm32模式,也就是clion的模式,还有问题
Ernest
2019-08-18
这家伙很懒,什么也没写!
``` /home/mmc/projects/embedded/rt-demo/Inc/rtconfig.h:7:28: fatal error: RTE_Components.h: No such file or directory ``` ``` /home/mmc/projects/embedded/rt-demo/Middlewares/Third_Party/RT-Thread/include/libc/libc_fdset.h:60:0: warning: "FD_ZERO" redefined ``` 一个缺失,一个重复定义,手动做了些什么,稍微注意点
撰写答案
登录
注册新账号
关注者
0
被浏览
2.4k
关于作者
921742079
这家伙很懒,什么也没写!
提问
42
回答
145
被采纳
3
关注TA
发私信
相关问题
1
求高手指点,RTThread下nanosleep()函数功能如何实现?在线等啊
2
RTT1.2.2在新塘Nano130KE3BN的移植中始终出现栈溢出的问题
3
官方能否出一个nano在mdk下移植finsh到stm32的教程
4
从裸机开始,创建一个RT-Thread Nano系统工程
5
Nano版如何启用shell
6
项目从RTT 2.x NANO移植到 RTT 3.x ENV 环境
7
nano 版本有没有集成到 IAR 中啊?
8
关于MDK5的RT-THREAD NANO中添加MSH组件的例程
9
rtt_nano版本,源代码在哪里下载啊?
10
RTT Nano 在keil 使用C++11 的问题
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
【RT-Thread】【ci】【scons】将ci.attachconfig.yml和scons结合使用
2
Rt-thread中OTA下载后,bootloader不搬程序
3
ulog 日志 LOG_HEX 输出时间改为本地日期时间
4
在RT-Thread Studio中构建前执行python命令
5
研究一了一段时间RTT,直接标准版上手太难,想用nano,但又舍不得组件
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
I2C_IIC
ESP8266
UART
WIZnet_W5500
ota在线升级
cubemx
PWM
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
flashDB
GD32
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
C++_cpp
MicroPython
本月问答贡献
xusiwei1236
8
个答案
2
次被采纳
踩姑娘的小蘑菇
1
个答案
2
次被采纳
用户名由3_15位
9
个答案
1
次被采纳
bernard
4
个答案
1
次被采纳
RTT_逍遥
3
个答案
1
次被采纳
本月文章贡献
聚散无由
2
篇文章
15
次点赞
catcatbing
2
篇文章
5
次点赞
Wade
2
篇文章
4
次点赞
Ghost_Girls
1
篇文章
7
次点赞
xiaorui
1
篇文章
2
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部