How to start the Atmel Studio Arduino simulator

by Visual Micro 5. June 2013 07:44

Visual Micro has a new facility due soon to make this process easier.

In the meantime this document describes how you can run the Atmel Studio simulator with an Arduino project.

NOTE: in 1406+ version of Visual Micro step 1) can be ignored because the compiler copies the output files to the local sketch debug/release folder

1) Switch Tools>Options>Visual Micro>Compiler>Always Show Build Path

2) Build your Arduino project, copy the path that appears in the output window to the windows clipboard (without the file:// prefix)

3) In a new instance of Atmel Studio, click "File>Open Object File For Debugging".

4) When prompted paste the build path and "name of your sketch.elf" into the "Specify Object F To Debug" field (example: c:\user\appdata\vmicro\sketch1\board\sketch1.elf). Give the sim project a name and click OK

4) When Atmel opens the new sim project click "No Tool" on the tool bar and select "Simulator" from the "Debugger/Programmer" drop down list.

5) Start debugging (Debug>Start debugging and break),  the sim will run with your Arduino program

That's it!

nb: Some avr processors are not yet supported by the Atmel Studio Sim

Differences between Arduino in Visual Studio and Atmel Studio

by Visual Micro 26. May 2013 16:12

This document is designed to be my own personal observations of note worthy functional differences between the development of Arduino programs in Visual Studio and Atmel Studio.

Both Visual Studio and Atmel Studio provide indentical Arduino compile, upload and debugging features.

Visual Studio Pro has more features for advanced users and if you already own a copy of Visual Studio it would be prefered.

Visual Studio 2008 and 2013 both open quickly and provide high speed intellisense (not perfect but good)

The plugin for Atmel Studio is currently lacking a few minor features such as "project>show all arduino files". This feature is very useful for explore library sources within the project and also aids the class explorers.

Atmel Studio lacks some of the customization features of Visual Studio such as macros.

Visual Studio "disables" source code based on #defined conditions, this is very useful but can also be fustrating because it also disabled intellisense within the disabled code. Atmel Studio does not do this.

Visual Studio intellisense code suggestions are more accurate. Example: you will see Serial,Serial1 etc for mega 2560 and just "Serial" for Uno, Atmel will show Serial,serial1 etc for all boards.

Atmel Studio has the simulator and various other tools.

Visual Studio intellisense understands only C++, Atmel Studio is naturally aware of the micro-controllers native language.

Visual Studio provides web authoring tools within an Arduino sketch project for web based boards such as the Yun (both Ide's support web/network compile and upload). Visual Studio Express or other web design tool can be used so this is not a huge weakness for Atmel Studio.

Atmel Studio is knows about its own micro-controllers and might have a brighter future than Visual Studio for Visual Micro

Visual Studio is required for other "non-atmel" architecures such as Energia and Chipkit