forked from devanlai/webstlink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
102 lines (96 loc) · 3.06 KB
/
index.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="sakura-earthly.css" />
<title>WebUSB STLink Test</title>
<script src="test.js" type="module"></script>
<style>
div.debug {
white-space: pre;
}
div.verbose {
white-space: pre;
}
div.info {
white-space: pre;
}
div.message {
white-space: pre;
}
div.error {
white-space: pre;
color: red;
}
div.warning {
white-space: pre;
color: red;
}
div.log {
min-height: 3em;
max-height: 10em;
font-family: monospace;
overflow-y:scroll;
}
div.registers {
display: flex;
flex-wrap: wrap;
}
span.register {
white-space: pre;
font-family: monospace;
flex: 1 0 27ch;
margin-left: 3ch;
}
span.register-updated {
font-weight: bold;
}
</style>
</head>
<body>
<a href="https://github.com/devanlai/webstlink"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
<p>
<button id="connect">Connect</button>
</p>
<p>
<details id="probeInfo">
<summary>Debugger - Disconnected</summary>
Product Name: <span id="productName"></span><br/>
Manufacturer: <span id="mfgName"></span><br/>
Serial Number: <span id="serialNumber"></span><br/>
</details>
<details id="targetInfo">
<summary>Target <span id="targetType">-</span> <span id="targetStatus">Unknown</span></summary>
</details>
</p>
<p>
Read address (hex):
<input type="text" id="memoryReadAddress" title="Memory address to read from (hex)" size="10" pattern="0x[A-Fa-f0-9]+"/>
Size (decimal):
<input type="number" id="memoryReadSize" title="Number of bytes to read (decimal)" min="1" value="1000" />
<textarea id="memoryContents" rows="10" readonly></textarea>
Flash address (hex):
<input type="text" id="flashWriteAddress" title="Flash address to write to (hex)" size="10" pattern="0x[A-Fa-f0-9]+" required/>
Firmware binary:
<input type="file" id="flashBinaryFile" required/>
<button id="flash" disabled>Flash</button>
</p>
<div id="log" class="log"></div>
<dialog id="mcuDialog">
<form id="mcuForm" method="dialog">
<table>
<thead>
<tr>
<th>Type</th>
<th>Max Frequency</th>
<th>Max Flash</th>
<th>SRAM</th>
<th>EEPROM</th>
</tr>
</thead>
<tbody></tbody>
</table>
<button type="submit">Select MCU variant</button>
</form>
</dialog>
</body>
</html>