Add Arduino Compatible IDE's To The Applications List

by Visual Micro 21. January 2019 05:06

It is possible to add an Applications.txt file containing additional IDE entries in the Visual Micro Applications list.

The default "My Visual Micro" location is "MyDocuments\Visual Micro". Please note that it is possible to override this location in "Tools>Options>Visual Micro"

An Applications.txt file can be placed in "[My Visual Micro]\Micro Platforms"

Copy the following properties into an Applications.txt located in the "[My Visual Micro]\Micro Platforms" folder.

The items in bold must be changed for each application. The TestIDE. ide prefix to EVERY key must be changed to a new value for each board.

Example: Paste all of the keys below into a new Applications.txt. The values of keys in the first section. Blank lines are ignored. # can be used to "comment" an entire line.

TestIDE.name=Test IDE 1.8
TestIDE.ide.hint=Another IDE for Visual Micro
TestIDE.ide.location.key=TestIDE
TestIDE.ide.location.ide.winreg=Test IDE Application Path
TestIDE.ide.location.sketchbook.winreg=Arduino Default Sketchbook

TestIDE.ide.location.sketchbook.preferences=sketchbook.path
TestIDE.ide.platforms.basedon=arduino16x
TestIDE.ide.exe_name=arduino
TestIDE.ide.platformswithoutpackage=false
TestIDE.ide.includes.fallback=wprogram.h
TestIDE.ide.extension=ino
TestIDE.ide.extension.fallback=pde
TestIDE.ide.versionGTEQ=160
TestIDE.ide.hosts=atmel
TestIDE.vm.debug=true
TestIDE.software=ARDUINO
TestIDE.ide.location.preferences.arduinoData={runtime.sketchbook.path}\ArduinoData
TestIDE.ide.location.preferences=%VM_APPDATA_LOCAL%\arduino15\preferences.txt
TestIDE.ide.location.preferences_fallback=%VM_APPDATA_ROAMING%\arduino15\preferences.txt
TestIDE.ide.location.contributions=%VM_APPDATA_LOCAL%\arduino15
TestIDE.ide.location.contributions_fallback=%VM_APPDATA_ROAMING%\arduino15
TestIDE.ide.contributions.boards.allow=true
TestIDE.ide.contributions.boards.ignore_unless_rewrite_found=true
TestIDE.ide.contributions.libraries.allow=true
TestIDE.ide.contributions.boards.support.urls.wiki=https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls
TestIDE.ide.create_platforms_from_boardsTXT.teensy=build.core

NB: The .winreg keys represent the name of a key in the windows registry. The registry keys are created below "HKCU\Software\Visual Micro\Locations"

NB: The sketchbook.winreg can optionally be changed to provide a different sketch book folder storage key.


The Correct Way To Open Arduino Projects In Visual Studio

by Visual Micro 19. April 2018 07:50

Normally, the best way to open Arduino projects in Visual Studio is to use standard Visual Studio commands such as 'File>Recent'.

This applies after the project has been created for the first time using Visual Micro commands such as "File>Open>Arduino Project", "File>New>Arduino Project". IE: You must have a Solution (.sln) to be able to open a Solution. Normally Arduino just has .ino/cpp etc. which is why Visual Micro commands auto create and configure solutions for you, but this only needs to happen once per project.

When opening projects make sure you open the Solution (.sln) (not .ino file) when you re-open projects. Opening an existing Solution will retain your previous "window layout" and "selected configuration" etc.

If you do not see your "Solution" on the "File>Recent" menu, then click the Solution to activate it in the explorer, then click "File>Save As". Saving the Solution (even with same name) will force it onto the Visual Studio "Recent" menus.

When your Solution is on the Recent menu you will have no need to use "File>Open Arduino" project, which is normally just used the first time you open an existing Arduino project in VS.

Tags:

Custom Arduino Breakpoint Debug Output

by Visual Micro 14. April 2018 04:40

The "when hit" breakpoint command can be used to output custom arrays andother data from the Arduino during debug sessions.

For example we can add a command:- MyArray values are {GetMyArrayValues()}

This will output an array as semi-colon sep values in the debugger windows during debugging.

