mpflash 0.9.0__py3-none-any.whl → 0.9.1.post1__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/add_firmware.py +1 -1
- mpflash/ask_input.py +1 -1
- mpflash/{vendor/basicgit.py → basicgit.py} +3 -7
- mpflash/bootloader/__init__.py +2 -37
- mpflash/bootloader/activate.py +60 -0
- mpflash/bootloader/detect.py +82 -0
- mpflash/bootloader/manual.py +10 -11
- mpflash/bootloader/micropython.py +2 -0
- mpflash/bootloader/touch1200.py +13 -22
- mpflash/cli_download.py +1 -1
- mpflash/cli_flash.py +3 -3
- mpflash/cli_group.py +18 -5
- mpflash/cli_main.py +3 -5
- mpflash/common.py +1 -0
- mpflash/config.py +2 -1
- mpflash/connected.py +9 -5
- mpflash/download.py +9 -5
- mpflash/downloaded.py +1 -1
- mpflash/{flash.py → flash/__init__.py} +3 -3
- mpflash/{flash_esp.py → flash/esp.py} +1 -1
- mpflash/{flash_stm32.py → flash/stm32.py} +4 -3
- mpflash/{flash_stm32_dfu.py → flash/stm32_dfu.py} +1 -1
- mpflash/{flash_uf2.py → flash/uf2/__init__.py} +19 -20
- mpflash/{flash_uf2_linux.py → flash/uf2/linux.py} +12 -11
- mpflash/{flash_uf2_macos.py → flash/uf2/macos.py} +11 -6
- mpflash/{flash_uf2_windows.py → flash/uf2/windows.py} +11 -6
- mpflash/{worklist.py → flash/worklist.py} +7 -5
- mpflash/list.py +13 -3
- mpflash/mpboard_id/__init__.py +1 -1
- mpflash/mpboard_id/add_boards.py +3 -7
- mpflash/mpboard_id/board_id.py +1 -1
- mpflash/mpremoteboard/__init__.py +7 -11
- mpflash/{vendor/versions.py → versions.py} +10 -5
- {mpflash-0.9.0.dist-info → mpflash-0.9.1.post1.dist-info}/METADATA +16 -5
- mpflash-0.9.1.post1.dist-info/RECORD +53 -0
- mpflash/flash_stm32_cube.py +0 -111
- mpflash-0.9.0.dist-info/RECORD +0 -52
- /mpflash/{flash_uf2_boardid.py → flash/uf2/boardid.py} +0 -0
- /mpflash/{uf2disk.py → flash/uf2/uf2disk.py} +0 -0
- {mpflash-0.9.0.dist-info → mpflash-0.9.1.post1.dist-info}/LICENSE +0 -0
- {mpflash-0.9.0.dist-info → mpflash-0.9.1.post1.dist-info}/WHEEL +0 -0
- {mpflash-0.9.0.dist-info → mpflash-0.9.1.post1.dist-info}/entry_points.txt +0 -0
mpflash/flash_stm32_cube.py
DELETED
@@ -1,111 +0,0 @@
|
|
1
|
-
# """
|
2
|
-
# Flash STM32 using STM32CubeProgrammer
|
3
|
-
# needs to be installed independenty from https://www.st.com/en/development-tools/stm32cubeprog.html
|
4
|
-
|
5
|
-
# On Linux needs to be run with sudo - unless udev rules are set to allow access to the device as a regular user
|
6
|
-
# """
|
7
|
-
|
8
|
-
# import subprocess
|
9
|
-
# import sys
|
10
|
-
# import time
|
11
|
-
# from pathlib import Path
|
12
|
-
# from typing import Optional
|
13
|
-
|
14
|
-
# import bincopy
|
15
|
-
# from loguru import logger as log
|
16
|
-
# from rich.progress import track
|
17
|
-
# from strip_ansi import strip_ansi
|
18
|
-
|
19
|
-
# from .mpremoteboard.mpremoteboard import MPRemoteBoard
|
20
|
-
|
21
|
-
# STM32_CLI_WIN = "C:\\Program Files\\STMicroelectronics\\STM32Cube\\STM32CubeProgrammer\\bin\\STM32_Programmer_CLI.exe"
|
22
|
-
# STM32_CLI_LINUX = "~/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI"
|
23
|
-
|
24
|
-
|
25
|
-
# def get_stm32_start_address(fw_file: Path):
|
26
|
-
# """
|
27
|
-
# Get the start address of the firmware file, to allow automatic restart from that address after flashing
|
28
|
-
# """
|
29
|
-
# try:
|
30
|
-
# fw_hex = bincopy.BinFile(str(fw_file))
|
31
|
-
# return f"0x{fw_hex.execution_start_address:08X}"
|
32
|
-
# except Exception:
|
33
|
-
|
34
|
-
# return ""
|
35
|
-
|
36
|
-
|
37
|
-
# def flash_stm32_cubecli(mcu: MPRemoteBoard, fw_file: Path, *, erase: bool = True) -> Optional[MPRemoteBoard]:
|
38
|
-
# """
|
39
|
-
# Flash STM32 devices using STM32CubeProgrammer CLI
|
40
|
-
# - Enter bootloader mode
|
41
|
-
# - wait 2s for the device to be detected
|
42
|
-
# - list the connected DFU devices
|
43
|
-
|
44
|
-
# On Linux: requires udev rules to allow access to the device as a regular user
|
45
|
-
# """
|
46
|
-
# if sys.platform == "linux":
|
47
|
-
# STM32_CLI = Path(STM32_CLI_LINUX).expanduser().as_posix()
|
48
|
-
# elif sys.platform == "win32":
|
49
|
-
# STM32_CLI = str(Path(STM32_CLI_WIN).expanduser())
|
50
|
-
# else:
|
51
|
-
# log.error(f"OS {sys.platform} not supported")
|
52
|
-
# return None
|
53
|
-
|
54
|
-
# if not Path(STM32_CLI).exists():
|
55
|
-
# log.error(
|
56
|
-
# f"STM32CubeProgrammer not found at {STM32_CLI}\nPlease install it from https://www.st.com/en/development-tools/stm32cubeprog.html"
|
57
|
-
# )
|
58
|
-
# return None
|
59
|
-
|
60
|
-
# # run STM32_Programmer_CLI.exe --list
|
61
|
-
# cmd = [
|
62
|
-
# STM32_CLI,
|
63
|
-
# "--list",
|
64
|
-
# ]
|
65
|
-
# results = subprocess.run(cmd, capture_output=True, text=True).stdout.splitlines()
|
66
|
-
# results = [strip_ansi(line) for line in results]
|
67
|
-
# if not any(["Product ID : STM32 BOOTLOADER" in l for l in results]):
|
68
|
-
# log.error("No STM32 BOOTLOADER detected")
|
69
|
-
# return None
|
70
|
-
# echo = False
|
71
|
-
# for line in results:
|
72
|
-
# if line.startswith("===== DFU Interface"):
|
73
|
-
# echo = True
|
74
|
-
# if line.startswith("===== STLink"):
|
75
|
-
# echo = False
|
76
|
-
# if echo:
|
77
|
-
# print(line)
|
78
|
-
# # Try to connect - no action
|
79
|
-
# cmd = [
|
80
|
-
# STM32_CLI,
|
81
|
-
# "--connect",
|
82
|
-
# "port=USB1",
|
83
|
-
# ]
|
84
|
-
# results = subprocess.run(cmd, capture_output=True, text=True).stdout.splitlines()
|
85
|
-
# if erase:
|
86
|
-
# log.info("Erasing flash")
|
87
|
-
# cmd = [
|
88
|
-
# STM32_CLI,
|
89
|
-
# "--connect",
|
90
|
-
# "port=USB1",
|
91
|
-
# "--erase",
|
92
|
-
# "all",
|
93
|
-
# ]
|
94
|
-
# results = subprocess.run(cmd, capture_output=True, text=True).stdout.splitlines()
|
95
|
-
# results = [strip_ansi(line) for line in results]
|
96
|
-
# log.info(f"Flashing {fw_file.name} using STM32CubeProgrammer CLI")
|
97
|
-
# start_address = get_stm32_start_address(fw_file)
|
98
|
-
|
99
|
-
# log.trace(f"STM32_Programmer_CLI --connect port=USB1 --write {str(fw_file)} --go {start_address}")
|
100
|
-
# cmd = [
|
101
|
-
# STM32_CLI,
|
102
|
-
# "--connect",
|
103
|
-
# "port=USB1",
|
104
|
-
# "--write",
|
105
|
-
# str(fw_file),
|
106
|
-
# "--go",
|
107
|
-
# start_address,
|
108
|
-
# ]
|
109
|
-
# results = subprocess.run(cmd, capture_output=True, text=True).stdout.splitlines()
|
110
|
-
# log.success("Done flashing, resetting the board and wait for it to restart")
|
111
|
-
# return mcu
|
mpflash-0.9.0.dist-info/RECORD
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
mpflash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
mpflash/add_firmware.py,sha256=QXk9P1UC0xvDlWhJ3Kj-Acy2wuxxK7R0L61KKiAjk1U,3337
|
3
|
-
mpflash/ask_input.py,sha256=GGyOOlzpvhYmxyILVuNSj7hJlAvpPFXpP95erinTyCs,8717
|
4
|
-
mpflash/bootloader/__init__.py,sha256=AbZJVbubvgcV0bQtItS9PEAvvPOKWLZpgi8DX5a5f5A,1282
|
5
|
-
mpflash/bootloader/manual.py,sha256=tebIE2YBYvsWx2YmAcUcWnTnSjCqR1AwkXKVHJvnQkA,3002
|
6
|
-
mpflash/bootloader/micropython.py,sha256=of9OuCchiGoczXPi6i0NT9LZHB9FgvigtZxWWvAcb2Q,399
|
7
|
-
mpflash/bootloader/touch1200.py,sha256=D9yB1n2bSR-nyQDdQXJtCsNknSfHhI6hRziBqOv_HJI,1466
|
8
|
-
mpflash/cli_download.py,sha256=qKZzHmuHazw5fhj_EGDu4DsqYCan41BK99nk1YWELFE,3527
|
9
|
-
mpflash/cli_flash.py,sha256=IQfloZM1UK4VO4bo-8OxQkwH-RTGUFs7IWb-m4gFJJg,7136
|
10
|
-
mpflash/cli_group.py,sha256=s180-nyUVNEwA5bPlkIum4mZPEW0Udf6oBAElnrjsvQ,2236
|
11
|
-
mpflash/cli_list.py,sha256=AvYq5_Z7l0Z4rkbr23TwFNzstuZsQgopFpdcrTLwUvs,1965
|
12
|
-
mpflash/cli_main.py,sha256=nFe30fOZZoz4zl3VkLUNoGv478etVtEEN-ccBmok9Tk,1093
|
13
|
-
mpflash/common.py,sha256=ZfJR8dKKUy4VDZUgnDTILzuaem2o1Ix2haLxHQ47Z0o,5765
|
14
|
-
mpflash/config.py,sha256=7-IL4R9oHeSh0jO-hppw8pDv990nEI31dwBzZFD50eY,1007
|
15
|
-
mpflash/connected.py,sha256=vzQ6heV7w5Mnu76nR2dr9FiQ7Ja1x1Q_k0TGgdV1lT8,2955
|
16
|
-
mpflash/download.py,sha256=EL17R88QO4TaiX-80GjjlEd6CNZ0vDOcWPuwewZ0_zs,13875
|
17
|
-
mpflash/downloaded.py,sha256=n2iSVv3pS6rZmUr5ry8tOh-jSCZJdI-g_QJG8N5R1As,4815
|
18
|
-
mpflash/errors.py,sha256=6lUhVtECY3syV2bBGKzegGH4pPKXhevvhYQZd74sy6o,238
|
19
|
-
mpflash/flash.py,sha256=aC1z4Jq8b8a8O6rCTX1gdGcO5yM1vGoWlZGIWgKuHro,2059
|
20
|
-
mpflash/flash_esp.py,sha256=j-VdSAKzNQZRVVO7oM9NcRAJWPDHsUianOien8rnYE8,2252
|
21
|
-
mpflash/flash_stm32.py,sha256=JNY1bL-VNlnaQ6AhY9drKj8EgwpGwty0WAH1JD-Ecfs,584
|
22
|
-
mpflash/flash_stm32_cube.py,sha256=TnLNqmJcdwRXWj_t0W4o-NmwBjd3z94qpjuyz77oP9o,3859
|
23
|
-
mpflash/flash_stm32_dfu.py,sha256=GUJTU6bmxu4m9cK_wQKRCXPKSIf7F8BAxKMSDs59TwQ,2985
|
24
|
-
mpflash/flash_uf2.py,sha256=f9CwUaBwnmgO9q7I5-Psbd0cStxyeiu0XDcu_OHlmVc,2796
|
25
|
-
mpflash/flash_uf2_boardid.py,sha256=2s4K3QiKWK5HKFKWYsDV3hI8alfWSxEOMeurER3eZtM,408
|
26
|
-
mpflash/flash_uf2_linux.py,sha256=I6KYbLrnn6lFvzoG-LFETak86VHuMG3XKpdrjCGH2co,3945
|
27
|
-
mpflash/flash_uf2_macos.py,sha256=HqQ2HjXlTYzCC5DzjNaoCOR4QKKi5UzjqJcfZVJLaKM,998
|
28
|
-
mpflash/flash_uf2_windows.py,sha256=Pg2siQENEqLddM7KKl9PdXtP7HzBsPICxo8uVCgn57E,1050
|
29
|
-
mpflash/list.py,sha256=pSV9WJozObPSnW-oYs2JPdmh2PtCPJUNgvrozclpnU4,2874
|
30
|
-
mpflash/logger.py,sha256=BAVrSXMGZLfSDRFbtVBtvb7Rl0sTJxooCgBS5t-6bXo,1057
|
31
|
-
mpflash/mpboard_id/__init__.py,sha256=yeSWAP1YJWYWB2i8KZlBK1l8loJRcDo-xdymuCv92nU,3723
|
32
|
-
mpflash/mpboard_id/add_boards.py,sha256=JgSXbK9aKtrSWQMIMYYW9OivuWXb1LLTIAmRthi1FC8,9429
|
33
|
-
mpflash/mpboard_id/board.py,sha256=yQ8IDHQS09AelvTvmPhpmsL4oX3L7IXGqHorkxDOkoE,1114
|
34
|
-
mpflash/mpboard_id/board_id.py,sha256=G5s-kMKAD-LGUAuU5eYnq25-MGIQPyB-zJojjcGawa4,2878
|
35
|
-
mpflash/mpboard_id/board_info.zip,sha256=F6YowS96DAqjten4ySe4MXgZwPtE-saZOUfY5OQkqKk,19759
|
36
|
-
mpflash/mpboard_id/store.py,sha256=lQQgHSxcaM_ZURcfZNSUv3-ZJjUKMC_xEOOSdpzVvBU,1493
|
37
|
-
mpflash/mpremoteboard/__init__.py,sha256=j-Cex6TlihDp125gjGB01S_zE9nIq4mdRfamWjnOJoA,7549
|
38
|
-
mpflash/mpremoteboard/mpy_fw_info.py,sha256=BTupe4rZDTs3UHRqvs429XqWHCchSpwa05yACOiOt5U,4413
|
39
|
-
mpflash/mpremoteboard/runner.py,sha256=YUmo5Y0aOgMaww8CXSdNdgXD-wRKncILuMZ0OB_2qRU,4646
|
40
|
-
mpflash/uf2disk.py,sha256=dQ8_U6e3qkFOyfXZDpWAsvEBIlMr-ZzLkzTDD8SADqM,286
|
41
|
-
mpflash/vendor/basicgit.py,sha256=b6-gdK_DT0dmW3jEY9T0cjKR-TSEQOSl9U9sRcJh538,9257
|
42
|
-
mpflash/vendor/click_aliases.py,sha256=K98inhtze8td1dw312kexJS7OX_0ojlptPQ5Z0SHxJY,3065
|
43
|
-
mpflash/vendor/dfu.py,sha256=jGsiD3lbSV1Ar9qJubhoY_hy-L8FI-K55aow8vgwoYQ,5590
|
44
|
-
mpflash/vendor/pydfu.py,sha256=1ObubGsPFrQ7T9M3JRlIPNIG2xx8uYffaEe0Y6bdf_g,19937
|
45
|
-
mpflash/vendor/readme.md,sha256=ZVg7kuUYyXcWcrWkaSJ0CunwebCqu2SiS2sqDadwrT8,84
|
46
|
-
mpflash/vendor/versions.py,sha256=osv5yFyg47_BZ85k3LRrzjyPu6T4psx56rgBN3YXMyM,3885
|
47
|
-
mpflash/worklist.py,sha256=j64PVJXm8jhLzPUQt3rnJXCbT1JEczTax46mRWID9bM,5809
|
48
|
-
mpflash-0.9.0.dist-info/LICENSE,sha256=xHwgxGNkI0R2iN4KNfbPbQSzRomWyRz7bJnR1O2mln8,1057
|
49
|
-
mpflash-0.9.0.dist-info/METADATA,sha256=B5R5UZfNdyGhHZJZboAlHOOmxzwHW4PmTbzmI9Xh0TY,15275
|
50
|
-
mpflash-0.9.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
51
|
-
mpflash-0.9.0.dist-info/entry_points.txt,sha256=Jk_visOhYOsZIcSP2Ms9hKqfKy1iorR-6dYltSoWCpY,52
|
52
|
-
mpflash-0.9.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|