similar to: Cross compiling for ARMv7-m

Displaying 20 results from an estimated 4000 matches similar to: "Cross compiling for ARMv7-m"

2020 Sep 14
2
Cross compiling for ARMv7-m
Hi Peter, On Wed, 26 Feb 2020 at 18:37, Peter Smith via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello Arslan, > > > I am guessing I can borrow libraries such as lc and lm from GCC > > arm-none-eabi*, but for clang_rt.builtins-arm.a (which I thought > > should've been built with LLVM build but I couldn't find that library > > in my build
2019 Aug 07
2
Compiling compiler-rt for baremetal CortexM on Ubuntu Linux
Hello, I want to build LLVM/Compiler-rt for baremetal targets like Cortex-M3. By adopting CMake options from http://llvm.1065342.n5.nabble.com/llvm-dev-Compiling-for-baremetal-ARMv4-on-Ubuntu-Linux-tp124226p124500.html, I can only build "libclang_rt.builtins-x86_64.a" in lib/linux, but what I want to build is "libclang_rt.builtins.arm.a". My CMake options are: cmake -G Ninja
2019 Mar 11
2
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello Christian, I reran my script with a similar cmake command to yours. After the build finished the following command from the build directory gave me: find . -name \*builtins.a ./lib/clang/9.0.0/armv6m-none-eabi/lib/libclang_rt.builtins.a ./lib/clang/9.0.0/armv7m-none-eabi/lib/libclang_rt.builtins.a ./lib/clang/9.0.0/armv7em-none-eabi/lib/libclang_rt.builtins.a I hope you see something like
2019 Mar 04
2
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello Christian, I'd expect that adding the library paths (-L) from gcc -v should fix the unable to find -lc, -lm but it won't fix the -lclang_rt.builtins-armv6m.a . To get clang_rt.builtins-armv6m.a you will need to cross compile compiler-rt for v6m and copy it to /usr/local/myclang/lib/clang/8.0.0/lib/baremetal . Beware that building compiler-rt for v6m does need quite a bit of fighting
2017 Aug 04
3
Cross compiling C++ program
On Fri, Aug 04, 2017 at 04:03:35PM -0600, Jonathan Roelofs wrote: > > > 1) Pick a directory as your sysroot > > ~/arm-sysroot > > > > > 2) Install the libc headers there (without having built it) > > What I did was mv musl-*/include ~/arm-sysroot/usr/include. > > I think you need to copy them, not move them. On a new directories and fresh untar of musl, I
2017 Aug 04
2
Cross compiling C++ program
On Fri, Aug 04, 2017 at 01:54:33PM -0600, Jonathan Roelofs wrote: > > > On 8/4/17 1:14 PM, Goran Mekić via llvm-dev wrote: > > On Thu, Aug 03, 2017 at 08:22:24AM -0600, Jonathan Roelofs wrote: > > > IIUC, you don't want to cross compile llvm itself (which is what those > > > instructions are for), but instead you want to *use* llvm to cross compile > >
2019 Feb 04
2
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello Christian, I've put some comments inline, On Sun, 3 Feb 2019 at 13:11, Christian Richter <christian.richter at hsu-hh.de> wrote: > > Hello again, > > so after I successfully build the compiler-rt for armv6 I tried to > actually use it in compiling a small helloworld for a baremetal arm > (consisting of barehelloCLANG.c and a small io.h + io.c) , but the >
2018 Dec 14
3
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello again Christian, I've posted https://reviews.llvm.org/D55709 to see if we can get the documentation on how to cross-compile compiler-rt improved. I'll be out of office until next year so I may be a bit slow to respond to any follow ups. Peter On Thu, 13 Dec 2018 at 17:10, Peter Smith <peter.smith at linaro.org> wrote: > > Hello Christian, > > I've just
2017 Oct 31
3
Cross compiling for Baremetal ARM without using GCC
Dear LLVM developers, Hello, I'm trying to find a way of cross-compiling my c code against Baremetal Cortex-M device (so target triple will be arm-none-eabi) only using LLVM/Clang, and not using anything from GNU (ld or libc). I'm doing this to know which one of LLVM/clang and GCC produces smaller flash image size because saving flash is a big deal in our projects. 1) When I just follow
2017 Aug 04
3
Cross compiling C++ program
On Thu, Aug 03, 2017 at 08:22:24AM -0600, Jonathan Roelofs wrote: > IIUC, you don't want to cross compile llvm itself (which is what those > instructions are for), but instead you want to *use* llvm to cross compile > things. > > To build your sysroot, you'll need to cross-build: > > 1) A libc. Good choices for that for baremetal are: newlib or musl. > 2)
2017 Aug 02
2
Cross compiling C++ program
On Wed, Aug 02, 2017 at 05:48:20PM -0600, Jonathan Roelofs wrote: > I strongly recommend against using the host's headers when cross compiling. > You need to either find or build an arm-none-eabi sysroot, and use the > --sysroot= flag. > > > Jon OK, that's a start. I found https://www.llvm.org/docs/HowToCrossCompileLLVM.html. Is it enough for --sysroot? In case it is,
2019 Nov 13
2
Compiling libc++ using GNU Arm Embedded Toolchain for arm-cortex-m4
Hello, lately, I have been thinking about how to resolve the problem with that the program size increases enormously when including <iostream> when compiling with libstdc++. In this library, in <iostream> there is a static object __ioinit initialized like so: ... // For construction of filebuffers for cout, cin, cerr, clog et. al. static ios_base::Init __ioinit; ... This
2017 Aug 04
3
Cross compiling C++ program
You may also take a look at the ELLCC project (www.ellcc.org <http://www.ellcc.org/>). As far as I understand it they produce and package cross toolchains for a number of popular targets. - Matthias > On Aug 4, 2017, at 12:54 PM, Jonathan Roelofs via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > > On 8/4/17 1:14 PM, Goran Mekić via llvm-dev wrote: >> On
2018 Dec 13
2
Compiling for baremetal ARMv4 on Ubuntu Linux
Hello Peter and Lists, thanks a lot, that way it worked out! The final cmake was cmake -G "Ninja" ../llvm/projects/compiler-rt/ -DCOMPILER_RT_BUILD_BUILTINS=ON -DCOMPILER_RT_BUILD_SANITIZERS=OFF -DCOMPILER_RT_BUILD_XRAY=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=OFF -DCOMPILER_RT_BUILD_PROFILE=OFF -DCMAKE_C_COMPILER=/usr/local/myclang/bin/clang -DCMAKE_AR=/usr/local/myclang/bin/llvm-ar
2018 Dec 04
2
Compiling for baremetal ARMv4 on Ubuntu Linux
I am currently trying to compile a pretty simple program to work on an experimental board. It contains an (FPGA-version of) an ARMv4 processor. So basically, I try this (on my Ubuntu 18.04.1 LTS): clang -v --target=arm-none-eabi -c barehello.c -o barehelloCLANG.o clang -v --target=arm-none-eabi -c io.c -o io.o clang -v --target=arm-none-eabi barehelloCLANG.o io.o -o helloCLANGstatic -static
2014 Jun 19
2
[LLVMdev] [PATCH] triples for baremetal
Eric, Attached are patches for llvm and clang that implement this. I've made 'none' a component that must be added explicitly (i.e. don't turn arm-eabi into arm--none-eabi, but rather turn it into arm--unknown-eabi) to try to reduce surprises. It also keeps the normalization logic a bit simpler than it would otherwise have to be. SPIR triples were one place where I was
2016 Apr 18
2
[cfe-dev] [libunwind] __ELF__ macro for arm-none-eabi
On 18 April 2016 at 16:33, Silviu Baranga <Silviu.Baranga at arm.com> wrote: > Doing a grep "eabi" * -R | grep darwin in llvm I found the test divmod-eabi.ll > which uses the triple armv7-apple-darwin-eabi. What format does that have? Certainly not ELF. :) But I didn't mean "has eabi on triple", but "is in none-eabi mode", which may have to check a
2016 Apr 18
2
[cfe-dev] [libunwind] __ELF__ macro for arm-none-eabi
On 18 April 2016 at 16:18, Silviu Baranga <Silviu.Baranga at arm.com> wrote: > This doesn't look like something ACLE specific (I can't find it in the ACLE doc). Sorry, I didn't mean it was ACLE, only that you guys were fiddling with macros. :) > This seems to be a generic macro. I think it would make sense to define it > if we know we're emitting ELF. Since the
2011 Jan 23
0
[LLVMdev] Target Triple Changes
Hi Renato, > 1. Some ARM triples "arm*-none-eabi" don't get properly recognized, > so Clang doesn't generate correct AAPCS (soft and hard) calls and > don't pass the correct triple to LLC. in order to have "eabi" be properly recognized by LLVM, it is enough to add "eabi" as a valid environment value. Then Triple::Normalize will automatically
2014 Sep 06
2
[LLVMdev] [Compiler-RT] [ARM] Where __aeabi_[il]div0 builtins should be implemented?
> Looks as though whomever implemented the call to __aeabi_idiv0 wanted > to be conservative for non EABI targets. How could it prevent him from providing default implementation of __aeabi_idiv0() for EABI targets? > AFAIK, gnueabi targets recognize all EABI functions, so that should > work well. Not sure I understand you, nothing in compiler-rt defines these functions, they are