Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clang compile for AVR/ARM?

I'd like to cross-compile Clang for run on ARM devices and compile for ARM mcu (Cortex M3) or ATmega AVR mcus. Is Clang able to do it?

UPDATE: i've found llvm-avr backend for LLVM 3.5: https://github.com/sushihangover/llvm-avr

Is anyone except me interested?

like image 564
4ntoine Avatar asked Jun 11 '14 05:06

4ntoine


People also ask

Does Clang support arm?

Arm® Compiler for Embedded is based on Clang and LLVM compiler technology. The Arm Compiler for Embedded documentation describes features that are specific to, and supported by, Arm Compiler for Embedded.

Can Clang compile itself?

Clang C++ can parse GCC 4.2 libstdc++ and generate working code for non-trivial programs, and can compile itself.

How do you compile in Clang?

To compile a C++ program on the command line, run the clang++ compiler as follows: $ scl enable llvm-toolset-6.0 'clang++ -o output_file source_file ...' This creates a binary file named output_file in the current working directory. If the -o option is omitted, the clang++ compiler creates a file named a.

Does LLVM work on ARM?

The Open-source LLVM toolchain for Arm processors supports the following features: LLVM core. Clang compiler. LLD linker.


1 Answers

For those interested, there is a currently active fork over here: https://github.com/dylanmckay/avr-llvm

like image 140
RandomInsano Avatar answered Sep 25 '22 14:09

RandomInsano