char GetMyArrayValues()
{
     for (int i = 0; i < inputBufferSize; i++)
     {
           Serial.print(inputBuffer[i]);
           Serial.print("; ");
     }

  return ''
} 

Arduino Custom Build Events and Hooks

by Visual Micro 20. March 2017 04:37

Arduino supports many different build events. Visual Micro supports the same events and more. If you can't find an event that meets your needs then please make a request to our forum. Build events are normally placed in the arduino platform.txt system which can be quite convoluted and difficult to test. Licensed users of Visual Micro can opt to use  local project board.txt instead of the usual Arduino locations. The advantage is easier development and testing along with events that are specific to a single project. When making changes to a local board.txt click the "Save" button pior to testing a new build.

The full Arduino build specification is listed here. Visual Micro also provides the following additionl events:-

  • Pre upload event
  • Error during upload event
  • Post upload event (only executes if no error was encountered)

Paste the following into a board.txt to see an attempt to run events. Obviously the example will produce an error because the .bat file will be missing but you will see how it works :)

# before upload event - example

recipe.hooks.deploy.preupload.pattern=cmd.exe /c "c:\hooks_test\test_pre.bat" "{build.path}"  "{build.project_name}" "{build.project_path}"

# upload failed event - example

recipe.hooks.deploy.errorupload.pattern=cmd.exe /c "c:\hooks_test\test_error.bat" "{build.path}"  "{build.project_name}" "{build.project_path}"

# upload complete event - example

recipe.hooks.deploy.postupload.pattern=cmd.exe /c "c:\hooks_test\test_post.bat" "{build.path}"  "{build.project_name}" "{build.project_path}"

Arduino Shared Cross-Platform Code And Library Development

by Visual Micro 16. January 2017 14:09

news: april 2017 - this functionality is free and in all version from vs2015+

related: shared single code files between projects

Visual Micro makes special use of Visual Studio C++ Shared Projects for both project and library development. C++ shared projects were released in Visual Studio 2015 and are improved in the soon to be released Visual Studio 2017.

Use "File>New>Project>C++>Arduino Library Project" to create a new library project or the "Add Library" menu to create from existing library code. When creating a project from existing library code, the code remains unchanged and compatible with the Arduino IDE. 

There are two types of shared projects that Visual Micro supports. It is important to understand the difference. Shared "library" projects that contain an Arduino format library.properties text file in the project root are compiled as Arduino Libraries. Shared "code" projects do not contain a library.properties text file. During compilation of shared code projects, the code is merged with the main project code in the temp build folder. In this case the code can be accessed as if it was within the folder structure of the main project.

Multiple main projects can use the same shared project(s). Intellisense in shared projects is powered by the current "Startup Project". A shared project can not be compiled directly, can not be a Startup Project and does not have a fixed platform.

tip: Adding a new library project to an official Arduino library folder will automatically make the library available for use in the Arduino IDE.

Shared projects can be created using the standard Visual Studio new project wizard.

Visual Micro also provides a simple way to create a shared project for an existing Arduino library.

Shared projects that contain an Arduino library.properties in the root folder are considered to be Arduino Libraries. If the library.properties file does not exist the shared project is considered part of the main project.

The "References" node of a Visual Studio project enables shared projects to be referenced by a master project.

Some of the magic of shared projects is that they do not have a specific architecture. Instead the architecture (intellisense etc) is taken from the "Startup project" of the current Visual Studio solution.

This enables us to develop cross-platform code whilst benefiting from intellisense for a specifc architecture. in fact VS2017RC takes this a step further but that's for another blog.

Using a shared library project is no different to using normal Arduino libraries. In fact they are normal arduino libraries except they also have a .vcxitems file in the library root which simply allows Visual Studio to show the source code during development (in a solution).

Shared library projects must be #included in the code in the same way as a normal Arduino library. The fact that we are using a shared project for development has no bearing on the compilation. The compliation works as normal and compiles the library as it does for all other libraries.

A useful difference between a shared library project and a normal library is that Visual Micro can find the library in any location, not just the published known Arduino library locations. This has many benefits for source control and also versioning.

It is possible to create a shared library project and add it to a solution with a single click.

