Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
DIY综合交流区
ART_work-0094编译报错,请问哪出问题了?
发布于 2012-12-30 15:51:10 浏览:8745
订阅该版
用GCC编译信息如下: ```In file included from D:WorkPathART_work-0094hardwareART t-threadcomponents etlwipsrcarchinclude/arch/cc.h:103:0, from D:WorkPathART_work-0094hardwareART t-threadcomponents etlwipsrcinclude/lwip/arch.h:43, from D:WorkPathART_work-0094hardwareART t-threadcomponents etlwipsrcinclude/lwip/debug.h:35, from D:WorkPathART_work-0094hardwareART t-threadcomponents etlwipsrcinclude/lwip/opt.h:46, from D:WorkPathART_work-0094hardwareART t-threadcomponents etlwipsrcinclude/lwip/sys.h:35, from D:WorkPathART_work-0094hardwareART t-threadcomponentsinit/components.h:27, from applicationsapplication.c:18: c:program filescodesourcerysourcery_codebench_lite_for_arm_eabiin../lib/gcc/arm-none-eabi/4.6.3/../../../../arm-none-eabi/include/string.h:26:7: error: conflicting types for 'rt_memset' D:WorkPathART_work-0094hardwareART t-threadinclude/rtthread.h:474:7: note: previous declaration of 'rt_memset' was here c:program filescodesourcerysourcery_codebench_lite_for_arm_eabiin../lib/gcc/arm-none-eabi/4.6.3/../../../../arm-none-eabi/include/string.h:34:9: error: conflicting types for 'rt_strlen' D:WorkPathART_work-0094hardwareART t-threadinclude/rtthread.h:479:12: note: previous declaration of 'rt_strlen' was here c:program filescodesourcerysourcery_codebench_lite_for_arm_eabiin../lib/gcc/arm-none-eabi/4.6.3/../../../../arm-none-eabi/include/string.h:36:6: error: conflicting types for 'rt_strncmp' D:WorkPathART_work-0094hardwareART t-threadinclude/rtthread.h:477:12: note: previous declaration of 'rt_strncmp' was here c:program filescodesourcerysourcery_codebench_lite_for_arm_eabiin../lib/gcc/arm-none-eabi/4.6.3/../../../../arm-none-eabi/include/string.h:37:8: error: conflicting types for 'rt_strncpy' D:WorkPathART_work-0094hardwareART t-threadinclude/rtthread.h:484:7: note: previous declaration of 'rt_strncpy' was here scons: *** [buildapplicationsapplication.o] Error 1 scons: building terminated because of errors.```
查看更多
8
个回答
默认排序
按发布时间排序
bernard
2012-12-30
这家伙很懒,什么也没写!
sourcery_codebench_lite定义了相同的rt_*接口,ART_work-0094本身自带了GCC编译器,不需要再用第三方编译器了。
HadesHe
2012-12-30
这家伙很懒,什么也没写!
谢谢您的回复 我的setenv.bat内容配置如下: @set path=../../tools/arm/bin;C:Python27Scripts;%PATH% @set RTT_ROOT=D:WorkPathART_work-0094hardwareART t-thread @set RTT_EXEC_PATH=../../tools/arm/bin @set RTT_CC=gcc @cmd 我的rtconfig.py内容配置如下: ``` import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='gcc' PLATFORM = 'gcc' EXEC_PATH = '../../tools/arm/bin' #EXEC_PATH = '../../tools/arm/bin' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') BUILD = 'debug' STM32_TYPE = 'STM32F4XX' if PLATFORM == 'gcc': # toolchains PREFIX = 'arm-none-eabi-' CC = PREFIX + 'gcc' # CC = EXEC_PATH + CC AS = PREFIX + 'gcc' AR = PREFIX + 'ar' LINK = PREFIX + 'gcc' TARGET_EXT = 'elf' SIZE = PREFIX + 'size' OBJDUMP = PREFIX + 'objdump' OBJCPY = PREFIX + 'objcopy' DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -ffunction-sections -fdata-sections' CFLAGS = DEVICE AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-stm32.map,-cref,-u,Reset_Handler -T stm32_rom.ld' CPATH = '' LPATH = '' if BUILD == 'debug': CFLAGS += ' -O0 -gdwarf-2' AFLAGS += ' -gdwarf-2' else: CFLAGS += ' -O2' POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin ' + SIZE + ' $TARGET ' elif PLATFORM == 'armcc': # toolchains CC = 'armcc' AS = 'armasm' AR = 'armar' LINK = 'armlink' TARGET_EXT = 'axf' DEVICE = ' --device DARMSTM' CFLAGS = DEVICE + ' --apcs=interwork' AFLAGS = DEVICE LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-stm32.map --scatter stm32_rom.sct' CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC' LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB' EXEC_PATH += '/arm/bin40/' if BUILD == 'debug': CFLAGS += ' -g -O0' AFLAGS += ' -g' else: CFLAGS += ' -O2' POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin fromelf -z $TARGET' ```
HadesHe
2012-12-30
这家伙很懒,什么也没写!
此时编译信息如下: Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp. ``` D:WorkPathART_work-0094hardwareARTplatform>scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... scons: building associated VariantDir targets: build arm-none-eabi-gcc -o buildapplicationsdaemon.o -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -ffunction-sections -fdata-sections -O0 -gdwarf-2 -DUSE_STDPERIPH_DRIVER -Iapplications -ID:WorkPathART_work-0094hardwareART t-threadapplications -I. -ID:WorkPathART_work-0094hardwareART t-thread -Idrivers -ID:WorkPathART_work-0094hardwareART t-threaddrivers -Ilibarduin o -ID:WorkPathART_work-0094hardwareART t-threadlibarduino -ILibrariesSTM32F4xx_StdPeriph_Driverinc -ID:WorkPathART_work-0094hardwareART t-threadLibrariesSTM32F4xx_StdPeriph_Driverinc - ILibrariesCMSISDeviceSTSTM32F4xxInclude -ID:WorkPathART_work-0094hardwareART t-threadLibrariesCMSISDeviceSTSTM32F4xxInclude -ILibrariesCMSISInclude -ID:WorkPathART_work-0094hardwa reART t-threadLibrariesCMSISInclude -ILibrariesSTM32_USB_Device_LibraryCoreinc -ID:WorkPathART_work-0094hardwareART t-threadLibrariesSTM32_USB_Device_LibraryCoreinc -ILibrariesSTM32_ USB_OTG_Driverinc -ID:WorkPathART_work-0094hardwareART t-threadLibrariesSTM32_USB_OTG_Driverinc -ILibrariesSTM32_USB_Device_LibraryClasscdcinc -ID:WorkPathART_work-0094hardwareART t- threadLibrariesSTM32_USB_Device_LibraryClasscdcinc -ILibrariesSTM32_USB_HOST_LibraryCoreinc -ID:WorkPathART_work-0094hardwareART t-threadLibrariesSTM32_USB_HOST_LibraryCoreinc -Iwifi_ 8686 -ID:WorkPathART_work-0094hardwareART t-threadwifi_8686 -ID:WorkPathART_work-0094hardwareART t-threadinclude -ID:WorkPathART_work-0094hardwareART t-threadlibcpuarmcortex-m4 -ID :WorkPathART_work-0094hardwareART t-threadlibcpuarmcommon -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdfs -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdfsin clude -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdfsfilesystems omfs -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdfsfilesystemsdevfs -ID:WorkPathART_work-009 4hardwareART t-threadcomponentsdriversinclude -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdriversinclude -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdrivers include -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdriversinclude -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdriversusbusbdevice -ID:WorkPathART_work-0094ha rdwareART t-threadcomponentsdriversusbusbhost -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdriversusbusbhostclass -ID:WorkPathART_work-0094hardwareART t-threadcomponent sdriversusbusbhostcore -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdriversusbusbhostinclude -ID:WorkPathART_work-0094hardwareART t-threadcomponentsdriversinclude -ID: WorkPathART_work-0094hardwareART t-threadcomponentsexternalluaapplications -I. -ID:WorkPathART_work-0094hardwareART t-thread -ID:WorkPathART_work-0094hardwareART t-threadcomponents externalluaexlibs -I. -ID:WorkPathART_work-0094hardwareART t-thread -ID:WorkPathART_work-0094hardwareART t-threadcomponentsexternallualua -I. -ID:WorkPathART_work-0094hardwareART t-thread -ID:WorkPathART_work-0094hardwareART t-threadcomponentsexternallua est -I. -ID:WorkPathART_work-0094hardwareART t-thread -ID:WorkPathART_work-0094hardwareART t-threadcompo nentsfinsh -ID:WorkPathART_work-0094hardwareART t-threadcomponentsinit -ID:WorkPathART_work-0094hardwareART t-threadcomponentslibc ewlib -ID:WorkPathART_work-0094hardwareART t-thr eadcomponents etlwipsrc -ID:WorkPathART_work-0094hardwareART t-threadcomponents etlwipsrcinclude -ID:WorkPathART_work-0094hardwareART t-threadcomponents etlwipsrcincludeipv4 - ID:WorkPathART_work-0094hardwareART t-threadcomponents etlwipsrcarchinclude -ID:WorkPathART_work-0094hardwareART t-threadcomponents etlwipsrcinclude etif -ID:WorkPathART_work-0 094hardwareART t-threadcomponentspthreads applicationsdaemon.c In file included from d:workpathart_work-0094hardware oolsarmin../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/include/dirent.h:6:0, from D:WorkPathART_work-0094hardwareART t-threadcomponentsdfsinclude/dfs_def.h:70, from D:WorkPathART_work-0094hardwareART t-threadcomponentsdfsinclude/dfs_file.h:18, from D:WorkPathART_work-0094hardwareART t-threadcomponentsdfsinclude/dfs_posix.h:20, from applicationsdaemon.c:19: d:workpathart_work-0094hardware oolsarmin../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/include/sys/dirent.h:10:2: error: #error "
not supported" In file included from D:WorkPathART_work-0094hardwareART t-threadcomponentsdfsinclude/dfs_file.h:20:0, from D:WorkPathART_work-0094hardwareART t-threadcomponentsdfsinclude/dfs_posix.h:20, from applicationsdaemon.c:19: D:WorkPathART_work-0094hardwareART t-threadcomponentsdfsinclude/dfs_fs.h:48:45: warning: 'struct dirent' declared inside parameter list [enabled by default] D:WorkPathART_work-0094hardwareART t-threadcomponentsdfsinclude/dfs_fs.h:48:45: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by defau lt] In file included from D:WorkPathART_work-0094hardwareART t-threadcomponentsdfsinclude/dfs_posix.h:20:0, from applicationsdaemon.c:19: D:WorkPathART_work-0094hardwareART t-threadcomponentsdfsinclude/dfs_file.h:26:49: warning: 'struct dirent' declared inside parameter list [enabled by default] scons: *** [buildapplicationsdaemon.o] Error 1 scons: building terminated because of errors. D:WorkPathART_work-0094hardwareARTplatform> ``` 初次接触Rt-Thread,谢谢前辈指教.
prife
2012-12-30
这家伙很懒,什么也没写!
不要再用第三方编译器了啊,用ART_work里自带的编译器吧。
HadesHe
2012-12-30
这家伙很懒,什么也没写!
>不要再用第三方编译器了啊,用ART_work里自带的编译器吧。 --- 我是用的ART_work里tools文件夹内自带的编译器啊,想编译一下生成适合STM32F4DISCOVERY用的.bin
bernard
2012-12-30
这家伙很懒,什么也没写!
你是改配置文件了,或者用了不正确的配置文件?
HadesHe
2012-12-30
这家伙很懒,什么也没写!
>你是改配置文件了,或者用了不正确的配置文件? --- 是的,我修改了ART_work-0094hardwareARTplatform目录下的这两个文件 他们分别是: setenv.bat ``` @set path=C:Python27Scripts;%PATH% @set RTT_ROOT=D:WorkPathART_work-0094hardwareART t-thread @set RTT_CC=gcc @cmd ``` rtconfig.py ``` import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='gcc' PLATFORM = 'gcc' EXEC_PATH = '../../tools/arm/bin' if os.getenv('RTT_EXEC_PATH'): EXEC_PATH = os.getenv('RTT_EXEC_PATH') BUILD = 'debug' STM32_TYPE = 'STM32F4XX' if PLATFORM == 'gcc': # toolchains PREFIX = 'arm-none-eabi-' CC = PREFIX + 'gcc' # CC = EXEC_PATH + CC AS = PREFIX + 'gcc' AR = PREFIX + 'ar' LINK = PREFIX + 'gcc' TARGET_EXT = 'elf' SIZE = PREFIX + 'size' OBJDUMP = PREFIX + 'objdump' OBJCPY = PREFIX + 'objcopy' DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -ffunction-sections -fdata-sections' CFLAGS = DEVICE AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread-stm32.map,-cref,-u,Reset_Handler -T stm32_rom.ld' CPATH = '' LPATH = '' if BUILD == 'debug': CFLAGS += ' -O0 -gdwarf-2' AFLAGS += ' -gdwarf-2' else: CFLAGS += ' -O2' POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin ' + SIZE + ' $TARGET ' elif PLATFORM == 'armcc': # toolchains CC = 'armcc' AS = 'armasm' AR = 'armar' LINK = 'armlink' TARGET_EXT = 'axf' DEVICE = ' --device DARMSTM' CFLAGS = DEVICE + ' --apcs=interwork' AFLAGS = DEVICE LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-stm32.map --scatter stm32_rom.sct' CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC' LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB' EXEC_PATH += '/arm/bin40/' if BUILD == 'debug': CFLAGS += ' -g -O0' AFLAGS += ' -g' else: CFLAGS += ' -O2' POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin fromelf -z $TARGET' ```
撰写答案
登录
注册新账号
关注者
0
被浏览
8.7k
关于作者
HadesHe
这家伙很懒,什么也没写!
提问
1
回答
5
被采纳
0
关注TA
发私信
相关问题
1
[项目]搞个开源的硬件项目
2
硬件计划贴,及时更新,欢迎提意见
3
软件计划贴,及时更新,欢迎提意见::WMA,MOUNT,LWIP等问题急需解决.
4
MMS协议
5
定点的wma解压库-libwma
6
QQ群记录 [20090821]
7
STM32网络收音机PCB报名征集
8
第一版调试记录
9
第二版硬件讨论
10
RADIO项目相关模块规格--欢迎大家自己做板时规格与此兼容,减少重复劳动
推荐文章
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
UART
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
ulog
C++_cpp
at_device
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
a1012112796
13
个答案
2
次被采纳
张世争
9
个答案
2
次被采纳
rv666
5
个答案
2
次被采纳
用户名由3_15位
11
个答案
1
次被采纳
本月文章贡献
程序员阿伟
8
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
3
次点赞
ThinkCode
1
篇文章
1
次点赞
Betrayer
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部