使用环境
<!-- 必须 告知插件运行的环境,帮助开发者定位问题 -->
- 操作系统版本:Windows 10 专业版 22H2
- 操作系统平台(x86/x64):64 位操作系统, 基于 x64 的处理器
- VsCode 版本:1.93.1
- EIDE 插件版本:v3.20.1
- C/C++ 插件版本:v1.23.3 (pre-release)
- 何种编译器(keil_c51/sdcc/armcc5/armgcc/...):armcc5
- 编译器版本(非编译问题可忽略):v5.06
描述问题
<!-- 使用简明清晰的语言描述您的问题 -->
使用rt-thread 5.1.0版本创建工程后再keil可以正常编译和下载,将此工程导入到eide中后编译,发现会报错,报错内容为
[ 9%] CC '../../../src/scheduler_up.c'
".......\src\scheduler_up.c", line 180: Warning: #223-D: function "rt_sched_remove_thread" declared implicitly
rt_sched_remove_thread(to_thread);
^
".......\src\scheduler_up.c", line 249: Warning: #223-D: function "rt_sched_insert_thread" declared implicitly
rt_sched_insert_thread(from_thread);
^
".......\src\scheduler_up.c", line 257: Warning: #223-D: function "rt_sched_remove_thread" declared implicitly
rt_sched_remove_thread(to_thread);
^
".......\src\scheduler_up.c", line 313: Warning: #223-D: function "rt_sched_remove_thread" declared implicitly
rt_sched_remove_thread(rt_current_thread);
^
".......\src\scheduler_up.c", line 370: Error: #159: declaration is incompatible with previous "rt_sched_insert_thread" (declared at line 249)
void rt_sched_insert_thread(struct rt_thread *thread)
^
".......\src\scheduler_up.c", line 422: Error: #159: declaration is incompatible with previous "rt_sched_remove_thread" (declared at line 180)
void rt_sched_remove_thread(struct rt_thread *thread)
^
.......\src\scheduler_up.c: 4 warnings, 2 errors
[ 18%] CC '../libraries/STM32F1xx_HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c'
[ 27%] CC '../libraries/STM32F1xx_HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c'
ERROR compilation failed at : "d:\01_ZHZ_PROJECT\01-gitee\motor-drv\rt-thread-5.1.0\rt-thread-5.1.0\src\scheduler_up.c", exit code: 1
command:
"D:\Keil_v5\ARM\ARMCC\bin\armcc.exe" -c --apcs=interwork -I../../../components/libc/posix/io/poll -I../../../components/fal/inc -I../libraries/HAL_Drivers/drivers/drv_flash -I../../../components/drivers/include -I../../../components/libc/posix/io/eventfd -I../../../components/utilities/ymodem -I../libraries/HAL_Drivers/CMSIS/Include -I../../../components/drivers/spi -Iapplications -Iboard/CubeMX_Config/Inc -I. -I../../../components/libc/compilers/common/extension -I../../../components/finsh -I../../../components/libc/compilers/common/include -Ipackages/ota_downloader-v1.0.0 -I../libraries/HAL_Drivers/drivers/config -I../libraries/HAL_Drivers/drivers -I../libraries/HAL_Drivers -I../../../libcpu/arm/cortex-m3 -I../../../libcpu/arm/common -Iboard
-I../../../include -I../../../components/libc/posix/ipc -I../libraries/STM32F1xx_HAL/STM32F1xx_HAL_Driver/Inc -I../../../components/libc/compilers/common/extension/fcntl/octal -I../../../components/libc/posix/io/epoll -I../libraries/STM32F1xx_HAL/CMSIS/Device/ST/STM32F1xx/Include -IRTE/rt-thread -DSTDC_LIMIT_MACROS -DRT_USING_ARMLIBC -DSTM32F103xE -DUSE_HAL_DRIVER -DRT_USING_LIBC -DCLK_TCK="RT_TICK_PER_SECOND" -DRTTHREAD -DSTM32F10X_HD --cpu Cortex-M3 --li --c99 -O0 --split_sections --diag_suppress=1 --diag_suppress=1295 -g -o .\build\rt-thread.obj___\src\scheduler_up.o --no_depend_system_headers --depend .\build\rt-thread.obj____\src\scheduler_up.d .......\src\scheduler_up.c
ERROR build failed !, elapsed time 0:0:0
复现方法:下载 rtthread 5.1.0 的源代码
导入rt-thread-5.1.0\bsp\stm32下任意一个demo,编译
屏幕截图
<!--使用一些截图能够更好地展现问题 -->
keil5 编译器版本:
报错:
期望现象
<!--您期望应该产生的,但实际上却没有发生的结果-->
消除报错,使eide可以正常编译