All users must add a reference to the shared project to the master project(s). Right click the "References" node of a master project in the solution explorer to add the reference to the Shared Project (library). This ensure the intellisense of the shared project will know the correct architecture.

Below are the images of the steps for paid Visual Micro users:-

1) Paid users should switch on "Create a project when adding libraries

 

2) Add a library to a project in the usual manner.

If the project already uses the library it will not cause an issue. If the lib headers are not required in the .ino file you can remove them.

3) After adding a library, the headers will be inserted into the .ino code as usual. In addition, a new project (with the same name of the library) will be added to the currently open solution (if the library project does not already exists in the solution)

So that intellisense can detect the correct platform, a reference is added to all master projects in the solution that use the library.

Right click the References node of a master project and then click "Add Reference"

4) When the Add Reference window opens, cick the "Shared Projects" tab and put a check mark against the library project(s) you want to use in the current master project.

 

Sharing Arduino Code Between Projects

by Visual Micro 27. May 2016 18:15

NOTE: We recommend using shared projects for c++/.h code.

related: share, edit and debug libraries between projects

It's a popular request to share code between Arduino projects. To share code just as if it has been added directly to the project as opposed to using a seperate library.

In Visual Studio use the "Add Existing" options to add existing code from an alternative location. NOTE: Click the "Add as link" option when adding the code.

In more recent IDE's such as Vs2017/2019 use "Add Existing Item" which automatically creates the link to the source.

You should see a link to the source is added to the current project. #include linked code as if it exists in the project folder (without path qualifier).

Below shows #include "UID_DS2401.h" has been included in the sketch code although it exists in an entirely different location ('up two parent folders\Test2').

Note: When the project is compiled any linked sources are copied into the hidden build folder along with the other project sources. This means that a name conflict could occurr therefore all the project sources should have unique names. This method of compile keeps things as close to normal "Arduino code" as possible and should future need arise, the linked sources can be copied locally and then compiled with the Arduino Ide without modifiying the source code.


Tags:

CC3200 SimpleLink Wifi

by Visual Micro 20. January 2016 19:04

Beta notes

The upload failed and was unable to "trigger the bootloader" after n retries

Moving the jumper from Pin 58 Vcc to SOP2 fixed the problem.

This suggestion was from the CC3200 getting started guide

http://www.ti.com/lit/ug/swru376c/swru376c.pdf

Tags:

Arduino 3rd Party Hardware GDB Configuration Guide

by Visual Micro 17. January 2016 17:40

Update: Since releasing support for a local project board.txt these properties can be placed in the board.txt avoiding need to find and edit boards.txt and platform.txt

 

Overview

 

Note: This solution uses the Microsoft MI (gdb) debugger that is installed with the Andoid tools for Visual Studio

 

Visual Micro supports the standard hardware definitions defined by each Ide version. These definitions are usually included in a board.txt and/or boards.txt and/or platform.txt.

 

note: The openOCD path is populated automatically by Visual MIcro and does not need to be installed. Additonal .cfg files can be posted to the forum for inclusion in the releases or added to the "visual micro install path\default\tools\openOCD" folder structure. The install path can be viewed via tools>options>visual micro>version.

 

Please see problem solving tips for developers below.

All PropertiesExample (OpenOCD is installed with Visual Micro)

#boards.txt

[board_name].build.openocdscript=board/[open ocd config file name].cfg

#board.txt

build.openocdscript=board/[open ocd config file name].cfg

#board.txt or platform.txt

debug.tool=gdb

tools.gdb.pre_init.tool=openocd

tools.gdb.cmd=[hardware tool chain gdb.exe]

tools.gdb.path={runtime.tools.[hardware tool chain path}/bin

tools.gdb.pattern="{path}/{cmd}" ­interpreter=mi ­d "{build.project_path}"

tools.gdb.openocd.cmd=bin/openocd.exe

tools.gdb.tcp=localhost:3333

tools.gdb.openocd.path={runtime.vm.ide.platforms.path}/default/tools/openocd­0.9.0

tools.gdb.openocd.params.verbose=­d2

tools.gdb.openocd.params.quiet=­d0

 

tools.gdb.openocd.pattern="{path}/{cmd}" ­s "{path}/scripts/" ­f "{path}/scripts/{build.openocdscript}" 


The following example is the definition of GDB debugging with OpenOCD for the Texas Instruments Stellaris LM4F/120

 

1) Boards.txt - Provide the name of the OpenOcd .cfg script for the lm4f120

 

