mpflash 0.2.2.post1__py3-none-any.whl → 0.2.2.post2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mpflash/common.py +1 -1
- mpflash/downloader.py +2 -1
- mpflash/flasher.py +8 -20
- {mpflash-0.2.2.post1.dist-info → mpflash-0.2.2.post2.dist-info}/METADATA +5 -2
- {mpflash-0.2.2.post1.dist-info → mpflash-0.2.2.post2.dist-info}/RECORD +8 -8
- {mpflash-0.2.2.post1.dist-info → mpflash-0.2.2.post2.dist-info}/LICENSE +0 -0
- {mpflash-0.2.2.post1.dist-info → mpflash-0.2.2.post2.dist-info}/WHEEL +0 -0
- {mpflash-0.2.2.post1.dist-info → mpflash-0.2.2.post2.dist-info}/entry_points.txt +0 -0
mpflash/common.py
CHANGED
mpflash/downloader.py
CHANGED
@@ -40,6 +40,7 @@ DEFAULT_BOARDS = [
|
|
40
40
|
"ARDUINO_NANO_RP2040_CONNECT",
|
41
41
|
"PIMORONI_PICOLIPO_16MB",
|
42
42
|
"SEEED_WIO_TERMINAL",
|
43
|
+
"PARTICLE_XENON",
|
43
44
|
]
|
44
45
|
|
45
46
|
|
@@ -103,7 +104,7 @@ def get_boards(fw_types: Dict[str, str], board_list: List[str], clean: bool) ->
|
|
103
104
|
for board in _urls:
|
104
105
|
board["port"] = port
|
105
106
|
|
106
|
-
for board in track(_urls, description="Checking download pages", transient=True):
|
107
|
+
for board in track(_urls, description=f"Checking {port} download pages", transient=True):
|
107
108
|
# add a board to the list for each firmware found
|
108
109
|
firmwares = firmware_list(board["url"], MICROPYTHON_ORG_URL, fw_types[port])
|
109
110
|
for _url in firmwares:
|
mpflash/flasher.py
CHANGED
@@ -104,9 +104,7 @@ def auto_update(conn_boards: List[MPRemoteBoard], target_version: str, fw_folder
|
|
104
104
|
wl: WorkList = []
|
105
105
|
for mcu in conn_boards:
|
106
106
|
if mcu.family != "micropython":
|
107
|
-
log.warning(
|
108
|
-
f"Skipping {mcu.board} on {mcu.serialport} as it is not a micropython board"
|
109
|
-
)
|
107
|
+
log.warning(f"Skipping {mcu.board} on {mcu.serialport} as it is not a micropython board")
|
110
108
|
continue
|
111
109
|
board_firmwares = find_firmware(
|
112
110
|
fw_folder=fw_folder,
|
@@ -117,19 +115,13 @@ def auto_update(conn_boards: List[MPRemoteBoard], target_version: str, fw_folder
|
|
117
115
|
)
|
118
116
|
|
119
117
|
if not board_firmwares:
|
120
|
-
log.error(
|
121
|
-
f"No {target_version} firmware found for {mcu.board} on {mcu.serialport}."
|
122
|
-
)
|
118
|
+
log.error(f"No {target_version} firmware found for {mcu.board} on {mcu.serialport}.")
|
123
119
|
continue
|
124
120
|
if len(board_firmwares) > 1:
|
125
|
-
log.debug(
|
126
|
-
f"Multiple {target_version} firmwares found for {mcu.board} on {mcu.serialport}."
|
127
|
-
)
|
121
|
+
log.debug(f"Multiple {target_version} firmwares found for {mcu.board} on {mcu.serialport}.")
|
128
122
|
# just use the last firmware
|
129
123
|
fw_info = board_firmwares[-1]
|
130
|
-
log.info(
|
131
|
-
f"Found {target_version} firmware {fw_info['filename']} for {mcu.board} on {mcu.serialport}."
|
132
|
-
)
|
124
|
+
log.info(f"Found {target_version} firmware {fw_info['filename']} for {mcu.board} on {mcu.serialport}.")
|
133
125
|
wl.append((mcu, fw_info))
|
134
126
|
return wl
|
135
127
|
|
@@ -148,7 +140,7 @@ def auto_update(conn_boards: List[MPRemoteBoard], target_version: str, fw_folder
|
|
148
140
|
"-f",
|
149
141
|
"fw_folder",
|
150
142
|
type=click.Path(exists=True, file_okay=False, dir_okay=True, path_type=Path),
|
151
|
-
default=
|
143
|
+
default=DEFAULT_FW_PATH,
|
152
144
|
show_default=True,
|
153
145
|
help="The folder to retrieve the firmware from.",
|
154
146
|
)
|
@@ -233,9 +225,7 @@ def flash_board(
|
|
233
225
|
if serial_port == "auto":
|
234
226
|
# update all connected boards
|
235
227
|
conn_boards = [
|
236
|
-
MPRemoteBoard(sp)
|
237
|
-
for sp in MPRemoteBoard.connected_boards()
|
238
|
-
if sp not in config.ignore_ports
|
228
|
+
MPRemoteBoard(sp) for sp in MPRemoteBoard.connected_boards() if sp not in config.ignore_ports
|
239
229
|
]
|
240
230
|
else:
|
241
231
|
# just this serial port
|
@@ -247,9 +237,7 @@ def flash_board(
|
|
247
237
|
for mcu, fw_info in todo:
|
248
238
|
fw_file = fw_folder / fw_info["filename"] # type: ignore
|
249
239
|
if not fw_file.exists():
|
250
|
-
log.error(
|
251
|
-
f"File {fw_file} does not exist, skipping {mcu.board} on {mcu.serialport}"
|
252
|
-
)
|
240
|
+
log.error(f"File {fw_file} does not exist, skipping {mcu.board} on {mcu.serialport}")
|
253
241
|
continue
|
254
242
|
log.info(f"Updating {mcu.board} on {mcu.serialport} to {fw_info['version']}")
|
255
243
|
|
@@ -274,7 +262,7 @@ def flash_board(
|
|
274
262
|
# for sp in MPRemoteBoard.connected_boards()
|
275
263
|
# if sp not in config.ignore_ports
|
276
264
|
# ]
|
277
|
-
|
265
|
+
|
278
266
|
show_boards(flashed, title="Connected boards after flashing")
|
279
267
|
|
280
268
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: mpflash
|
3
|
-
Version: 0.2.2.
|
3
|
+
Version: 0.2.2.post2
|
4
4
|
Summary: Download and flashing tool for MicroPython firmwares
|
5
5
|
Home-page: https://github.com/Josverl/micropython-stubber/blob/main/src/mpflash/README.md
|
6
6
|
License: MIT
|
@@ -77,9 +77,12 @@ This will download the latest stable version of the MicroPython firmware for the
|
|
77
77
|
The stable version (default) is determined based on the most recent published release,
|
78
78
|
other optionse are `--version preview` and `--version x.y.z` to download the latest preview or version x.y.z respectively.
|
79
79
|
|
80
|
+
by default the firmware will be downloaded to Downloads in a `firmware` folder in your, but you can specify a different directory using the `--dir` option.
|
81
|
+
|
82
|
+
```bash
|
80
83
|
The directory structure will be something like this:
|
81
84
|
```
|
82
|
-
firmware
|
85
|
+
Downloads/firmware
|
83
86
|
| firmware.jsonl
|
84
87
|
+---esp8266
|
85
88
|
| ESP8266_GENERIC-FLASH_1M-v1.22.2.bin
|
@@ -1,20 +1,20 @@
|
|
1
1
|
mpflash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
mpflash/cli_group.py,sha256=oWgZlUoXY_Wc9-XMXxuxH3F0TevYNafsFWpRtT_WiiU,1228
|
3
3
|
mpflash/cli_main.py,sha256=nLFfR-ti_stLVvgwDRsNXgaQ43gQVZUOz_xvRERPuy0,494
|
4
|
-
mpflash/common.py,sha256=
|
4
|
+
mpflash/common.py,sha256=RBNfbojPKLK3_cxLFIvtHWy8UZUbBxN0ogBN0nliVR4,3896
|
5
5
|
mpflash/config.py,sha256=R_sYZ_UwzIc9H2vhwIU5RSDhpcV3fHIX83FEURWOd5E,160
|
6
|
-
mpflash/downloader.py,sha256=
|
6
|
+
mpflash/downloader.py,sha256=QVtgocj4b-c9ZunzEZnsyhEZu_Lbk8Hk-43qWBMJ0AI,9783
|
7
7
|
mpflash/flash_esp.py,sha256=XffVg1BKzaQo4pzSJdUoHmHa7h4s4gBlNQR50ahGJ1E,2301
|
8
8
|
mpflash/flash_stm32.py,sha256=Pn1y9rKw48D0khucT8yU3NjFkHQ9YYTvwco9ir4MmpQ,3742
|
9
9
|
mpflash/flash_uf2.py,sha256=8rZRqdi3Rtp8UsHxKgmoMfZ1yBXZbMFXcOeyVVMmX5w,2029
|
10
10
|
mpflash/flash_uf2_linux.py,sha256=wXtpqFan6x5k8h2bwwLqwY-LKbpyTg7n2SbD4eb6yH0,4012
|
11
11
|
mpflash/flash_uf2_windows.py,sha256=AiFg5jrSyEMX2QxC2sgfn8GekKBw-fPkIi8emlU7Z7o,711
|
12
|
-
mpflash/flasher.py,sha256=
|
12
|
+
mpflash/flasher.py,sha256=J7-bsrfQ0MPEKrnUx47q0OqAS61roLBaETu4nv4MfMU,9400
|
13
13
|
mpflash/list.py,sha256=7GpZEK7fh6GCzgUdRLHGp8FMEeCbLstV-2u3ohaRYsc,1970
|
14
14
|
mpflash/logger.py,sha256=FvGQSR2l4O9nmJV0rKbyoeJDd7fbY2vKQTmPEED0h6s,1048
|
15
15
|
mpflash/uf2_boardid.py,sha256=WZKucGu_hJ8ymb236uuZbiR6pD6AA_l4LA-7LwtQhq8,414
|
16
|
-
mpflash-0.2.2.
|
17
|
-
mpflash-0.2.2.
|
18
|
-
mpflash-0.2.2.
|
19
|
-
mpflash-0.2.2.
|
20
|
-
mpflash-0.2.2.
|
16
|
+
mpflash-0.2.2.post2.dist-info/entry_points.txt,sha256=Jk_visOhYOsZIcSP2Ms9hKqfKy1iorR-6dYltSoWCpY,52
|
17
|
+
mpflash-0.2.2.post2.dist-info/LICENSE,sha256=mWpNhsIxWzetYNnTpr4eb3HtgsxGIC8KcYWxXEcxQvE,1077
|
18
|
+
mpflash-0.2.2.post2.dist-info/METADATA,sha256=_Dem1zESHqzvSoy3kpmUnuJ8Doz5tqY90B9hLeQ2iv8,12786
|
19
|
+
mpflash-0.2.2.post2.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
20
|
+
mpflash-0.2.2.post2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|