Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
CLOCK
unknown type name 'clock_t'
发布于 2024-10-15 16:24:18 浏览:585
订阅该版
使用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. ```
查看更多
2
个回答
默认排序
按发布时间排序
axushilong
2024-12-25
这家伙很懒,什么也没写!
强烈建议官方将BSP目录及其子目录下的各个示例都按最新的env编译一遍看看吧,一堆的各种问题,新手都不知道怎么解决,编译都不过,这怎么学,怎么用?麻烦以后发行编译器的时候将之前的示例都编译一遍吧。非常强烈建议做这样的测试。同样建议的赞上去让官方看到。
加缪
2024-10-15
这家伙很懒,什么也没写!
参考一下:https://club.rt-thread.org/ask/question/981978b1d833e9cf.html
撰写答案
登录
注册新账号
关注者
0
被浏览
585
关于作者
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
【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
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部