# Boards.txt - LaunchPad (Stellaris) w/ lm4f120 (80MHz)

# ------------------------------------------


lplm4f120h5qr.build.openocdscript=board/ek-lm4f120xl.cfg

 

NOTE: If using a local project board.txt instead of boards.txt use this syntax without the board_id prefix. You only need to use a property like this is your pattern requires it!

build.openocdscript=board/ek-lm4f120xl.cfg


 

2) Platform.txt - Configure all boards to use OpenOCD+GDB  

 

# Platform.txt - LMF4

# ------------------------------------------

 

# master switch to enable the gdb debug tool

debug.tool=gdb

 

tools.gdb.cmd=arm-none-eabi-gdb.exe

tools.gdb.path={runtime.ide.path}/hardware/tools/lm4f/bin

tools.gdb.pattern="{path}/{cmd}" -interpreter=mi -d {build.project_path}

 

tools.gdb.pre_init.tool=openocd

tools.gdb.openocd.cmd=bin/openocd.exe

tools.gdb.openocd.path={runtime.vm.ide.platforms.path}/default/tools/openocd-0.9.0

tools.gdb.openocd.pattern="{path}/{cmd}" -s "{path}/scripts/" -f "{path}/scripts/{build.openocdscript}"


#
# --------------------------------------

note: OpenOCD is optional. v9.0 is currently installed with Visual Micro spo the location will always be the same (as shown below).

Attachment: The attached platform.txt and boards.txt files are the Arduino 1.5 style definitons used by Visual Studio to compile the Energia Stellaris lmf4 core. Both files are optional and are used in combination with the "actual" defintions that might be installed with each Ide.

boards.append.txt (419.00 bytes)

Please submit new defintions that your would like to be distributed with Visual Micro via email or our forum. Arduino 1.0, 1.5, 1.6 formats are supported, all three can be installed at the same time.

GDB and OpenOCD - Problem solving tips - GDB attempts to start but fails with error

Visual Micro installs a small program called MicroGDB.exe. When a Visual Studio GDB session runs it is the MicroGDB.exe program that is loaded/executed.

 

The MicroGDB.exe attempts to run GDB and OpenOCD (when applicable). Theh MicroGDB creates trace files of the various conversations between gdb/microgdb and visual studio. MicroGDb also writes an error trace.


There will be trace files for gdb in the local vs project temp build folder:-

[configuration name]\logs\gdb

which means

debug\logs\gdb

or

release\logs\gdb


If you click Project>Build you will see build without attempt to launch gdb. The start commands will attempt to run GDB.

 

Sometimes after errors configuration errors the OpenOCD, MicroGDB.exe or gdb processes will remain running (see task manager). In this case they need to be manually terminated before a new gdb session can be established.


GDB and OpenOCD - Problem solving tips - GDB running but behaving badly

If the debugger is running but code can not be found or behvour is not as expected.
Use vMicro>Toggle Hidden Files to ensure all sources are available to the debugger
Ensure Gcc optimization is set to the correct value for the code you are trying to debug
Ensure the correct compiler switches for the hadarware being used
Discuss in the visualmicro.com form


Tags:

Energia IDE Stellaris LM4F Hardware Debugging

by Visual Micro 17. January 2016 17:04

Visual Studio GDB with Stellaris Launchpad LM4F

This is the first of a new range of Visual Micro GDB debuggers for micro-controllers like Arduino.

Further documentation about the supported debuggers and configurations can be found here.

Visual Micro must already be installed along with the Microsoft tools described below. Please use the forum for assistance and feedback.

Key features

  • Comatible with .ino source code
  • Debug sketch, libraries and core
  • Step by Line or Instruction
  • Step Over, Step Out
  • Move instruction pointer
  • Set/move breakpoints (3 max)
  • Inspect memory, locals, call stack
  • Disassembly or source navigation
  • Immediate expression evaluator
  • Watch expressions, local expressions, auto expressions
  • Breakpoints, trace points, conditional breakpoin expressions
  • Pin variables during debug sessions. Easily see values. Add notes/comment.
  • Drill down into variables
  • Gdb command tool - optional manual interaction with the debugger (limited testing)
  • Toolchain, ocd and gdb automatic configuration based on the selected Arduino board
  • Automatic/background conversion between cpp and Arduino format .ino source code
  • Auto highlight changed data - Easily see which registers and variables have changed.
  • One button click: Build>Upload>Debug

