Well here is the reference on github.comgit@github.com:neilh10/at91sam3xaz01.gitIt incorporates an Arduino compilable port for Atmel Studio 6. I've ported through Arduino SAM release 1.5.2 (but not run it) but it doesn't incorporate all Arduino SAM libray files. I did download and run tests on a version that had release 1.5.1 - so not that different.I've download the github zip file into a temporary directory, and in n AS6.0.1996 opened the project file sam3xApp01\sam3xApp01.atslnand then build the solution.It compiled and linked OK - but I haven't tested it by downloading it through the JTAG. AS6.0.1996 is the lowest rev that supports JTAG/SAM-ICE through ATSAM3X JTAG.It is "As Is" - a development snapshot for unit testing some of the hardware drivers. See the "ReadMe-AboutThisBuild-SAM3XAZ.docx" - I intend to label any specific differences between my hw and this build as HWSAM3XAZA but not done yet.Its also my first time through using github.com - and incredibly impressive as it is a fair number of files.Last time I did such an impressive remote source control was in 2001 with a commerical system called "Continuus" that operated on a private network between two sites and that ended up supporting 50+ working programmers. The simplicity of GIT so far blows me away (though it took about 4 hours to get all of this uploaded). Thanks to all the people contributed to the gitHub online tutorials as well as the git cmd line utility and Git Gui and SSH to work.Be interested in what you can share about the project you are working on.

peteb

Neil, very many thanks for the time and effort to prepare and post this. Much appreciated. BTW I'm supporting a number of Arduino development projects being undertaken my electronics students and attempting to get better debug facilities by utilising the SAM-ICE, but keeping the Arduino framework.

I built your project((in Version: 6.0.1996 - Service Pack 2) and got errors in adc.h (Part of the output is shown) - see below. I can understand that some conditionally included definitions are not actually being included. Does the project build for you? Is there some definition that is missing? Have you had similar issues? I see that you have injected an error into this file previously to test a conditionally compiled macro definition...clip from adc.c:#if SAM3S_SERIES || SAM4S_SERIES || SAM3XA_SERIES //error njh;...

In file included from ../arduino/hardware/arduino/sam/system/libsam/chip.h:44:0, from ../arduino/hardware/arduino/sam/cores/arduino/Arduino.h:34, from ../arduino/hardware/arduino/sam/cores/arduino/cortex_handlers.c:19:C:\at91sam3xaz01-master\sam3xApp01\arduino\hardware\arduino\sam\system\libsam\include\adc.h(170,48): 'enum adc_resolution_t' declared inside parameter list [enabled by default]C:\at91sam3xaz01-master\sam3xApp01\arduino\hardware\arduino\sam\system\libsam\include\adc.h(170,48): its scope is only this definition or declaration, which is probably not what you want [enabled by default]

Background: The fix is in the AS6 toolchain so it makes me nervous. I did send it through to Eric Weddington Jan 10th,2013 and though he responded, he didn't say if the fix I proposed was good.I see from http://www.atmel.com/tools/atmelstudio.aspxthat there is another releaseAtmel Studio 6.1 beta (build 2440)and 6.1 has an upgraded ARM Toolchain 4.7.2from AS 6.0 ARM Toolchain 4.7.0.59 - GCC 4.7.0

peteb

Thanks again for all your help. Exactly right! I updated as suggested: #define SAM3XA_SERIES (SAM3X4 || SAM3X8 || SAM3A4 || SAM3A8)The example builds, executes and is debuggable via SAM-ICE. I will now undertake some more testing.

BTW, I did try the Atmel Studio 6.1 beta (build 2440). I set up for ATSAM3X8E. I found that there appeared to be a problem when setting up the toolchain in Project Properties. Just by selecting the toolchain configuration to be "All Configurations" an application error was displayed: "Error occurred computing the All Configuration settings". I tried uninstalling, re-downloading and re-installing but the problem persisted. So, it seemed to be unusable. I wonder if anybody else has come across this? I then installed the earlier version: 6.0.1996 - Service Pack 2 that I am currently using.

Neil and Pete, you guys are awesome!I was going through all the same problems. I had tried the two most recent releases of 6.1, neither of which worked. Not only was the recommendation for 6.0 excellent, but the sample project posted to github was a game changer. Thanks guys.I'm now successfully getting my Due blinky test running while debugging with the SAM-ICE.

Hey glad it was useful. SAM3X has a lot of very nice opportunities with its internal ram and peripherals and low power. Shame this fix hasn't made it in to the AS. However it does seem the real productive programming is moving to anenvironment with python in it, and there is another productive OOPs paradigm that I've come across using www.squirrel-lang.org - one programsa 'nut' (ElectricImp.com is using it on WiFi SD card).Neil

I am working with custom SAM3X8C board using SAM-ICE to program it using Atmel STudio 6. i would like to know if there is a way to reset the microncontroller over SAM-ICE through Atmel Studio 6 with out programming it? I am trying to avoid unplugging the power to the board to do a reset.

For those interested in debugging Arduino Due and saving some money, I recommend to use an Atmel ICE that costs around $25 or a SWD CMSIS-DAP ($20) like the one from adafruit and shown in the following picture, instead of pay over $100 for a SAM-ICE. Of course, the mentioned cheap options have limited features but at least let you to perform debugging functions like stepping, breakpoints, watch points, and firmware downloads.