<div dir="ltr"><div><div>You will need to have a full set of "binary tools" for ARM - or at least a linker, C/C++ library and a debugger that understands ARM.<br><br></div>You can almost certainly build the Clang + LLVM toolchain into something that will work for you, but you will need to do some more work than you have so far, and it may involve some interesting challenges in building tools that work on Windows... <br><br>--<br></div>Mats<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 May 2015 at 09:55, Guilherme <span dir="ltr"><<a href="mailto:guibufolo+llvm@gmail.com" target="_blank">guibufolo+llvm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello,<br><br></div>I would like to cross compile C code i have to ARM. My host system is a windows machine.<br><br></div>I have found, the rather short, <a href="http://clang.llvm.org/docs/CrossCompilation.html" target="_blank">http://clang.llvm.org/docs/CrossCompilation.html</a> guide and it does concisely explain what you need to do when you have a version of clang that is able to cross compile.<br><br>But what I could not find is a list, link or reference to where get a 
version of clang for windows which is able to cross-compile to ARM.<br><br></div><div>Using the version I got from the downloads site i get:<br>D:\Playground\xcompile-arm>c:\llvm\bin\clang --version<br>clang version 3.5.0 (217039)<br>Target: i686-pc-windows-gnu<br>Thread model: posix<br><br>D:\Playground\xcompile-arm>c:\llvm\bin\clang.exe -target armv7-unknown-none-elf main.c<br>clang.exe: warning: unknown platform, assuming -mfloat-abi=soft<br>clang.exe: warning: unknown platform, assuming -mfloat-abi=soft<br>c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\Users\uidw8099\AppData\Local\Temp\main-4763a2.o: Relocations in generic ELF (EM: 40)<br>C:\Users\uidw8099\AppData\Local\Temp\main-4763a2.o: error adding symbols: File in wrong format<br>collect2.exe: error: ld returned 1 exit status<br>clang.exe: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)<br><br>Second: I'm not able to find which sub-arch a certain processor belongs to: For instance i have a e200z4, which sub-arch does it belong to? Can i read that from the Reference manual?<br></div><div><br></div><div>For the sys part of the triple, if i'm doing bare metal development, should i use None? What exactly does the sys part change when compiling code?<br><br></div><div>Thank you for your help<br></div><br></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>