Hi,
I've been testing Visual Micro 1.1211.04 with an Arduino Leonardo using VS 2010 Pro. The test proggy just blinks the LED on pin 13 and spits out some serial data.
#include "HardwareSerial.h"
#include "Arduino.h"
const int led = 13;
void setup(){
Serial.begin(57600);
pinMode(led, OUTPUT);
}
void loop(){
Serial.write("Leonardo says Hi!\r\n");
while(true){
digitalWrite(led, 1);
delay(50);
digitalWrite(led, 0);
delay(50);
Serial.write(".");
}
}
Even though I placed a breakpoint (breaks unconditionally) on the first line in the loop function, on "Serial.write("Leonardo says Hi!\r\n");", it does not get hit.
The debugger options are set like so:
- The project is built as 'Debug'
- Memory Usage Report: True
- Micro Debug: Full
- Enable Break/Pause: False (True seems to work and blocks the execution indefinitely since no serial data ever seems to make it through to the debugger)
- Local Speed: 57600 (I'm aware of the serial speed issues above 57.6 kbps with the Leonardo)
- Remote Speed: 57600
When compiling and starting the debugger, things start out as expected:
Compiling debug version of 'Test' for 'Arduino Leonardo'
Binary sketch size: 6072 bytes (of a 28672 byte maximum) (0.5100292 secs)
AVR Memory Usage
----------------
Device: atmega32u4
Program: 6072 bytes (18.5% Full)
(.text + .data + .bootloader)
Data: 280 bytes (10.9% Full)
(.data + .bss + .noinit)
text data bss dec hex
0 6072 0 6072 17b8
Uploading to I/O board using 'COM20'
Done uploading via 'COM22'
Usually, this is followed by a couple dialog boxes:
---------------------------
Visual.Micro.Visual.Studio.Arduino.10
---------------------------
Visual micro was unable to load a debugger extension
Assembly: C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Extensions\Debugger Visualizations\PerformanceMonitor\bin/PerformanceMonitor.dll
Type: VisualizationExamples.PerformanceMonitorWindow
Exception has been thrown by the target of an invocation.
---------------------------
OK
---------------------------
---------------------------
Visual.Micro.Visual.Studio.Arduino.10
---------------------------
Unable to load debugger visualization: C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Extensions\Debugger Visualizations\PerformanceMonitor\bin/PerformanceMonitor.dll
Exception has been thrown by the target of an invocation.
---------------------------
OK
---------------------------
As the app runs on the Arduino, there are no debug traces and no debug messages.
The terminal window opens up on COM 20 as expected and at the proper speed (57600 baud) but no serial data shows up. If I open a dumb terminal on COM 20, I do see the expected app output.
After watching the detailed YouTube video on configuring and using the debugger and trying various Micro Debug options, all signs seem to point to a serial port issue not being initialized or opened properly but I have no clue why that is.
Commenting out all calls to Serial.xxx() functions in the application doesn't alter the behavior, neither does adding a "while(!Serial);" in the setup() function.
Please let me know if you'd like a more detailed report of the project properties or the full project if this helps.
Thank you,
Cheers,
-Fabien.
PS: if this is any help, the machine I'm testing with runs 64-bit Windows 7, is very stable and used for development with other tool chains (mostly using IAR Workbench with STLinkv2) targeting ARM Cortex Mx, STM8S chips and Netduino Go boards running the .Net Micro Framework.