FREE: Arduino plugin for Atmel Studio

The Atmel Studio IDE is created by the manufacturer of the Arduino micro-controller and is free. Atmel Studio is based on Microsoft Visual Studio 2010 so this is a great combination for many windows users (mac supported using VMWare)

It has been a lot of fun creating the free Arduino plugin for Visual Studio but even more fun making it work with Atmel Studio. There are still a few rough edges but the plugin does already include a huge number of unique features that help make coding for Arduino more fun.

Read more

High Speed Arduino Compiler, Intellisense, Code Completion

The plugin replicates all of the important features of the Arduino Ide and ensures that sketch projects remain fully compatible with the Arduino Ide. There are no configuration changes required to open and compile any Arduino project.

The plugin works with the various version of Arduino (1.0.5,1.5 beta for 2 weeks), no need to reload the Ide to switch between versions. Similarly, the Arduino sketch book folder can be altered and new libraries can be automatically detected without need to re-start the Ide.

The plugin also provides intellisense and optional debugging. The usb debugger is simple but effective and has just been released after 6 months of beta testing by team of 3000 people.

Beta support for arduino 1.5 is included in the (Beta Channel) on the visual micro downloads site (arduino 1.0.4 recommended for the next week or two). An official Atmel patch is required to enable advanced functions or debugging, the patch is only available from the visual micro web site.

Installation takes less then 10 minutes, after install, if you find that color coding does not work in .pde/.ino files please install the latest beta of the visual micro plugin. The beta is mature and will be released in a few days (mac users need the beta to activate the debugger)

Examples and Tutorials Wizard

You will find a dedicated wiki and active forum at Visual Micro

added Arduino Plugin in Atmel Studio on YouTube no sound but quick overview of some features

The standard Arduino plugin and Atmel Studio are free, BUT if you buy the debugger for the current special offer of $15 I won't complain. Thanks, I hope to raise enough for professional documentation :slight_smile:

Great product Tim!

Does it still take forever for Atmel Studio to start up? (WinVista on Sony Vaio laptop)
I was using it for a while to bootload '1284P chips, but soon got tired of the minutes long start up time and found out how to the change the MKii driver so the IDE could use it.

It takes about a minute or so on my desktop, 3.6GHz processor, 16Gb RAM, running Win7 Ultimate.

Thanks garballz

@CrossRoads, I have a vista machine at work which only has 1gb of ram. It's a bit slow but VS 2010 and Atmel Studio do take a long time to start up (couple of minutes sometimes). On my win7 machine Atmel Studio takes about 17 seconds, which is slow because the machine is fast. So we can certainly loose some project time waiting for start-up but then the plugin gives so many other savings that for most users the start-up time will be fine. The faster compiler times alone might entirely negate the start-up time, especially for less expert users like myself that have to test every small code change with compile and upload. As concerns drivers and board settings, this solution does not use any of the standard Atmel config settings, it will use whatever you have set for the standard Arduino IDE. It uses the same cores, boards.txt, libs etc and logic as the arduino ide.

@ Tim, I use Enried's Modded Ver 1.04 IDE with Coding Badly's tiny cores. It works well for me and I'm really interested in the debugging thing. Will your application support all of that and where do I sign up for the debugger?.

Doc

Hi Docedison,

The plugin supports custom cores, I've compiled tiny45/85 in the past if I recall. It also supports a number of additional core options which allow it to compile Arduino code into some pretty diverse applications such as the cygwin "Software In The Loop" SITL system from diydrones.com

So the answer to the question about the cores should be yes, if you uncover anything that needs attention then please report to the visualmicro.com forum and it will be fixed for the next release. To save time, also provide links to download for the core but I would expect it to work.

I suggest pointing Visual Micro to arduino 1.0.4 because from what you say the combination is already tested.

As far as the debugger is concerned it's worth a try. Simply activate the 30 day trial when you run the software or when you attempt to enable the debugging.

There are a couple of points to keep in mind, the debugger is a software debugger. The amount of memory it requires depends on the functions you are already using in your project. I don't know the capacity of your board or the size of your code.

If you have serial print statements in your code for debug then you will find they can be removed and replaced with breakpoints and custom messages which will take less memory because breakpoint message strings are not stored/compiled onto the Arduino. Some newer users have reclaimed 1.7k of ram by doing this. So this works well for some :slight_smile: (edit: always remember to click OK and save your Atmel solution file when prompted, this is because breakpoints are stored in the solution and not with each project)

Finally, by default, the debugger relies either on serial or softwareSerial. The "serial" must use arduino 1.x format and not 0023 and earlier.

If you find time to try it all out then skip the first couple of minutes of this video and it shows how to switch on some basic debug features - YouTube

Thanks

Thank You Sir.. I asked because there are others like myself that don't always use an Arduino Uno for code and any little advantage helps. Although there isn't a lot of spare room in many of the smaller chips... Once the code is debugged and works in a bigger one porting most code can be easily done.

Doc

I actually timed it this time:

20 seconds before the splash screen shows up
58 seconds till it's fully opened ready to start using

Okay, but if you pedal faster it might load quicker :slight_smile:

