Hi Steven,
It looks like your installed linker does not support cross-compilation for
arm. You need to install gcc with arm support. You can find a link to it on
Linaro site: http://www.linaro.org/downloads/ (Bare-metal toolchain for
Cortex-R/M and Cortex-A) .
Kind regards,
Evgeny
-----Original Message-----
From: qiuw at ichaier.com [mailto:qiuw at ichaier.com]
Sent: 11 March 2015 09:56
To: Evgeny Astigeevich
Subject: Re: RE: [LLVMdev] A question to LLVM for ARMv6
Hi, Evgeny
Thanks for your reply.
But When I executed the command (clang --target=armv6m-arm-none-eabi
-mcpu=cortex-m0 t.c), the error was displayed as follows
D:\LLVM_TEST\m0>"H:\Program Files\LLVM\bin\clang"
--target=armv6m-arm-none-eabi
-mcpu=cortex-m0 t.c
e:/python26/egg-info/mingw/usr/bin/../lib/gcc/i686-w64-mingw32/4.5.2/../../.
./..
/i686-w64-mingw32/bin/ld.exe: C:\DOCUME~1\qiuw\LOCALS~1\Temp\t-3d7139.o:
Relocat ions in generic ELF (EM: 40)
C:\DOCUME~1\qiuw\LOCALS~1\Temp\t-3d7139.o: could not read symbols: File in
wrong format
collect2: ld returned 1 exit status
clang.exe: error: linker (via gcc) command failed with exit code 1 (use -v
to se e invocation)
I want compile 't.c' to 't.o' that can be linked by gcc or lld.
Thanks a
lot.
Kind regards,
Steven.
-------------->Hi Steven,
>
>On the following page you can find how to build cross-compiling
>clang/llvm and what packages you will need for the ARM cross-compilation:
>
>http://llvm.org/docs/HowToCrossCompileLLVM.html
>
>On the following page you can read about cross-compilation using clang:
>
>http://clang.llvm.org/docs/CrossCompilation.html
>
>
>For example, compiling for Cortex-M0 (armv6-m):
>
>clang --target=armv6m-arm-none-eabi -mcpu=cortex-m0 t.c
>
>
>Kind regards,
>Evgeny
>
>-----Original Message-----
>From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
>On Behalf Of qiuw at ichaier.com
>Sent: 05 March 2015 03:53
>To: llvmdev
>Subject: [LLVMdev] A question to LLVM for ARMv6
>
>Hi, all
>
>I want to use LLVM to compile an ARM Cortex-M0 project on windows. Who
>can send me a sample, including command arguments and introdution about
>debug process. Thanks a lot.
>
>-Steven
>***************************** Legal Disclaimer
>***************************** "This email may contain confidential and
>privileged material for the sole use of the intended recipient. Any
>unauthorized review, use or distribution by others is strictly
>prohibited. If you have received the message in error, please advise the
sender by reply email and delete the message. Thank
you.">
>
>_______________________________________________
>LLVM Developers mailing list
>LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
>
>
>
***************************** Legal Disclaimer *****************************
"This email may contain confidential and privileged material for the sole
use of the intended recipient. Any unauthorized review, use or distribution
by others is strictly prohibited. If you have received the message in error,
please advise the sender by reply email and delete the message. Thank you."