Since 3 years I have been using AS7 for Arduino Uno only, and except for temporary issues with the "Import Arduino sketch" features when Arduino IDE or AS7 got updated, everything went well so far.
Time has passed, and my projects began to grow beyond the limits of the UNO, so I moved forward, using Mega and Due.
For the Mega, everything went well, except that I had to create an empty sketch with the libraries i needed in Arduino IDE, import it in AS7 and then start coding; this is the same story as the Uno, as you can read from my other post here:
For the Due, I followed the same workflow and could complete the import of the Arduino template sketch (no code, only the libraries), but at the moment of compiling I hit a "chip.h" not found error.
I searched a lot but have found only this thread (plus some duplicates of it on other forums):
which is 3 yrs old and is related to the Zero board (SAMD processor, not SAM). The solution of the directory junction intrigued me and i tested it for a Zero board, finding that it works nicely (I have updated the aforementioned thread with all the details), so i tried to apply the same concept to the Due. Here is what i did, without luck:
To be absolutely sure of the outcome, I did a clean reinstall of the Arduino ide and discovered that the uninstall process does not remove the folders in %localappdata%\arduino15.
I manually deleted it.
For the Zero, thing stopped working from BSP 1.6.8 (apr 2015) and 1.6.9 (dec 2016) so i looked for Due BSP around the same dates, and found that my starting point could be SAM 1.6.8 (nov 2015).
To stay clean and safe, I copied the Blink example in my sketchbook and used it as test code. At every BSP version change i did the following:
-compiled in Arduino IDE (for Due, programming port target).
-imported in AS7
-selected Release version and hit "Rebuild solution" in AS7.
I tried the almost all other SAM BSP versions, before and after 1.6.8, with the following procedure to replace them:
-From IDE board manager, Removed the package.
-Closed Arduino IDE.
-Deleted %localappdata%\arduino15 folder (I also that "Remove" of a BSP from the IDE does not clean everything from that folder as well).
-Started Arduino IDE, installed the next SAM BSP version.
-Reopened my test copy of Blink, set it for Due target (it gets lost following deletion of %localappdata%\arduino15 folder).
-Compiled in the IDE.
-Closed the IDE
-Started AS7 and imported sketch as described above.
-Rebuilt solution for Release target.
The constant outcome was compile error: chip.h not found.
Being desperate, I have also installed MPlab X with the compilers and the "Arduino importer" plugin, and i discovered that it can only import from AS7: it is not possible to import in MPLAB X directly from Arduino IDE.
I hope i have explained everything clearly, if not please just let me know.
Thanks in advance to all who want to help.