-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
51 lines (37 loc) · 1.37 KB
/
README
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
stlink swo usb capture tool
heh ;) it works :)
Dependencies
============
pyusb >= 1.x (Tested with 1.0.0-0.4.a2.fc18)
(you have to work out udev rules yourself....)
Basic Usage
===========
python hack.py
connect
swo_file blahblahblah.log
swo_start stimulusbitmask
....
swo_start otherstimulusmask
...
exit (or ^d)
in another window:
# to see everything...
python swodecoder.py -f blahblahblah.log
# to see just stimulus port 2
python swodecoder.py -f blahblahblah.log -a 2
Tips
====
You _probably_ will want to edit swodecoder.py, in the PacketParser's
target parameter, if you want to change the output formatting.
http://false.ekta.is/2013/12/using-swoswv-streaming-data-with-stlink-under-linux-part-2/
Bugs
====
The STLink firmware gets into some screwy states sometimes, you need to
unplug/replug to get it back. Boo :( (This is a bug in swopy's USB handling)
After streaming for a while, stably writing 40-60KB/sec, and seeing consistent
300-800bytes SWO data per frame, you'll see the STLink report that it has ~64KB
to dump, and then it gets a USB Transfer error and locks up. Boo :( As best I
can tell that's a firmware bug on the STLink, there's no field I can tell in
the USB responses to indicate there's any sort of overflow)
Sometimes the stimulus bits are weird. Writing to bits that _should_ turn on
the channel you want doesn't. Boo :( No idea what's going on there.