Overview and Install Instructions

The intial instructions explain how to setup the debug tools in Visual Studio 2017.

VS 2017 Community Edition is a free Ide for everyone, except large organizations. Large organizations can use for free for open source projects.

  • Visual Micro uses the standard C++ tools of Visual Studio to provide Arduino programming. The C++ tools are a custom option durng install or at a later date via Control Panel>Add or remove programs.
  • Visual Micro is also a free install from within the Ide using "Tools>Extensions & Updates>Online"
  • The Energia Ide can be downloaded from the respective hardware vendor such as arduino.cc and arduino.org

 

Installing all of the tools descrived above is currently a requirement for the gdb tools in Visual Micro. 

Visual Micro is also an extension and can be installed/uninstalled via the Gallery in the same way as the Gdb debugger.

After install simply create a new project, and select the relevant debugger settings (see more for TI boards here)

Visual Micro should now be managing the project. Select the Energia Ide and Stellaris board in Visual Micro and then test upload.

To run the gdb debug use any of the standard Visual Studio "Debug" Menu commands (not the Visual Micro tool bar or menu commands)

Do not use more than 3 breakpoints!! 4 are supported but stepping runs out of steam with 4 and the debug stops responding.

If the debugger locks up then kill the openOCD.exe process in task manager. If it is not loaded then kill the arm-none-eabi-gdb.exe process.

If you can't upload or the board is in a bad state after debug discopnnect and reconnect or kill the OpenOCD.exe windows process if it has remained open.

Know lock up causes are:- 1) Source code out of date 2) Optimization prevents all breakpoints from being recognized 

Known issues

  • Some source code paths are incorrect causing temp folder sources instead of local project sources to open during debug.
  • Stepping line position a little erratic sometimes see instruction stepping when line stepping was selected.

Which backend Ide?

Energia 1.6 (2016/2017)

Related Articles

Tags:

Arduino.org is now supported

by Visual Micro 16. January 2016 06:30

Announcing Support for yet another Arduino "compatible" Ide, Arduino.org

In some ways the arduino.org ide is slightly behind the arduino.cc ide. This can mean that some newer libraries might fail when you try to use them.

If a library (downloaded from the internet) is not compatible with the arduino.org ide then it will also not be compatible with Visual Micro when the Arduino.org ide is selected.

You will find the arduino.org ide in the Visual Micro <Configuration Manager>. If arduino.cc is already installed on a computer then the .zip download from arduino.org will suffice.

With Visual Micro you can install all Ide's at the same time. It will automatically read and use the configuration of each ide and present the appropriate options.

Tags:

Improve Intellisense Library Discovery And Build Speed

by Visual Micro 14. January 2016 23:32

Jan 2017 - Licenced users have a new Parallel Build option. The option builds all files in each folder at the same time (as usual, only when they need to be built). 

Feb 2017 - All users now benefit from intelligent caching of the library discovery mechanisim described below. The 2nd time a project is compiled will be much faster and even faster the third time. Release compilation is always 1-1.5 seconds faster than debug.

15th January 2016 Visual Micro adopted (optional/default) the Arduino 1.6.6 + gcc based library discovery system.

  • This feature does not assist with intellisense, only with compile. Please read the important note at the bottom of this page about intellisense for Arduino libraries

Overview

The new system allows library authors to reference other libraries without need to #include those libraries in the project_name.ino

An example is the Microsoft AzureIoT Arduino Library that reference the SPI, RTCZero and WiFi libraries.

This new automatic discovery of related libraries is a useful feature for new users but causes significant delay during compilation.

Experienced users can switch off the "library in library" includes discovery by unchecking the "Visual Micro>Deep Library Search" menu item.

The setting is per project. A global setting might be implement in future versions based on user feedback.

