Atmel Studio 6

Hey everyone,

I have tried to get this to work for, well, at least it seems to me, a very long time. I have tried Jayvon Systems' tutorial, then Omar Francisco's Arduino installer, and got the Blink-example to compile without errors. So far so good.

I should mention that I am not using an arduino board but an evaluation board (link in german). Communication with the boards via avrdude has been tested using a simple program written in C++, and it works (LEDs are turned on).

Now, uploading the .hex-file built with the Arduino Blink example, nothing happens. When debugging (and I have no clue on how to use that function properly), nothing happens when I build and run the simulation, then, when I click "Break all", wiring.c is opened and a line is marked with yellow background - as far as I can tell, it's a different line every time. When I click in "Next Statement", nothing happens except that the yellow line background vanishes, and when I hit "Break all" again, another line gets marked in the same fashion.

Did anyone encounter something similar, and/or has some pointers for me?

Thanks!

i feel your pain...i gave up on it...plus somehow the USB driver in it screwed with my Arduino IDE...so i uninstalled studio6...i don't think the arduino works with it..unless somebody found a way to...i rather just upload a hex file with a USBtiny or any AVR programmer

The script from Omar's site works for Release code out of the box. If you need to deploy Debug code, change the localdeploy.bat accordingly. Atmel Studio does not export the $(Configuration) property to external tools, at least not yet, therefore the localdeploy.bat is hard coded to the Release mode, but it can be easily changed. The next release of the installation script is going to address this problem.

I noticed the hitch with the deploy-bat looking for the .hex-file in the release-folder, and changed the configuration to release. The deploy-script works fine now, it bangs away the bits as requested, but I get the same result - no reaction from th board's LEDs. It is my assumption that Atmel Studio does not produce a working .hex-file, seeing how I can only see an empty main.cpp when debugging...

Have you tried checking the fuses on your chip to make sure they match Arduino's default settings? If it was not an Arduino board to begin with, some products come with different configurations. This has caused us problems in the past. Be careful with setting fuses, you can flash configurations that "soft-brick" the chip, requiring high voltage programming to reverse. Some can be changed without issue.

The Atmel Studio debugger is not foolproof under any circumstances, but we've gotten it to work with Arduino with some degree of success. Hard to say what might be causing the problems you describe without more detail though.

A couple more things - if you got the blink example to compile but it doesn't perform as expected, can you check the compiled hex filesize vs. the result from the Arduino IDE? Often, a successful compilation but strange behavior at runtime is due to compiler and linker optimization settings that differ from the defaults.

Also, I didn't realize you mentioned debugging with the simulator in your first post - that's a different beast than debugging on-chip, and we've had trouble getting consistent results (plus, it's sloooow). Not sure if you have a programming tool, but using DEBUGWIRE with a Jtag or AVR Dragon has been a better experience.

If you're looking to try again and would like instructions to cross-reference with Jaycon's tutorial, we've updated our AVR Studio 5 tutorial for using Arduino with Atmel Studio 6. It can't account for every variation in people's setups, but a good number of users have found the previous version helpful. Let us know if you make progress and we'll share any other insights we have!