similar to: [LLVMdev] Setting up a cross-compiler for cortex-m3

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Setting up a cross-compiler for cortex-m3"

2012 Jul 18
0
[LLVMdev] Setting up a cross-compiler for cortex-m3
Hi there, I'm trying to switch from GCC to llvm (clang++) for cross-compiling a firmware of mine for a stm32 (ARM cortex-m3). After looking in the documentation and a bit of googling here is what I did (in case someone else in the future is having the same problem) cd llvm git clone http://llvm.org/git/llvm.git cd llvm/tools git clone http://llvm.org/git/clang.git cd llvm/projects git
2012 Jul 18
2
[LLVMdev] Setting up a cross-compiler for cortex-m3
On 18 July 2012 14:33, salvatore benedetto <salvatore.benedetto at gmail.com> wrote: > but I still haven't figure out how to build for cortex-m3 > > clang -march=armv7-m -mfloat-abi=soft <something missing?> testReference.cpp -c -march should have done the trick. You can also try -mcpu=cortex-m3, or try -ccc-host-triple armv7m-none-gnueabi (or -eabi), and possibly
2012 Jul 18
3
[LLVMdev] Setting up a cross-compiler for cortex-m3
On 18 July 2012 14:57, salvatore benedetto <salvatore.benedetto at gmail.com> wrote: > $ clang -march=armv7-m -mfloat-abi=soft -ccc-host-triple > armv7m-none-gnueabi testReference.cpp -c > fatal error: error in backend: CPU: 'cortex-m3' does not support ARM > mode execution! Ah, yes! Try: $ clang -ccc-host-triple thumbv7m-none-gnueabi testReference.cpp -c Cross
2012 Jul 18
0
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Wed, Jul 18, 2012 at 3:52 PM, Renato Golin <rengolin at systemcall.org> wrote: > On 18 July 2012 14:33, salvatore benedetto > <salvatore.benedetto at gmail.com> wrote: >> but I still haven't figure out how to build for cortex-m3 >> >> clang -march=armv7-m -mfloat-abi=soft <something missing?> testReference.cpp -c > > -march should have done
2012 Jul 18
0
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Wed, Jul 18, 2012 at 4:15 PM, Renato Golin <rengolin at systemcall.org> wrote: > On 18 July 2012 14:57, salvatore benedetto > <salvatore.benedetto at gmail.com> wrote: >> $ clang -march=armv7-m -mfloat-abi=soft -ccc-host-triple >> armv7m-none-gnueabi testReference.cpp -c >> fatal error: error in backend: CPU: 'cortex-m3' does not support ARM >>
2012 Jul 18
2
[LLVMdev] Setting up a cross-compiler for cortex-m3
On 18 July 2012 15:24, salvatore benedetto <salvatore.benedetto at gmail.com> wrote: > I'm not sure how to interpret the above output, but I don't understand > why if say -triple armv4t-none--gnueabi . Ok, we're getting there... ;) I think these errors are due to Clang not finding the libraries/includes/etc for the target you're building. If you have
2012 Jul 18
0
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Wed, Jul 18, 2012 at 5:45 PM, Renato Golin <rengolin at systemcall.org> wrote: > On 18 July 2012 15:46, salvatore benedetto > <salvatore.benedetto at gmail.com> wrote: >> $ clang++ -ccc-host-triple thumbv7m-none-gnueabi noInclude.cpp -c >> --sysroot=/home/emitrax/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/ > > Try -ccc-gcc-name
2012 Jul 18
0
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Wed, Jul 18, 2012 at 4:31 PM, Renato Golin <rengolin at systemcall.org> wrote: > On 18 July 2012 15:24, salvatore benedetto > <salvatore.benedetto at gmail.com> wrote: >> I'm not sure how to interpret the above output, but I don't understand >> why if say -triple armv4t-none--gnueabi . > > Ok, we're getting there... ;) Glad you are confident.
2012 Jul 18
3
[LLVMdev] Setting up a cross-compiler for cortex-m3
On 18 July 2012 15:46, salvatore benedetto <salvatore.benedetto at gmail.com> wrote: > $ clang++ -ccc-host-triple thumbv7m-none-gnueabi noInclude.cpp -c > --sysroot=/home/emitrax/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/ Try -ccc-gcc-name arm-none-linux-gnueabi-g++ -ccc-host-triple thumbv7m-none-linux-gnueabi Sometimes it's better than sysroot, as it finds it
2012 Jul 22
3
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Wed, Jul 18, 2012 at 6:08 PM, salvatore benedetto <salvatore.benedetto at gmail.com> wrote: > On Wed, Jul 18, 2012 at 5:45 PM, Renato Golin <rengolin at systemcall.org> wrote: >> On 18 July 2012 15:46, salvatore benedetto >> <salvatore.benedetto at gmail.com> wrote: >>> $ clang++ -ccc-host-triple thumbv7m-none-gnueabi noInclude.cpp -c >>>
2012 Jul 30
1
[LLVMdev] Cross-compiling for cortex-m3: how do I get ride of -ccc-gcc-name ?
On Mon, Jul 30, 2012 at 10:27 AM, Renato Golin <rengolin at systemcall.org> wrote: > On 30 July 2012 09:14, salvatore benedetto > <salvatore.benedetto at gmail.com> wrote: >> I'm sorry, I should have been more clear. I don't just want to get >> right of the option itself, I want not to >> have the need to a have a GCC cross-toolchain around. > >
2012 Jul 30
2
[LLVMdev] Cross-compiling for cortex-m3: how do I get ride of -ccc-gcc-name ?
On Mon, Jul 30, 2012 at 3:51 AM, Gordon Keiser <gkeiser at arxan.com> wrote: > Making a symlink to clang in the same directory as the GCC / binutils (I'll call it $ARM_BIN) called > > arm-none-linux-gnueabi-clang (and one with clang++ too) > > and another link in the $ARM_BIN/../lib directory to clang directory located under clang's lib (for includes) > should be
2012 Jul 22
3
[LLVMdev] Setting up a cross-compiler for cortex-m3
On 22 July 2012 22:03, salvatore benedetto <salvatore.benedetto at gmail.com> wrote: > While we are at it, if a new comer would like to understand where everything > takes place, where should he look? > > I did a grep in the source and eventually ended up in clang/something/driver. That's pretty much it: clang/lib/Driver
2012 Jul 18
1
[LLVMdev] Setting up a cross-compiler for cortex-m3
On 18 July 2012 17:08, salvatore benedetto <salvatore.benedetto at gmail.com> wrote: > I of course own you a beer :-) Thank you very much. I will remind you of that, next year, on EuroLLVM 2013. :D > Which part of gcc I'm using with that option? > Just the libc, libgcc et all? AFAIK, it uses the name to find the tool chain, and guess all other binaries from it. So it calls
2012 Jul 30
0
[LLVMdev] Cross-compiling for cortex-m3: how do I get ride of -ccc-gcc-name ?
On 30 July 2012 09:14, salvatore benedetto <salvatore.benedetto at gmail.com> wrote: > I'm sorry, I should have been more clear. I don't just want to get > right of the option itself, I want not to > have the need to a have a GCC cross-toolchain around. That requires a bit more than just compiling binutils. You'll need a working linker and a perfect interaction between
2012 Jul 23
0
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Sun, Jul 22, 2012 at 11:12 PM, Renato Golin <rengolin at systemcall.org> wrote: > On 22 July 2012 22:03, salvatore benedetto > <salvatore.benedetto at gmail.com> wrote: >> While we are at it, if a new comer would like to understand where everything >> takes place, where should he look? >> >> I did a grep in the source and eventually ended up in
2012 Jul 23
2
[LLVMdev] Setting up a cross-compiler for cortex-m3
On 23 July 2012 17:03, Chris Cadwallader <ccadwallader at arxan.com> wrote: > On Darwin, if -march is armv7 clang's driver will assume you want thumb2 unless you also give it -mno-thumb but that is irrelevant with mcpu=cortex-m3. I think that Thumb2 should be the default for v7 on any system, not just Darwin. Maybe some ARM folk can comment on this... -- cheers, --renato
2012 Jul 22
0
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Sun, Jul 22, 2012 at 10:37 PM, Renato Golin <rengolin at systemcall.org> wrote: > On 22 July 2012 20:42, Anton Korobeynikov <anton at korobeynikov.info> wrote: >>> Any suggestions? >> Try to specify CPU explicitly. > > He shouldn't have to, but that might help. Maybe setting -march? This > is a big mess... > > I thought that v7 always assumed
2012 Jul 23
0
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Mon, Jul 23, 2012 at 8:14 PM, Renato Golin <rengolin at systemcall.org> wrote: > On 23 July 2012 17:03, Chris Cadwallader <ccadwallader at arxan.com> wrote: >> On Darwin, if -march is armv7 clang's driver will assume you want thumb2 unless you also give it -mno-thumb but that is irrelevant with mcpu=cortex-m3. > > I think that Thumb2 should be the default for v7
2012 Jul 22
2
[LLVMdev] Setting up a cross-compiler for cortex-m3
On Sun, Jul 22, 2012 at 9:42 PM, Anton Korobeynikov <anton at korobeynikov.info> wrote: >> Any suggestions? > Try to specify CPU explicitly. Already did. clang++ -ccc-gcc-name arm-none-linux-gnueabi-g++ -ccc-host-triple thumbv7m-none-gnueabi testReference.cpp -c -mcpu=cortex-m3 fatal error: error in backend: CPU: 'cortex-m3' does not support ARM mode execution! S.