Use of Atmel Studio 6.2 for programming an Arduino Due

Hello everybody,

I hope my post is in the good section. If not, I feel sorry for it and please put it in the good one.

I wanted to use Atmel Studio 6.2 with Arduino projects for better programming and be able to easily debug the code with the use of breakpoints. I made all the steps of the following tutorial to configure it for Arduino:

But I can't build the project without having 2 errors. I have the Arduino board Due (uC ATMEL ATSAM3X8E). The error list displays: Error 1 ‘ADC_MR_LOWRES_BITS_10? was not declared in this scope C:\Program Files (x86)\Arduino\hardware\arduino\sam\system\libsam/include/adc.h 55 16 S_2014_07_23_abc_alpha_beta Error 2 ‘ADC_MR_LOWRES_BITS_12? was not declared in this scope C:\Program Files (x86)\Arduino\hardware\arduino\sam\system\libsam/include/adc.h 55 16 S_2014_07_23_abc_alpha_beta

I found the file where the definition of this variable is and add the path to the directories but it doesn’t change anything! Could someone help me? I would be thankful ;-)!

Hello ecousin,

The tutorial that you linked is for AVR. Arduino Due is SAM. It's also a bit hard to tell you what could be happening with your project without the code or at least the main file. Regards,


Hi Palliser,

It’s in fact a bit the same for SAM, just the paths are a little different in the Arduino directories but it’s possible to find correspondances or similarities in the directories structure.
I think just the main file will not help you to understand my problem. Maybe I can’t however give you the zip of the whole project (attached) but you must have the Arduino IDE version 1.5.6 minimum I think to have the Arduino libraries of the Due.

ecousin (21.3 KB)

Hi Ecousin,

Have you had any luck with setting up the libraries for the Arduino Due?

If you have are you willing to share a project file with it up and running.

I have been working on trying to do this for a while now and I am pulling my hair out.



I wrote a tutorial about it: