micropython-stubber 1.20.2__py3-none-any.whl → 1.20.5__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.
- {micropython_stubber-1.20.2.dist-info → micropython_stubber-1.20.5.dist-info}/METADATA +5 -4
- {micropython_stubber-1.20.2.dist-info → micropython_stubber-1.20.5.dist-info}/RECORD +51 -46
- {micropython_stubber-1.20.2.dist-info → micropython_stubber-1.20.5.dist-info}/WHEEL +1 -1
- mpflash/mpflash/ask_input.py +24 -14
- mpflash/mpflash/bootloader/__init__.py +36 -0
- mpflash/mpflash/bootloader/manual.py +102 -0
- mpflash/mpflash/bootloader/micropython.py +10 -0
- mpflash/mpflash/bootloader/touch1200.py +45 -0
- mpflash/mpflash/cli_download.py +1 -0
- mpflash/mpflash/cli_flash.py +16 -9
- mpflash/mpflash/cli_group.py +13 -6
- mpflash/mpflash/cli_list.py +6 -2
- mpflash/mpflash/cli_main.py +5 -2
- mpflash/mpflash/common.py +15 -2
- mpflash/mpflash/config.py +27 -1
- mpflash/mpflash/download.py +82 -16
- mpflash/mpflash/downloaded.py +28 -7
- mpflash/mpflash/errors.py +5 -1
- mpflash/mpflash/flash.py +10 -27
- mpflash/mpflash/flash_uf2.py +4 -6
- mpflash/mpflash/flash_uf2_boardid.py +2 -1
- mpflash/mpflash/flash_uf2_macos.py +13 -57
- mpflash/mpflash/flash_uf2_windows.py +4 -4
- mpflash/mpflash/mpboard_id/__init__.py +4 -0
- mpflash/mpflash/mpboard_id/board_id.py +19 -3
- mpflash/mpflash/mpboard_id/store.py +2 -1
- mpflash/mpflash/vendor/click_aliases.py +91 -0
- mpflash/poetry.lock +102 -137
- mpflash/pyproject.toml +1 -1
- stubber/__init__.py +1 -1
- stubber/board/createstubs.py +12 -4
- stubber/board/createstubs_db.py +4 -5
- stubber/board/createstubs_db_min.py +1 -1
- stubber/board/createstubs_db_mpy.mpy +0 -0
- stubber/board/createstubs_mem.py +4 -5
- stubber/board/createstubs_mem_min.py +1 -1
- stubber/board/createstubs_mem_mpy.mpy +0 -0
- stubber/board/createstubs_min.py +2 -2
- stubber/board/createstubs_mpy.mpy +0 -0
- stubber/board/modulelist.txt +9 -0
- stubber/bulk/mcu_stubber.py +0 -1
- stubber/codemod/_partials/__init__.py +0 -2
- stubber/publish/candidates.py +7 -28
- stubber/publish/enums.py +0 -6
- stubber/publish/package.py +15 -46
- stubber/publish/publish.py +1 -2
- stubber/rst/lookup.py +7 -7
- stubber/rst/reader.py +26 -27
- stubber/update_module_list.py +2 -26
- {micropython_stubber-1.20.2.dist-info → micropython_stubber-1.20.5.dist-info}/LICENSE +0 -0
- {micropython_stubber-1.20.2.dist-info → micropython_stubber-1.20.5.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: micropython-stubber
|
3
|
-
Version: 1.20.
|
3
|
+
Version: 1.20.5
|
4
4
|
Summary: Tooling to create and maintain stubs for MicroPython
|
5
5
|
Home-page: https://github.com/Josverl/micropython-stubber#readme
|
6
6
|
License: MIT
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.9
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
16
17
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
17
18
|
Classifier: Programming Language :: Python :: Implementation :: MicroPython
|
18
19
|
Classifier: Topic :: Software Development :: Build Tools
|
@@ -25,8 +26,8 @@ Requires-Dist: executing (>=2.0.1,<3.0.0)
|
|
25
26
|
Requires-Dist: importlib-metadata (>=1.0,<2.0) ; python_version < "3.8"
|
26
27
|
Requires-Dist: libcst (>=1.1.0,<2.0.0)
|
27
28
|
Requires-Dist: loguru (>=0.6,<0.8)
|
28
|
-
Requires-Dist: mpflash (>=0.
|
29
|
-
Requires-Dist: mpremote (>=1.
|
29
|
+
Requires-Dist: mpflash (>=0.8.6,<0.9.0)
|
30
|
+
Requires-Dist: mpremote (>=1.23.0,<2.0.0)
|
30
31
|
Requires-Dist: mypy (==1.9.0)
|
31
32
|
Requires-Dist: mypy-gitlab-code-quality (>=1.1.0,<2.0.0)
|
32
33
|
Requires-Dist: packaging (>=21.3,<24.0)
|
@@ -38,7 +39,7 @@ Requires-Dist: pyserial (>=3.5,<4.0)
|
|
38
39
|
Requires-Dist: pysondb-v2 (>=2.1.0,<3.0.0)
|
39
40
|
Requires-Dist: python-minifier (>=2.7.0,<3.0.0) ; python_version < "3.12"
|
40
41
|
Requires-Dist: requests (>=2.28.0,<3.0.0)
|
41
|
-
Requires-Dist: rich-click (>=1.
|
42
|
+
Requires-Dist: rich-click (>=1.8.3,<2.0.0)
|
42
43
|
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
43
44
|
Requires-Dist: tenacity (>=8.2.2,<9.0.0)
|
44
45
|
Requires-Dist: tomli (>=2.0.1,<3.0.0) ; python_version < "3.11"
|
@@ -1,74 +1,79 @@
|
|
1
1
|
mpflash/libusb_flash.ipynb,sha256=7RGtGg1mPPMWrfJOobOfYYwAAhsFpykpTJtfNwevY9o,6631
|
2
2
|
mpflash/mpflash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
mpflash/mpflash/add_firmware.py,sha256=u_g9mID557fptLEJ1Nld9n27V1R1og8uEkadm0O3YTw,3435
|
4
|
-
mpflash/mpflash/ask_input.py,sha256=
|
5
|
-
mpflash/mpflash/
|
6
|
-
mpflash/mpflash/
|
7
|
-
mpflash/mpflash/
|
8
|
-
mpflash/mpflash/
|
9
|
-
mpflash/mpflash/
|
10
|
-
mpflash/mpflash/
|
11
|
-
mpflash/mpflash/
|
4
|
+
mpflash/mpflash/ask_input.py,sha256=ipkRIMb_kl4j9o8f_LtpX8jL8dZnTeGiTvE87fA8LBw,8953
|
5
|
+
mpflash/mpflash/bootloader/__init__.py,sha256=-izynXMMvv-6PLFf3wjvDj_E4dCwdTrKqhrcYYfsGQc,1308
|
6
|
+
mpflash/mpflash/bootloader/manual.py,sha256=4FNQg0JpyRmfISrDDfZ5j9iQBK-Jyrnz8nLqKf1ZEuc,3104
|
7
|
+
mpflash/mpflash/bootloader/micropython.py,sha256=QQJlXUnyVA4cRS2O4GbrQhpKhFFvxtQC5G6WQcSCbp8,409
|
8
|
+
mpflash/mpflash/bootloader/touch1200.py,sha256=AJ4GPLtvCR5LDDe5Uu_5Rg8OI2JHxEB-blzCcO5x9Tc,1511
|
9
|
+
mpflash/mpflash/cli_download.py,sha256=zufBC0xNPZCq28mG_fepupziizbm86wTpfNEszkei9Q,3656
|
10
|
+
mpflash/mpflash/cli_flash.py,sha256=KOn1T9lThFs5pkhWZY_QCEdyB66xk6eJjS3n995hwPk,7354
|
11
|
+
mpflash/mpflash/cli_group.py,sha256=MsySUNipL8xkQAu4yuQPkFLoZNtQ5RPWtX3diHHrPdE,2334
|
12
|
+
mpflash/mpflash/cli_list.py,sha256=_3XzR8RyjlojbOqGKm_TLwcQojCb4OgCYi7mcjjoflI,2046
|
13
|
+
mpflash/mpflash/cli_main.py,sha256=MHhU1cAYEhwOpHG2p3OEfwpSrn9-J2foGVZqby_HO8k,1134
|
14
|
+
mpflash/mpflash/common.py,sha256=gkj71hGibMEcmThJ5LSrAV5vp6SpJAJNLHWO4GjB040,5929
|
15
|
+
mpflash/mpflash/config.py,sha256=VqaS6dT1UFigVmYRtVVBTi7cNQ6UKReaN4VUj3D5Ip4,1166
|
12
16
|
mpflash/mpflash/connected.py,sha256=CBG_DJ33OPWAPbX-ICQpL1LcFOhNYpLUSB0Q5v7gi9s,3029
|
13
|
-
mpflash/mpflash/download.py,sha256=
|
14
|
-
mpflash/mpflash/downloaded.py,sha256=
|
15
|
-
mpflash/mpflash/errors.py,sha256=
|
16
|
-
mpflash/mpflash/flash.py,sha256=
|
17
|
+
mpflash/mpflash/download.py,sha256=VFV0XP8mTnBXOeo_JbyHBjIQJ0PUUiXu8hoO0lAxid8,14235
|
18
|
+
mpflash/mpflash/downloaded.py,sha256=cHq_fWUuZ0sXOCs5d3NIf3etUDsAXtnwnO7tkRqJE9A,4870
|
19
|
+
mpflash/mpflash/errors.py,sha256=IAidY3qkZsXy6Pm1rdmVFmGyg81ywHhse3itaPctA2w,247
|
20
|
+
mpflash/mpflash/flash.py,sha256=U17kp3ftG-noqhgA1HSYxK945sLhIR-Rh3xZgckT4H8,1927
|
17
21
|
mpflash/mpflash/flash_esp.py,sha256=dEc_B7-f1BMUGBMrwIm83ulcCqaS5MlrPAp3FCNgNfk,2311
|
18
22
|
mpflash/mpflash/flash_stm32.py,sha256=d4BoQl3a9Tchnvn2ZTuq2MpYBB4MTaRukwtEncI95k0,823
|
19
23
|
mpflash/mpflash/flash_stm32_cube.py,sha256=w7aGWjReeWUKl0Q3ZjXH8BRqNO1Tk9AO7gtRNUg1c9Y,3970
|
20
24
|
mpflash/mpflash/flash_stm32_dfu.py,sha256=G70EZodWb-aRi507Jxbys-VEwbBGU1oZacow3_nq-d4,2972
|
21
|
-
mpflash/mpflash/flash_uf2.py,sha256=
|
22
|
-
mpflash/mpflash/flash_uf2_boardid.py,sha256=
|
25
|
+
mpflash/mpflash/flash_uf2.py,sha256=2IKgEOnlsB9bILJWHILMKbGo9b39NKazBWp1-T_eKKs,2463
|
26
|
+
mpflash/mpflash/flash_uf2_boardid.py,sha256=U5wGM8VA3wEpUxQCMtuXpMZZomdVH8J_Zd5_GekUMuU,423
|
23
27
|
mpflash/mpflash/flash_uf2_linux.py,sha256=Oy9V4g7JSuks2hHFeO_OHdBKSGktbqZOtsivuxfl-xg,4055
|
24
|
-
mpflash/mpflash/flash_uf2_macos.py,sha256=
|
25
|
-
mpflash/mpflash/flash_uf2_windows.py,sha256=
|
28
|
+
mpflash/mpflash/flash_uf2_macos.py,sha256=fGz-LGoYKX772sqJb4pAvcMw-2Orlc83ecOIk0-1GYc,987
|
29
|
+
mpflash/mpflash/flash_uf2_windows.py,sha256=a-iIGPkwIoUXA7atCz0_uZp-kipSL24P-IE5ka1B1Mk,1025
|
26
30
|
mpflash/mpflash/list.py,sha256=0TawTkwhjKPPj7nTHoDn8nQ54WOkGRurP1BJVeg956g,2963
|
27
31
|
mpflash/mpflash/logger.py,sha256=dI_H_a7EOdQJyvoeRHQuYeZuTKYVUS3DUPTLhE9rkdM,1098
|
28
|
-
mpflash/mpflash/mpboard_id/__init__.py,sha256=
|
32
|
+
mpflash/mpflash/mpboard_id/__init__.py,sha256=9IS8E-4eimd_bclgGgWE1wGEx0IRzKnu5Jzl8pQih_g,3816
|
29
33
|
mpflash/mpflash/mpboard_id/add_boards.py,sha256=OWclyLWf9L-pCVmZ22b-xQYfvi3yQVsJHmGMgMzWxoU,9684
|
30
34
|
mpflash/mpflash/mpboard_id/board.py,sha256=CwtBux8y7GDUe7CADVxL8YefGRl9Fg8OAJBUhgaBYCI,1151
|
31
|
-
mpflash/mpflash/mpboard_id/board_id.py,sha256=
|
35
|
+
mpflash/mpflash/mpboard_id/board_id.py,sha256=uVBbqksE1S4RPO1kNAVk4-xJWj6vwAX6QeuE0ekkZEc,2964
|
32
36
|
mpflash/mpflash/mpboard_id/board_info.zip,sha256=F6YowS96DAqjten4ySe4MXgZwPtE-saZOUfY5OQkqKk,19759
|
33
|
-
mpflash/mpflash/mpboard_id/store.py,sha256=
|
37
|
+
mpflash/mpflash/mpboard_id/store.py,sha256=4lLEff6a30lIOb4fOYYzanE4G4qfgikfprmpV1eUf2U,1536
|
34
38
|
mpflash/mpflash/mpremoteboard/__init__.py,sha256=fJ_N1F6R3CfP9F7pmocb5l8yRvzmSmtHi4u_uTQHR1w,7683
|
35
39
|
mpflash/mpflash/mpremoteboard/mpy_fw_info.py,sha256=6AQbN3jtQgllqWQYl4e-63KeEtV08EXk8_JnM6XBkvo,4554
|
36
40
|
mpflash/mpflash/mpremoteboard/runner.py,sha256=-PgzAeBGbyXaAUlwyiw4mcINsP2U1XRRjP1_QdBrxpg,4786
|
37
41
|
mpflash/mpflash/uf2disk.py,sha256=4_P2l-kedM7VSliA2u706LQLxvu3xWSod1-lj-xjZis,298
|
38
42
|
mpflash/mpflash/vendor/basicgit.py,sha256=sflgCv7apLbV2w8F6gmhc-3kuqDnnS4tdGol6JT2uTM,9545
|
43
|
+
mpflash/mpflash/vendor/click_aliases.py,sha256=c853EHSlkE2DvFqeFvFpwXKuJj3_jsXDP7iotVOKaAw,3156
|
39
44
|
mpflash/mpflash/vendor/dfu.py,sha256=ZXMcE6aH4-43Wh4tbQT4U-q-BU3RUiL3JAxmP_QAK2s,5755
|
40
45
|
mpflash/mpflash/vendor/pydfu.py,sha256=_MdBRo1EeNeKDqFPSTB5tNL1jGSBJgsVeVjE5e7Pb8s,20542
|
41
46
|
mpflash/mpflash/vendor/readme.md,sha256=iIIZxuLUIGHQ0KODzYVtMezsztvyxCXcNJp_AzwTIPk,86
|
42
47
|
mpflash/mpflash/vendor/versions.py,sha256=thk1a5wEEhXIQoL0zZ7oooeFyQeSoI00CIUbZF0b3rI,3783
|
43
48
|
mpflash/mpflash/worklist.py,sha256=MKHDynttVP3lsHSfb7DEqeQ2mRV0da96lD4lIcS_zQY,5962
|
44
|
-
mpflash/poetry.lock,sha256=
|
45
|
-
mpflash/pyproject.toml,sha256=
|
49
|
+
mpflash/poetry.lock,sha256=nazCqSd9wbD-8YFG3UMOyO8JfV1sQlchNsh-O0H7yqE,119577
|
50
|
+
mpflash/pyproject.toml,sha256=phWxCni9TdlEMsN7ArG-dRDhpwbGL3kXULr1K6TDAro,1651
|
46
51
|
mpflash/README.md,sha256=1SVCxNG88akXYv1BOeLvqwfI9phy8PdkfJ2sqxL_nkE,13680
|
47
52
|
mpflash/stm32_udev_rules.md,sha256=uxvC8FvU7K0R1QQUqCIvVfW9yfWYlIHhIVtirAjQVHE,2684
|
48
|
-
stubber/__init__.py,sha256=
|
53
|
+
stubber/__init__.py,sha256=mu1ef5O9zEsBrHCk1VLUFfWs2r9h-HAGeLMHCbrgQuo,49
|
49
54
|
stubber/basicgit.py,sha256=sflgCv7apLbV2w8F6gmhc-3kuqDnnS4tdGol6JT2uTM,9545
|
50
55
|
stubber/board/board_info.csv,sha256=K2VSmfR013fN-oJWkQUmiQ19w09dVwJHDquPy6QmMhY,8627
|
51
56
|
stubber/board/boot.py,sha256=XjWlKErU5nI1HJSugXIP_3hlwgRQboE6sJrpcbSygnk,1120
|
52
|
-
stubber/board/createstubs.py,sha256=
|
53
|
-
stubber/board/createstubs_db.py,sha256=
|
54
|
-
stubber/board/createstubs_db_min.py,sha256=
|
55
|
-
stubber/board/createstubs_db_mpy.mpy,sha256=
|
57
|
+
stubber/board/createstubs.py,sha256=_hy_bxiv7FPTbKD66Gw8WCXQAXIWY0Nf2_18I9CIVYM,32922
|
58
|
+
stubber/board/createstubs_db.py,sha256=c4UtzBY7XRD5lDL9JqcXJWg4qb7XYrIloPBWEpTJKis,30383
|
59
|
+
stubber/board/createstubs_db_min.py,sha256=c9zdIoc94RfgiDsb-L2Z_PV83EbtzaR_kC_jYQ8ePGQ,11473
|
60
|
+
stubber/board/createstubs_db_mpy.mpy,sha256=QnV60Zxf_zjpJIZFmTmfGDERQU5GGS_AZ3jBQuVIIKk,9536
|
56
61
|
stubber/board/createstubs_lvgl.py,sha256=CTe7eq1ACRK_JJxavaqDD8znn29nSWJiHHTZ_ps6EhM,27217
|
57
62
|
stubber/board/createstubs_lvgl_min.py,sha256=jLkWYmeboI2A8feMC7pT7cYWttLejQTuX7WAEZCylhw,27207
|
58
63
|
stubber/board/createstubs_lvgl_mpy.mpy,sha256=ex-nlq2V5e8anQBJvRWEEc-FzU7nlwg5NSrZ8vOadIA,9267
|
59
|
-
stubber/board/createstubs_mem.py,sha256=
|
60
|
-
stubber/board/createstubs_mem_min.py,sha256=
|
61
|
-
stubber/board/createstubs_mem_mpy.mpy,sha256=
|
62
|
-
stubber/board/createstubs_min.py,sha256=
|
63
|
-
stubber/board/createstubs_mpy.mpy,sha256=
|
64
|
+
stubber/board/createstubs_mem.py,sha256=N-JRZ9mGi0rhPCY-oxrjAXSajFXXL_GxYko1v3K40lQ,28719
|
65
|
+
stubber/board/createstubs_mem_min.py,sha256=KL_ro2hkhn_5gcioaXWdoBRHxeWwzdc9fxOlIRksctg,11019
|
66
|
+
stubber/board/createstubs_mem_mpy.mpy,sha256=VHfdVvClxKd5SEbGNq4PDIJGa-EavxYih7IhODfIpOk,9118
|
67
|
+
stubber/board/createstubs_min.py,sha256=saSoVmNEariIiA4CUCjylg-SI1L5IGGb0vPepXqR2Nc,13699
|
68
|
+
stubber/board/createstubs_mpy.mpy,sha256=W3DnSocykRO0CanCMjwbR1nHVgMtDqsNJ3BK1ElFpL8,12388
|
64
69
|
stubber/board/fw_info.py,sha256=6AQbN3jtQgllqWQYl4e-63KeEtV08EXk8_JnM6XBkvo,4554
|
65
70
|
stubber/board/info.py,sha256=b7SOPZHVsVhaayKCwVkFZlYu0BW-UFI7LuG1Eop9480,5629
|
66
71
|
stubber/board/main.py,sha256=f6V3tdt6sPZVLuwemT-NLuK9GySfW2c2J6PJMOOWQQw,413
|
67
|
-
stubber/board/modulelist.txt,sha256=
|
72
|
+
stubber/board/modulelist.txt,sha256=f5WxcG8OBjwhZFDtvxllGDp-6bmH9M5A9knc_6YE7xI,2900
|
68
73
|
stubber/board/pyrightconfig.json,sha256=6oHS4aDOfwKBAFeUPsCGJzEXpUgBZsPaF0M4P-N26D4,1376
|
69
|
-
stubber/bulk/mcu_stubber.py,sha256=
|
74
|
+
stubber/bulk/mcu_stubber.py,sha256=R5twR8f-44O1PIXTWwyAu96sK-2Y8o4zel9FtjuCxVI,16347
|
70
75
|
stubber/codemod/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
71
|
-
stubber/codemod/_partials/__init__.py,sha256=
|
76
|
+
stubber/codemod/_partials/__init__.py,sha256=LVJ-QkEKlc5IqOZ-bYrNXWRd9J5eolsTR_kRTyS9p6w,1430
|
72
77
|
stubber/codemod/_partials/db_main.py,sha256=ZKzxV0LOEyHu1zcsBr4xRf9i1a4Jyh808sdbmcmkrWE,4003
|
73
78
|
stubber/codemod/_partials/lvgl_main.py,sha256=9BAJP6P1R2SQVbNya2ujes35eATa56D_Ri2_PjeRBq0,1964
|
74
79
|
stubber/codemod/_partials/modules_reader.py,sha256=dJj-H0ncUWVtilSyohQ-dyiUZOjQObds_-llwy_LkYU,2046
|
@@ -111,23 +116,23 @@ stubber/get_lobo.py,sha256=jyysWbeEwNuZZtkTudJP1QbyVvh-TwFom5cE7iCi9lE,1776
|
|
111
116
|
stubber/minify.py,sha256=QC5TbyNH7xJRauo8IMJgMnKGocqdjEXGb6YQgBvMTTA,15026
|
112
117
|
stubber/publish/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
113
118
|
stubber/publish/bump.py,sha256=qSb1DpaIxgyoH3YcPU1XKyDKgqkomxSm0WWf1sAVh0Y,3262
|
114
|
-
stubber/publish/candidates.py,sha256=
|
119
|
+
stubber/publish/candidates.py,sha256=bhuLATHm19pfIdZ91tqEas8ADE0dU_RABVWxGYKGCxw,10672
|
115
120
|
stubber/publish/database.py,sha256=CLy5oiLasA-YzTTXi9d01qLAyk7NpugCDUOa5R9Ac2g,623
|
116
121
|
stubber/publish/defaults.py,sha256=-Ey04lflKVnT0xO8r8AGliQSdtek9Dm_LDjpwvAnAVk,1636
|
117
|
-
stubber/publish/enums.py,sha256=
|
122
|
+
stubber/publish/enums.py,sha256=Z_x798ArtxyjQIRRY43GDGNB9BD4uPfpeGsXYdj31w0,780
|
118
123
|
stubber/publish/helpers.py,sha256=909umfKUHBMBoVnAanop1vKx8loCrWntlfiiG6z89lY,716
|
119
124
|
stubber/publish/merge_docstubs.py,sha256=bo35onpFgcmcqExKSbpbZKprVs2D_feSy0awNZ09a7A,5319
|
120
125
|
stubber/publish/missing_class_methods.py,sha256=i_tPnGpEpmu53N3exPCrwR1HprxxBpgHgLAZSwJCb4o,1823
|
121
|
-
stubber/publish/package.py,sha256=
|
126
|
+
stubber/publish/package.py,sha256=yKIYKzbSXlh71_1QpTQ_8fXAAYkteqyXmAtWwfNL8bM,5274
|
122
127
|
stubber/publish/pathnames.py,sha256=O-9519j6FTIlmTFyDWqCxdG3k8MWhDI89rClBrgUONQ,1811
|
123
|
-
stubber/publish/publish.py,sha256=
|
128
|
+
stubber/publish/publish.py,sha256=812OS3jVJcWs09DkMJxqoKiYXUg9xJSejFyXlhd-mTI,3953
|
124
129
|
stubber/publish/pypi.py,sha256=Mu1F7Xx4e0NPWK1_Erck6QGEfdY8w67EBeWFi6JiAzk,1240
|
125
130
|
stubber/publish/stubpackage.py,sha256=45yquQiBlJhacYEOmAHP6BgDfl1EtUWjdDLx06rCWgE,44731
|
126
131
|
stubber/rst/__init__.py,sha256=5VcbDCotIICa2xnJDs_gw2sFXpjjGOZZbwCrNKXy1OE,293
|
127
132
|
stubber/rst/classsort.py,sha256=YCmF4QEYXqZ1Yu2FZb1iPQBrVkq-mrZaBaRcSUlC7ZE,2655
|
128
|
-
stubber/rst/lookup.py,sha256=
|
133
|
+
stubber/rst/lookup.py,sha256=RrxEC6otlQDQKjmc0s3rEvZzB48P0JO0c41jfuuuBiU,20186
|
129
134
|
stubber/rst/output_dict.py,sha256=cpBXRtUD-uh0EgjWIBiRrMLBmIAEXjoJFSOAg-qJQiU,14755
|
130
|
-
stubber/rst/reader.py,sha256
|
135
|
+
stubber/rst/reader.py,sha256=-upWvHL1CsEVdyDi0n3B_FSW6VRP5TWRM4Er1nP55HU,33700
|
131
136
|
stubber/rst/report_return.py,sha256=WZJSbgjsjxFeCeY-vLms56gv_x3TubaGXGQ8--d8RqI,2814
|
132
137
|
stubber/rst/rst_utils.py,sha256=q4MCmhCeI0fnx6KNVdgz1nE4_hAK4T-F7oAMBnmwZ4w,17817
|
133
138
|
stubber/stubber.py,sha256=41zvyaDQt25Y8IRsMvcQR68LxDZrTz_iVJpEQ5D3VWc,1634
|
@@ -136,7 +141,7 @@ stubber/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
136
141
|
stubber/tools/manifestfile.py,sha256=D5Plwj5LRDe6zq5m-ETKfum0vFAykka70WXSEHl83a4,23721
|
137
142
|
stubber/tools/readme.md,sha256=kH7dA2Rs4BLCXa2ILoTDIj3sJHcGYtDPntyxVIOXvtI,199
|
138
143
|
stubber/update_fallback.py,sha256=NUxp1sN1-8BLPd0rpExTcYBppUXYWPP8dOcjNeLY2Zo,4921
|
139
|
-
stubber/update_module_list.py,sha256=
|
144
|
+
stubber/update_module_list.py,sha256=P6V6Z-PgiNdL6UghtSRNLoUiHxEpp_s7ESgF6A0MyjM,4009
|
140
145
|
stubber/utils/__init__.py,sha256=nV9FsOZsJ_hXsyUv4j0Qqp-PKycxyIktU9IoLs4kQmQ,225
|
141
146
|
stubber/utils/config.py,sha256=Jg4eHhgKim4uP4IqZRWykRNiX1r-SXC2xSrbsVprGAA,4859
|
142
147
|
stubber/utils/makeversionhdr.py,sha256=dO8sWLAY_ifT1IJJ1-JJ2z_thvfqJnK3c1_bHF_UI28,1953
|
@@ -147,8 +152,8 @@ stubber/utils/stubmaker.py,sha256=qld_Wfm9f4EuzedXlX1Ky0i0BJdR75oOOTha13_ekz0,52
|
|
147
152
|
stubber/utils/typed_config_toml.py,sha256=ikifCIZGNhS_uqsfp6IwIpxdtZqbLtywprjWG_Q0y8o,2629
|
148
153
|
stubber/utils/versions.py,sha256=4cGr-4Nbgqzoi-iJC08b_LFZH-CiyTNODlT-ihv4ZE0,3901
|
149
154
|
stubber/variants.py,sha256=-o4TgotbKaCcYBdXkutPaBSR1JdxWmOAiuNT1UlahYc,3784
|
150
|
-
micropython_stubber-1.20.
|
151
|
-
micropython_stubber-1.20.
|
152
|
-
micropython_stubber-1.20.
|
153
|
-
micropython_stubber-1.20.
|
154
|
-
micropython_stubber-1.20.
|
155
|
+
micropython_stubber-1.20.5.dist-info/entry_points.txt,sha256=NQi_M36fgq5k6giSuASas3LrpF6CVdkzfvJC0ja73_g,55
|
156
|
+
micropython_stubber-1.20.5.dist-info/LICENSE,sha256=Fx9qrL45ayRXgH6QzttboqZEjKXms0w1t_b_nkOqYCU,1572
|
157
|
+
micropython_stubber-1.20.5.dist-info/METADATA,sha256=HwORjeijeI8TVYN7UV0nnE3ZsPfcBhsGPv1soNzvPzk,19158
|
158
|
+
micropython_stubber-1.20.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
159
|
+
micropython_stubber-1.20.5.dist-info/RECORD,,
|
mpflash/mpflash/ask_input.py
CHANGED
@@ -11,7 +11,8 @@ from loguru import logger as log
|
|
11
11
|
|
12
12
|
from .common import DownloadParams, FlashParams, ParamType
|
13
13
|
from .config import config
|
14
|
-
from .mpboard_id import get_known_boards_for_port, get_known_ports,
|
14
|
+
from .mpboard_id import (get_known_boards_for_port, get_known_ports,
|
15
|
+
known_stored_boards)
|
15
16
|
from .mpremoteboard import MPRemoteBoard
|
16
17
|
from .vendor.versions import micropython_versions
|
17
18
|
|
@@ -28,6 +29,11 @@ def ask_missing_params(
|
|
28
29
|
Returns:
|
29
30
|
ParamType: The updated parameters.
|
30
31
|
"""
|
32
|
+
if not config.interactive:
|
33
|
+
# no interactivity allowed
|
34
|
+
log.info("Interactive mode disabled. Skipping ask for user input.")
|
35
|
+
return params
|
36
|
+
|
31
37
|
import inquirer
|
32
38
|
|
33
39
|
log.trace(f"ask_missing_params: {params}")
|
@@ -36,9 +42,6 @@ def ask_missing_params(
|
|
36
42
|
# if action download, multiple input
|
37
43
|
multi_select = isinstance(params, DownloadParams)
|
38
44
|
action = "download" if isinstance(params, DownloadParams) else "flash"
|
39
|
-
if not config.interactive:
|
40
|
-
# no interactivity allowed
|
41
|
-
return params
|
42
45
|
|
43
46
|
questions = []
|
44
47
|
answers: dict[str, Union[str, List]] = {"action": action}
|
@@ -67,8 +70,14 @@ def ask_missing_params(
|
|
67
70
|
answers["serial"] = [answers["serial"]]
|
68
71
|
params.serial = [s.split()[0] for s in answers["serial"]] # split to remove the description
|
69
72
|
if "port" in answers:
|
70
|
-
params.ports = [p for p in params.ports if p != "?"] # remove the "?" if present
|
71
|
-
|
73
|
+
# params.ports = [p for p in params.ports if p != "?"] # remove the "?" if present
|
74
|
+
if isinstance(answers["port"], str):
|
75
|
+
params.ports.append(answers["port"])
|
76
|
+
elif isinstance(answers["port"], list): # type: ignore
|
77
|
+
params.ports.extend(answers["port"])
|
78
|
+
else:
|
79
|
+
raise ValueError(f"Unexpected type for answers['port']: {type(answers['port'])}")
|
80
|
+
|
72
81
|
if "boards" in answers:
|
73
82
|
params.boards = [b for b in params.boards if b != "?"] # remove the "?" if present
|
74
83
|
params.boards.extend(answers["boards"] if isinstance(answers["boards"], list) else [answers["boards"]])
|
@@ -152,10 +161,18 @@ def ask_port_board(*, multi_select: bool, action: str):
|
|
152
161
|
"Which {port} board firmware do you want to {action} " + "to {serial} ?" if action == "flash" else "?"
|
153
162
|
),
|
154
163
|
choices=filter_matching_boards,
|
155
|
-
validate=
|
164
|
+
validate=at_least_one_validation, # type: ignore
|
165
|
+
# validate=lambda _, x: True if x else "Please select at least one board", # type: ignore
|
156
166
|
),
|
157
167
|
]
|
158
168
|
|
169
|
+
def at_least_one_validation(answers, current) -> bool:
|
170
|
+
import inquirer.errors
|
171
|
+
if not current:
|
172
|
+
raise inquirer.errors.ValidationError("", reason="Please select at least one item.")
|
173
|
+
if isinstance(current, list) and not any(current):
|
174
|
+
raise inquirer.errors.ValidationError("", reason="Please select at least one item.")
|
175
|
+
return True
|
159
176
|
|
160
177
|
def ask_mp_version(multi_select: bool, action: str):
|
161
178
|
"""
|
@@ -181,13 +198,6 @@ def ask_mp_version(multi_select: bool, action: str):
|
|
181
198
|
# todo: this may be a little slow
|
182
199
|
mp_versions = [v for v in mp_versions if "preview" in v or get_known_boards_for_port("stm32", [v])]
|
183
200
|
|
184
|
-
def at_least_one_validation(answers, current) -> bool:
|
185
|
-
if not current:
|
186
|
-
raise inquirer.errors.ValidationError("", reason="Please select at least one version")
|
187
|
-
if isinstance(current, list) and not any(current):
|
188
|
-
raise inquirer.errors.ValidationError("", reason="Please select at least one version")
|
189
|
-
return True
|
190
|
-
|
191
201
|
message = "Which version(s) do you want to {action} " + ("to {serial} ?" if action == "flash" else "?")
|
192
202
|
q = input_ux(
|
193
203
|
# inquirer.List(
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import time
|
2
|
+
|
3
|
+
from mpflash.common import BootloaderMethod
|
4
|
+
from mpflash.errors import MPFlashError
|
5
|
+
from mpflash.logger import log
|
6
|
+
from mpflash.mpremoteboard import MPRemoteBoard
|
7
|
+
|
8
|
+
from .manual import enter_bootloader_manual
|
9
|
+
from .micropython import enter_bootloader_mpy
|
10
|
+
from .touch1200 import enter_bootloader_cdc_1200bps
|
11
|
+
|
12
|
+
|
13
|
+
def enter_bootloader(
|
14
|
+
mcu: MPRemoteBoard,
|
15
|
+
method: BootloaderMethod = BootloaderMethod.MPY,
|
16
|
+
timeout: int = 10,
|
17
|
+
wait_after: int = 2,
|
18
|
+
):
|
19
|
+
"""Enter the bootloader mode for the board"""
|
20
|
+
if method == BootloaderMethod.NONE:
|
21
|
+
# NO bootloader requested, so must be OK to flash
|
22
|
+
return True
|
23
|
+
|
24
|
+
log.info(f"Entering bootloader on {mcu.board} on {mcu.serialport} using method: {method.value}")
|
25
|
+
if method == BootloaderMethod.MPY:
|
26
|
+
result = enter_bootloader_mpy(mcu, timeout=timeout)
|
27
|
+
elif method == BootloaderMethod.MANUAL:
|
28
|
+
result = enter_bootloader_manual(mcu, timeout=timeout)
|
29
|
+
elif method == BootloaderMethod.TOUCH_1200:
|
30
|
+
result = enter_bootloader_cdc_1200bps(mcu, timeout=timeout)
|
31
|
+
else:
|
32
|
+
raise MPFlashError(f"Unknown bootloader method {method}")
|
33
|
+
if result:
|
34
|
+
time.sleep(wait_after)
|
35
|
+
log.error(f"Failed to enter bootloader on {mcu.serialport}")
|
36
|
+
return result
|
@@ -0,0 +1,102 @@
|
|
1
|
+
"""Manual bootloader mode entry for various MCUs."""
|
2
|
+
|
3
|
+
from click.exceptions import Abort
|
4
|
+
from rich.console import Console
|
5
|
+
from rich.highlighter import RegexHighlighter
|
6
|
+
from rich.panel import Panel
|
7
|
+
from rich.prompt import Confirm
|
8
|
+
from rich.theme import Theme
|
9
|
+
|
10
|
+
# from mpflash.logger import console, log
|
11
|
+
from mpflash.mpremoteboard import MPRemoteBoard
|
12
|
+
|
13
|
+
|
14
|
+
class MCUHighlighter(RegexHighlighter):
|
15
|
+
"""Apply style to anything that looks like an email."""
|
16
|
+
|
17
|
+
base_style = "mcu."
|
18
|
+
highlights = [
|
19
|
+
r"(?P<bold>Method[\s\d\:]*)",
|
20
|
+
r"(?P<bold> \d.)", # numbered items
|
21
|
+
r"(?P<bold> - )", # bullets
|
22
|
+
r"(?P<pad>GPIO[\d]*)",
|
23
|
+
r"(?P<pad>GPI[\d]*)",
|
24
|
+
r"(?P<pad>IO[\d]*)",
|
25
|
+
r"(?P<pad>RUN)",
|
26
|
+
r"(?P<pad>GND)",
|
27
|
+
r"(?P<pad>VCC)",
|
28
|
+
r"(?P<pad>3.3V)",
|
29
|
+
r"(?P<pad>5V)",
|
30
|
+
# buttons
|
31
|
+
r"(?P<button>BOOTSEL)",
|
32
|
+
r"(?P<button>RESET)",
|
33
|
+
r"(?P<button>reset)",
|
34
|
+
# other
|
35
|
+
r"(?P<cable>USB)",
|
36
|
+
# r"(?P<mcu>SAMD[\d]*)",
|
37
|
+
# r"(?P<mcu>ESP[\d]*)",
|
38
|
+
# r"(?P<mcu>rp2)",
|
39
|
+
# r"(?P<mcu>rp2040)",
|
40
|
+
]
|
41
|
+
|
42
|
+
|
43
|
+
# https://rich.readthedocs.io/en/stable/appendix/colors.html?highlight=colors#standard-colors
|
44
|
+
mcu_theme = Theme(
|
45
|
+
{
|
46
|
+
"mcu.bold": "orange3",
|
47
|
+
"mcu.mcu": "orange3",
|
48
|
+
"mcu.button": "bold green",
|
49
|
+
"mcu.pad": "dodger_blue2",
|
50
|
+
"mcu.cable": "dodger_blue2",
|
51
|
+
}
|
52
|
+
)
|
53
|
+
|
54
|
+
|
55
|
+
def enter_bootloader_manual(mcu: MPRemoteBoard, timeout: int = 10):
|
56
|
+
|
57
|
+
message: str
|
58
|
+
if mcu.port == "rp2":
|
59
|
+
message = f"""\
|
60
|
+
Please put your {" ".join([mcu.port,mcu.board])} device into bootloader mode by either:
|
61
|
+
Method 1:
|
62
|
+
1. Unplug the USB cable,
|
63
|
+
2. Press and hold the BOOTSEL button on the device,
|
64
|
+
3. Plug the USB cable back in.
|
65
|
+
4. Release the BOOTSEL button.
|
66
|
+
|
67
|
+
Method 2:
|
68
|
+
1. Press and hold the BOOTSEL button on the device,
|
69
|
+
2. Reset the device by either:
|
70
|
+
- pressing the RESET button on the device
|
71
|
+
- by power-cycling the device,
|
72
|
+
- by briefly connecting the RUN pin to GND
|
73
|
+
3. Release the BOOTSEL button.
|
74
|
+
"""
|
75
|
+
elif mcu.port == "samd":
|
76
|
+
message = f"""\
|
77
|
+
Please put your {mcu.port.upper()} device into bootloader mode by:
|
78
|
+
- Pressing or sliding the RESET button twice in fast succession
|
79
|
+
"""
|
80
|
+
else:
|
81
|
+
message = f"""\
|
82
|
+
Please put your {mcu.port.upper()} device into bootloader mode by:
|
83
|
+
- Pressing the RESET button on the device
|
84
|
+
"""
|
85
|
+
|
86
|
+
# todo: would be nice to re-use the console instance from logger
|
87
|
+
console = Console(highlighter=MCUHighlighter(), theme=mcu_theme)
|
88
|
+
message += "\nIf you are unsure how to enter bootloader mode, please refer to the device documentation."
|
89
|
+
console.print(
|
90
|
+
Panel(
|
91
|
+
message,
|
92
|
+
highlight=True,
|
93
|
+
title="Manual Bootloader",
|
94
|
+
title_align="left",
|
95
|
+
expand=False,
|
96
|
+
)
|
97
|
+
)
|
98
|
+
try:
|
99
|
+
answer = Confirm.ask("Press Enter to continue", default="y")
|
100
|
+
except Abort:
|
101
|
+
return False
|
102
|
+
return answer in ["y", "Y", True]
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"""Module for handling the bootloader mode for micropython boards"""
|
2
|
+
|
3
|
+
from mpflash.mpremoteboard import MPRemoteBoard
|
4
|
+
|
5
|
+
|
6
|
+
def enter_bootloader_mpy(mcu: MPRemoteBoard, timeout: int = 10):
|
7
|
+
"""Enter the bootloader mode for the board using mpremote and micropython on the board"""
|
8
|
+
mcu.run_command("bootloader", timeout=timeout)
|
9
|
+
# todo: check if mpremote command was successful
|
10
|
+
return True
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import sys
|
2
|
+
import time
|
3
|
+
|
4
|
+
import serial
|
5
|
+
|
6
|
+
from mpflash.errors import MPFlashError
|
7
|
+
from mpflash.logger import log
|
8
|
+
from mpflash.mpremoteboard import MPRemoteBoard
|
9
|
+
|
10
|
+
from .manual import enter_bootloader_manual
|
11
|
+
|
12
|
+
|
13
|
+
def enter_bootloader_cdc_1200bps(mcu: MPRemoteBoard, timeout: int = 10):
|
14
|
+
if sys.platform == "win32":
|
15
|
+
log.warning("Touch 1200bps method is currently not supported on Windows, switching to manual")
|
16
|
+
return enter_bootloader_manual(mcu, timeout=timeout)
|
17
|
+
|
18
|
+
log.info(f"Entering bootloader on {mcu.board} on {mcu.serialport} using CDC 1200bps")
|
19
|
+
# if port argument is present perform soft reset
|
20
|
+
if not mcu.serialport:
|
21
|
+
raise MPFlashError("No serial port specified")
|
22
|
+
# try to initiate serial port connection on PORT with 1200 baudrate
|
23
|
+
try:
|
24
|
+
with serial.Serial(
|
25
|
+
port=mcu.serialport,
|
26
|
+
baudrate=1200,
|
27
|
+
parity=serial.PARITY_NONE,
|
28
|
+
stopbits=serial.STOPBITS_ONE,
|
29
|
+
bytesize=serial.EIGHTBITS,
|
30
|
+
rtscts=True,
|
31
|
+
) as connection:
|
32
|
+
print("Connection established")
|
33
|
+
connection.rts = True
|
34
|
+
connection.dtr = False
|
35
|
+
time.sleep(0.4)
|
36
|
+
|
37
|
+
except serial.SerialException as e:
|
38
|
+
log.exception(e)
|
39
|
+
raise MPFlashError("pySerial error: " + str(e) + "\n") from e
|
40
|
+
except Exception as e:
|
41
|
+
log.exception(e)
|
42
|
+
raise MPFlashError("Error: " + str(e) + "\n") from e
|
43
|
+
|
44
|
+
# be optimistic
|
45
|
+
return True
|
mpflash/mpflash/cli_download.py
CHANGED
mpflash/mpflash/cli_flash.py
CHANGED
@@ -4,7 +4,7 @@ from typing import List
|
|
4
4
|
import rich_click as click
|
5
5
|
from loguru import logger as log
|
6
6
|
|
7
|
-
|
7
|
+
from mpflash.common import BootloaderMethod
|
8
8
|
from mpflash.errors import MPFlashError
|
9
9
|
from mpflash.mpboard_id import find_known_board
|
10
10
|
from mpflash.mpremoteboard import MPRemoteBoard
|
@@ -17,7 +17,8 @@ from .cli_list import show_mcus
|
|
17
17
|
from .common import FlashParams
|
18
18
|
from .config import config
|
19
19
|
from .flash import flash_list
|
20
|
-
from .worklist import WorkList, full_auto_worklist, manual_worklist,
|
20
|
+
from .worklist import (WorkList, full_auto_worklist, manual_worklist,
|
21
|
+
single_auto_worklist)
|
21
22
|
|
22
23
|
# #########################################################################################################
|
23
24
|
# CLI
|
@@ -101,11 +102,13 @@ from .worklist import WorkList, full_auto_worklist, manual_worklist, single_auto
|
|
101
102
|
help="""Erase flash before writing new firmware. (Not supported on UF2 boards)""",
|
102
103
|
)
|
103
104
|
@click.option(
|
104
|
-
"--bootloader
|
105
|
-
|
106
|
-
|
105
|
+
"--bootloader",
|
106
|
+
"-b",
|
107
|
+
"bootloader",
|
108
|
+
type=click.Choice([e.value for e in BootloaderMethod]),
|
109
|
+
default="mpy",
|
107
110
|
show_default=True,
|
108
|
-
help="""
|
111
|
+
help="""How to enter the (MicroPython) bootloader before flashing.""",
|
109
112
|
)
|
110
113
|
def cli_flash_board(**kwargs) -> int:
|
111
114
|
# version to versions, board to boards
|
@@ -118,9 +121,11 @@ def cli_flash_board(**kwargs) -> int:
|
|
118
121
|
|
119
122
|
params = FlashParams(**kwargs)
|
120
123
|
params.versions = list(params.versions)
|
121
|
-
params.
|
124
|
+
params.ports = list(params.ports)
|
125
|
+
params.boards = list(params.boards)
|
122
126
|
params.serial = list(params.serial)
|
123
127
|
params.ignore = list(params.ignore)
|
128
|
+
params.bootloader = BootloaderMethod(params.bootloader)
|
124
129
|
|
125
130
|
# make it simple for the user to flash one board by asking for the serial port if not specified
|
126
131
|
if params.boards == ["?"] and params.serial == "*":
|
@@ -129,14 +134,16 @@ def cli_flash_board(**kwargs) -> int:
|
|
129
134
|
# Detect connected boards if not specified,
|
130
135
|
# and ask for input if boards cannot be detected
|
131
136
|
all_boards: List[MPRemoteBoard] = []
|
132
|
-
if not params.boards
|
137
|
+
if not params.boards:
|
133
138
|
# nothing specified - detect connected boards
|
134
139
|
params.ports, params.boards, all_boards = connected_ports_boards(include=params.ports, ignore=params.ignore)
|
135
140
|
if params.boards == []:
|
136
|
-
# No MicroPython boards detected, but it could be unflashed or
|
141
|
+
# No MicroPython boards detected, but it could be unflashed or in bootloader mode
|
137
142
|
# Ask for serial port and board_id to flash
|
138
143
|
params.serial = ["?"]
|
139
144
|
params.boards = ["?"]
|
145
|
+
# assume manual mode if no board is detected
|
146
|
+
params.bootloader = BootloaderMethod("manual")
|
140
147
|
else:
|
141
148
|
resolve_board_ids(params)
|
142
149
|
|
mpflash/mpflash/cli_group.py
CHANGED
@@ -5,43 +5,50 @@ Additional comands are added in the submodules.
|
|
5
5
|
|
6
6
|
import rich_click as click
|
7
7
|
|
8
|
-
from .
|
9
|
-
|
8
|
+
from mpflash.vendor.click_aliases import ClickAliasedGroup
|
9
|
+
|
10
|
+
from .config import __version__, config
|
11
|
+
from .logger import log, make_quiet, set_loglevel
|
10
12
|
|
11
13
|
|
12
14
|
def cb_verbose(ctx, param, value):
|
13
15
|
"""Callback to set the log level to DEBUG if verbose is set"""
|
14
16
|
if value and not config.quiet:
|
17
|
+
# log.debug(f"Setting verbose mode to {value}")
|
15
18
|
config.verbose = True
|
16
19
|
if value > 1:
|
17
20
|
set_loglevel("TRACE")
|
18
21
|
else:
|
19
22
|
set_loglevel("DEBUG")
|
23
|
+
log.debug(f"version: {__version__}")
|
20
24
|
else:
|
21
25
|
set_loglevel("INFO")
|
22
26
|
config.verbose = False
|
23
27
|
return value
|
24
28
|
|
25
29
|
|
26
|
-
def cb_interactive(ctx, param, value):
|
27
|
-
|
28
|
-
|
30
|
+
def cb_interactive(ctx, param, value:bool):
|
31
|
+
log.trace(f"Setting interactive mode to {value}")
|
32
|
+
config.interactive = value
|
29
33
|
return value
|
30
34
|
|
31
35
|
|
32
36
|
def cb_test(ctx, param, value):
|
33
37
|
if value:
|
38
|
+
log.trace(f"Setting tests to {value}")
|
34
39
|
config.tests = value
|
35
40
|
return value
|
36
41
|
|
37
42
|
|
38
43
|
def cb_quiet(ctx, param, value):
|
44
|
+
log.trace(f"Setting quiet mode to {value}")
|
39
45
|
if value:
|
40
46
|
make_quiet()
|
41
47
|
return value
|
42
48
|
|
43
49
|
|
44
|
-
@click.group()
|
50
|
+
@click.group(cls=ClickAliasedGroup)
|
51
|
+
# @click.group()
|
45
52
|
@click.version_option(package_name="mpflash")
|
46
53
|
@click.option(
|
47
54
|
"--quiet",
|
mpflash/mpflash/cli_list.py
CHANGED
@@ -5,12 +5,16 @@ import rich_click as click
|
|
5
5
|
from rich import print
|
6
6
|
|
7
7
|
from .cli_group import cli
|
8
|
+
from .connected import list_mcus
|
8
9
|
from .list import show_mcus
|
9
10
|
from .logger import make_quiet
|
10
|
-
from .connected import list_mcus
|
11
11
|
|
12
12
|
|
13
|
-
@cli.command(
|
13
|
+
@cli.command(
|
14
|
+
"list",
|
15
|
+
help="List the connected MCU boards. alias: devs",
|
16
|
+
aliases=["devs"],
|
17
|
+
)
|
14
18
|
@click.option(
|
15
19
|
"--json",
|
16
20
|
"-j",
|