The difference in compile time between an empty AzureIot library project 1) with the new Arduino 1.6.6+ system is 7 seconds and 2) without the new system using the older Arduino rexex system.

Using the older system by unticking the "Deep Library search" menu item and then adding #includes for the required libs (to the project_name.ino) will compile in less than 1 second.

 

The following applies to versions of Visual Micro older than 1607.7

Important: Intellisense does NOT use the deep search facility. ALL libraries that are used by the .ino or .cpp code must be #included in the project_name.ino

Viual Micro uses the older regex system to determine includes for intellisense purposes. This is because it can take many seconds to scan library sources which would disrupt the Ide during code writing.

Hopefully as the next few months progress we manage to optimize and add intelligence to the "deep scan" enabling its use for intellisense.

In the meantime, if intellisense is not discovering libraries, please #include any required libraries directly into the project_name.ino code. (Then click Save or Build to force an intellisense refresh)

 

Arduino Zero/M0 Build, Upload and GDB Debugger

by Visual Micro 3. January 2016 19:32

Overview

Any visual micro project, with the android tools installed, can now run gdb debug without need for the cross platform projects used previously (still supported). For Gdb, automatic debugging can remain at default state (on).

Selecting the Arduino Zero/M0 (or board with debug.tool defined) and clicking "Debug>Start debugging" will start a GDB debug session. "Debug>Attach To Process" will start gdb without build/upload.

GDB does not yet support the special break-point commands, such as {@plot}, that can be used with the Visual Micro usb debugger.



Existing users (Projects created pre Sept 2017) please note - Older project need a minor update

The Visual Micro new project templates now contain two new properties in the .vcproj files. However existing visual micro .vcxproj files currently need to be updated manually (or deleted and re-created using "file>open>arduino project") before GDB will work.

To edit a .vcproj users can right click a project in the solution explorer then click Unload. Then right click again and click "Edit project.vcxproj". Adding the ItemGroup and PropertyGroup shown below will allow gdb to work. fyi: I added them just prior to the existing <ItemGroup> entries.

Right click the project in the solution tree and select Reload project to reload the project again.

Old .vcxproj update to support gdb. Add the following xml:-
  <ItemGroup>
    <ProjectCapability Include="VisualMicro" />
  </ItemGroup>
  <PropertyGroup>
    <DebuggerFlavor>VisualMicroDebugger</DebuggerFlavor>
  </PropertyGroup>

Key features

  • Comatible with .ino source code
  • Debug sketch, libraries and core
  • Step by Line or Instruction
  • Step Over, Step Out
  • Move instruction pointer
  • Set/move breakpoints (3 max)
  • Inspect memory, locals, call stack
  • Disassembly or source navigation
  • Immediate expression evaluator
  • Watch expressions, local expressions, auto expressions
  • Breakpoints, trace points, conditional breakpoin expressions
  • Pin variables during debug sessions. Easily see values. Add notes/comment.
  • Drill down into variables
  • Gdb command tool - optional manual interaction with the debugger (limited testing)
  • Toolchain, ocd and gdb automatic configuration based on the selected Arduino board
  • Automatic/background conversion between cpp and Arduino format .ino source code
  • Auto highlight changed data - Easily see which registers and variables have changed.
  • One button click: Build>Upload>Debug

 

NOTE: Compiler optimization can prevent breakpoints from becoming active.

Related Articles

How to change Arduino code fonts and colors

by Visual Micro 2. December 2015 12:17

Visual Studio provides a large list of syntax color and font choices. This document is an example of how to configure these options. This document is work in progress so please help and submit your syntax color schemes to the forum

The "Tools>Options" menu allow current settings to be exported (and imported) which is a good way to backup your settings and to try different collections of settings :) Please see the example below of your to backup your settings.

download this example

note: the prototype in the above code example is not valid for standard users!

note: Commonly only the following options are not within of the C++ options list:-

  • Keyword
  • Preprocessor Keyword

Tools>Options

How to backup your Visual Studio Settings

Use the "Tools>Import and Export Settings" menu to access the wizzard. Save where prompted or in some other location that can be easily found in the future.

 

Tags:

Advanced Arduino - Local Libraries and Sub Folders Structure

by Visual Micro 24. October 2015 17:17

