After struggling for several hours with an Interrupt issue, I decided to dedicate a few hours to going through the tuition for the Visual Micro debugger. I connected my Uno and everything worked as described. I must say is is pretty damn good, very useful and one of the main reasons I paid for Visual Micro again. With a big smile I went to try and debug my own MCU which is a Black Pill (STM32F103C8T6).
I have tried Serial (USART not USB as I have no bootloader) and ST-Link but I am just failing. I guess that my MCU is not supported
EDIT: With a fresh sketch just using blinky the 'Release' over
ST-Link works fine. I made a variable to hold a changing blink rate length so that I have a moving target to monitor.
int blinkDelay = 100; //Starting delay
void setup() {
pinMode(PB12, OUTPUT); //Black Pill LED
Serial.begin(115200);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(PB12, HIGH); // turn the LED on (HIGH is the voltage level)
delay(blinkDelay); // wait for a second
blinkDelay++;
Serial.println("LED On");
digitalWrite(PB12, LOW); // turn the LED off by making the voltage LOW
delay(blinkDelay); // wait for a second
blinkDelay++;
Serial.println("LED Off");
}
I move to Debug mode with Automatic Debugging and Trace Only enabled.
I just get '
Launching Debugger...' in the output window and no flashing LED on the Dev board. As mentioned, I did a 'Release' build first. Obviously I can not do any breakpoints if it is not running.
Is there anything I can do to fix this, like creating my own pin map files for VM or is it massively more complicated than that?
This is a real blow and a set back. I am not sure where to go from here.
Edit2: Re starting the IDE and using
Serial (USART) FWIW
GoToDefinition reports Serial as
extern USBSerial Serial; NOTE: When using the USART 1 I have to manually hit the Reset button on the dev board before I can upload the Firmware. When Using 'Debug' I have tried hitting reset and not hitting reset. but I just get the error below.
Is this manual reset the problem?
Quote:Compiling debug version of 'Blink' for 'Generic STM32F103C series'
Blink.ino: In function void setup()
void setup() {
Error compiling project sources
Blink.ino:3: In file included from
Debug Build Error: This hardware might not support the default Visual Micro Debugger.
If this project is using OTA/WiFi upload then please use the vMicro>Debugger menu to set the Serial COM and Remote port for the debugger.
Otherwise switch the toolbar from 'Debug' to 'Release' and build again.
or switch off Automatic Debugging
or configure the SoftwareSerial debugger option.
void begin(USBSerial *theSerial)
Debug build failed for project 'Blink'
^~~~~
void begin(USBSerial *theSerial, unsigned long baud)
Using STLink As mentioned above the upload works fine in 'Release' but just sits waiting in Debug with the 'Launching Debugger...' message.