Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Should we implement an arduino platform in visual studio (Read 7321 times)
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Should we implement an arduino platform in visual studio
Oct 5th, 2011 at 11:50pm
Print Post  
Currently we use whatever is selected such as win32. This prevents us from making good use of the Visual Studio Build Configuration dialog. 

It also seems that the future of compilation might be to produce an emulating windows program or produce an arduino program for upload. In which case a platform would allow us to switch between emulator/windows and arduino.
« Last Edit: Oct 5th, 2011 at 11:51pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Paul B
Newbies
*
Offline


Posts: 2
Joined: Oct 10th, 2011
Re: Should we implement an arduino platform in visual studio
Reply #1 - Oct 11th, 2011 at 6:59am
Print Post  
I've been playing with Arduino for the first time over the last week and have written a few simple programs.  I found your project yesterday - congratulations on an excellent piece of work - and was therefore tempted to write something a little more complex.

Inevitably, it didn't work, and after a couple of hours of print-statement debugging it became clear that an emulator would be easier.  So I bolted together a quick software dummy of the Protosnap I'm playing with:  on VS the entire debug then took ten minutes.

From that experience, I completely endorse the idea of an emulating Windows program.
  
Back to top
 
IP Logged
 
sticks
Junior Member
**
Offline


Posts: 10
Joined: Oct 3rd, 2011
Re: Should we implement an arduino platform in visual studio
Reply #2 - Oct 11th, 2011 at 8:56pm
Print Post  
Out of curiosity, what did you use to build your software dummy? Were you able to debug in VS?
  
Back to top
 
IP Logged
 
Paul B
Newbies
*
Offline


Posts: 2
Joined: Oct 10th, 2011
Re: Should we implement an arduino platform in visual studio
Reply #3 - Oct 12th, 2011 at 5:19pm
Print Post  
sticks wrote on Oct 11th, 2011 at 8:56pm:
Out of curiosity, what did you use to build your software dummy? Were you able to debug in VS?


Well, nothing very subtle.  I just modelled the Arduino Serial class as an object in my main program, which for testing I call instead of the COM port.  I also link in the Arduino sketch along with a header that provides versions of the functions it calls.

When the dummy port  has received a message (in this cased defined as a null-terminated ASCII string), it calls loop() and the Arduino program gets to run and do its thing until the message is eaten.

I was trying to debug a simple messaging-protocol - doing it this way allowed me to debug the code within VS in the normal way, which - since it wasn't very good code - was hugely faster than doing it on the Arduino itself.  When that worked, I simply compiled it within the Arduino project and carried on.

This is very handy for any part of the Arduino code not tied to details of the hardware (though I did also model the LEDs, switches and buzzer on the ProtoSnap).  But it's obviously not a full-up emulator
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Should we implement an arduino platform in visual studio
Reply #4 - Oct 12th, 2011 at 7:07pm
Print Post  
I've been considering ways to provide some emulator features via the addin. If you have any ideas I'd love to hear them
  
Back to top
WWW  
IP Logged
 
Baptiste
Newbies
*
Offline


Posts: 1
Location: France
Joined: Nov 17th, 2011
Re: Should we implement an arduino platform in visual studio
Reply #5 - Dec 5th, 2011 at 12:51pm
Print Post  
Hi,

I think that being able to easily switch target platform is very important, and even fondamental as no debugger can be used on Arduino boards (isn't it ?)

A first step in emulation could be to have a new platforme, distinct to the Win32 one, nothing more.
From this step, and thanks to "WIN32" or "ARDUINO" macros (or __AVR_ATmega328P__, ...), it will be easy for everyone to forward lowlevel calls to platforme specific ones. Emulation features can come later.

Anyone using a LCD shied can use the great and easy to use the great pixeltoaster library for exemple. http://code.google.com/p/pixeltoaster/.

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint