micropython-stubber 1.20.5__py3-none-any.whl → 1.20.6__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.
Files changed (152) hide show
  1. {micropython_stubber-1.20.5.dist-info → micropython_stubber-1.20.6.dist-info}/LICENSE +30 -30
  2. {micropython_stubber-1.20.5.dist-info → micropython_stubber-1.20.6.dist-info}/METADATA +1 -1
  3. micropython_stubber-1.20.6.dist-info/RECORD +159 -0
  4. mpflash/README.md +184 -184
  5. mpflash/libusb_flash.ipynb +203 -203
  6. mpflash/mpflash/add_firmware.py +98 -98
  7. mpflash/mpflash/ask_input.py +236 -236
  8. mpflash/mpflash/bootloader/__init__.py +37 -36
  9. mpflash/mpflash/bootloader/manual.py +102 -102
  10. mpflash/mpflash/bootloader/micropython.py +10 -10
  11. mpflash/mpflash/bootloader/touch1200.py +45 -45
  12. mpflash/mpflash/cli_download.py +129 -129
  13. mpflash/mpflash/cli_flash.py +219 -219
  14. mpflash/mpflash/cli_group.py +98 -98
  15. mpflash/mpflash/cli_list.py +81 -81
  16. mpflash/mpflash/cli_main.py +41 -41
  17. mpflash/mpflash/common.py +164 -164
  18. mpflash/mpflash/config.py +47 -47
  19. mpflash/mpflash/connected.py +74 -74
  20. mpflash/mpflash/download.py +360 -360
  21. mpflash/mpflash/downloaded.py +129 -129
  22. mpflash/mpflash/errors.py +9 -9
  23. mpflash/mpflash/flash.py +52 -52
  24. mpflash/mpflash/flash_esp.py +59 -59
  25. mpflash/mpflash/flash_stm32.py +24 -24
  26. mpflash/mpflash/flash_stm32_cube.py +111 -111
  27. mpflash/mpflash/flash_stm32_dfu.py +101 -101
  28. mpflash/mpflash/flash_uf2.py +67 -67
  29. mpflash/mpflash/flash_uf2_boardid.py +15 -15
  30. mpflash/mpflash/flash_uf2_linux.py +123 -123
  31. mpflash/mpflash/flash_uf2_macos.py +34 -34
  32. mpflash/mpflash/flash_uf2_windows.py +34 -34
  33. mpflash/mpflash/list.py +89 -89
  34. mpflash/mpflash/logger.py +41 -41
  35. mpflash/mpflash/mpboard_id/__init__.py +93 -93
  36. mpflash/mpflash/mpboard_id/add_boards.py +255 -255
  37. mpflash/mpflash/mpboard_id/board.py +37 -37
  38. mpflash/mpflash/mpboard_id/board_id.py +86 -86
  39. mpflash/mpflash/mpboard_id/store.py +43 -43
  40. mpflash/mpflash/mpremoteboard/__init__.py +221 -221
  41. mpflash/mpflash/mpremoteboard/mpy_fw_info.py +141 -141
  42. mpflash/mpflash/mpremoteboard/runner.py +140 -140
  43. mpflash/mpflash/uf2disk.py +12 -12
  44. mpflash/mpflash/vendor/basicgit.py +288 -288
  45. mpflash/mpflash/vendor/click_aliases.py +91 -91
  46. mpflash/mpflash/vendor/dfu.py +165 -165
  47. mpflash/mpflash/vendor/pydfu.py +605 -605
  48. mpflash/mpflash/vendor/readme.md +2 -2
  49. mpflash/mpflash/vendor/versions.py +119 -117
  50. mpflash/mpflash/worklist.py +170 -170
  51. mpflash/poetry.lock +1588 -1588
  52. mpflash/pyproject.toml +60 -60
  53. mpflash/stm32_udev_rules.md +62 -62
  54. stubber/__init__.py +3 -3
  55. stubber/basicgit.py +294 -288
  56. stubber/board/board_info.csv +193 -193
  57. stubber/board/boot.py +34 -34
  58. stubber/board/createstubs.py +986 -986
  59. stubber/board/createstubs_db.py +825 -825
  60. stubber/board/createstubs_db_min.py +331 -331
  61. stubber/board/createstubs_db_mpy.mpy +0 -0
  62. stubber/board/createstubs_lvgl.py +741 -741
  63. stubber/board/createstubs_lvgl_min.py +741 -741
  64. stubber/board/createstubs_mem.py +766 -766
  65. stubber/board/createstubs_mem_min.py +306 -306
  66. stubber/board/createstubs_mem_mpy.mpy +0 -0
  67. stubber/board/createstubs_min.py +294 -294
  68. stubber/board/createstubs_mpy.mpy +0 -0
  69. stubber/board/fw_info.py +141 -141
  70. stubber/board/info.py +183 -183
  71. stubber/board/main.py +19 -19
  72. stubber/board/modulelist.txt +247 -247
  73. stubber/board/pyrightconfig.json +34 -34
  74. stubber/bulk/mcu_stubber.py +454 -454
  75. stubber/codemod/_partials/__init__.py +48 -48
  76. stubber/codemod/_partials/db_main.py +147 -147
  77. stubber/codemod/_partials/lvgl_main.py +77 -77
  78. stubber/codemod/_partials/modules_reader.py +80 -80
  79. stubber/codemod/add_comment.py +53 -53
  80. stubber/codemod/add_method.py +65 -65
  81. stubber/codemod/board.py +317 -317
  82. stubber/codemod/enrich.py +145 -145
  83. stubber/codemod/merge_docstub.py +284 -284
  84. stubber/codemod/modify_list.py +54 -54
  85. stubber/codemod/utils.py +57 -57
  86. stubber/commands/build_cmd.py +94 -94
  87. stubber/commands/cli.py +51 -51
  88. stubber/commands/clone_cmd.py +66 -66
  89. stubber/commands/config_cmd.py +29 -29
  90. stubber/commands/enrich_folder_cmd.py +70 -70
  91. stubber/commands/get_core_cmd.py +69 -69
  92. stubber/commands/get_docstubs_cmd.py +87 -87
  93. stubber/commands/get_frozen_cmd.py +112 -112
  94. stubber/commands/get_mcu_cmd.py +56 -56
  95. stubber/commands/merge_cmd.py +66 -66
  96. stubber/commands/publish_cmd.py +119 -119
  97. stubber/commands/stub_cmd.py +30 -30
  98. stubber/commands/switch_cmd.py +54 -54
  99. stubber/commands/variants_cmd.py +48 -48
  100. stubber/cst_transformer.py +178 -178
  101. stubber/data/board_info.csv +193 -193
  102. stubber/data/board_info.json +1729 -1729
  103. stubber/data/micropython_tags.csv +15 -15
  104. stubber/data/requirements-core-micropython.txt +38 -38
  105. stubber/data/requirements-core-pycopy.txt +39 -39
  106. stubber/downloader.py +36 -36
  107. stubber/freeze/common.py +68 -68
  108. stubber/freeze/freeze_folder.py +69 -69
  109. stubber/freeze/freeze_manifest_2.py +113 -113
  110. stubber/freeze/get_frozen.py +127 -127
  111. stubber/get_cpython.py +101 -101
  112. stubber/get_lobo.py +59 -59
  113. stubber/minify.py +418 -418
  114. stubber/publish/bump.py +86 -86
  115. stubber/publish/candidates.py +262 -262
  116. stubber/publish/database.py +18 -18
  117. stubber/publish/defaults.py +45 -45
  118. stubber/publish/enums.py +24 -24
  119. stubber/publish/helpers.py +29 -29
  120. stubber/publish/merge_docstubs.py +130 -130
  121. stubber/publish/missing_class_methods.py +49 -49
  122. stubber/publish/package.py +146 -146
  123. stubber/publish/pathnames.py +51 -51
  124. stubber/publish/publish.py +120 -120
  125. stubber/publish/pypi.py +38 -38
  126. stubber/publish/stubpackage.py +1029 -1029
  127. stubber/rst/__init__.py +9 -9
  128. stubber/rst/classsort.py +77 -77
  129. stubber/rst/lookup.py +530 -530
  130. stubber/rst/output_dict.py +401 -401
  131. stubber/rst/reader.py +822 -822
  132. stubber/rst/report_return.py +69 -69
  133. stubber/rst/rst_utils.py +540 -540
  134. stubber/stubber.py +38 -38
  135. stubber/stubs_from_docs.py +90 -90
  136. stubber/tools/manifestfile.py +610 -610
  137. stubber/tools/readme.md +5 -5
  138. stubber/update_fallback.py +117 -117
  139. stubber/update_module_list.py +123 -123
  140. stubber/utils/__init__.py +5 -5
  141. stubber/utils/config.py +127 -127
  142. stubber/utils/makeversionhdr.py +54 -54
  143. stubber/utils/manifest.py +92 -92
  144. stubber/utils/post.py +79 -79
  145. stubber/utils/repos.py +157 -154
  146. stubber/utils/stubmaker.py +139 -139
  147. stubber/utils/typed_config_toml.py +77 -77
  148. stubber/utils/versions.py +128 -120
  149. stubber/variants.py +106 -106
  150. micropython_stubber-1.20.5.dist-info/RECORD +0 -159
  151. {micropython_stubber-1.20.5.dist-info → micropython_stubber-1.20.6.dist-info}/WHEEL +0 -0
  152. {micropython_stubber-1.20.5.dist-info → micropython_stubber-1.20.6.dist-info}/entry_points.txt +0 -0
@@ -1,30 +1,30 @@
1
- micropython-stubber consists of original work combined with multiple modules
2
- from different sources and authors. Each module comes under its own licensing terms.
3
- The Short name of the license and exact authorship information can be found in a
4
- "LICENSE" or "LICENSE_<module>" file within the relevant stub directory.
5
-
6
- Files not belonging to a particular module a provided under MIT license, unless explicitly
7
- stated otherwise.
8
-
9
- =============== Top level MIT License ===============
10
-
11
- Copyright (c) 2019 Jos Verlinde
12
-
13
- Permission is hereby granted, free of charge, to any person obtaining a copy
14
- of this software and associated documentation files (the "Software"), to deal
15
- in the Software without restriction, including without limitation the rights
16
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
- copies of the Software, and to permit persons to whom the Software is
18
- furnished to do so, subject to the following conditions:
19
-
20
- The above copyright notice and this permission notice shall be included in all
21
- copies or substantial portions of the Software.
22
-
23
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
- SOFTWARE.
30
-
1
+ micropython-stubber consists of original work combined with multiple modules
2
+ from different sources and authors. Each module comes under its own licensing terms.
3
+ The Short name of the license and exact authorship information can be found in a
4
+ "LICENSE" or "LICENSE_<module>" file within the relevant stub directory.
5
+
6
+ Files not belonging to a particular module a provided under MIT license, unless explicitly
7
+ stated otherwise.
8
+
9
+ =============== Top level MIT License ===============
10
+
11
+ Copyright (c) 2019 Jos Verlinde
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a copy
14
+ of this software and associated documentation files (the "Software"), to deal
15
+ in the Software without restriction, including without limitation the rights
16
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
+ copies of the Software, and to permit persons to whom the Software is
18
+ furnished to do so, subject to the following conditions:
19
+
20
+ The above copyright notice and this permission notice shall be included in all
21
+ copies or substantial portions of the Software.
22
+
23
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
+ SOFTWARE.
30
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: micropython-stubber
3
- Version: 1.20.5
3
+ Version: 1.20.6
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
@@ -0,0 +1,159 @@
1
+ mpflash/README.md,sha256=hV89fJ3UfE-6CpugGT_SI7I_V6vtCf5GVfzUK3POjd4,13496
2
+ mpflash/libusb_flash.ipynb,sha256=sw5MVQvPmH-DJy9kOdXyO80BSjEPMEXf_GJsGk3usrc,6428
3
+ mpflash/mpflash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ mpflash/mpflash/add_firmware.py,sha256=QXk9P1UC0xvDlWhJ3Kj-Acy2wuxxK7R0L61KKiAjk1U,3337
5
+ mpflash/mpflash/ask_input.py,sha256=GGyOOlzpvhYmxyILVuNSj7hJlAvpPFXpP95erinTyCs,8717
6
+ mpflash/mpflash/bootloader/__init__.py,sha256=AbZJVbubvgcV0bQtItS9PEAvvPOKWLZpgi8DX5a5f5A,1282
7
+ mpflash/mpflash/bootloader/manual.py,sha256=tebIE2YBYvsWx2YmAcUcWnTnSjCqR1AwkXKVHJvnQkA,3002
8
+ mpflash/mpflash/bootloader/micropython.py,sha256=of9OuCchiGoczXPi6i0NT9LZHB9FgvigtZxWWvAcb2Q,399
9
+ mpflash/mpflash/bootloader/touch1200.py,sha256=D9yB1n2bSR-nyQDdQXJtCsNknSfHhI6hRziBqOv_HJI,1466
10
+ mpflash/mpflash/cli_download.py,sha256=qKZzHmuHazw5fhj_EGDu4DsqYCan41BK99nk1YWELFE,3527
11
+ mpflash/mpflash/cli_flash.py,sha256=9udC74150-T96duaJzBUyzmxVANJBFCcVzLIpvfaDgk,7135
12
+ mpflash/mpflash/cli_group.py,sha256=s180-nyUVNEwA5bPlkIum4mZPEW0Udf6oBAElnrjsvQ,2236
13
+ mpflash/mpflash/cli_list.py,sha256=AvYq5_Z7l0Z4rkbr23TwFNzstuZsQgopFpdcrTLwUvs,1965
14
+ mpflash/mpflash/cli_main.py,sha256=nFe30fOZZoz4zl3VkLUNoGv478etVtEEN-ccBmok9Tk,1093
15
+ mpflash/mpflash/common.py,sha256=ZfJR8dKKUy4VDZUgnDTILzuaem2o1Ix2haLxHQ47Z0o,5765
16
+ mpflash/mpflash/config.py,sha256=PsP-VzZkFOYcxyI_FiNyvlRyTOeHteO8n4oMQnCHm_8,1119
17
+ mpflash/mpflash/connected.py,sha256=vzQ6heV7w5Mnu76nR2dr9FiQ7Ja1x1Q_k0TGgdV1lT8,2955
18
+ mpflash/mpflash/download.py,sha256=EL17R88QO4TaiX-80GjjlEd6CNZ0vDOcWPuwewZ0_zs,13875
19
+ mpflash/mpflash/downloaded.py,sha256=j662_mCvGqiLnSQv6RuKxuPQ2KTp7t8GOfRMXzKHh0A,4741
20
+ mpflash/mpflash/errors.py,sha256=6lUhVtECY3syV2bBGKzegGH4pPKXhevvhYQZd74sy6o,238
21
+ mpflash/mpflash/flash.py,sha256=C9lrtJBQnkVojJ-W6vnkR16S6zhPEwdRR7GEbYbnd1E,1875
22
+ mpflash/mpflash/flash_esp.py,sha256=j-VdSAKzNQZRVVO7oM9NcRAJWPDHsUianOien8rnYE8,2252
23
+ mpflash/mpflash/flash_stm32.py,sha256=x80yyLSe29YuPMZ0KyykPWUr0_DiuVxDVttMM-0M3LQ,799
24
+ mpflash/mpflash/flash_stm32_cube.py,sha256=TnLNqmJcdwRXWj_t0W4o-NmwBjd3z94qpjuyz77oP9o,3859
25
+ mpflash/mpflash/flash_stm32_dfu.py,sha256=oag6eTnhmztKqskmEm7MAjXW_tS854ALvZqc4C2RXgY,2871
26
+ mpflash/mpflash/flash_uf2.py,sha256=VxUruch2pz8JgIbrOylA6gBCyx9C3Z4hoPMPaRQNN4g,2396
27
+ mpflash/mpflash/flash_uf2_boardid.py,sha256=2s4K3QiKWK5HKFKWYsDV3hI8alfWSxEOMeurER3eZtM,408
28
+ mpflash/mpflash/flash_uf2_linux.py,sha256=Aj9qTEvZvJK-RBccvTBHMRwydMl29D6ynuBHHJXdfa4,3932
29
+ mpflash/mpflash/flash_uf2_macos.py,sha256=4O-7S96vxnjRB2R3IwwA8ZsD-L_IPh0Mmb-949vi9bQ,953
30
+ mpflash/mpflash/flash_uf2_windows.py,sha256=2K7R2uhfsdgFFmWAqFATQCljPQmBW56lsbDsHyk27J0,991
31
+ mpflash/mpflash/list.py,sha256=pSV9WJozObPSnW-oYs2JPdmh2PtCPJUNgvrozclpnU4,2874
32
+ mpflash/mpflash/logger.py,sha256=BAVrSXMGZLfSDRFbtVBtvb7Rl0sTJxooCgBS5t-6bXo,1057
33
+ mpflash/mpflash/mpboard_id/__init__.py,sha256=yeSWAP1YJWYWB2i8KZlBK1l8loJRcDo-xdymuCv92nU,3723
34
+ mpflash/mpflash/mpboard_id/add_boards.py,sha256=JgSXbK9aKtrSWQMIMYYW9OivuWXb1LLTIAmRthi1FC8,9429
35
+ mpflash/mpflash/mpboard_id/board.py,sha256=yQ8IDHQS09AelvTvmPhpmsL4oX3L7IXGqHorkxDOkoE,1114
36
+ mpflash/mpflash/mpboard_id/board_id.py,sha256=G5s-kMKAD-LGUAuU5eYnq25-MGIQPyB-zJojjcGawa4,2878
37
+ mpflash/mpflash/mpboard_id/board_info.zip,sha256=F6YowS96DAqjten4ySe4MXgZwPtE-saZOUfY5OQkqKk,19759
38
+ mpflash/mpflash/mpboard_id/store.py,sha256=lQQgHSxcaM_ZURcfZNSUv3-ZJjUKMC_xEOOSdpzVvBU,1493
39
+ mpflash/mpflash/mpremoteboard/__init__.py,sha256=b4XMG8YU5exQK3cFQy2EPsnycvP63YpgbeMdW64MXZ4,7462
40
+ mpflash/mpflash/mpremoteboard/mpy_fw_info.py,sha256=BTupe4rZDTs3UHRqvs429XqWHCchSpwa05yACOiOt5U,4413
41
+ mpflash/mpflash/mpremoteboard/runner.py,sha256=YUmo5Y0aOgMaww8CXSdNdgXD-wRKncILuMZ0OB_2qRU,4646
42
+ mpflash/mpflash/uf2disk.py,sha256=dQ8_U6e3qkFOyfXZDpWAsvEBIlMr-ZzLkzTDD8SADqM,286
43
+ mpflash/mpflash/vendor/basicgit.py,sha256=b6-gdK_DT0dmW3jEY9T0cjKR-TSEQOSl9U9sRcJh538,9257
44
+ mpflash/mpflash/vendor/click_aliases.py,sha256=K98inhtze8td1dw312kexJS7OX_0ojlptPQ5Z0SHxJY,3065
45
+ mpflash/mpflash/vendor/dfu.py,sha256=jGsiD3lbSV1Ar9qJubhoY_hy-L8FI-K55aow8vgwoYQ,5590
46
+ mpflash/mpflash/vendor/pydfu.py,sha256=1ObubGsPFrQ7T9M3JRlIPNIG2xx8uYffaEe0Y6bdf_g,19937
47
+ mpflash/mpflash/vendor/readme.md,sha256=ZVg7kuUYyXcWcrWkaSJ0CunwebCqu2SiS2sqDadwrT8,84
48
+ mpflash/mpflash/vendor/versions.py,sha256=osv5yFyg47_BZ85k3LRrzjyPu6T4psx56rgBN3YXMyM,3885
49
+ mpflash/mpflash/worklist.py,sha256=WtVcofHXeJEZZ3sucGh9vi2CeY8brpRKbhz6N3hqmgo,5792
50
+ mpflash/poetry.lock,sha256=gxYwn52qLpMBy571ewPzeF4rvOnLzaCQZ2zvRhA7-dU,117989
51
+ mpflash/pyproject.toml,sha256=AEKGF6Bv7MFjKFdELYoOaYthneX4ARDUioar5A_WJF0,1591
52
+ mpflash/stm32_udev_rules.md,sha256=LJelvFFA8w9mBcEUDA02SZ4yzNKfUFL_NWLNUb6geWY,2622
53
+ stubber/__init__.py,sha256=6iAf7REDZo8COEqYZ36DsEwpMsN3U8Ev0gLoPo6VEwU,46
54
+ stubber/basicgit.py,sha256=CkS4YrAP1pLwfoihUZB5Y39uQjkQu_n4ukyrvbrlExs,9440
55
+ stubber/board/board_info.csv,sha256=3BBwHOtKfq_U0Xl8iWgNsN3akhbNMjb-TIeusDwtTXQ,8434
56
+ stubber/board/boot.py,sha256=TEBSaKXY_TYJy9YrTRWv22m8jZRefaRNiwM8xNAlH5M,1086
57
+ stubber/board/createstubs.py,sha256=7AxKv4qVCU4lGkMf97Je_-f0mi-LCaw_veqmq4M5B8k,31936
58
+ stubber/board/createstubs_db.py,sha256=rOcUDj8mq7sCzm5aPhXvAa0jkANmAmxD5Od5IU4sfCA,29558
59
+ stubber/board/createstubs_db_min.py,sha256=FJmKLWduxWEljchZoQ3OTn_uVV5hSzGNQSsYWk62e-A,11142
60
+ stubber/board/createstubs_db_mpy.mpy,sha256=bsSpyY6Vt0Lz_KUrIUkmotUuJwPIDWgOEc5-6sXmbC4,9536
61
+ stubber/board/createstubs_lvgl.py,sha256=LDlY2AxT5S_IZ5twi2wK9gm3SnHsDt9inrpCLOYmZIk,26476
62
+ stubber/board/createstubs_lvgl_min.py,sha256=9L9JsZUCY0E5x4F_Uyckkd8GjiB_49guU6DN-u7XhgU,26466
63
+ stubber/board/createstubs_lvgl_mpy.mpy,sha256=ex-nlq2V5e8anQBJvRWEEc-FzU7nlwg5NSrZ8vOadIA,9267
64
+ stubber/board/createstubs_mem.py,sha256=Q_zhrIHuPM44tmYBrmsIxVubq3AMo-I5_aMItfjZVgY,27953
65
+ stubber/board/createstubs_mem_min.py,sha256=PosLj1D2mpoCm-KHhPJOIWqXlmpSf3ooFosz_v9GWFY,10713
66
+ stubber/board/createstubs_mem_mpy.mpy,sha256=2UrnFQ2Rvs392k8eGXoP56q1sxYf20quKYvVHaHefe0,9118
67
+ stubber/board/createstubs_min.py,sha256=L4he4S-NQt8Z7UbS6cykt76opAJdgz15wW1sepBqqUM,13405
68
+ stubber/board/createstubs_mpy.mpy,sha256=XzBpYMh6v6QZw_675VDLnBJxx6szI-pRRasbUtHtM-k,12388
69
+ stubber/board/fw_info.py,sha256=BTupe4rZDTs3UHRqvs429XqWHCchSpwa05yACOiOt5U,4413
70
+ stubber/board/info.py,sha256=0FCQZ5J3KFDbYe0D5iOuwhmZUUBVASPU7-L6fA7ZRGc,5446
71
+ stubber/board/main.py,sha256=l-5RCT-MMV93SkVwXh3guzx_kxFIJciSEgH1e4UrqT8,394
72
+ stubber/board/modulelist.txt,sha256=LH3tz0w9MxZEAoYRl0JPmVSrYlbsrhkHd9lBP9z2h88,2653
73
+ stubber/board/pyrightconfig.json,sha256=4jEkjN3pTfa8Ok5wxW0_W2mAOWIjKZPq5GRsk8oTBN4,1342
74
+ stubber/bulk/mcu_stubber.py,sha256=_iv2G3QaiGxe7L7W40KahNGyOoKTGw_yyyejMHY6O7Q,15893
75
+ stubber/codemod/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
+ stubber/codemod/_partials/__init__.py,sha256=SKt5UKja7SGdJ2PIQLp7-CURTQ-EimrswhW-ZTaRBEk,1382
77
+ stubber/codemod/_partials/db_main.py,sha256=yvl1ydyiWJDhNmuH7P_5b85Crfrh2CAroA_i_8aCqIw,3856
78
+ stubber/codemod/_partials/lvgl_main.py,sha256=ANMJr4XpWyLHhk3ZHsR0YnGe8fNtIi58YOdN6TLay1o,1887
79
+ stubber/codemod/_partials/modules_reader.py,sha256=kIYUxrCNtR7K1D0NVxePuNjhPoPkOx9qbjh-mdW1IVs,1966
80
+ stubber/codemod/add_comment.py,sha256=qGaa-sF3WyeLZwa5FPyT_Yp-ARFruKlBIIe0tayUiTk,1912
81
+ stubber/codemod/add_method.py,sha256=AbHmfwjgTYWes3XrqPGk0-FjKxnGQuDLXbE5APhApF4,2544
82
+ stubber/codemod/board.py,sha256=WVeUbVOV8MlDAyr5JLhOLdlmyFdlOpdRunjdzM_ULsM,11564
83
+ stubber/codemod/enrich.py,sha256=9hb2__De3eNkF8WKg0CLwYs0lngIDJ0M3nmx2yyuGCU,5293
84
+ stubber/codemod/merge_docstub.py,sha256=-F2P9UAD98Xt8ArsNqQJ-AM6bz9H9V9E3S2d17Jk5xg,12397
85
+ stubber/codemod/modify_list.py,sha256=_YTj3E44dwb7QaRqKaIq0IWg-BzH69AZRqTr3QMkFnY,2064
86
+ stubber/codemod/utils.py,sha256=mE4Ks7-lqnxXbjQcftO_OkJGJDZyCOR4soNJSWRtMek,2402
87
+ stubber/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
+ stubber/commands/build_cmd.py,sha256=nH7rBmeLpyOLUmUDJVich1blH8TTb1yvJN4Xrzu-UDw,2367
89
+ stubber/commands/cli.py,sha256=4CRoeLfE3JKykdoBhdciBebJBvuvqo_NTGSQ0A0_-kg,1799
90
+ stubber/commands/clone_cmd.py,sha256=xLzr0Vcswpb3Lo-b46hLBluJKxhV5bsJKlxqa3TnGNM,2607
91
+ stubber/commands/config_cmd.py,sha256=CMFe0IngKPJYrb3kcZ6BObBOh4dW_0Wf7etAuJthB18,964
92
+ stubber/commands/enrich_folder_cmd.py,sha256=f7UpS9IGjyCVu8LVtSSvkw3BgK0qzsQQyAhXDZ6X5Iw,1783
93
+ stubber/commands/get_core_cmd.py,sha256=gsRKc_7OW8Wl9EXqyhrFzu7MqsDy2Ca8Zv2nNyf4eEc,2208
94
+ stubber/commands/get_docstubs_cmd.py,sha256=O891GWA1CqYg6tHVBWOOmEELUcn6Z_NMaMDNibcimgg,2914
95
+ stubber/commands/get_frozen_cmd.py,sha256=s7HnV8xT6AMjcJXThgFFV72u1V-gs6U5n2qdSvBcfZs,3829
96
+ stubber/commands/get_mcu_cmd.py,sha256=xO38GuHqzNJIrg3rawN4ajmyv3DCk4au8d3PFg2o7bY,1959
97
+ stubber/commands/merge_cmd.py,sha256=xAye4pibQfvnWBG8TegoDLGGngo6wMxJ1Z4bH7RpFTs,1607
98
+ stubber/commands/publish_cmd.py,sha256=26PkYALwO7YyWD4JHIi30t24QzrtCf5XcA8ljlOJLSk,2791
99
+ stubber/commands/stub_cmd.py,sha256=aObVfSiZq9jRJYYrtbiF44GoFNW8glNHvTjMK3gOz0U,1156
100
+ stubber/commands/switch_cmd.py,sha256=IYzhsl_KO05LP7GUhPjUUgmyWsPmZGnbHb1DErX7ZKM,1762
101
+ stubber/commands/variants_cmd.py,sha256=DTFjZ1MkawhJ_7bGfnMZfy9y_ZAKDFzIuphGcuiYW58,1236
102
+ stubber/cst_transformer.py,sha256=Er9kww4hgdeQ9dARMx8lB5PLIvPaKjtKJMe8BofKOzY,6301
103
+ stubber/data/board_info.csv,sha256=3BBwHOtKfq_U0Xl8iWgNsN3akhbNMjb-TIeusDwtTXQ,8434
104
+ stubber/data/board_info.json,sha256=LbyNo3qeij8bY_PRTxWoS5nFuDv6VyaRTKGiXC_-zRQ,57210
105
+ stubber/data/micropython_tags.csv,sha256=95Y4zBefqi65QNvQy5bJXr7Fw8sVHmspeo2rnyLZECQ,1894
106
+ stubber/data/requirements-core-micropython.txt,sha256=mRQ8Sj-PqYP74lVgpWWXSYkVJilSKVsjijoLARQNAwY,1279
107
+ stubber/data/requirements-core-pycopy.txt,sha256=UKZooNXL7GbojDwmaiBTxHEQzzd-H8kI6l5eJCX-oyk,1012
108
+ stubber/downloader.py,sha256=TwvdzSdep1jtCpjocqFJdi7c-I5bZSc3dhfDE5zX-ps,1170
109
+ stubber/freeze/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
110
+ stubber/freeze/common.py,sha256=gY0JSlXmwZqnoosb91M7W3wy3Ej6w48dTdJP8gKOg-U,2571
111
+ stubber/freeze/freeze_folder.py,sha256=-n1w9jxzLjL1Sg-f9VHqHaxsBKDiPGHqBNgeY68pqq8,2422
112
+ stubber/freeze/freeze_manifest_2.py,sha256=uogLPLb4bAah5ULkKzhWWadvu0CswGI3TygRqOb5XYc,3948
113
+ stubber/freeze/get_frozen.py,sha256=9NItdnzfNjx0yC5q1EDgw1TQ39d58kBnIRTGRPIfjbs,5163
114
+ stubber/get_cpython.py,sha256=PEiDn2STECuKeRBSyWx7WuexUpSsyZ-76jQrBvWZY4U,3683
115
+ stubber/get_lobo.py,sha256=I6bVpcGX7TaD4CI9UID8R9brOG-bBdeL07j1WsTXQH4,1717
116
+ stubber/minify.py,sha256=QEYCqN-ApJSpZvgx0fiLi4A-jZMnMI19B-JmNqI79Us,14618
117
+ stubber/publish/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
118
+ stubber/publish/bump.py,sha256=M9ePaH-K1lbh-OVyPNAv6uxumDtHe3cOD2rXeAMWDqY,3176
119
+ stubber/publish/candidates.py,sha256=MGU1FKabawjcruMxyvgJnZHG-ZO2YU0Vl_Oz10GFUX8,10410
120
+ stubber/publish/database.py,sha256=fH_-Zjd_JHTEaW2Yf8kEB6DQduKrmZl9R-67mNYE3HI,605
121
+ stubber/publish/defaults.py,sha256=W37MT9NW3tucLk0oDNKeGBQEtzHORu_iut_s4x1QeQA,1591
122
+ stubber/publish/enums.py,sha256=BRzoSjLxYPLcEHySaFprY1ndLLdUetqRjYJmi5CW7xU,756
123
+ stubber/publish/helpers.py,sha256=XRN9KZgPtIEgVW6NSmZunvTiT0UqP_rr63lM69hcqbs,687
124
+ stubber/publish/merge_docstubs.py,sha256=nQJVloB_iHnsEiILCHIJrS2dgR1bP06LtiXYyaJi4Sc,5189
125
+ stubber/publish/missing_class_methods.py,sha256=TTXOid0gAhUHokLUL2SJ1Fy-YVlHWwqTPqBjVpZioEA,1774
126
+ stubber/publish/package.py,sha256=GGNUgSNsJ9yX2km-MEVx8xf8jQ3qCQanK8dVCSOjVqQ,5128
127
+ stubber/publish/pathnames.py,sha256=wfImW4HLftZ3gSV3zjOzSbxvhTdMFWOl9DDY8Uilvmc,1760
128
+ stubber/publish/publish.py,sha256=8nC7yl4R1p8A0_7yYij8Cot-Ew7O0r84vSFiSYpJvrA,3833
129
+ stubber/publish/pypi.py,sha256=fuxpVFOvvCXXjdTgEB2vWqMjhwUDDQMiHJ6N98C_JdM,1202
130
+ stubber/publish/stubpackage.py,sha256=3uDhsx5LVsgrKQC7BwiorJw14QWdN6KvIBO500PhNnw,43702
131
+ stubber/rst/__init__.py,sha256=8KUzMFNdDU9X6U1VMU1q5bGu_KGxB1XNcJhzNg7tF98,284
132
+ stubber/rst/classsort.py,sha256=jofWVYPQQUzUhN-t2qFJT6381DH46Pjy0fTp5ek5JJU,2578
133
+ stubber/rst/lookup.py,sha256=QIX0_xbXydfXgD-7ctni3QJo2hFN7BzsGz-5Bq1owKQ,19656
134
+ stubber/rst/output_dict.py,sha256=tH_32ZTNj7BndvY2YcZCa1uB-lLeyJUeltoEkTT_Np8,14354
135
+ stubber/rst/reader.py,sha256=JUcfMs-lu_Fg95bCAnLS70RSjOTIAk15nVMzjEPH8aU,32878
136
+ stubber/rst/report_return.py,sha256=r6WeysP2VygcBM-nk1Jo_iItcxsl6sWgWg6myHTjBFY,2745
137
+ stubber/rst/rst_utils.py,sha256=8wfodql00CnO57x8VeNh1yoz7yx_ONa330kWuR1JFoE,17277
138
+ stubber/stubber.py,sha256=sScRIAq7vvUZUS9Mzh4Ne6ny0qpsReGNqo0u8vtZXEc,1596
139
+ stubber/stubs_from_docs.py,sha256=jcNdbNFQ6qZiVOVzdD8nfBNTubD-jviL_KJDPqOfTxo,2743
140
+ stubber/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
141
+ stubber/tools/manifestfile.py,sha256=OzDIryJgZEZ-kutskbxogPJY13wpsnDscOFPkzNZbH0,23111
142
+ stubber/tools/readme.md,sha256=VLcozbfszPiMbYe1bHhh-FXtEZ263TbeLSdSCwdTe5o,194
143
+ stubber/update_fallback.py,sha256=Wi0dj5dly1UFmjpzh7dksb-RuHsSRC0i-E9H-dZ5AQo,4804
144
+ stubber/update_module_list.py,sha256=smeu-xSeFgtr1piJNR1JqLzHd3HZ1K5_iaKNRea6dzk,3886
145
+ stubber/utils/__init__.py,sha256=i2OXAFcw6X1xSEwh2X355lGrM0xgmZZow9z9zRwtV5A,220
146
+ stubber/utils/config.py,sha256=Xjnno__D3DEUAGmjFyECuv0cibJpCnbpFvA_fRJX3sM,4732
147
+ stubber/utils/makeversionhdr.py,sha256=65VXDavYQU5GnR8OfbFAXAq6RCAtLdbEM-a7a3UiLxc,1899
148
+ stubber/utils/manifest.py,sha256=frHSaZs_ZYLdjUl9tDSnRm6OOHjR1W7IrKMABYKaUIY,3181
149
+ stubber/utils/post.py,sha256=qoN-XiNBNMExUdHeXbkjlsvllkG2jKB-ptuApe4kjpc,2758
150
+ stubber/utils/repos.py,sha256=cQhpk_u1ZzlGdaoL3Xq7A8M7V1eyxyX1Ledp8M11gqE,5784
151
+ stubber/utils/stubmaker.py,sha256=1eMNpZZ-BWBtxLwBO-kz4CywjUe0JexN6QSyAVNICxM,5099
152
+ stubber/utils/typed_config_toml.py,sha256=6nlFgHwdCcK_0MJICsstCFgm9M6TblvF-l0_2cpw_cY,2552
153
+ stubber/utils/versions.py,sha256=56UhB49F2647jY9eWtkjjRuYYfJLEjC9daQFhgckgZM,4161
154
+ stubber/variants.py,sha256=iS3sv8cT7czdI9x4KqzTCPT6hX1CKQ-bIlWnDG6gyoU,3688
155
+ micropython_stubber-1.20.6.dist-info/LICENSE,sha256=2zsOXlYgl9W7_XGXcncAXIYfvSVlyNcVBycC6hhlKhA,1542
156
+ micropython_stubber-1.20.6.dist-info/METADATA,sha256=4r0sxERw7TcA4axNn-IUzxWIl6sc-upxa7iU5Mf-j_A,19158
157
+ micropython_stubber-1.20.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
158
+ micropython_stubber-1.20.6.dist-info/entry_points.txt,sha256=NQi_M36fgq5k6giSuASas3LrpF6CVdkzfvJC0ja73_g,55
159
+ micropython_stubber-1.20.6.dist-info/RECORD,,
mpflash/README.md CHANGED
@@ -1,184 +1,184 @@
1
- # MPFLASH
2
- [![pypi version](https://badgen.net/pypi/v/mpflash)](https://pypi.org/project/mpflash/)
3
- [![python versions](https://badgen.net/pypi/python/mpflash)](https://badgen.net/pypi/python/mpflash)
4
- [![Downloads](https://static.pepy.tech/badge/mpflash)](https://pepy.tech/project/mpflash)
5
-
6
-
7
- `mpflash` is a command-line tool for working with MicroPython firmware. It provides features to help you flash and update Micropython on one or more .
8
-
9
- This tool was initially created to be used in a CI/CD pipeline to automate the process of downloading and flashing MicroPython firmware to multiple boards, but it has been extend with a TUI to be used for manual downloadig, flashing and development.
10
-
11
- `mpflash` has been tested on:
12
- - OS: Windows x64, Linux X64, but not (yet) macOS.
13
- - Micropython (hardware) ports:
14
- - `rp2`, using `.uf2`, using filecopy (macos not tested yet)
15
- - `samd`, using ` .uf2`, using filecopy (macos not tested yet)
16
- - `esp32`, using `.bin`, using esptool,
17
- - `esp8266`, using `.bin`, using esptool
18
- - `stm32`, using ` .dfu`, using pydfu
19
-
20
- Not yet implemented: `nrf`, `cc3200`, `mimxrt`
21
-
22
- ## Features
23
- 1. List the connected boards including their firmware details, in a tabular or json format
24
- 2. Download MicroPython firmware for versions, and matching a specified board or matches your current attached board.
25
- 3. Flash one or all connected MicroPython boards with a specific firmware or version.
26
-
27
- ## Installation
28
- To install mpflash, you can use pip: `pip install mpflash`
29
-
30
- ## Basic usage
31
- You can use mpflash to perform various operations on your MicroPython boards. Here is an example of basic usage:
32
-
33
- | Command | Description |
34
- |---------|-------------|
35
- | `mpflash list` | List the connected board(s) including their firmware details |
36
- | `mpflash download` | Download the MicroPython firmware(s) for the connected board(s) |
37
- | `mpflash flash` | Flash the latest stable firmware to the connected board(s) |
38
-
39
-
40
- ## Linux permissions to access usb devices
41
- In order to flash the firmware to the board, you need to have the correct permissions to access the USB devices.
42
- On Windows this will not be an issue, but on Linux you can use udev rules to give non-root users access to the USB devices.
43
- [See the stm32_permissions documentation](./stm32_udev_rules.md) for more information.
44
-
45
-
46
- ## Detailed usage
47
- You can list the connected boards using the following command:
48
- ```bash
49
- $> mpflash list
50
- Connected boards
51
- ┏━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━┓
52
- ┃ Serial ┃Family ┃Port ┃Board ┃CPU ┃Version ┃build ┃
53
- ┡━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━┩
54
- │ COM21 │micropython │rp2 │RPI_PICO │RP2040 │v1.23.0-preview │ 236 │
55
- │ │ │ │Raspberry Pi Pico with RP2040 │ │ │ │
56
- │ COM23 │micropython │rp2 │RPI_PICO_W │RP2040 │v1.23.0-preview │ 176 │
57
- │ │ │ │Raspberry Pi Pico W with RP2040 │ │ │ │
58
- │ COM9 │micropython │rp2 │ARDUINO_NANO_RP2040_CONNECT │RP2040 │v1.23.0-preview │ 341 │
59
- │ │ │ │Arduino Nano RP2040 Connect with RP2040 │ │ │ │
60
- └─────────┴─────────────┴──────┴───────────────────────────────────────────┴────────┴─────────────────┴──────┘
61
- ```
62
- ## Download the firmware
63
-
64
- To download the MicroPython firmware for some boards, use the following command:
65
- - `mpflash download` download the latest stable firmware for all connected boards
66
- - `mpflash download --version preview` download the current preview for all connected boards
67
- - `mpflash download --board ESP8266_GENERIC --board SEEED_WIO_TERMINAL` download these specific boards
68
- - `mpflash download --version ? --board ?` prompt to select a specific version and board to download
69
-
70
- These will try to download the prebuilt MicroPython firmware for the boards from https://micropython.org/download/ and save it in your downloads folder in the `firmware` directory.
71
- The stable version (default) is determined based on the most recent published release,
72
- other versions are `--version preview` and `--version x.y.z` to download the latest preview or version x.y.z respectively.
73
-
74
- By default the firmware will be downloaded to your OS's preferred `Downloads/firmware` folder, but you can speciy a different directory using the `--dir` option.
75
-
76
- The directory structure will be something like this:
77
-
78
- ``` text
79
- Downloads/firmware
80
- | firmware.jsonl
81
- +---esp8266
82
- | ESP8266_GENERIC-FLASH_1M-v1.22.2.bin
83
- | ESP8266_GENERIC-FLASH_512K-v1.22.2.bin
84
- | ESP8266_GENERIC-OTA-v1.22.2.bin
85
- | ESP8266_GENERIC-v1.22.2.bin
86
- \---samd
87
- SEEED_WIO_TERMINAL-v1.22.2.uf2
88
- ```
89
-
90
- ## Flashing the firmware
91
- After you have downloaded a firmware you can flash the firmware to a board using the following command: `mpflash flash`
92
- This will (try to) autodetect the connected boards, and determine the correct firmware to flash to each board.
93
-
94
- - `mpflash flash` will flash the latest stable firmware to all connected boards.
95
- - `mpflash flash --serial ? --board ?` will prompt to select a specific serial port and board to flash. (the firmware must be dowloaded earlier)
96
-
97
-
98
- ### Flashing all connected boards with the latest stable firmware
99
- ```bash
100
- > mpflash flash
101
- 22:15:55 | ℹ️ - Using latest stable version: v1.22.2
102
- Connected boards
103
- ┏━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━┓
104
- ┃ Serial ┃ Family ┃ Port ┃ Board ┃ CPU ┃ Version ┃ build ┃
105
- ┡━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━┩
106
- │ COM11 │ micropython │ rp2 │ RPI_PICO_W │ RP2040 │ 1.20.0 │ │
107
- │ COM12 │ micropython │ esp8266 │ ESP8266_GENERIC │ ESP8266 │ 1.22.2 │ │
108
- │ COM18 │ micropython │ rp2 │ RPI_PICO_W │ RP2040 │ 1.23.0-preview │ 155 │
109
- │ COM3 │ micropython │ samd │ SEEED_WIO_TERMINAL │ SAMD51P19A │ 1.23.0-preview │ 155 │
110
- │ COM5 │ micropython │ stm32 │ PYBV11 │ STM32F405RG │ 1.23.0-preview │ 166 │
111
- │ COM8 │ micropython │ esp32 │ ESP32_GENERIC_S3 │ ESP32S3 │ 1.23.0-preview │ 155 │
112
- └────────┴─────────────┴─────────┴────────────────────┴─────────────┴────────────────┴───────┘
113
- 22:15:58 | ℹ️ - Found v1.22.2 firmware rp2\RPI_PICO_W-v1.22.2.uf2 for RPI_PICO_W on COM11.
114
- 22:15:58 | ℹ️ - Found v1.22.2 firmware esp8266\ESP8266_GENERIC-v1.22.2.bin for ESP8266_GENERIC on COM12.
115
- 22:15:58 | ℹ️ - Found v1.22.2 firmware rp2\RPI_PICO_W-v1.22.2.uf2 for RPI_PICO_W on COM18.
116
- 22:15:58 | ℹ️ - Found v1.22.2 firmware samd\SEEED_WIO_TERMINAL-v1.22.2.uf2 for SEEED_WIO_TERMINAL on COM3.
117
- 22:15:58 | ⚠️ - Trying to find a firmware for the board PYBV11
118
- 22:15:58 | ❌ - No v1.22.2 firmware found for PYBV11 on COM5.
119
- 22:15:58 | ⚠️ - Trying to find a firmware for the board ESP32-GENERIC-S3
120
- 22:15:58 | ❌ - No v1.22.2 firmware found for ESP32_GENERIC_S3 on COM8.
121
- 22:15:58 | ℹ️ - Updating RPI_PICO_W on COM11 to 1.22.2
122
- 22:15:58 | ℹ️ - Erasing not yet implemented for UF2 flashing.
123
- 22:15:58 | ℹ️ - Entering UF2 bootloader on RPI_PICO_W on COM11
124
- 22:15:58 | ℹ️ - Waiting for mcu to mount as a drive : 10 seconds left
125
- 22:15:59 | ℹ️ - Waiting for mcu to mount as a drive : 9 seconds left
126
- 22:16:00 | ℹ️ - Board is in bootloader mode
127
- 22:16:00 | ℹ️ - Copying firmware\rp2\RPI_PICO_W-v1.22.2.uf2 to F:
128
- 22:16:13 | ✅ - Done copying, resetting the board and wait for it to restart
129
- 22:16:23 | ℹ️ - Updating ESP8266_GENERIC on COM12 to 1.22.2
130
- 22:16:23 | ℹ️ - Flashing firmware\esp8266\ESP8266_GENERIC-v1.22.2.bin on ESP8266_GENERIC on COM12
131
- 22:16:23 | ℹ️ - Running esptool --chip ESP8266 --port COM12 erase_flash
132
- esptool.py v4.7.0
133
- Serial port COM12
134
- Connecting....
135
- ...
136
- Chip erase completed successfully in 6.5s
137
- Hard resetting via RTS pin...
138
- 22:16:31 | ℹ️ - Running esptool --chip ESP8266 --port COM12 -b 460800 write_flash --flash_size=detect 0x0 firmware\esp8266\ESP8266_GENERIC-v1.22.2.bin
139
- esptool.py v4.7.0
140
- Serial port COM12
141
- Connecting....
142
- ...
143
- Leaving...
144
- Hard resetting via RTS pin...
145
- 22:16:43 | ℹ️ - Done flashing, resetting the board and wait for it to restart
146
- 22:16:49 | ✅ - Flashed 1.22.2 to ESP8266_GENERIC on COM12 done
147
- 22:16:49 | ℹ️ - Updating RPI_PICO_W on COM18 to 1.22.2
148
- 22:16:49 | ℹ️ - Erasing not yet implemented for UF2 flashing.
149
- 22:16:49 | ℹ️ - Entering UF2 bootloader on RPI_PICO_W on COM18
150
- 22:16:49 | ℹ️ - Waiting for mcu to mount as a drive : 10 seconds left
151
- 22:16:50 | ℹ️ - Waiting for mcu to mount as a drive : 9 seconds left
152
- 22:16:51 | ℹ️ - Board is in bootloader mode
153
- 22:16:51 | ℹ️ - Copying firmware\rp2\RPI_PICO_W-v1.22.2.uf2 to F:[/bold]
154
- 22:17:02 | ✅ - Done copying, resetting the board and wait for it to restart
155
- 22:17:12 | ℹ️ - Updating SEEED_WIO_TERMINAL on COM3 to 1.22.2
156
- 22:17:12 | ℹ️ - Erasing not yet implemented for UF2 flashing.
157
- 22:17:12 | ℹ️ - Entering UF2 bootloader on SEEED_WIO_TERMINAL on COM3
158
- 22:17:12 | ℹ️ - Waiting for mcu to mount as a drive : 10 seconds left
159
- 22:17:13 | ℹ️ - Waiting for mcu to mount as a drive : 9 seconds left
160
- 22:17:14 | ℹ️ - Board is in bootloader mode
161
- 22:17:14 | ℹ️ - Copying firmware\samd\SEEED_WIO_TERMINAL-v1.22.2.uf2 to F:[/bold]
162
- 22:17:17 | ✅ - Done copying, resetting the board and wait for it to restart
163
- 22:17:27 | ℹ️ - Flashed 4 boards
164
- Connected boards after flashing
165
- ┏━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━┓
166
- ┃ Serial ┃ Family ┃ Port ┃ Board ┃ CPU ┃ Version ┃ build ┃
167
- ┡━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━┩
168
- │ COM11 │ micropython │ rp2 │ RPI_PICO_W │ RP2040 │ 1.22.2 │ │
169
- │ COM12 │ micropython │ esp8266 │ ESP8266_GENERIC │ ESP8266 │ 1.22.2 │ │
170
- │ COM18 │ micropython │ rp2 │ RPI_PICO_W │ RP2040 │ 1.22.2 │ │
171
- │ COM3 │ micropython │ samd │ SEEED_WIO_TERMINAL │ SAMD51P19A │ 1.22.2 │ │
172
- │ COM5 │ micropython │ stm32 │ PYBV11 │ STM32F405RG │ 1.23.0-preview │ 166 │
173
- │ COM8 │ micropython │ esp32 │ ESP32_GENERIC_S3 │ ESP32S3 │ 1.23.0-preview │ 155 │
174
- └────────┴─────────────┴─────────┴────────────────────┴─────────────┴────────────────┴───────┘
175
- ```
176
- Note that if no matching firmware can be found for a board, it will be skipped.
177
- (For example, the PYBV11 and ESP32_GENERIC_S3 boards in the example above.)
178
-
179
- ## Issues and bug reports
180
- mpflash is currently co-located in the [micropython-stubber](https://github.com/Josverl/micropython-stubber) repository.
181
- Please report any issues or bugs in the [issue tracker](https://github.com/Josverl/micropython-stubber/issues) using the MPflash feedback template.
182
-
183
- ## License
184
- mpflash is licensed under the MIT license. See the LICENSE file for more details.
1
+ # MPFLASH
2
+ [![pypi version](https://badgen.net/pypi/v/mpflash)](https://pypi.org/project/mpflash/)
3
+ [![python versions](https://badgen.net/pypi/python/mpflash)](https://badgen.net/pypi/python/mpflash)
4
+ [![Downloads](https://static.pepy.tech/badge/mpflash)](https://pepy.tech/project/mpflash)
5
+
6
+
7
+ `mpflash` is a command-line tool for working with MicroPython firmware. It provides features to help you flash and update Micropython on one or more .
8
+
9
+ This tool was initially created to be used in a CI/CD pipeline to automate the process of downloading and flashing MicroPython firmware to multiple boards, but it has been extend with a TUI to be used for manual downloadig, flashing and development.
10
+
11
+ `mpflash` has been tested on:
12
+ - OS: Windows x64, Linux X64, but not (yet) macOS.
13
+ - Micropython (hardware) ports:
14
+ - `rp2`, using `.uf2`, using filecopy (macos not tested yet)
15
+ - `samd`, using ` .uf2`, using filecopy (macos not tested yet)
16
+ - `esp32`, using `.bin`, using esptool,
17
+ - `esp8266`, using `.bin`, using esptool
18
+ - `stm32`, using ` .dfu`, using pydfu
19
+
20
+ Not yet implemented: `nrf`, `cc3200`, `mimxrt`
21
+
22
+ ## Features
23
+ 1. List the connected boards including their firmware details, in a tabular or json format
24
+ 2. Download MicroPython firmware for versions, and matching a specified board or matches your current attached board.
25
+ 3. Flash one or all connected MicroPython boards with a specific firmware or version.
26
+
27
+ ## Installation
28
+ To install mpflash, you can use pip: `pip install mpflash`
29
+
30
+ ## Basic usage
31
+ You can use mpflash to perform various operations on your MicroPython boards. Here is an example of basic usage:
32
+
33
+ | Command | Description |
34
+ |---------|-------------|
35
+ | `mpflash list` | List the connected board(s) including their firmware details |
36
+ | `mpflash download` | Download the MicroPython firmware(s) for the connected board(s) |
37
+ | `mpflash flash` | Flash the latest stable firmware to the connected board(s) |
38
+
39
+
40
+ ## Linux permissions to access usb devices
41
+ In order to flash the firmware to the board, you need to have the correct permissions to access the USB devices.
42
+ On Windows this will not be an issue, but on Linux you can use udev rules to give non-root users access to the USB devices.
43
+ [See the stm32_permissions documentation](./stm32_udev_rules.md) for more information.
44
+
45
+
46
+ ## Detailed usage
47
+ You can list the connected boards using the following command:
48
+ ```bash
49
+ $> mpflash list
50
+ Connected boards
51
+ ┏━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━┓
52
+ ┃ Serial ┃Family ┃Port ┃Board ┃CPU ┃Version ┃build ┃
53
+ ┡━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━┩
54
+ │ COM21 │micropython │rp2 │RPI_PICO │RP2040 │v1.23.0-preview │ 236 │
55
+ │ │ │ │Raspberry Pi Pico with RP2040 │ │ │ │
56
+ │ COM23 │micropython │rp2 │RPI_PICO_W │RP2040 │v1.23.0-preview │ 176 │
57
+ │ │ │ │Raspberry Pi Pico W with RP2040 │ │ │ │
58
+ │ COM9 │micropython │rp2 │ARDUINO_NANO_RP2040_CONNECT │RP2040 │v1.23.0-preview │ 341 │
59
+ │ │ │ │Arduino Nano RP2040 Connect with RP2040 │ │ │ │
60
+ └─────────┴─────────────┴──────┴───────────────────────────────────────────┴────────┴─────────────────┴──────┘
61
+ ```
62
+ ## Download the firmware
63
+
64
+ To download the MicroPython firmware for some boards, use the following command:
65
+ - `mpflash download` download the latest stable firmware for all connected boards
66
+ - `mpflash download --version preview` download the current preview for all connected boards
67
+ - `mpflash download --board ESP8266_GENERIC --board SEEED_WIO_TERMINAL` download these specific boards
68
+ - `mpflash download --version ? --board ?` prompt to select a specific version and board to download
69
+
70
+ These will try to download the prebuilt MicroPython firmware for the boards from https://micropython.org/download/ and save it in your downloads folder in the `firmware` directory.
71
+ The stable version (default) is determined based on the most recent published release,
72
+ other versions are `--version preview` and `--version x.y.z` to download the latest preview or version x.y.z respectively.
73
+
74
+ By default the firmware will be downloaded to your OS's preferred `Downloads/firmware` folder, but you can speciy a different directory using the `--dir` option.
75
+
76
+ The directory structure will be something like this:
77
+
78
+ ``` text
79
+ Downloads/firmware
80
+ | firmware.jsonl
81
+ +---esp8266
82
+ | ESP8266_GENERIC-FLASH_1M-v1.22.2.bin
83
+ | ESP8266_GENERIC-FLASH_512K-v1.22.2.bin
84
+ | ESP8266_GENERIC-OTA-v1.22.2.bin
85
+ | ESP8266_GENERIC-v1.22.2.bin
86
+ \---samd
87
+ SEEED_WIO_TERMINAL-v1.22.2.uf2
88
+ ```
89
+
90
+ ## Flashing the firmware
91
+ After you have downloaded a firmware you can flash the firmware to a board using the following command: `mpflash flash`
92
+ This will (try to) autodetect the connected boards, and determine the correct firmware to flash to each board.
93
+
94
+ - `mpflash flash` will flash the latest stable firmware to all connected boards.
95
+ - `mpflash flash --serial ? --board ?` will prompt to select a specific serial port and board to flash. (the firmware must be dowloaded earlier)
96
+
97
+
98
+ ### Flashing all connected boards with the latest stable firmware
99
+ ```bash
100
+ > mpflash flash
101
+ 22:15:55 | ℹ️ - Using latest stable version: v1.22.2
102
+ Connected boards
103
+ ┏━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━┓
104
+ ┃ Serial ┃ Family ┃ Port ┃ Board ┃ CPU ┃ Version ┃ build ┃
105
+ ┡━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━┩
106
+ │ COM11 │ micropython │ rp2 │ RPI_PICO_W │ RP2040 │ 1.20.0 │ │
107
+ │ COM12 │ micropython │ esp8266 │ ESP8266_GENERIC │ ESP8266 │ 1.22.2 │ │
108
+ │ COM18 │ micropython │ rp2 │ RPI_PICO_W │ RP2040 │ 1.23.0-preview │ 155 │
109
+ │ COM3 │ micropython │ samd │ SEEED_WIO_TERMINAL │ SAMD51P19A │ 1.23.0-preview │ 155 │
110
+ │ COM5 │ micropython │ stm32 │ PYBV11 │ STM32F405RG │ 1.23.0-preview │ 166 │
111
+ │ COM8 │ micropython │ esp32 │ ESP32_GENERIC_S3 │ ESP32S3 │ 1.23.0-preview │ 155 │
112
+ └────────┴─────────────┴─────────┴────────────────────┴─────────────┴────────────────┴───────┘
113
+ 22:15:58 | ℹ️ - Found v1.22.2 firmware rp2\RPI_PICO_W-v1.22.2.uf2 for RPI_PICO_W on COM11.
114
+ 22:15:58 | ℹ️ - Found v1.22.2 firmware esp8266\ESP8266_GENERIC-v1.22.2.bin for ESP8266_GENERIC on COM12.
115
+ 22:15:58 | ℹ️ - Found v1.22.2 firmware rp2\RPI_PICO_W-v1.22.2.uf2 for RPI_PICO_W on COM18.
116
+ 22:15:58 | ℹ️ - Found v1.22.2 firmware samd\SEEED_WIO_TERMINAL-v1.22.2.uf2 for SEEED_WIO_TERMINAL on COM3.
117
+ 22:15:58 | ⚠️ - Trying to find a firmware for the board PYBV11
118
+ 22:15:58 | ❌ - No v1.22.2 firmware found for PYBV11 on COM5.
119
+ 22:15:58 | ⚠️ - Trying to find a firmware for the board ESP32-GENERIC-S3
120
+ 22:15:58 | ❌ - No v1.22.2 firmware found for ESP32_GENERIC_S3 on COM8.
121
+ 22:15:58 | ℹ️ - Updating RPI_PICO_W on COM11 to 1.22.2
122
+ 22:15:58 | ℹ️ - Erasing not yet implemented for UF2 flashing.
123
+ 22:15:58 | ℹ️ - Entering UF2 bootloader on RPI_PICO_W on COM11
124
+ 22:15:58 | ℹ️ - Waiting for mcu to mount as a drive : 10 seconds left
125
+ 22:15:59 | ℹ️ - Waiting for mcu to mount as a drive : 9 seconds left
126
+ 22:16:00 | ℹ️ - Board is in bootloader mode
127
+ 22:16:00 | ℹ️ - Copying firmware\rp2\RPI_PICO_W-v1.22.2.uf2 to F:
128
+ 22:16:13 | ✅ - Done copying, resetting the board and wait for it to restart
129
+ 22:16:23 | ℹ️ - Updating ESP8266_GENERIC on COM12 to 1.22.2
130
+ 22:16:23 | ℹ️ - Flashing firmware\esp8266\ESP8266_GENERIC-v1.22.2.bin on ESP8266_GENERIC on COM12
131
+ 22:16:23 | ℹ️ - Running esptool --chip ESP8266 --port COM12 erase_flash
132
+ esptool.py v4.7.0
133
+ Serial port COM12
134
+ Connecting....
135
+ ...
136
+ Chip erase completed successfully in 6.5s
137
+ Hard resetting via RTS pin...
138
+ 22:16:31 | ℹ️ - Running esptool --chip ESP8266 --port COM12 -b 460800 write_flash --flash_size=detect 0x0 firmware\esp8266\ESP8266_GENERIC-v1.22.2.bin
139
+ esptool.py v4.7.0
140
+ Serial port COM12
141
+ Connecting....
142
+ ...
143
+ Leaving...
144
+ Hard resetting via RTS pin...
145
+ 22:16:43 | ℹ️ - Done flashing, resetting the board and wait for it to restart
146
+ 22:16:49 | ✅ - Flashed 1.22.2 to ESP8266_GENERIC on COM12 done
147
+ 22:16:49 | ℹ️ - Updating RPI_PICO_W on COM18 to 1.22.2
148
+ 22:16:49 | ℹ️ - Erasing not yet implemented for UF2 flashing.
149
+ 22:16:49 | ℹ️ - Entering UF2 bootloader on RPI_PICO_W on COM18
150
+ 22:16:49 | ℹ️ - Waiting for mcu to mount as a drive : 10 seconds left
151
+ 22:16:50 | ℹ️ - Waiting for mcu to mount as a drive : 9 seconds left
152
+ 22:16:51 | ℹ️ - Board is in bootloader mode
153
+ 22:16:51 | ℹ️ - Copying firmware\rp2\RPI_PICO_W-v1.22.2.uf2 to F:[/bold]
154
+ 22:17:02 | ✅ - Done copying, resetting the board and wait for it to restart
155
+ 22:17:12 | ℹ️ - Updating SEEED_WIO_TERMINAL on COM3 to 1.22.2
156
+ 22:17:12 | ℹ️ - Erasing not yet implemented for UF2 flashing.
157
+ 22:17:12 | ℹ️ - Entering UF2 bootloader on SEEED_WIO_TERMINAL on COM3
158
+ 22:17:12 | ℹ️ - Waiting for mcu to mount as a drive : 10 seconds left
159
+ 22:17:13 | ℹ️ - Waiting for mcu to mount as a drive : 9 seconds left
160
+ 22:17:14 | ℹ️ - Board is in bootloader mode
161
+ 22:17:14 | ℹ️ - Copying firmware\samd\SEEED_WIO_TERMINAL-v1.22.2.uf2 to F:[/bold]
162
+ 22:17:17 | ✅ - Done copying, resetting the board and wait for it to restart
163
+ 22:17:27 | ℹ️ - Flashed 4 boards
164
+ Connected boards after flashing
165
+ ┏━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━┓
166
+ ┃ Serial ┃ Family ┃ Port ┃ Board ┃ CPU ┃ Version ┃ build ┃
167
+ ┡━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━┩
168
+ │ COM11 │ micropython │ rp2 │ RPI_PICO_W │ RP2040 │ 1.22.2 │ │
169
+ │ COM12 │ micropython │ esp8266 │ ESP8266_GENERIC │ ESP8266 │ 1.22.2 │ │
170
+ │ COM18 │ micropython │ rp2 │ RPI_PICO_W │ RP2040 │ 1.22.2 │ │
171
+ │ COM3 │ micropython │ samd │ SEEED_WIO_TERMINAL │ SAMD51P19A │ 1.22.2 │ │
172
+ │ COM5 │ micropython │ stm32 │ PYBV11 │ STM32F405RG │ 1.23.0-preview │ 166 │
173
+ │ COM8 │ micropython │ esp32 │ ESP32_GENERIC_S3 │ ESP32S3 │ 1.23.0-preview │ 155 │
174
+ └────────┴─────────────┴─────────┴────────────────────┴─────────────┴────────────────┴───────┘
175
+ ```
176
+ Note that if no matching firmware can be found for a board, it will be skipped.
177
+ (For example, the PYBV11 and ESP32_GENERIC_S3 boards in the example above.)
178
+
179
+ ## Issues and bug reports
180
+ mpflash is currently co-located in the [micropython-stubber](https://github.com/Josverl/micropython-stubber) repository.
181
+ Please report any issues or bugs in the [issue tracker](https://github.com/Josverl/micropython-stubber/issues) using the MPflash feedback template.
182
+
183
+ ## License
184
+ mpflash is licensed under the MIT license. See the LICENSE file for more details.