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 Re: What term is used to refer to VM (within Arduino) executable? (Read 3959 times)
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: What term is used to refer to VM (within Arduino) executable?
Jun 28th, 2013 at 4:41pm
Print Post  
I am not sure I understand the question.

The normal Arduino build process is to compile in a temp folder. This means copying the sources and libs to a temp folder and then using the standard Arduino avrgcc/avrdue.exe for compile upload.

Prior to compile Visual Micro injects Serial.Print statements into the temp sources based upon the configured Visual Studio C++ breakpoints.

The Visual Micro Serial Monitor reads the incoming serial stream and removes breakpoint data so that is can be used to display the debugger visualizations and to assist with F5/Break/Pause/Continue.

Visual Micro takes a snapshot of this configuration and stores it in xml files so that when the project is next opened we can know if the micro-controller has a debug version of your program loaded and what the source code/breakpoints we applicable at time of last upload.

During the running of the debugger Visual Micro passes the xml object to each open source Visualization but this is not yet documented. Visual Micro also passes all of the current breakpoint data received during debug to each Visualization which is document and in use.

Visual Studio is unable to inform Visual Micro of data types of local variables or even which local variables exist within a function. 

Therefore Visual Micro uses crude string manipulation to inject serial into the sources and is unaware of data types or what the real code does.

I don't know if any of this helps you, maybe you can give example of which area you need more detail about. At NO time is the Arduino.exe used. Thanks
« Last Edit: Jun 28th, 2013 at 4:41pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: What term is used to refer to VM (within Arduino) executable?
Reply #1 - Jun 29th, 2013 at 12:50am
Print Post  
Hi,

Thanks for the good example.

I'll try to answer best I can. Question: What is the data type of your array?

The debugger already allows you to do all of what you have described except that in the current release only ascii data is supported. This might be a limiting problem for you, we do plan a future release that has better capability and the ability to know the length and data types of arduino variables.

Quote:
(3) At completion, I set a Flag (in the array) and wait for a (serial.print activity) to send the bytes to my C# Visualizer object. 


Yes you can do this in the current release. Use the Breakpoint Condition property to test if the Flag is set

Quote:
(4) (somehow?) An inserted statement would eventually test my Array-Flag. If True more inserted statements would tranfer the array back to the Debugger.


See above, using the Breakpoint Condition property allows a breakpoint to only executed based upon the condition.

Quote:
a (C#/VB) VM-Visualizer event fires with array data ready. The Visualizer updates the Screen after suitable handling.


Yes this is how the Visualizations work. If you want to see a Visualization working then you can switch on project property "Report Digital" or "Report Analog"

You will see in the C# examples that the Visualization is notified when the debug starts and also when new values arrive from an Arduino breakpoint (serial).

When C#/Vb is notified of new data a list of KeyValue pairs are provided in the message arguments. The key/value pairs are a list of variables/expression names and values. The values are strings so you would need to convert them back to your array format.

You will see various examples of responding on the OnExpressionValuesChanged event in the C# sources provided with Visual Micro.

There are more graphical examples if you click the BIG button on the Serial Monitor during a debug session.

You might also find it useful to know that you can use the standard Arduino serial conversion syntax with your expressions and variables (When Hit) watch.

Code
Select All
myVar,HEX
myVar,BIN
etc.. 

« Last Edit: Jun 29th, 2013 at 12:52am by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: What term is used to refer to VM (within Arduino) executable?
Reply #2 - Jun 29th, 2013 at 2:27pm
Print Post  
Yes I agree this is what I hope the Visualization system will become. Right now this is possible but you still have to add your own serial output.

As you learn about Arduino you will find this is easy to do without help from Visual Micro.

If you have FTDI cable then I suggest using that with the debugger by changing the RemoteTransport, RemotePort, LocalPort properties or by using the softwareSerial RemoteTransport and any two spare digital pins.

This will free the debugger from the main usb port allowing you to run your own windows program at the same time as the debugger/arduino runs.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint