Arduino DUE

How to program Arduino DUE board in powerfull mode?
I mean , I’m using Atmel Studio + Visual Micro
Normally I create a new project which is based on Arduino IDE but I know the Arduino Due Arm processor board has more functions then Arduino Uno or avr based board .
There are some functions such as Matrix, or interrupt ,o quadrature encoder
What I have to do , to add some library.h ?
How can I solve the problem <avr/io.h> when I want to make a porting of software from Arduino uno platform to Arduino Due ?

The Arduino environment includes libsam which has many helper functions for most
of the chip’s hardware units and registers. All of the source code is present if you
want to explore.

Thanxs for your answer Mark What I would like to do is to write a porting of GBRL which at the moment is written only for Arduino Uno I think it will be more powerful than now , more Ram , more memory code and pwm resolution , also more timers ...pratically anything more ;D

I found

include "C:\Program Files (x86)\Arduino\hardware\arduino\sam\variants\arduino_due_x\pins_arduino.h"

Automatically composed by Atmel Studio + Visual Micro

You'd be better off starting from the Arduino library version of GRBL perhaps and porting the interrupt and direct port manipulation stuff from that point, probably less work, certainly will be more useful to more people.

You have full access to the chip in the Arduino world, and you make something much easier for others to use. Good luck, an expanded GRBL would be nice to have I reckon!

I ported Marlin to Due, it was fairly straightforward. The first step is abstracting out the AVR specific features. In the first case, implement them using standard API functions to get it to compile, and only using Due specific features later to improve performance where necessary.

The Arduino core uses a somewhat old version of Atmel ASF, that provides a library of low-level functions for most of the SAM3X peripherals. By including arduino.h, you already include the required headers. You'll have to dig around in libsam to see what functions are available.

Personally, I would always try to create a new portable version, rather than another CPU specific one. There are lots of other CPUs like Teensy, that would benefit from this sort of firmware.

I had thought that there may already be a Due version of GRBL, maybe I am thinking of TinyG2.

Thanks for your answers . I'm going to search for a Due version of GRBL and if I find it I 'll just extend some G-Code instead to porting out. Anyway I'd like to understand misterious behind the Arduino IDE .... :(

I know it's a big job to do that but I think that to have a good practicality with DUE is important and powerful

Bob you’re right
here the link of DUE porting …
Nice !!! :smiley:

I open the project with atmel studio 6.2 , I found a icon in the project folder I clean and build the solution but I cannot doenlowd the code as normmaly I use to do I have a message " Please select a connected tool and interface and try again " Is this mean that I have to buy a Atmel ICE or something like that ? It doesn't work like normally ....I dont know what to do .... :-[