why use Atmel Studio?

Is there a good reason to install the Arduino Visual Micro extension for Atmel Studio and use that IDE, assuming I don't buy the debugger?

speed of execution, and the ability to control any avr at its lowest form

Osgeld:
speed of execution, and the ability to control any avr at its lowest form

Does it compile and upload faster?

no

but for instance just using arduino, going down and twiddling bits to toggle a pin gets you reaction speed of ~4us, using digital write its around 40us, 10x slower

at some point you are writing less arduino and more raw avr stuff, or you have a mcu that's perfect for your application but arduino does not support it

then you use atmel studio, I rarely use it, but knowing how to use it is nice

I don't use it anymore, takes waaaaaaaaay too long to start up.
Is nice for loading bootloaders & fuses tho, only loads the bootloader and the whole memory.

Hi CrossRoads, you are right there was problem in the May 2013 release of Visual Micro that caused Atmel Studio to take longer to start up.

@Others

In terms of speed the Atmel solution provides a 100% compatible Arduino build so the micro-controller will work at the same speed as if you built with the Arduino Ide. However the build process in Atmel is highly optimized so most of the time the compile will be much faster in Atmel than in the Arduino Ide.

I hope there are lots of other reasons to use Visual Micro. One being that we can switch Arduino versions without re-starting the ide especially important while Arduino transitions 1.5 from beta to release, the same applies to sketchbook folders which allows large lists of libraries to be more easily managed.

Atmel Studio also provides many advanced features such as real-time memory usage graph and debugging. Intellisense, code completion and many other productivity tools make life easier.

Atmel is a well rounded solution for windows users that want something simple and powerful with easy install. I hope this helps.

A simple breakpoint or tracepoint

Debugging Arduino - Serial.print(debug) be gone!!

I have worked with Eclipse so far, Which also has some snags in it :). Is it not so that you need a special debugging card to be able to make use of all the debugging features?

Hi do you mean that you do not need a license key to debug in Eclipse? This is because Eclipse can not debug or provide the graphical real-time data views?

Yes, the debugger for Visual Micro has a small $29 fee but does not require any hardware or card to work. The debugger can use the same usb connection that is used for upload or a separate usb/software serial connection.

The free plugin for Atmel is very mature and takes a lot of time to maintain. We do not sell hardware and this software does take a great deal of time to create, therefore the debugger has a small fee.

Thousands or people are using it and find it useful however there is a huge range of Arduino users. If you are comfortable with Eclipse and it serves your purpose and have no need for additional helper tools then there would be no reason to change.

ps: Please keep in mind that Visual Micro, who make the Arduino plugin and debugger for Atmel is a different company unconnected to Atmel Corp.

Please don't get me wrong I am not judging the software whatsoever. I just thought I needed some special card to do online debugging. It does mean (I take it) that there is some overhead to get the info from the Arduino to the PC when debugging. And is this extra code gone when in release mode?
And there are plugins for SVN and Doxygen? Those are the only real 2 ones I am using now in Eclipse. But it is true though that Eclipse serves my purpose fine. But that does not mean I should not look further than my nose is long (Dutch phrase :))
I'll give it a try. Btw. The latest version starts up fine (Windows7 laptop with 4G memory, Pentium dual core T4300 2.1Ghz, nothing special)

Hi nicoverduin,

Very good questions! I am sorry it was not clear previously that the debugger is a software debugger. Yes, you are correct, when you make a release compile or switch off debugging then the debug code is not included.

In terms of additional overhead, initially we feared this would be a problem but as it turns out it is often not a problem. Mostly users add serial print messages to debug, these consume huge (relative to the mcu) amounts of Arduino memory. The debugger does not compile debug status messages into the Arduino program, instead the messages remain on the pc and only an id number is compiled onto the Arduino.

Because the debugger uses serial or serial1,2,3 or softwareSerial (digital pins) it would appear to use a lot of Arduino program memory if you compiled an empty Arduino program in debug mode.

However, if the Arduino program already uses the same functions (it often does) then the memory increase is minimal.

This also applies to additional debug features such as breakpoint timers (Hit Counts). It is, for example, possible to set breakpoints to print messages and watch expressions every 250ms (4hz). In this case the debugger uses the Arduino millis() function which will increase the debug program size slightly. Every additional breakpoint can consume additional Arduino memory but, as stated earlier, the gains of not having print() messages on the Arduino seems to balance the additional memory of the debugger.