Seriously though here are some productivity gain examples:-

  1. Make 1 compile, then modify something in the sketch source code, then make another compile. Hopefully, the re-compile is very fast and saves some time.

  2. Use the "update variable" facility to test different values with the debugger, this avoids the need to re-compile and upload so often.

  3. Of course, just having intellisense, means that most of us (non-experts) have to go hunting for reference material much less often which is a huge time saver.

  4. The facility to inspect analogs, digitalpins, registers, expressions and sensor/variable values with the debugger saves me having to dig out old reference guides for the various bits of hardware that I use from time to time.

  5. If you change sketchbook folder very often, or want to switch between arduino versions or if you edit your own custom hardware (boards.txt) files is the fact that the ide does not need to be re-started. The UI can auto detect and reload all cores and libs without even the need to close the current sketch.

  6. Atmel Studio comes with VisualAssistX which not only gives great code explorers but also provides code re-factoring. This is a superb set of tools that allow us to easily (single click) re-structure the code of our projects.

All in all, I think we have some huge productivity gains with Atmel Studio but I agree it is nice to have an ide that opens really quickly.

Visual Studio 2012 opens really fast, I hope Atmel use the VS 2012 shell for the next major release of Atmel Studio. I really like Vs2012 and it works very well for Arduino development, you can see some images on the visual micro web site.

EDIT: here is a youtube example of Atmel starting in a relatively short time. Notice I ensure that the Atmel Start-up page and ASF explorer are closed. I don't use those windows very often and they slow start-up time. Win7 64bit i7/8gb. - YouTube

One big thing I have noticed is the recompile speed when using the Due.

Just a couple of re-compiles will negate any Studio start-up penalty compared to using the standard Arduino IDE.

Visual Micro is an order of magnitude faster on the re-compiles!

CrossRoads:
Does it still take forever for Atmel Studio to start up? (WinVista on Sony Vaio laptop)
I was using it for a while to bootload '1284P chips, but soon got tired of the minutes long start up time and found out how to the change the MKii driver so the IDE could use it.

Just vanilla Atmel Studio on Win8 Pro, 3.4GHz Core i7, takes at least 30 seconds. Seems like forever.

@Jack, don't close it XD

What would be the recommended way of unit testing Arduino code on Atmel Studio /w the Arduino plugin?

Currently I use the standard Visual Studio 2010 with the Visual Micro plugin and the out of the box Unit Test project template that comes with VS2010.

Do you guys use other Unit testing frameworks or...??

@obiwanjacobi

Yes, we have some help and are working on unit test solution (s) which will hopefully be available during the next few weeks.

However, Atmel Studio is not yet as full featured as Visual Studio, because you know VS I think you will prefer it.

Atmel are keen to make this the best solution so I hope the next 12 months sees some improvements in areas such as:- Intellisense, enable/disable code based on compiler -defines, support for virtual folders ++

This might not be very useful for many but the plugin already supports SITL (software in the loop) using cygwin and the gcc compiler to produce windows console apps. The only group that I know of making use of this currently is the diydrones.com community that have a huge arduino project that can also compile for HAL and SITL.

EDIT: would love to see your projects, if you don't mind emailing to info [at] visualmicro.com. They will remain private.

I've been exploring the VisualAssistX snippets in Atmel Studio and have to say that I like it! This seems an ideal way to insert frequently used Arduino code, create standard file headers and manipulate code/text.

Snippets can be assigned short cuts and/or given meaningful names, keywords can be included to provide varying degrees of intelligence. After inserting a snippet, VisualAssistX will provide additional code refraction options such as automatically declaring the required local or global variables.

I'm giving it a try as a newb. I have not selected the 30-day debug trial, but have a question about standard debugging features, if any.

Can you use the debug tools (like watch a variable) from the dropdown menu without the optional USB debugger? My code compiles when I start debuggin, but I do not have a micro so it stops when it tries to upload and it does not step into the program...

Also, can the IDE highlight the open and close brackets?

How to see or what is intellesense? i.e., I type "volatile" and think valid variable types should pop-up, is that right? They don't.

Hi C2,

I will try to answer your questions but please join the visualmicro.com forum for more help.

Can you use the debug tools (like watch a variable) from the dropdown menu without the optional USB debugger?

EDIT: Yes you can watch variables and expressions when debugging with the Arduino connected.

You do not have your Arduino connected? As a newbie I think the answer is "No". We are working on making the Atmel Simulator easier to use with Arduino, you can read how to try the Simulator here but I think it is too complicated at the moment for a newbie and some experts :slight_smile:

can the IDE highlight the open and close brackets

I think so, please look at the VisualAssixtX menu options. VisualAssistX provides many useful features and is responsible for intellisense and code/syntax color/highlight

How to see or what is intellisense? i.e., I type "volatile" and think valid variable types should pop-up, is that right?

Yes, this should be automatic!

This sounds like an installer issue. You could try to run the installer again and click repair but I recommend installing version 1305.21 of Visual Micro from our download site. On the download site click DOWNLOADS>(beta channel)

Thanks

Thanks VM!

Simulator:
I was able to set up the simulator. Now I have two instances of AStudio open. I think I just need the simulator and I notice that my sketch is part of the project as a .cpp. It appears to run, but since I don’t know how to use the software, I’m not sure where to go from here. I was able to Step into and keep stepping through the code and libraries, etc., and that is exactly what I wanted to do. I’ll jut have to read up on using AStudio.

Intellesense:
I might just not understand how it is supposed to work. For example, on a new line I can hit Ctrl-Space and a pop-up appears with a number of elements, “Serial” is not among them. Ctrl-J does not seem to do anything, but I think it once did produce a pop-up…