Black Magic Probe on an stm32f103c8

User avatar
Rick Kimball
Posts: 728
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Black Magic Probe on an stm32f103c8

Postby Rick Kimball » Mon Dec 05, 2016 10:21 pm

It was just the latest version.

Code: Select all

$ git pull
Already up-to-date.
$ git log
commit d6e29774feee9cad275f97d7e5c7fcfccfeb190b
Merge: dc9073b 085c980
Author: Gareth McMullin <gareth@blacksphere.co.nz>
Date:   Mon Dec 5 10:55:24 2016 +1300

    Merge pull request #174 from ChuckM/sam4l
   
    Target Driver for Atmetl AT91SAM4L target


The changes are just 8 lines and you don't even need the ones to do the install, so 4 lines actually changed:

Code: Select all

$ diff platforms/bluepill platforms/stlink | grep '<'

diff platforms/bluepill/Makefile.inc platforms/stlink/Makefile.inc
< LDFLAGS = $(LDFLAGS_BOOT) -Wl,-Ttext=0x8000000
< .phony: install all host_clean
< all:   blackmagic.bin
< install:
<    openocd -f ~/openocd_cfg/st_nucleo_f103rb.cfg -c 'program blackmagic verify reset exit'

diff platforms/bluepill/platform.c platforms/stlink/platform.c
<    //SCB_VTOR = 0x2000; /* Relocate interrupt vector table here */

diff platforms/bluepill/platform.h platforms/stlink/platform.h
< #define TMS_PORT   GPIOA
< #define TMS_PIN      GPIO4
Last edited by Rick Kimball on Mon Dec 05, 2016 10:23 pm, edited 1 time in total.
-rick

User avatar
RogerClark
Posts: 5466
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Black Magic Probe on an stm32f103c8

Postby RogerClark » Mon Dec 05, 2016 10:23 pm

Rick

Why did you move the vector table, are you loading it where the sketch normally resides, i.e at 0x2000 hex ?

I'll need to give the STlink binary a try on my Black Pill (All my blue pills now have broken USB connectors :-( )

But on the Baite STlink it would not enumerate at all on USB, which is a bit strange, as all you seem to have done is change the vector table and the TMS pin, and I can't see how that would effect the USB enumeration on Baite STlink

User avatar
Rick Kimball
Posts: 728
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Black Magic Probe on an stm32f103c8

Postby Rick Kimball » Mon Dec 05, 2016 10:25 pm

Roger wrote:Why did you move the vector table, are you loading it where the sketch normally resides, i.e at 0x2000 hex ?

Because I never plan to update it using DFU and it gives me another 8k of flash to play with if I decide to do more.

-rick
-rick

User avatar
RogerClark
Posts: 5466
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Black Magic Probe on an stm32f103c8

Postby RogerClark » Mon Dec 05, 2016 10:26 pm

BTW.

According to @denis the Baite STlink has the same circuits as the all STLinks e.g.

http://www.avrki.ru/picture/articles/sa ... ink_v2.jpg

So there isnt any USB enumeration hardware

Umm.. Strange that blacksphere's precompiled binary did work on it, nor did the version I compiled myself

User avatar
Rick Kimball
Posts: 728
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Black Magic Probe on an stm32f103c8

Postby Rick Kimball » Mon Dec 05, 2016 10:32 pm

RogerClark wrote:...But on the Baite STlink it would not enumerate at all on USB, which is a bit strange, as all you seem to have done is change the vector table and the TMS pin, and I can't see how that would effect the USB enumeration on Baite STlink

Did you unplug the usb cable to re-enumerate?

-rick
-rick

User avatar
RogerClark
Posts: 5466
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Black Magic Probe on an stm32f103c8

Postby RogerClark » Mon Dec 05, 2016 10:34 pm

Yep

PS. I tried using gitter, do you still have an account or did you delete it again?

User avatar
Rick Kimball
Posts: 728
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Black Magic Probe on an stm32f103c8

Postby Rick Kimball » Mon Dec 05, 2016 10:39 pm

OK, I moved the discussion over there to gitter
-rick

michael_l
Posts: 214
Joined: Mon Aug 24, 2015 6:11 pm

Re: Black Magic Probe on an stm32f103c8

Postby michael_l » Mon Dec 05, 2016 10:51 pm

RogerClark wrote:Michael

I'm not sure if these are the same file but...

Try


https://github.com/rogerclarkmelbourne/ ... ter/driver


Yes, this works. Now I can see 'Black Magic GBD Server' and 'UART Port'. Thanks.

EDIT: also I was able to debug an another bluepill

User avatar
RogerClark
Posts: 5466
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Black Magic Probe on an stm32f103c8

Postby RogerClark » Tue Dec 06, 2016 12:37 am

OK. I can't remember where I found those drivers, but it was somewhere on the blacksphere site.
However they may have since removed the originals from their site

michael_l
Posts: 214
Joined: Mon Aug 24, 2015 6:11 pm

Re: Black Magic Probe on an stm32f103c8

Postby michael_l » Tue Dec 06, 2016 10:43 am

Roger, Driver I was using was dated 2011 and used USB VID 0483, PID 5740. Current one uses VID 1D50, PID 6018. Funny thing is that yesterday I managed somehow to brake my ST link V2 clone. Windows does not recognize the device anymore, no leds etc. Good thing is that BMP on bluepill seems to work okay.


Return to “Black Magic Probe & other”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest