iotkit-embedded icon indicating copy to clipboard operation
iotkit-embedded copied to clipboard

ARMCC 编译SDK

Open lingyun0129 opened this issue 7 years ago • 7 comments

因GNU编译工具编译的SDK,在mtk平台出现链接错误。故想问能否用armcc来编译SDK?该如何操作,能否给予指导?

lingyun0129 avatar Sep 29 '18 07:09 lingyun0129

可以尝试关闭编译选项 -Os 之后再重新链接

edwardyangx avatar Nov 23 '18 16:11 edwardyangx

什么链接错误,我可以用MDK链接GCC编出来的库,注意选择正确的CFLAGS,比如-fshort-wchar,-mthumb,-mfloat-abi,另外一些newlib的libc库函数底层调用需要自己封装,改用mircolib的或者自己实现。

pansila avatar Nov 26 '18 02:11 pansila

请问楼上采用的是arm-none-eabi-gcc还是GNU Make + gcc 编译链接到MDK。有没有什么指导的网站或者文档分享一下,很困惑

zyh2591 avatar Jan 08 '19 01:01 zyh2591

请问用MDK5 ARM Complier来链接 SDK, 使用arm-none-eabi-gcc 编译出的库文件 imageimage 链接后出问题, T407_SOM\T407_SOM.axf: Error: L6242E: Cannot link object sdk-impl.o as its attributes are incompatible with the image attributes. ... wchart-16 clashes with wchart-32. T407_SOM\T407_SOM.axf: Error: L6242E: Cannot link object mqtt_client.o as its attributes are incompatible with the image attributes. ... wchart-16 clashes with wchart-32. T407_SOM\T407_SOM.axf: Error: L6242E: Cannot link object mem_stats.o as its attributes are incompatible with the image attributes. ... wchart-16 clashes with wchart-32. 请问大家有办法解决么?

superdsp avatar Jan 23 '19 06:01 superdsp

T407_SOM\T407_SOM.axf: Error: L6366E: sdk-impl.o attributes are not compatible with the provided attributes . Object sdk-impl.o contains Build Attributes that are incompatible with the provided attributes. Tag_FP_arch = VFPv2 instructions were permitted (implies VFPv1 instructions were permitted) (=2) Tag_ABI_HardFP_use = Permitted VFP use is implied by Tag_FP_arch (=0) Tag_FP_HP_extension = Use of the optional half-precision extension to VFPv3/Advanced SIMDv1 was permitted (=1) 还有一堆的问题

superdsp avatar Jan 23 '19 08:01 superdsp

@zyh2591 arm-none-eabi-gcc参照sdk里面提供的几个config改下就行了

pansila avatar Feb 11 '19 08:02 pansila

@superdsp 1. 宽字符问题,要给gcc指定宽字符的大小,-fshort-wchar。2. cpu构架要匹配,在config里面指定。

另附上我遇到的问题做的patch。 board.zip

pansila avatar Feb 11 '19 09:02 pansila