This is intial document providing example of the different source code folder structures that can be applied to Arduino projects

The only rule concerning structure is that the master .ino source code must reside in the project folder. Both must have the same name.

Linked source code files are also support. Project referenced are not yet supported.

.ino code file names do not need to be #included in any source files

.ino files are combined into a single temp folder .cpp during compile, prototypes are automatically created for .ino code unless "auto prototypes" =False in the project properties.

If .ino files are "linked" from other projects they must not contain duplicate method names such as "setup()" and "loop()"

Source from outside of the project can not be debugged (yet)

Local libraies override all other library repositories. For example copying the EEPROM library to a local sketch libarary will ensure the local version is always compiled.

Known issue: Click build clean after moving files or folders within the solution explorer.

Three new useful things in Visual Studio

by Visual Micro 6. October 2015 06:09

Visual Studio 2015 comes with many new features and improvements in the IDE, the debugger or language compilers. Obviously, there are more than three things I like in the new IDE, but three things have caught my attention from the very beginning.

The Error Window

vs2015error1
One of the things that bothered me the most about the error window was the mixture of errors/warnings/messages from both MSBuild and IntelliSense. But I don’t usually care about the later and their presence in the error window is usually annoying me. This is now fixed and you can select to see messages from Build, IntelliSense or both.
vs2015error2
In addition to this you can apply even more filtering:

  • You can select the source of the messages: Entire Solution, Current Project, Open Documents or Current Document.
    vs2015error3
  • You can search the error list, and the search includes the text in all the output list columns (Code, Description, Project, File or Line).
    vs2015error4
  • You can individually show or hide Errors, Warnings and Message (but this feature has been available for many years).

The Find in Files Append

In Visual Studio 2015 they have implemented an append feature, were you could append your search results to one of the existing two windows.

vs2015find1

As a result the old search results are not discarded, but aggregated in a the form of a tree list in the search results window.

vs2015find2
vs2015find3

Though this is not what exactly I was expecting it provides the feature I was looking for with probably minimal changes to the Visual Studio IDE.

The Inline Create Definition (for C++)

I’m not sure how this feature is actually called, but what it does is creating a definition for a function in the source file from the declaration in the header and displays it in a boxed document inside the header document. Here is an example:

You declare a function/method in a header file. Visual Studio figures out the definition is missing.
vs2015inline1
Use the Quick Actions (CTRL + .) to create a definition of the symbol in the source file.
vs2015inline2
The definition is added to the source file that is opened as a document in a box just below the function declaration.
vs2015inline3
I find this very useful to get going with a new function. Of course for writing larger functions you’ll probably switch to the actual document tab where the source file is opened.

With these new features only Visual Studio has become much more productive for me. And there are plenty more.

Arduino Debug With Charts and Graphs

by Visual Micro 16. August 2015 02:17
Breakpoint support for the @Plot command is available in the Pro version of Visual Micro. The Arduino program code does not need to be edited simply add a {@Plot} instruction to the break/trace point "action" message.

Multiple Arduino plot with tick marks

breakpoint action message to plot variables l1 and l2:- {@Plot.Thunderbird-4.SeaLevel.Diamond l1}{@Plot.Thunderbird-4.Atitude.VDash l2}

  • New Breakpoint Command language, free upgrade for Pro users
  • Arduino code does not change
  • Simple tracepoint command syntax
  • @Create your own commands and open source visualizations or use the provided @Plot example ...
  • @Plot to a single graph per window or multiple graphs per window.
  • @Plot single or unlimited windows.
  • @Plot in colors of choice or that make sense (eg: same as wiring colors)
  • @Plot with tick marks or without
  • @Plot with labels
  • @Plot also includes automatic sliding time window and automatic min/max Y axis
  • Open source examples, easy to extend and create new graphical control types
  • Freeze display
  • Easily see current values
The example below shows the Breakpoint "When Hit" syntax required to display a graph or Motor1 and Motor2 in a "Motors" window and a single @Plot into a window called MyAnalog
Plot unlimited graphs without hacking any Arduino code. Add graphs names, single or multiple plots per window, unlimited windows


 

Tags:

Arduino for Visual Studio 2017 and 2019

