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 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) How to debug with Black Magic Probe (BMP)? (Read 3124 times)
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with Black Magic Probe (BMP)?
Reply #20 - Oct 2nd, 2020 at 4:04pm
Print Post  
Reading the SWO information via Serial Monitor plugin in Visual Studio. 
Is that the complete information?
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: How to debug with Black Magic Probe (BMP)?
Reply #21 - Oct 2nd, 2020 at 4:15pm
Print Post  
I see, thanks for the information and I'll look into this element further so we can update our documentation and tutorial videos.

Just one more question, are you using the SerialWireOutput Library to write to SWO or another method?
« Last Edit: Oct 2nd, 2020 at 4:29pm by Simon@Visual Micro »  
Back to top
IP Logged
 
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with Black Magic Probe (BMP)?
Reply #22 - Oct 2nd, 2020 at 8:41pm
Print Post  
In order not to loose the whole stuff I spent hours to reproduce which BMP compilation I had used.
The only one that worked like I described above is this:
https://github.com/blacksphere/blackmagic/releases/tag/v1.7.1
I managed using Mingw32 to compile to a single blackmagic file and uploaded to the Blue pill using Cubeprogrammer. (I changed the Com port after upload and USB connection to that small number but that was not necessary, I had read that that also could be an issue)
Connections:
BMP: PA3-->Target BP: PB3
         A5                    SWCLK
         A14                  SWO
Does this answer your "one more Question"?
« Last Edit: Oct 2nd, 2020 at 8:43pm by arduino1 »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: How to debug with Black Magic Probe (BMP)?
Reply #23 - Oct 2nd, 2020 at 9:00pm
Print Post  
Understood, I thought you had used the pre-compiled BMP firmware we show in our tutorial on Arduino ProjectHub / YouTube.

I wanted to know what code you are using to initialise / write to SWO from your Arduino Sketch using the Roger Clarke Core?
(as from what I can see the SerialWireOutput Library I mentioned is only for the official STM32 Core.....)
  
Back to top
IP Logged
 
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with Black Magic Probe (BMP)?
Reply #24 - Oct 3rd, 2020 at 7:45am
Print Post  
Using the BMP bin files you refer to doesn't work!!!
Blink in Arduino always yields mismatch at some address. 
That BMP.bin I finally used (see my link above) runs smoothly also in Vmicro.... 
Will be sticking to that, of course.
I used Generic STM32F1 series with submenue and the SerialWireOutput library with the example provided.

Is it possible to access the CPU registers?

Does BMP only work with that core? My application needs the Maple core.

  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: How to debug with Black Magic Probe (BMP)?
Reply #25 - Oct 3rd, 2020 at 10:03am
Print Post  
Thanks for the clarification, however I'm missing something as the two BIN files on our tutorial still work well for me (re-built my STM-BMP yesterday following these instructions).

I used the Roger Clarke core on the target as well, the BMP does work with both cores (though always recommend only one of the cores is installed at any one time, not both together).

Thanks for confirming the SWO element is with the official core.

The CPU Registers should be viewable once the Debug Session has started, from the VS Debug > Windows > Registers (at the bottom of the window list).
  
Back to top
IP Logged
 
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with Black Magic Probe (BMP)?
Reply #26 - Oct 3rd, 2020 at 1:01pm
Print Post  
Anyway, do you need shuffling the Boot0 jumper and "attaching to process" with those BMP binaries? 
With my compilation it runs through fine (debugging) when leaving Boot0=0.

Main question: How to view the GPIO (Port) registers?
In CubeMXIDE they are called "SFR's" if I remember correctly.

Furthermore, on a fresh installed Win10 notebook neither Arduino IDE works  nor vmicro using the BMP with the same settings as in the main PC.
"Com10 port (being the GDB Server port) not found" -

Update: On the notebook PC I installed Mingw64 (don't know if essential for this issue).
Uninstalled Arduino. Loaded Arduino (portable). 
Deleted Arduino15. Started Arduino. Installed Due from Boardmanager. Installed STM32F1 boards (STMduino).
Result: Blink compiles with BMP and runs in Arduino and in vmicro without needing the reset button.

But, what about port register viewing in vmicro? Visual GDB needed?

« Last Edit: Oct 4th, 2020 at 1:14pm by arduino1 »  
Back to top
 
IP Logged
 
arduino1
Junior Member
**
Offline


Posts: 75
Joined: Feb 12th, 2015
Re: How to debug with Black Magic Probe (BMP)?
Reply #27 - Oct 5th, 2020 at 1:42pm
Print Post  
Can the port registers (STM32f103xx) be shown (and edited) in vmicro?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2704
Joined: Feb 13th, 2019
Re: How to debug with Black Magic Probe (BMP)?
Reply #28 - Oct 5th, 2020 at 2:01pm
Print Post  
There is nothing specifically for this purpose in the hardware debugging at present, and we will look further into this.

To my knowledge the e.g. GPIOC register is resolved to a memory address at compile time, so this can be viewed in GDB, once the address is known using 'x'

There is a Digital / Analog Pin Viewer built into the vMicro Serial Debugger which allows the digital pin states to be altered, and analog pins graphed.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How to debug with Black Magic Probe (BMP)?
Reply #29 - Oct 14th, 2020 at 5:10pm
Print Post  
This Topic was moved here from Hardware Debugging (GDB, GDB WiFi, GDB Stub) [move by] Visual Micro.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint