-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblackmagic-on-a-bluepill.html
86 lines (67 loc) · 3.23 KB
/
blackmagic-on-a-bluepill.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://okke-formsma.github.io/theme/styles.css" />
<title>Okke's blog - Blackmagic on a bluepill</title>
<meta charset="utf-8" />
<meta name="generator" content="Pelican" />
<link href="https://fonts.googleapis.com/css2?family=Chelsea+Market&family=Libre+Franklin:wght@500&display=swap" rel="stylesheet">
<link href="https://okke-formsma.github.io/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Okke's blog Full Atom Feed" />
<link href="https://okke-formsma.github.io/feeds/misc.atom.xml" type="application/atom+xml" rel="alternate" title="Okke's blog Categories Atom Feed" />
</head>
<body>
<header>
<h1 class="title"><a href="https://okke-formsma.github.io/">Okke's blog</a></h1>
<nav>
<ul>
</ul>
</nav>
</header>
<main>
<article class="post">
<header>
<time class="published" datetime="2020-06-30T00:00:00+02:00"> 2020-06-30 </time>
<h2>
<a href="https://okke-formsma.github.io/blackmagic-on-a-bluepill.html" rel="bookmark" title="Permalink to Blackmagic on a bluepill">
Blackmagic on a bluepill
</a>
</h2>
</header>
<footer>
</footer>
<div class="post-content"> <p>To flash <a href="https://github.com/joric/nrfmicro/wiki">nrfmicro</a> chips, you can use a bluepill with blackmagic installed.</p>
<p>The bluepill has some issues with wrong resistors (I had to change R3 on the bluepill from 100k to 10k ohm).
The blackpill with stm32f103 processor does not have this problem, and is recommended. (Black Magic is not supported on blackpill 1.2 (stm32f401) or blackpill 2.0 (stm32f411) at this time.</p>
<p>There's an excellent article on <a href="https://github.com/joric/nrfmicro/wiki/Software">flashing blackmagic firmware onto a bluepill</a> by joric.
Here are some the steps I went through to make it work on ubuntu.</p>
<ul>
<li>
<p>Connect the usb-to-uart converter to the bluemicro and set the bluemicro boot0 jumper to 1. </p>
</li>
<li>
<p>Find the usb port that the converter is attached to</p>
</li>
</ul>
<div class="highlight"><pre><span></span><span class="err">> dmesg | grep tty</span>
<span class="err">[157210.247340] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0</span>
<span class="err">[157221.140041] usb 1-2: cp210x converter now attached to ttyUSB0</span>
</pre></div>
<ul>
<li>Install the dfu. Run stm32loader.py on python2 with the pySerial package installed:</li>
</ul>
<div class="highlight"><pre><span></span><span class="err">python2 stm32loader.py -p /dev/ttyUSB0 -ewv blackmagic_dfu.bin</span>
</pre></div>
<ul>
<li>Install the blackmagic firmware:</li>
</ul>
<div class="highlight"><pre><span></span><span class="err">stm32flash -w blackmagic.bin /dev/ttyUSB0 -S 0x08002000</span>
</pre></div>
<ul>
<li>Set the jumper back to 0, disconnect the uart adapter, connect the bluepill to usb.</li>
<li>Check if the blackmagic probe is recognized with <code>lsusb</code>.</li>
</ul> </div>
</article>
</main>
</body>
</html>