Author Topic: Another use for that old Blue Pill board, turn it into a Stlink programmer.  (Read 3700 times)

0 Members and 1 Guest are viewing this topic.

Offline techman-001Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 748
  • Country: au
  • Electronics technician for the last 50 years
    • Mecrisp Stellaris Unofficial UserDoc
Make a Stlink V2 programmer/debugger for STM8/STM32 using a STM32F103 board

Sometimes one needs a SWD programmer/debugger for a STM project but a commercial ‘board’ such as a Discovery, Nucleo or $5 - $20 Chinese clone programmer isn’t available, so it can be handy to build your own or use a cheap spare Blue Pill type board to make one.

The ST MCU may then be flashed and debugged via SWD using this unit. Note, I don’t use STM8 so that facility is untested in this document.

This creates a “V2J37S7 STM8/STM32 Programmer/Debugger”

Note: the following README is for a Unix OS such as Linux on your PC.

https://mecrisp-stellaris-folkdoc.sourceforge.io/bluepill-stlink-programmer.html
« Last Edit: October 28, 2020, 11:45:06 pm by techman-001 »
 

Offline dave j

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
Your link misses the 'l' off the end of html which results in the page not being found.
I'm not David L Jones. Apparently I actually do have to point this out.
 
The following users thanked this post: techman-001

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1768
  • Country: se
Blue Pill can also easily support Black Magic Probe FW, which is also good for MCUs from other vendors.

This has at least the advantage of a clearer license - I do not think installing a cracked FW on non-ST HW is exactly according to the license...
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline GromBeestje

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: nl
Using the ST-Link firmware on non-ST hardware is most likely a violation of the license.  (all those stlink dongles out there, but they're quite convinient)
But to use it, there have been ST-Link bootloaders out there for years,
also, there have been various CMSIS-DAP firmwares out there.

But that is no requirement considering MCUs from other vendors. OpenOCD will work fine with ST-Link and non-ST MCUs.
There have been few exceptions, such as Cypress PSoC4, but using the new stlink-dap implementation (requiring a recent ST-Link firmware though) even those work fine.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3855
  • Country: nl
I quite like the closed aluminum housing with the pinout printed on them of the cheap ST-Link V2 clones.

But I do have some interest in trying out the "Black Magic Probe" some day...
USD 60 for that thing is too much for me, but if it works on a "Blue Pill" I'll look into donating a bit to that project.

 

Offline GromBeestje

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: nl
Yep, the Black Magic Probe can be compiled for Blue PIlls, and ST-Links as well.

https://github.com/blacksphere/blackmagic/wiki/Debugger-Hardware

Their hardware, it's all about having the level shifters and stuff. Important if your target runs on a voltage different then 3.3 Volt.
But if your debugger and target both run on 3.3 Volt, any Blue Pill or Aluminium ST-Link will do.
 



Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf