Skip to content

Commit 983f60d

Browse files
committed
First attempt with ESP Web Tools
1 parent ca44080 commit 983f60d

File tree

8 files changed

+173
-4
lines changed

8 files changed

+173
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# MPEasy.Org
2+
3+
How to run tidy: tidy -e -config tidy.cfg index.html

index.html

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>MicroPython Easy Installer</title>
6+
<meta
7+
name="description"
8+
content="Easy install for MicroPython on ESP32 family MCUs using web browser"
9+
/>
10+
<meta name="viewport" content="width=device-width" />
11+
<meta name="color-scheme" content="dark light" />
12+
<style>
13+
body {
14+
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
15+
Roboto, Ubuntu, sans-serif;
16+
padding: 0;
17+
margin: 0;
18+
line-height: 1.4;
19+
}
20+
.content {
21+
max-width: 600px;
22+
margin: 0 auto;
23+
padding: 12px;
24+
}
25+
h2 {
26+
margin-top: 2em;
27+
}
28+
h3 {
29+
margin-top: 1.5em;
30+
}
31+
a {
32+
color: #03a9f4;
33+
}
34+
.invisible {
35+
visibility: hidden;
36+
}
37+
.hidden {
38+
display: none;
39+
}
40+
esp-web-install-button[install-unsupported] {
41+
visibility: inherit;
42+
}
43+
.content pre {
44+
max-width: 100%;
45+
overflow-y: scroll;
46+
}
47+
.footer {
48+
margin-top: 24px;
49+
border-top: 1px solid #ccc;
50+
padding-top: 24px;
51+
text-align: center;
52+
}
53+
.footer .initiative {
54+
font-style: italic;
55+
margin-top: 16px;
56+
}
57+
table {
58+
border-spacing: 0;
59+
}
60+
td {
61+
padding: 8px;
62+
border-bottom: 1px solid #ccc;
63+
}
64+
.radios li {
65+
list-style: none;
66+
line-height: 2em;
67+
}
68+
@media (prefers-color-scheme: dark) {
69+
body {
70+
background-color: #333;
71+
color: #fff;
72+
}
73+
a {
74+
color: #58a6ff;
75+
}
76+
}
77+
</style>
78+
<script type="module" src="https://unpkg.com/[email protected]/dist/web/install-button.js?module"></script>
79+
</head>
80+
<body>
81+
<div class="content">
82+
<h1>MicroPython Easy Installer for ESP32 Family and ESP8266 MCUs</h1>
83+
<p>Install the latest MicroPython release on your MCU.</p>
84+
<p>Select a build for a generic board with your flash and RAM size, or for a specific board:</p>
85+
<ul class="radios">
86+
<li>
87+
<label><input type="radio" name="type" value="generic4m" /> Generic 4M Flash, RAM&lt;=1M</label>
88+
</li>
89+
<li>
90+
<label><input type="radio" name="type" value="featherS2neo" /> Unexpected Maker Feather S2 Neo</label>
91+
</li>
92+
</ul>
93+
<p class="button-row" align="center">
94+
<esp-web-install-button class="invisible"></esp-web-install-button>
95+
</p>
96+
97+
<div class="footer">
98+
Easy MP <a href="https://micropython.org/"
99+
>MicroPython</a
100+
> &mdash;
101+
Installer powered by <a href="https://esphome.github.io/esp-web-tools/">ESP Web Tools</a>.
102+
</div>
103+
</div>
104+
<script>
105+
document.querySelectorAll('input[name="type"]').forEach(radio =>
106+
radio.addEventListener("change", () => {
107+
const button = document.querySelector('esp-web-install-button');
108+
button.manifest = `./manifest_${radio.value}.json`;
109+
button.classList.remove('invisible');
110+
}
111+
));
112+
</script>
113+
</body>
114+
</html>

index.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

manifest_c3_mini.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "MicroPython ESP32",
3+
"version": "v1.23.0",
4+
"builds": [
5+
{
6+
"chipFamily": "ESP32-S2",
7+
"parts": [{ "path": "bin/LOLIN_C3_MINI-20240602-v1.23.0.bin", "offset": 4096 }]
8+
}
9+
]
10+
}

manifest_featherS2neo.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "MicroPython ESP32",
3+
"version": "v1.23.0",
4+
"builds": [
5+
{
6+
"chipFamily": "ESP32-S2",
7+
"parts": [{ "path": "bin/UM_FEATHERS2NEO-20240602-v1.23.0.bin", "offset": 4096 }]
8+
}
9+
]
10+
}

manifest_generic4m.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "Generic 4M Flash, RAM<=1M",
3+
"version": "v1.23.0",
4+
"builds": [
5+
{
6+
"chipFamily": "ESP8266",
7+
"parts": [{ "path": "bin/ESP8266_GENERIC-20240602-v1.23.0.bin", "offset": 4096 }]
8+
},
9+
{
10+
"chipFamily": "ESP32",
11+
"parts": [{ "path": "bin/ESP32_GENERIC-20240602-v1.23.0.bin", "offset": 4096 }]
12+
},
13+
{
14+
"chipFamily": "ESP32-C3",
15+
"parts": [{ "path": "bin/ESP32_GENERIC_C3-20240602-v1.23.0.bin", "offset": 0 }]
16+
},
17+
{
18+
"chipFamily": "ESP32-S2",
19+
"parts": [{ "path": "bin/ESP32_GENERIC_S2-20240602-v1.23.0.bin", "offset": 4096 }]
20+
},
21+
{
22+
"chipFamily": "ESP32-S3",
23+
"parts": [{ "path": "bin/ESP32_GENERIC_S3-FLASH_4M-20240602-v1.23.0.bin", "offset": 0 }]
24+
}
25+
]
26+
}

manifest_s2_pico.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "MicroPython ESP32",
3+
"version": "v1.23.0",
4+
"builds": [
5+
{
6+
"chipFamily": "ESP32-S2",
7+
"parts": [{ "path": "bin/LOLIN_S2_PICO-20240602-v1.23.0.bin", "offset": 4096 }]
8+
}
9+
]
10+
}

tidy.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom-tags: yes

0 commit comments

Comments
 (0)