SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By tzikis
#145342
Hello guys. I am writing this post because I recently made some progress using Clang to analyze the syntax of an Arduino sketch, and I though it might interest some of you. Any suggestion is also appreciated. I'm glad to say I was contacted by an Atmel representative and there is a strong effort in making Clang + LLVM work with AVR.

To make a long story short, for those who haven't heard of it, LLVM is a radical new open source compiler, spearheaded by Apple and used by many other tech giants (Adobe, Ageia,NVIDIA and Oracle come to mind), and it's set to gradually replace GCC and Clang is the C/C++/Obj-C part of LLVM. Among other things, Clang has much better syntax analysis capabilities than GCC as well as much better error output. What I did was use Clang to parse the intermediate .cpp code generated by the equivalent .ino file, instead of using GCC like the Arduino IDE does.

If you're interested, you can find more info on my blog post, here:http://blog.tzikis.com/?p=454. Please let me know if you have any suggestions.

P.S. I definitely don't intend this post as a spam. This is for educational purposes only. I hope it doesn't offend anyone.
By Fake_Name
#168074
What does arduino have to do with this at all?

It sounds like you're working on C++ support for AVR MCUs in clang. That *is* cool, but the arduino aspect is largely irrelevant. "Arduino" is basically just some code-munging the compiler doesn't even care about.