All I can say is that lots of people find the debugger very useful, when previously they were working in the dark now the lights are on and they can see what their code is doing and why.

I would say that many Arduino experts might not need this facility and are happy with serial.print() commands for debugging, but for people like myself it is useful.

In terms of Doxygen and SVN I think these plugins are available for free in the Atmel Gallery and Visual Studio Galleries.

Thanks very much for confirming the latest version starts quickly for you. I find Visual Studio 2008 and 2013 to be very fastest starters, Atmel Studio is based on Visual Studio 2010 which is a bit slow to start.

Best of luck

Hi CrossRoads, you are right there was problem in the May 2013 release of Visual Micro that caused Atmel Studio to take longer to start up.

No no, you mis-understand. I was only saying Atmel Studio 6 alone takes waaaaaay too long to start up, on my WinVista 4 year old Sony Vaio. I have never tried VisualMicro on top of Atmel Studio. I have had no need for that kind of software support. Direct port manipulation gets me the IO speed I need, and some simple serial prints get me status info while I am debugging code. I don't do huge overly complex embedded programs.

There is just no comparison between AS and the IDE,

AS has all the great stuff a real programming environment should have, like

split windows, side-by-side editing, block in/outdenting, block commenting, dropdown list of functions in the current file, highlight a word and all the occurrences of that word also highlight (that's very useful), highlight a library function and jump to that file and function, mouse scroll to change text size, shows all compiler warnings, click on a variable to see how it's declared, go straight to the declaration if you want to, click on a constant to see it's defined value, etc etc.

The IDE has

a compile button

AS is slow to start up (mind you the IDE is no speed demon either), but that's normally a once a day thing.


Rob

The AVR Studio 5 IDE gives you a seamless and easy-to-use environment to write, build, and debug your C/C++ and assembler code. AVR 5 Studio Introduction.

AVR Studio 5

The general feeling on AVRFreaks is that AVR Studio 4.x had some nice features, and Atmel Studio 6.1 works pretty well and has all the latest stuff, but ... you should skip trying to use AVR Studio 5!

Graynomad:
There is just no comparison between AS and the IDE,

AS has all the great stuff a real programming environment should have, like

split windows, side-by-side editing, block in/outdenting, block commenting, dropdown list of functions in the current file, highlight a word and all the occurrences of that word also highlight (that's very useful), highlight a library function and jump to that file and function, mouse scroll to change text size, shows all compiler warnings, click on a variable to see how it's declared, go straight to the declaration if you want to, click on a constant to see it's defined value, etc etc.

The IDE has

a compile button

AS is slow to start up (mind you the IDE is no speed demon either), but that's normally a once a day thing.


Rob

Do you use AS? And have you had to use any Arduino library code in an AS project? Is it a PITA due to pin / port mapping (or any other gotchas) in the code? Is it doable?

Am contemplating moving there for the reasons you list, but the coding inertia of existing libraries is high.

I use the Visual Micro plugin on AS6.1 (read what westfw says about 5), so there are none of those issues. Works just fine, I recently wrote a library for a well-known LCD company and had no issues.

But if you want to go the ASF route and also use Arduino libs at the same time there might be conflicts and problems.

If the goal is to write for Arduino I'd forget the ASF and use Visual Micro. I've not looked at ASF for ages but if there's anything useful there you can pirate the code and wrap it in "Arduino".

I would assume things like the port definitions (PORTA, PINA etc) are the same, pin mapping is a different story but does ASF have an abstraction to allow logical pin mapping?


Rob

Thanks Rob.

I've not looked at ASF for ages but if there's anything useful there

ASF is somewhat limited in scope for AVR. It's aimed more at Xmega and ARM, where the peripherals tend to be much more complex. Due is implemented on top of ASF, for instance (a mistake, IMO, but it does demonstrate ... something.)

Hi All,

A few things that might be useful for Atmel Studio 6.1 users.

Visual Micro overrides all Atmel settings and makes a fully compatible Arduino compile.

If a project does not have an .ino or .pde of the same name then Visual Micro goes silent and allows normal Atmel to work without conflict.

If an .ino or .pde is added to the project (with the same name) then Visual Micro takes over and ensures a 100% Arduino compile.

Visual Micro also expects the folder containing the project to have the same name, this means that we remain Arduino compatible and share out projects with users of the standard Arduino Ide

If Visual Micro is active then the menu item "project>import sketch library" works the same way as the Arduino Ide and regardless of this all libraries are compiled as per normal Arduino compilation rules.

Tim