How to set up a C project with Arduino Due and Eclipse

I tried a lot of tutorials to get my Due running with Eclipse and C but nothing worked. Here is what I want to do:

  1. Download eclipse and install the AVR eclipse plugin
  2. Configure the AVR paths to the Arduino IDE installation package (path-to-arduino\hardware\tools...)
  3. Create a new AVR Cross Target Application C project with "blink" example code in C
  4. Copy the core files for the board (arduino sam) in my workspace

What ever I try to get the compiler errors fixed failed. >:(
Is there an easier way to do this or is there someone who made this before?

What ever I try to get the compiler errors fixed failed.

Can't see your code. Can't see your error messages. Can't see what you did to get the error messages.

Is there an easier way to do this

Of course. Use the IDE.

I am getting right now very confused. If I use the IDE I have to implement my sketches in C++, right? I know not using the Arduino IDE makes no sense but I don't want to use classes.

I know not using the Arduino IDE makes no sense but I don't want to use classes.

You don't need to know anything about how to define a class, or what object oriented programming is about to be able to use Serial.print(). Well, Serial is an instance of the HardwareSerial class.

So, classes are not big hairy monsters that are trying to frighten you. If you don't want to develop classes, don't. The setup() and loop() functions are pure C. analogWrite(), digitalRead(), pinMode() are functions. Not a class in sight.

So, you are right. Not using the Arduino IDE does not make sense. Even if you don't want to use classes.

Thought I'd take a look at the forums to take a break from sitting here right now programming a Taijuino DUE with Eclipse.

What you might want to try is, rather than using the AVR Eclipse plugin, use this Eclipse Arduino plugin from Jantje

Depending on your platform and versions, you my need to copy a version of 'make' as [I detailed at this post](http://See: Windows/Linux/Mac Eclipse plugin to compile and upload arduino sketches - #557 by rockwallaby - Libraries - Arduino Forum) on the forum section for this Eclipse plugin

This setup of Eclipse and the Arduino plugin by Jantje works very nicely,for both AVR as well as SAM cores.
I don't ever use the Arduino IDE.

But if you are just starting out with Arduino or with programming, I would suggest starting first with the standard IDE.

As Paul implies, using the standard IDE doesn't mean restricting you to C++, of course not.


Paul

Another option to look at is this post with a link to a video.


Paul

Hi guys,

thanks for the advice. I switched to the plugin from Jantje. I think this handles a lot of configuration work for you and it works well for the Sam cores.

@ajeetpalsingh the link you posted just leads to an electronic website that sells the Due? How this should help me?

hannes93, I reported him as spam and is now gone.

I use the plugin of Jantje and have been very happy with it, for both AVR and SAM boards.
The link I pointed to looks equally good and will be keen to give that a try in the coming days, as long as it will do the DUE boards.


Paul

The video looks quite promising. Let me know if it works for the Due!