Pages: 1 ... 3 4 [5]   Go Down
Author Topic: Visual Micro - Arduino for Visual Studio  (Read 12768 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 10
Posts: 162
IDE for Microsoft Visual Studio and Atmel Studio 6.1, optional USB Debugger
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay I'll add a visual micro board tomorrow.

Vs didn't support user libraries at first. It's worth thinking about making the core and lib includes optional. I made it optional in visual studio so that the "Find & Replace" in files would not make a mess of core and libs for new users. Intellisense works with or without and I guess it would be the same in xcode
Logged

Arduino for Microsoft Visual Studio Pro and Atmel Studio 6.1 http://www.visualmicro.com
Arduino Debugger http://www.visualmicro.com/post/2012/05/05/Debug-Arduino-Overview.aspx

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6378
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
where I'm headed with debugging support
For ARM CM3, how about using the internal debug features?  My CM3 TRM has chapters on "Core debug" (halt, singlestep, modify registers) and "System debug" (breakpoints, watchpoints, trace and profiling.)  And they're DOCUMENTED.  I'm not sure whether you need JTAG to access them in a meaningful way, but even if you do, I think that would be preferable to an external custom-made FPGA...

The AVRs have debugging capabilities as well, only accessible via DebugWire or JTAG.  But Atmel doesn't document them in any detail, so you pretty much have to buy Atmel debugging tools to use them (although that would still be an interesting thing to do.)
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8458
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep you can do most things with JTAG etc, I still don't have a good feel for what exactly you can do and what the tradeoffs are and how intrusive it is. Things like single stepping are mostly great but useless in a time-critical piece of code. You can also get real time streaming of data I think if you go into one wire mode.

Quote
preferable to an external custom-made FPGA...
So far all I've added is two flip flops, these will allow me to do what I think is the all-time most useful thing and that is generate a couple of pulses. I still don't think accurate timing and counting is possible with the current tools although I may be wrong. A third output allows you to trigger an LA when data is written to the bus, this will allow the LA to see variable values easily.

There is also access to the extended memory bus and that can be used in future to do the clever stuff if I ever get the urge.

So really almost no added hardware and anybody that's serious will already have a logic analyzer, it's another $100 for an ICE to get JTAG.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Offline Offline
Full Member
***
Karma: 10
Posts: 162
IDE for Microsoft Visual Studio and Atmel Studio 6.1, optional USB Debugger
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A new board has been added for shared plugin ideas that don't specifically relate to Visual Studio

Visual Micro
Download Visual Studio Plugin
Tip: How to get Visual Studio Professional and MS Office for Free

Mac Users Might Find This Plugin Useful
xcode
« Last Edit: February 05, 2012, 11:25:08 am by visualmicro » Logged

Arduino for Microsoft Visual Studio Pro and Atmel Studio 6.1 http://www.visualmicro.com
Arduino Debugger http://www.visualmicro.com/post/2012/05/05/Debug-Arduino-Overview.aspx

Offline Offline
Full Member
***
Karma: 10
Posts: 162
IDE for Microsoft Visual Studio and Atmel Studio 6.1, optional USB Debugger
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Many people have asked how to compile and upload using Visual Studio. They were expecting special "arduino" tool bar buttons to perform these tasks. The fact is that Visual Studio has many ways to compile and run applications so Visual Micro just taps into the standard Visual Studio commands.

These commands are shown by default in Visual Studio as various tool bar buttons and menu items. This guide explains more...

The standard Visual Studio "Build" options will build/compile for Arduino for either a single Arduino project or all Arduino projects in the current current solution.

The standard Visual Studio "Debug" options will upload (but not debug). "Start with or without" debugging will upload for the selected port and board. On the tools menu you can also override the serial upload and use a programmer instead.

To recap, all of the Visual Studio "build/debug" tool bar buttons, "build" menu items, "debug" menu items,  right click context project menu and keyboard shortcuts provide compile and upload for Arduino. For an example then press F5

If you have multiple arduino projects in a single solution you can right mouse menu on a project name to "Set As Startup Project". This governs which project is uploaded when clicking F5 or any of the standard "Start" commands in Visual Studio. The current start up project will be shown in bold in the Visual Studio solution explorer.

All of the above Visual Studio commands will automatically work with Arduino when an Arduino sketch is open. These commands work in the same way for all types of Visuaol Studio applications. The commands are described in more detail in the Microsoft Visual Studio help.

Code Error Tracking

Many code errors will be shown as you type or when you view your source code however some will become more obvious when you try to compile. When you compile you will see a status in the "Sketch Builder" output pane. Errors will also appear in the output pane.

You can drill down to the relevent source code of any errors by double clicking the respective line in the "Sketch Builder" output.
Logged

Arduino for Microsoft Visual Studio Pro and Atmel Studio 6.1 http://www.visualmicro.com
Arduino Debugger http://www.visualmicro.com/post/2012/05/05/Debug-Arduino-Overview.aspx

Pages: 1 ... 3 4 [5]   Go Up
Jump to: