ARM Cortex-M3 (Arduino DUE) missing file (s?} 1.6.8

Hi,
there is at least one missing file "chip.h" referenced in Arduino.h file. If I imported ino project in the AtmelStudio 7.0 for debugging features, this missing file failed compilation.

...\ArduinoCore\include\core\Arduino.h(42,18): error: chip.h: No such file or directory

This limits use Arduino DUE in the AtmelStudio using Arduino libraries.

Thanks

Sneer

chip.h should be in .../hardware/sam/1.6.8/system/libsam (You probably need the rest of "system" as well.)
That AS7 fails to import it is a separate problem - talk to Atmel (I've never been sure that AS7's "import Arduino project" was designed to work with anything other than AVR Arduinos.)
Note that libsam is an Atmel thing. WAS an atmel thing, anyway. It seems to have been replaced by "ASF", and I can't find libsam (or any documentation for it) on the Atmel site any more.

OK, Atmel try to import Arduino libraries in the Studio. I gues many people will do it, because there is debugger and customized editor.
If I imported simple Arduino project as UNO or MEGA2560, there are no problems. Arduino ZERO works also. Zero comes from additional packages which is not part of Arduino IDE installation tree.
But DUE not. Therefore something must be "wrong" in the DUE package.

Zero doesn't use libsam; it's built more on "bare metal."

Therefore something must be "wrong" in the DUE package.

Does the Arduino IDE compile Due sketches? Arduino does not claim "sketches are importable by AS7"; it is Atmel that claims that AS7 can import arduino sketches. Therefore, if something is wrong, it is wrong on the AS side...
The presence of libsam does result in s different directory structure. The relevant directories (under "hardware") for samd and avr are cores, variants, and libraries. For Due, there's also the "system" directory.

OK.OK.You have right. Couple of hours and I solved it. I created the ArduinoCore library for ATSAM3X8E. Now I can link it to any DUE project in AtmelStudio and I am able debug DUE board using Atmel-ICE tool. The main problems seems is in the AtmelStudio, because it imports SAMD code instead of SAM. Question is, why it decides do that.

sneer:
I created the ArduinoCore library for ATSAM3X8E. Now I can link it to any DUE project in AtmelStudio ...

@sneer Hey thats cool, can you please share that library, I'm having the same problem here, can't compile Arduino Due Sketches, all the other boards seem all right AS7.

Another option to make compatible the AS7 and the arduino Due using the atmel Ice is to instal the Visual Micro. It is an extension for AS7 that solves the compatibility problems.

PD:sorry for my bad English