Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
CLOCK
unknown type name 'clock_t'
发布于 2024-10-15 16:24:18 浏览:271
订阅该版
使用gcc工具链, 工程由stm32cubemx生成 MingW: 9.2.0 arm-none-eabi-gcc: 10.3.1 20210824 stm32cubemx: 6.12.1 rt-theard nano: 4.1.1 cubemx里nano的配置全部默认, 生成工程后在rtconfig.h里把RT_USING_FINSH打开了 ![screenshot_image.png](https://oss-club.rt-thread.org/uploads/20241015/73a5c358ab22ca68135cff0995eff2cf.png) ![screenshot_image.png](https://oss-club.rt-thread.org/uploads/20241015/ccef09dd90e65eb65121580678e7cdc4.png.webp) ![screenshot_image.png](https://oss-club.rt-thread.org/uploads/20241015/e0c0dd45613f8f42d3215b4e4a174130.png) ![screenshot_image.png](https://oss-club.rt-thread.org/uploads/20241015/58fab1a994e17da180f624da62e4e03f.png.webp) ``` ====================[ Build | stm32_test.elf | Debug ]========================== C:\Users\lenovo\AppData\Local\Programs\CLion\bin\cmake\win\x64\bin\cmake.exe --build C:\Work_Space\Project\stm32_test\cmake-build-debug --target stm32_test.elf -j 14 [1/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/sysmem.c.obj FAILED: CMakeFiles/stm32_test.elf.dir/Core/Src/sysmem.c.obj C:\WORK_S~1\ENVIRO~1\GNUARM~1\102021~1.10\bin\AR19DD~1.EXE -DDEBUG -DSTM32F407xx -DUSE_HAL_DRIVER -IC:/Work_Space/Project/stm32_test/Core/Inc -IC:/Work_Space/Project/stm32_test/LWIP/App -IC:/Work_Space/Project/stm32_test/LWIP/Target -IC:/Work_Space/Project/stm32_test/USB_DEVICE/App -IC:/Work_Space/Project/stm32_test/USB_DEVICE/Target -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/system -IC:/Work_Space/Project/stm32_test/Drivers/STM32F4xx_HAL_Driver/Inc -IC:/Work_Space/Project/stm32_test/Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/netif/ppp -IC:/Work_Space/Project/stm32_test/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -IC:/Work_Space/Project/stm32_test/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -IC:/Work_Space/Project/stm32_test/Drivers/CMSIS/Device/ST/STM32F4xx/Include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/apps -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/priv -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/prot -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/netif -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix/net -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix/sys -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/stdc -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/system/arch -IC:/Work_Space/Project/stm32_test/Drivers/CMSIS/Include -IC:/Work_Space/Project/stm32_test/RT-Thread -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/components/finsh/inc -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension/fcntl/msvc -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension/fcntl/octal -IC:/Work_Space/Project/stm32_test/Bsp/LCD_Touch -g -std=gnu11 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -fno-common -fmessage-length=0 -Og -g -MD -MT CMakeFiles/stm32_test.elf.dir/Core/Src/sysmem.c.obj -MF CMakeFiles\stm32_test.elf.dir\Core\Src\sysmem.c.obj.d -o CMakeFiles/stm32_test.elf.dir/Core/Src/sysmem.c.obj -c C:/Work_Space/Project/stm32_test/Core/Src/sysmem.c In file included from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension/sys/types.h:17, from c:\work_s~1\enviro~1\gnuarm~1\102021~1.10\arm-none-eabi\include\stdio.h:61, from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/system/arch/cc.h:37, from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/arch.h:48, from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/debug.h:40, from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/opt.h:52, from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/errno.h:40, from C:/Work_Space/Project/stm32_test/Core/Src/sysmem.c:24: c:\work_s~1\enviro~1\gnuarm~1\102021~1.10\arm-none-eabi\include\time.h:56:1: error: unknown type name 'clock_t'; did you mean '_flock_t'? 56 | clock_t clock (void); | ^~~~~~~ | _flock_t [2/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/syscalls.c.obj FAILED: CMakeFiles/stm32_test.elf.dir/Core/Src/syscalls.c.obj C:\WORK_S~1\ENVIRO~1\GNUARM~1\102021~1.10\bin\AR19DD~1.EXE -DDEBUG -DSTM32F407xx -DUSE_HAL_DRIVER -IC:/Work_Space/Project/stm32_test/Core/Inc -IC:/Work_Space/Project/stm32_test/LWIP/App -IC:/Work_Space/Project/stm32_test/LWIP/Target -IC:/Work_Space/Project/stm32_test/USB_DEVICE/App -IC:/Work_Space/Project/stm32_test/USB_DEVICE/Target -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/system -IC:/Work_Space/Project/stm32_test/Drivers/STM32F4xx_HAL_Driver/Inc -IC:/Work_Space/Project/stm32_test/Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/netif/ppp -IC:/Work_Space/Project/stm32_test/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -IC:/Work_Space/Project/stm32_test/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -IC:/Work_Space/Project/stm32_test/Drivers/CMSIS/Device/ST/STM32F4xx/Include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/apps -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/priv -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/prot -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/netif -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix/net -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix/sys -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/stdc -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/system/arch -IC:/Work_Space/Project/stm32_test/Drivers/CMSIS/Include -IC:/Work_Space/Project/stm32_test/RT-Thread -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/components/finsh/inc -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension/fcntl/msvc -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension/fcntl/octal -IC:/Work_Space/Project/stm32_test/Bsp/LCD_Touch -g -std=gnu11 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -fno-common -fmessage-length=0 -Og -g -MD -MT CMakeFiles/stm32_test.elf.dir/Core/Src/syscalls.c.obj -MF CMakeFiles\stm32_test.elf.dir\Core\Src\syscalls.c.obj.d -o CMakeFiles/stm32_test.elf.dir/Core/Src/syscalls.c.obj -c C:/Work_Space/Project/stm32_test/Core/Src/syscalls.c In file included from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension/sys/types.h:17, from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension/sys/stat.h:14, from C:/Work_Space/Project/stm32_test/Core/Src/syscalls.c:24: c:\work_s~1\enviro~1\gnuarm~1\102021~1.10\arm-none-eabi\include\time.h:56:1: error: unknown type name 'clock_t'; did you mean '_flock_t'? 56 | clock_t clock (void); | ^~~~~~~ | _flock_t [3/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/main.c.obj FAILED: CMakeFiles/stm32_test.elf.dir/Core/Src/main.c.obj C:\WORK_S~1\ENVIRO~1\GNUARM~1\102021~1.10\bin\AR19DD~1.EXE -DDEBUG -DSTM32F407xx -DUSE_HAL_DRIVER -IC:/Work_Space/Project/stm32_test/Core/Inc -IC:/Work_Space/Project/stm32_test/LWIP/App -IC:/Work_Space/Project/stm32_test/LWIP/Target -IC:/Work_Space/Project/stm32_test/USB_DEVICE/App -IC:/Work_Space/Project/stm32_test/USB_DEVICE/Target -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/system -IC:/Work_Space/Project/stm32_test/Drivers/STM32F4xx_HAL_Driver/Inc -IC:/Work_Space/Project/stm32_test/Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/netif/ppp -IC:/Work_Space/Project/stm32_test/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -IC:/Work_Space/Project/stm32_test/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -IC:/Work_Space/Project/stm32_test/Drivers/CMSIS/Device/ST/STM32F4xx/Include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/apps -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/priv -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/prot -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/netif -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix/arpa -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix/net -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/posix/sys -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/compat/stdc -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/system/arch -IC:/Work_Space/Project/stm32_test/Drivers/CMSIS/Include -IC:/Work_Space/Project/stm32_test/RT-Thread -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/components/finsh/inc -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/include -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension/fcntl/msvc -IC:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension/fcntl/octal -IC:/Work_Space/Project/stm32_test/Bsp/LCD_Touch -g -std=gnu11 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mthumb-interwork -ffunction-sections -fdata-sections -fno-common -fmessage-length=0 -Og -g -MD -MT CMakeFiles/stm32_test.elf.dir/Core/Src/main.c.obj -MF CMakeFiles\stm32_test.elf.dir\Core\Src\main.c.obj.d -o CMakeFiles/stm32_test.elf.dir/Core/Src/main.c.obj -c C:/Work_Space/Project/stm32_test/Core/Src/main.c In file included from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/RealThread_RTOS_RT-Thread/include/libc/extension/sys/types.h:17, from c:\work_s~1\enviro~1\gnuarm~1\102021~1.10\arm-none-eabi\include\stdio.h:61, from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/system/arch/cc.h:37, from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/arch.h:48, from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/debug.h:40, from C:/Work_Space/Project/stm32_test/Middlewares/Third_Party/LwIP/src/include/lwip/opt.h:52, from C:/Work_Space/Project/stm32_test/LWIP/App/lwip.h:29, from C:/Work_Space/Project/stm32_test/Core/Src/main.c:22: c:\work_s~1\enviro~1\gnuarm~1\102021~1.10\arm-none-eabi\include\time.h:56:1: error: unknown type name 'clock_t'; did you mean '_flock_t'? 56 | clock_t clock (void); | ^~~~~~~ | _flock_t [4/154] Building ASM object CMakeFiles/stm32_test.elf.dir/Core/Startup/startup_stm32f407zetx.s.obj [5/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/usart.c.obj [6/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/fsmc.c.obj [7/154] Building CXX object CMakeFiles/stm32_test.elf.dir/Bsp/LCD_Touch/bsp_lcd.cpp.obj [8/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/can.c.obj [9/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/stm32f4xx_hal_timebase_tim.c.obj [10/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/spi.c.obj [11/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/stm32f4xx_hal_msp.c.obj [12/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/system_stm32f4xx.c.obj [13/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/gpio.c.obj [14/154] Building C object CMakeFiles/stm32_test.elf.dir/Core/Src/stm32f4xx_it.c.obj ninja: build stopped: subcommand failed. ```
查看更多
1
个回答
默认排序
按发布时间排序
加缪
2024-10-15
这家伙很懒,什么也没写!
参考一下:https://club.rt-thread.org/ask/question/981978b1d833e9cf.html
撰写答案
登录
注册新账号
关注者
0
被浏览
271
关于作者
Scienheim
这家伙很懒,什么也没写!
提问
1
回答
0
被采纳
0
关注TA
发私信
相关问题
1
RTT进入main函数之后不能再设置系统的时钟了吗?
2
PersimmmonUI 的Clock控件问题
推荐文章
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
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
2
RT-Thread 发布 EtherKit开源以太网硬件!
3
rt-thread使用cherryusb实现虚拟串口
4
《C++20 图形界面程序:速度与渲染效率的双重优化秘籍》
5
《原子操作:程序世界里的“最小魔法单位”解析》
热门标签
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
ESP8266
I2C_IIC
WIZnet_W5500
ota在线升级
UART
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
at_device
ulog
C++_cpp
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
张世争
8
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
11
个答案
1
次被采纳
KunYi
6
个答案
1
次被采纳
本月文章贡献
程序员阿伟
6
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
2
次点赞
ThinkCode
1
篇文章
1
次点赞
Betrayer
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部