Using AVR STudio to build Arduino projects

For those of you who want to use AVR Studio to build you Arduino projects, check out my post in the AVRFreaks forum:

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=110776

The post describes how to use AVR Studio 5 instead of the Arduino IDE to build applications.

The Arduino IDE was really great at first - it got me started (big thanks), but over time I have started to dislike it. Its slow. It has no intellisense. The IDE sucks. I dislike the extra pass it makes to change my code in strange ways. There’s no debugger. So I went looking for alternatives, and came to the conclusion that there are two, Eclipse ( http://arduino.cc/forum/index.php/topic,62094.0.html ) or Visual Studio (AVR Studio 5 to be precise). As a long term Visual Studio user, I chose to make AVR Studio 5 sing and dance and had success. Read the post above for the full story.

I'm currently using Eclipse but would like to use VS. What do you use for a serial monitor?

Iain

Sounds interesting, however the start where you say

"This post describes how to use AVR Studio 5 instead of the Arduino IDE to build applications. It presumes a certain level of knowledge and experience."

Kind of scares me. :wink:

What do you use for a serial monitor?

Any one of a dozen terminal programs, I like Tera Term.


Rob

I was wondering if there was anything that was integrated with AVR Studio. In Eclipse there's an integrated serial monitor.

retrolefty>When I said that "It presumes a certain level of knowledge and experience.", I didnt mean to scare anyone - I was just apologising for the lack of detail. I just didnt want to lose people in a lot of detail - eg - I said "define an external tool", but didnt say how to do that.
I also presume that you are comfy with VS which is probably why you are looking for an alternative to the Arduino IDE.
So no need to be scared, it really does work nicely. Your IDE frustrations will be a thing of the past.

There are so many advanatages with this approach - its the best of both worlds.

Sixeyes>What do you use for a serial monitor?
I use the one in the IDE at present, it does the job, so I havent felt the need to replace it.

Any one try this yet?

Lefty

I didn't know VS had a serial monitor.

How do you access it?
Does it remain open between uploads?
Is it similar to the output / debug windows?

Do you know if this will work even if we don't have the full version of VS2010?

The Eclipse monitor window remains open between uploads which is a real bonus for debugging.
The only pain is remembering to close the serial port before uploading.

Sorry sixeyes, I meant the Arduino IDE !! I just havent seen the need to find a replacement for the serial monitor (yet). Ive got Eclipse installed so at your suggestion, Ill play with the one built into it. I have both VS2008 and VS2010 installed, but I doubt that either is necessary, I am NOT using them - just AVRSTudio.

I guess I don't know what I am missing. I find the Aruino IDE easy to use and to test with via serial monitor. Sometimes I need a 2nd serial port and I use RS232 MON from EVMSoft.com for that. It allows more options vs just outputting characters, for when I am simulating some other piece of hardware.

I have both VS2008 and VS2010 installed, but I doubt that either is necessary, I am NOT using them - just AVRSTudio.

In your article you mention using Visual Assist so I wondered if VS2010 was required.

I guess I don't know what I am missing. I find the Aruino IDE easy to use and to test with via serial monitor.

From time to time it gets mentioned, can the Arduino IDE not close down when uploading a new sketch. With Eclipse you get that and it's a window within the IDE rather than a popup.

Other features are auto complete (unless you've had it, you won't miss it) and not having to recompile libraries for every update. The Arduino IDE becomes tedious as your code base grows in size.

Iain

"The Arduino IDE becomes tedious as your code base grows in size."
I found using the Tabs feature of the IDE kept large code pretty workable.
I set up a bunch of tabs, named so they appeared in order:

It's not the editor that's the problem. It's that every time you compile, it compiles every file. In Eclipse only changed files are recompiled. The compilation time really bugged me using the Arduino IDE.

Iain

I think perhaps the fact that the Arduino IDE recompiles everything is definitely the worst aspect. But the editor is'nt far behind. Its lack of auto-complete or intellisense or whatever you want to call it comes in at a close second.
I dont want to sound like I am complaining, it was a fantastic way to get started. I wouldnt be having fun with micros now if it wasn't for the Arduino community.
But all I can say is that I was prepared to invest time so as I could work out how to use AVR Studio and didnt regret doing so. I couldn't now go back to using the Arduino IDE, it would feel like stepping back a decade or three. And others now have the benefit of knowing about a better way.

Don't apologize for expressing your opinion! And thanks for the post. I happen to agree with your perspective - the Arduino IDE is nice and simple, but with that simplicity comes lots of limitations. This seems to be a common theme among those of us who came into Arduino from the software development side of things. I've re-installed Windows just to do some more in-depth work with AVR Studio; ideally I'd prefer to work with standard tools under 'nix (make, emacs, Bash in my case). However, I often find that using the vendor's preferred tool suite makes exploration much easier, especially when starting with a new platform.

BTW, there's nothing magical about the serial monitor in the Arduino IDE - it's just a serial terminal. As Visual Studio is a plugin-based tool suite, I'm sure that there are lots of options available for integrated serial monitoring, if it's not actually included in the base distribution. I've seen some really neat tooling available from the NetDuino side of things - integrated graphing and monitoring of analog and digital ports on the 'duino, etc.

sixeyes:
It's not the editor that's the problem. It's that every time you compile, it compiles every file. In Eclipse only changed files are recompiled. The compilation time really bugged me using the Arduino IDE.

Iain

The older versions of the IDE use to not compile a library or include file if it found the matching .o file. However many people would bite themselves when working on library files and make changes in the source but forget to delete the old .o file so the new source would not even be compiled. Anyway they decided to change it to it's present behaviour because of that. Compile (verify) is pretty fast on my machine (but haven't written any monsters yet), but uploads always seem too slow. maybe time to upgrade to the Uno bootloader?

Lefty

Does AVR Studio allow plugins?

VC++ Express does not, is AVR Studio a level above?

sixeyes:
Does AVR Studio allow plugins?

VC++ Express does not, is AVR Studio a level above?

Support seems to be available; C++ and Subversion support plugins are available via "online gallery" in extension manager. The Addin manager is also enabled. As for specific implementation details, someone with more recent Visual Studio experience than I may have more information. They (M$/Atmel) may have enabled some signed code jiggery-pokery that limits actual implementation.

That sounds promising

Hello frankDownder,

frankDownunder:
For those of you who want to use AVR Studio to build you Arduino projects, check out my post in the AVRFreaks forum:

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=110776

The post describes how to use AVR Studio 5 instead of the Arduino IDE to build applications.

With a friend on the French forum , we tried to follow your avrfreaks topic. after a few days searching and a few changes in the parameters, we succeeded, thanks to your previous work.

You can find a summary here: http://arduino.cc/forum/index.php/topic,82577.0.html
and the full French topic here: http://arduino.cc/forum/index.php/topic,81365.0.html