Although the Arduino programming system is simple and easy to use, when you get into more complex applications (photo attached) it lacks any serious debugging capability. I'm struggling to get Atmel Studio 7 and the Atmel ICE interface working on my Windows 10 PC. I keep getting a variety of error messages that basically say it doesn't see or recognize the attached Arduino board. If you are a newbie like me, you have probably fussed about the lack of documentation. After an extensive Google search I found this page
http://www.atmel.com/webdoc/index.html
It's loaded with good information. I have no idea why this page isn't referenced in big bold type everywhere you look.
To the best of my knowledge, AVRdude.exe is a program that Studio 7 needs to communicate with the Atmel ICE and the Arduino board. Good documentation on it is found here:
http://www.nongnu.org/avrdude/
It was loaded into my system with Studio 7 or when I plugged in the Atmel ICE. It has a configuration file, 2 versions were loaded automatically, that specifies properties for all the Atmel chips. Within the conf file I find
AVRDUDE's "-C" command line option specifies the location of the
configuration file. The "-c" option names the programmer configuration
which must match one of the entry's "id" parameter. The "-p" option
identifies which part AVRDUDE is going to be programming and must match
one of the parts' "id" parameter
OK, I did some more digging. I found it should be installed as an external tool, and since I'm using a Mega2560 this seemed to be just what I need:
Looks good until
Stage 2: Make note of COM port being used by your Arduino board
This is needed in the Arguments line of the "External Tools" window. A typical Arguments line (from the above web page) would look like this:
-C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" -patmega2560 -cwiring -P\.\COM3 -b115200 -D -Uflash:w:"$(ProjectDir)Debug$(TargetName).hex":i
This seems pretty stright forward. The -cwiring would have to be changed to reflect the use of the Atmel ICE, but unlike Windows 7, Windows 10 doesn't provide any information about usb or com port usage.
AAAHHHHH!!!!
The Windows 10 device manager does recognize an "Atmel-ICE Data Gateway" (Driver version 1.0.0.0 is up to date) and that the device is working properly. I'm not sure how that fits into this.
Everything I find seems to be 3 or 4 years old and doesn't apply to today's systems. Does anyone have some up to date information about installing AVRdude? Do I need to replace $(ProjectDir) and $(TargetName).hex for every project I'm working on? I usually have 3 or 4 in development at any one time.