by Visual Micro 3. August 2015 10:35

news 3rd August - Visual Micro BETA for Visual Studio 2015 has been released as an Extension in the Visual Studio Gallery

This is initial draft documentation for the Visual Micro beta extension. This version of Visual Micro has been changed from add-in to extension.

The Visual Micro main menu provides quick access to most Arduino features in Visual Studio

Please download from the extension downloads page. It is currently a zip containing a .vsix file. Double click the vsix to install Visual Micro into Visual Studio.

After installation "Tools>Extensions and Updates..." can be used to update or uninstall Visual Micro

In this version tool bars are not shown by default. There are also more bars available in the Visual Micro extension than in previous releases.

Tip: Right click the tool bar area to see the "Arduino" tool bars.

Multiple tool bars can be controller by users for an ideal Arduino programming environment

please note: the 'Standard' bar shown as the lowest bar in the image above is not included in the current beta

In this Extension version of Visual Micro the visibility of tool bars can be specified in two modes.

1) With no projects open

2) With one or more projects open

All primary features are available on tool bars and the "Visual Micro" top menu. The "Visual Micro" menu replaces and extends the functinality found on the "Tools>Visual Micro" menu of previous releases.

The "Add Library" tool bar is available when Arduino project(s) are open

Arduino libraries are easily used in a Arduino project

New Projects can be created using various templates in the Visual Studio "New Project" wizard.

New templates can be added to the list simply by clicking "Add Template" in any Arduino project.

Ready to use project templates provide quick ways to create and test new Arduino projects

 

A Windows 10 IoT project template is installed and "ready to go".

Create a new project based on this template. Upload to your board and you have a Window IoT device!!

A ready to use Windows 10 IoT for Arduino is included with the Visual Studio extension

 

Tags:

Install Arduino DUE and Arduino ZERO in Visual Studio or Atmel Studio

by Visual Micro 25. July 2015 08:06

Since the release of Arduino 1.6.2 the 32 bit boards mnuch be installed using the Arduino Board Manager tool. The Arduino Board Manager will download and install the relevent sources enabling compile and upload to an Arduino Due or Arduno Zero using Visual Studio or Atmel Studio.

The Arduino Board Manager tool allows new hardware to be installed into the Ide such as 32 bit Arduino Due and Zero boards

 

Arduino Community Joins Visual Studio Community

by Visual Micro 30. May 2015 16:44

Micro-controller circuit board manufacturers Arduino, Sparkfun, Adafruit and the entire community have joined together to make installing and programming micro-controllers much simpler. Previously different files and instructions had to be discovered from various places on the web, then downloaded and installed.

Arduino.cc have designed and included a tool in their development software called a 'Boards Manager'. The Boards Manager provides a simple way to see and install available hardware. The hardware is discovered from .json file(s) that are located under the arduino ide folder. The files contain definitions for avr and sam (arduino uno, arduino due boards)

The Boards Manager is supported with a free respository (managed by arduino.cc) that enables any software author to register (and make available for programming) packages of hardware and software tools.

Arduino have been bold and allowed competitive hardware manufacturers to also use the system, this provides a great facilioty for us all! Therefore, the facility also exists to add additional urls of package.json files that contain the software tools to build programs for different types of Arduino compatible hardware. This can be Arduno clones or entirely different hardware. For example sparkfun boards, adafruit boards, intel boards or the new esp8266 $5 programmable wifi server.

For more information about how to add your own .json urls please see the viaual micro "Ide locations configuration window" or the "arduino ide" file>preferences window. Both Visual Studio, with Visual Micro installed, and the arduino ide use the same system. Some arduino.cc approved thrird party urls are located on ths page

The list of urls shown at the bottom of this page result in the ability to install any of the hardware (and more) shown below. A clever design by Arduino.ccFederico Fissore and the community.

Microsoft Visual Studio management tool for Arduino Community hardware

 

Arduino 1.6.5 AVR Package Released

by Visual Micro 25. April 2015 19:07

News: The Arduino 1.6.5 Avr core has been released and is available in the Boards Manager

note: old image shows 1.6.3 but when you open the Boards Manager in Visual Micro you can also choose later Arduino versions such as 1.6.4 and 1.6.5

Tags: