Closed Josverl closed 3 months ago
@Beetlegigg,
Can you try to update to mpflash 0.7.7 and tru to run 2 variants of the command and share the output. Also can you check if you see any (USB) drive mounting during either variant ?
mpflash --verbose flash
mpflash --verbose --test macos_uf2 flash
Hi Jos, Here is the output of the latest test copied from the terminal - see the commands you requested highlighted in blue bold after a scroll down the output text. Also to note is that, at the end of my test, I saw that a rpi disk had been created on the desktop, the same as if manually holding the rpi boot button on power on.
Successfully installed jsons-1.6.3 mpflash-0.7.7 typish-1.9.3
*iMacBG*:~:% mpflash --version
mpflash, version 0.7.7
*iMacBG*:~:% mpflash --verbose flash
21:42:19 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
β ΄ Scanning cu.Bluetooth-Incoming-Port ββββββββββββββββββββββββββββββββββ
0:00:0221:42:22 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m
mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
β Έ Scanning cu.Bluetooth-Incoming-Port ββββββββββββββββββββββββββββββββββ
0:00:0521:42:25 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m
mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
Error: Failed to get mcu_info for /dev/cu.Bluetooth-Incoming-Port
β Scanning cu.Bluetooth-Incoming-Port ββββββββββββββββββββββββββββββββββ
0:00:0721:42:27 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m
mpremote
connect /dev/cu.usbmodem141101 run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
21:42:27 | π *FlashParams(*ports=*[*'rp2'*]*, boards=*[*'PICO'*]*,
versions=*[*'stable'*]*,
fw_folder=*PosixPath(*'/Users/BG/Downloads/firmware'*)*, serial='auto',
erase=*True*,
bootloader=*True*, cpu=*None**)*
21:42:27 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
21:42:30 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
21:42:33 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
21:42:35 | β *Error connecting to boards: Failed to get mcu_info for *
*/dev/cu.Bluetooth-Incoming-Port*
21:42:35 | β *No boards were flashed*
*iMacBG*:~:% mpflash --verbose --test macos_uf2 flash
21:43:25 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
β ΄ Scanning cu.Bluetooth-Incoming-Port ββββββββββββββββββββββββββββββββββ
0:00:0221:43:28 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m
mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
β Έ Scanning cu.Bluetooth-Incoming-Port ββββββββββββββββββββββββββββββββββ
0:00:0521:43:32 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m
mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
Error: Failed to get mcu_info for /dev/cu.Bluetooth-Incoming-Port
β Scanning cu.Bluetooth-Incoming-Port ββββββββββββββββββββββββββββββββββ
0:00:0721:43:34 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m
mpremote
connect /dev/cu.usbmodem141101 run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
21:43:34 | π *FlashParams(*ports=*[*'rp2'*]*, boards=*[*'PICO'*]*,
versions=*[*'stable'*]*,
fw_folder=*PosixPath(*'/Users/BG/Downloads/firmware'*)*, serial='auto',
erase=*True*,
bootloader=*True*, cpu=*None**)*
21:43:34 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
21:43:37 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
21:43:40 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.Bluetooth-Incoming-Port run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremotebo
ard/mpy_fw_info.py
21:43:42 | β *Error connecting to boards: Failed to get mcu_info for *
*/dev/cu.Bluetooth-Incoming-Port*
21:43:42 | β *No boards were flashed*
*iMacBG*:~:% mpflash list
Error: Failed to get mcu_info for /dev/cu.Bluetooth-Incoming-Port
Connected boards
ββββββββββββββββββββββββββββ³βββββ³ββββββββββββββββββββββββββββββ³ββββββββ
β*Ser. *β*Fam.*β*Board *β
*Version*β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
βcu.Bluetooth-Incoming-Portβunknβ β β
βcu.usbmodem141101 βupy βPICO βv1.19.1β
β β β*Raspberry Pi Pico with RP2040*β β
ββββββββββββββββββββββββββββ΄βββββ΄ββββββββββββββββββββββββββββββ΄ββββββββ
*iMacBG*:~:% mpflash --ignore cu.Bluetooth-Incoming-Port list
Error: Failed to get mcu_info for /dev/cu.Bluetooth-Incoming-Port
Connected boards
ββββββββββββββββββββββββββββ³ββββββββββββ³βββββ³ββββββββββββββββββββββββββββββ³βββββββ³ββββββββ
β*Serial *β*Family *β*Port*β*Board
*β*CPU *β*Version*β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
βcu.Bluetooth-Incoming-Portβunknown β β
β β β
βcu.usbmodem141101 βmicropythonβrp2 βPICO
βRP2040βv1.19.1β
β β β β*Raspberry Pi Pico with RP2040*β
β β
ββββββββββββββββββββββββββββ΄ββββββββββββ΄βββββ΄ββββββββββββββββββββββββββββββ΄βββββββ΄ββββββββ
*iMacBG*:~:% mpflash --ignore /dev/cu.Bluetooth-Incoming-Port list
Connected boards
βββββββββββββββββββ³ββββββββββββ³βββββ³ββββββββββββββββββββββββββββββ³βββββββ³ββββββββ
β*Serial *β*Family *β*Port*β*Board *β*CPU
*β*Version*β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
βcu.usbmodem141101βmicropythonβrp2 βPICO
βRP2040βv1.19.1β
β β β β*Raspberry Pi Pico with RP2040*β β
β
βββββββββββββββββββ΄ββββββββββββ΄βββββ΄ββββββββββββββββββββββββββββββ΄βββββββ΄ββββββββ
*iMacBG:~:% mpflash --ignore /dev/cu.Bluetooth-Incoming-Port --verbose
flash*
21:47:49 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.usbmodem141101 run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremoteboard/mpy_fw_info.py
21:47:49 | π *FlashParams(*ports=*[*'rp2'*]*, boards=*[*'PICO'*]*,
versions=*[*'stable'*]*, fw_folder=*PosixPath(*
'/Users/BG/Downloads/firmware'*)*, serial='auto',
erase=*True*, bootloader=*True*, cpu=*None**)*
21:47:49 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.usbmodem141101 run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremoteboard/mpy_fw_info.py
21:47:50 | βΉοΈ *Try (2) to find a firmware for the board PICO*
21:47:50 | βΉοΈ *Found v1.22.2 firmware rp2/RPI_PICO-v1.22.2.uf2 for PICO on
/dev/cu.usbmodem141101.*
21:47:50 | βΉοΈ *Updating PICO on /dev/cu.usbmodem141101 to 1.22.2*
21:47:50 | βΉοΈ *Entering bootloader on PICO on /dev/cu.usbmodem141101*
21:47:50 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect /dev/cu.usbmodem141101 resume bootloader
21:47:52 | βΉοΈ *Erasing not yet implemented for UF2 flashing.*
21:47:52 | β οΈ OS darwin not tested/supported
Traceback (most recent call last):
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/blkinfo/wrappers.py",
line 58, in __init__
self._disks = LsBlkWrapper._build_disk_tree()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/blkinfo/wrappers.py",
line 132, in _build_disk_tree
disk_info_list = subprocess.check_output(['lsblk', '-a', '-n', '-r',
'-b', '-o', filter_str])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/subprocess.py",
line 465, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/subprocess.py",
line 546, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/subprocess.py",
line 1022, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/subprocess.py",
line 1899, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'lsblk'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/BG/.pyenv/versions/3.11.0/bin/mpflash", line 8, in <module>
sys.exit(mpflash())
^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/cli_main.py",
line 20, in mpflash
result = cli(standalone_mode=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/rich_click/rich_command.py",
line 360, in __call__
return super().__call__(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/click/core.py",
line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/rich_click/rich_command.py",
line 152, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/click/core.py",
line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/click/core.py",
line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/click/core.py",
line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/cli_flash.py",
line 171, in cli_flash_board
if flashed := flash_list(
^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/flash.py",
line 37, in flash_list
updated = flash_uf2(mcu, fw_file=fw_file, erase=erase)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/flash_uf2.py",
line 52, in flash_uf2
destination = wait_for_UF2_linux()
^^^^^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/flash_uf2_linux.py",
line 107, in wait_for_UF2_linux
uf2_drives += list(get_uf2_drives())
^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/flash_uf2_linux.py",
line 28, in get_uf2_drives
myblkd = BlkDiskInfo()
^^^^^^^^^^^^^
File
"/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/blkinfo/wrappers.py",
line 60, in __init__
raise NoLsblkFound('lsblk command-line tool from util-linux package is
not found.')
blkinfo.errors.NoLsblkFound: lsblk command-line tool from util-linux
package is not found.
*iMacBG:~:% mpflash --ignore /dev/cu.Bluetooth-Incoming-Port --verbose
--test macos_uf2 flash*
[?] Which serial port do you want to flash ?:
/dev/cu.Bluetooth-Incoming-Port n/a
+ Other
[?] Which serial port do you want to flash ?: cu.usbmodem141101
[?] Which port do you want to flash to cu.usbmodem141101 ?:
esp32
esp8266
mimxrt
nrf
renesas-ra
> rp2
samd
stm32
[?] Which rp2 board firmware do you want to flash to cu.usbmodem141101 ?:
v1.22.2 GARATRONIC_PYBSTICK26_RP2040
v1.22.2 Pimoroni Pico LiPo 16MB
v1.22.2 Pimoroni Pico LiPo 4MB
v1.22.2 Pimoroni Tiny 2040
v1.22.2 Pololu 3pi+ 2040 Robot
v1.22.2 Pololu Zumo 2040 Robot
> v1.22.2 Raspberry Pi Pico
v1.22.2 Raspberry Pi Pico W
v1.22.2 Silicognition RP2040-Shim
v1.22.2 SparkFun Pro Micro RP2040
v1.22.2 SparkFun Thing Plus RP2040
v1.22.2 W5100S-EVB-Pico
v1.22.2 W5500-EVB-Pico
21:50:53 | π *FlashParams(*ports=*[*'rp2'*]*, boards=*[*'RPI_PICO'*]*,
versions=*[*'stable'*]*, fw_folder=*PosixPath(*
'/Users/BG/Downloads/firmware'*)*,
serial='cu.usbmodem141101', erase=*True*, bootloader=*True*, cpu=*None**)*
21:50:53 | βΉοΈ *Updating RPI_PICO on cu.usbmodem141101 to 1.22.2*
21:50:53 | βΉοΈ *Entering bootloader on RPI_PICO on cu.usbmodem141101*
21:50:53 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote
connect cu.usbmodem141101 bootloader
21:50:53 | βΉοΈ *failed to access cu.usbmodem141101 (it may be in use by
another program)*
21:50:55 | βΉοΈ *Erasing not yet implemented for UF2 flashing.*
21:50:55 | β οΈ OS darwin not tested/supported
Waiting for mcu to mount as a drive
ββββββββββββββββββββββββββββββββββββββββ 0% -:--:--21:50:55 | β *pumount
only works on Linux*
21:50:55 | β *pumount only works on Linux*
Waiting for mcu to mount as a drive
ββββββββββββββββββββββββββββββββββββββββ 0% -:--:--21:50:56 | β *pumount
only works on Linux*
21:50:56 | β *pumount only works on Linux*
Waiting for mcu to mount as a drive
βββββΊβββββββββββββββββββββββββββββββββββ 10% -:--:--21:50:57 | β *pumount
only works on Linux*
21:50:57 | β *pumount only works on Linux*
Waiting for mcu to mount as a drive
βββββββββΊβββββββββββββββββββββββββββββββ 20% 0:00:0921:50:58 | β *pumount
only works on Linux*
21:50:58 | β *pumount only works on Linux*
Waiting for mcu to mount as a drive
βββββββββββββΊβββββββββββββββββββββββββββ 30% 0:00:0821:50:59 | β *pumount
only works on Linux*
21:50:59 | β *pumount only works on Linux*
Waiting for mcu to mount as a drive
βββββββββββββββββΊβββββββββββββββββββββββ 40% 0:00:0621:51:00 | β *pumount
only works on Linux*
21:51:00 | β *pumount only works on Linux*
Waiting for mcu to mount as a drive
βββββββββββββββββββββΊβββββββββββββββββββ 50% 0:00:0621:51:01 | β *pumount
only works on Linux*
21:51:01 | β *pumount only works on Linux*
Waiting for mcu to mount as a drive
βββββββββββββββββββββββββΊβββββββββββββββ 60% 0:00:0521:51:02 | β *pumount
only works on Linux*
21:51:02 | β *pumount only works on Linux*
Waiting for mcu to mount as a drive
βββββββββββββββββββββββββββββΊβββββββββββ 70% 0:00:0421:51:03 | β *pumount
only works on Linux*
21:51:03 | β *pumount only works on Linux*
Waiting for mcu to mount as a drive
βββββββββββββββββββββββββββββββββΊβββββββ 80% 0:00:0321:51:04 | β *pumount
only works on Linux*
21:51:04 | β *pumount only works on Linux*
21:51:05 | β *Board is not in bootloader mode*
21:51:05 | β *Failed to flash RPI_PICO on cu.usbmodem141101*
21:51:05 | β *No boards were flashed*
*iMacBG*:~:%
On 7 May 2024, at 21:38, Jos Verlinde @.***> wrote:
@beetlegigg https://github.com/beetlegigg,
Can you try to update to mpflash 0.7.7 and tru to run 2 variants of the command and share the output. Also can you check if you see any (USB) drive mounting during either variant ?
β Reply to this email directly, view it on GitHub https://github.com/Josverl/micropython-stubber/issues/557#issuecomment-2099268133, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIHTXIKYVXE3PHYZ46GOGZDZBE3UVAVCNFSM6AAAAABHHCK2YOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJZGI3DQMJTGM . You are receiving this because you were mentioned.Message ID: @.***>
@beetlegigg, @andypiper,
I tried my hand at a new version of the MacOS flashing of UF2 devices.
install with pip install mpflash==0.8.1b1
@Josverl Re. MacOS. The list looks better :-), but it does not seem to want to download a newer version - screenshot attached below
It creates a 'firmware' folder in my Download folders that contains a file firmware.jsonl but the file has zero bytes. I note that you indicate that the latest V1.23 is not yet downloadable, but it did not download the available V1.22.2.
Thanks for your continued efforts on this.
The default version is stable
which is resolved of the published GitHub tags, and is currently v1.23.0
. (but not downloadable)
If you use --version preview
or --version 1.22.2
or -v ?
with the download and flash commands that should use these versions
Thanks for the suggestion but still cannot download, am I putting in the commands incorrectly?
using mpflash -VV download -v ?
(with a space) should:
meanwhile version v1.23.0 is available for download - so there is no specific need to specify a different version anymore.
to test just the download part :
using mpflash -VV download --board RPI_PICO
π‘: Typing that last command makes me think of the fact that the BOARD_ID of the PICO board has changed in a recent version from PICO to RPI_PICO. I try to accommodate for that, but it seems you have found a bug in that part of the code.
if you can download it , then the command to flash would need to specify --board RPI_PICO
as well.
so something like mpflash -VV flash --serial ? --board RPI_PICO
I will check later tonight if I can repro wrt to PICO/RPI_PICO and and sanity check why it slipped through the unit tests
@Josverl Thanks for the info, I gave it another go and some good success, but it seems to report a 1.24 preview rather than the 1.23 stable release. I checked again with mpflash list and indeed it shows:
Connecting to the board with Thonny it reports
so not a 1.24 preview but an earlier v1.23 preview release.
Here is the terminal output of my endeavours:
iMacBG:~:% mpflash list
Connected boards
βββββββββββββββββββ³ββββββββββββ³βββββ³ββββββββββββββββββββββββββββββ³βββββββ³ββββββββ
βSerial βFamily βPortβBoard βCPU βVersionβ
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
βcu.usbmodem141301βmicropythonβrp2 βPICO βRP2040βv1.19.1β
β β β βRaspberry Pi Pico with RP2040β β β
βββββββββββββββββββ΄ββββββββββββ΄βββββ΄ββββββββββββββββββββββββββββββ΄βββββββ΄ββββββββ
iMacBG:~:% mpflash -VV download --board RPI_PICO
21:46:32 | βοΈ ask_missing_params: DownloadParams(ports=['rp2'], boards=['RPI_PICO'], versions=['stable'],
fw_folder=PosixPath('/Users/BG/Downloads/firmware'), serial=['*'], ignore=[], clean=True, force=False)
21:46:32 | βοΈ answers: {'action': 'download', 'versions': ['stable']}
21:46:32 | βοΈ ask_missing_params returns: DownloadParams(ports=['rp2'], boards=['RPI_PICO'], versions=['stable'],
fw_folder=PosixPath('/Users/BG/Downloads/firmware'), serial=['*'], ignore=[], clean=True, force=False)
21:46:34 | βοΈ Using latest stable version: v1.23.0
21:46:34 | βοΈ Checking MicroPython download pages
21:46:34 | π Total 17 firmwares
21:46:34 | π Matching firmwares: 2
21:46:34 | π Last preview only: 1
21:46:34 | π RPI_PICO-v1.23.0-5.uf2
21:46:34 | βΉοΈ Found 1 relevant unique firmwares
21:46:34 | βΉοΈ Downloading https://micropython.org/resources/firmware/RPI_PICO-20240531-v1.23.0-5.g3613ad962.uf2
21:46:34 | βΉοΈ to /Users/BG/Downloads/firmware/rp2/RPI_PICO-v1.23.0-5.uf2
21:46:35 | βΉοΈ Downloaded 1 firmwares, skipped 0 existing files.
iMacBG:~:% mpflash -VV flash --serial ? --board RPI_PICO
zsh: no matches found: ?
iMacBG:~:% mpflash -VV flash --serial --board RPI_PICO
21:47:33 | β Error: Got unexpected extra argument (RPI_PICO)
iMacBG:~:% mpflash -VV flash --board RPI_PICO
21:48:00 | βοΈ ask_missing_params: FlashParams(ports=(), boards=['RPI_PICO'], versions=['stable'],
fw_folder=PosixPath('/Users/BG/Downloads/firmware'), serial=['*'], ignore=[], erase=True, bootloader=True, cpu=None)
21:48:00 | βοΈ answers: {'action': 'flash', 'serial': ['*'], 'versions': ['stable']}
21:48:00 | βοΈ ask_missing_params returns: FlashParams(ports=[], boards=['RPI_PICO'], versions=['stable'],
fw_folder=PosixPath('/Users/BG/Downloads/firmware'), serial=['*'], ignore=[], erase=True, bootloader=True, cpu=None)
21:48:02 | βοΈ Using latest stable version: v1.23.0
21:48:02 | βοΈ No boards detected yet, scanning for connected boards
21:48:02 | βοΈ include=['*'], ignore=[], bluetooth=False
21:48:02 | βοΈ comports: ['/dev/cu.Bluetooth-Incoming-Port', '/dev/cu.usbmodem141301']
21:48:02 | βοΈ no Bluetooth: ['/dev/cu.usbmodem141301']
21:48:02 | π filtered_comports: ['/dev/cu.usbmodem141301']
21:48:02 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote connect /dev/cu.usbmodem141301 run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremoteboard/mpy_fw_info.py
21:48:03 | βοΈ Auto updating all boards to v1.23.0
21:48:03 | βοΈ include=['*'], ignore=[], bluetooth=False
21:48:03 | βοΈ comports: ['/dev/cu.Bluetooth-Incoming-Port', '/dev/cu.usbmodem141301']
21:48:03 | βοΈ no Bluetooth: ['/dev/cu.usbmodem141301']
21:48:03 | π filtered_comports: ['/dev/cu.usbmodem141301']
21:48:03 | βΉοΈ Try (2) to find a firmware for the board PICO
21:48:03 | βΉοΈ Found v1.23.0 firmware rp2/RPI_PICO-v1.23.0-5.uf2 for PICO on /dev/cu.usbmodem141301.
21:48:03 | βΉοΈ Updating PICO on /dev/cu.usbmodem141301 to 1.23.0
21:48:03 | βΉοΈ Entering bootloader on PICO on /dev/cu.usbmodem141301
21:48:03 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote connect /dev/cu.usbmodem141301 resume bootloader
21:48:05 | βΉοΈ Erasing not yet implemented for UF2 flashing.
21:48:05 | β οΈ OS darwin not tested/supported
21:48:05 | βΉοΈ Board is in bootloader mode
21:48:05 | βοΈ Found Board-ID=RPI-RP2
21:48:05 | βΉοΈ Board ID: RPI-RP2
21:48:05 | βΉοΈ Copying /Users/BG/Downloads/firmware/rp2/RPI_PICO-v1.23.0-5.uf2 to /Volumes/RPI-RP2.
21:48:05 | β
Done copying, resetting the board and wait for it to restart
21:48:12 | βΉοΈ Flashed 1 boards
Updating board info ββββββββββββββββββββββββββββββββββββββββ 0% -:--:--21:48:12 | π /Users/BG/.pyenv/versions/3.11.0/bin/python3.11 -m mpremote connect /dev/cu.usbmodem141301 resume run
/Users/BG/.pyenv/versions/3.11.0/lib/python3.11/site-packages/mpflash/mpremoteboard/mpy_fw_info.py
Updated boards after flashing
βββββββββββββββββββ³ββββββββββββ³βββββ³ββββββββββββββββββββββββββββββ³βββββββ³ββββββββββββββββ
βSerial βFamily βPortβBoard βCPU βVersion β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
βcu.usbmodem141301βmicropythonβrp2 βRPI_PICO βRP2040βv1.24.0-previewβ
β β β βRaspberry Pi Pico with RP2040β β β
βββββββββββββββββββ΄ββββββββββββ΄βββββ΄ββββββββββββββββββββββββββββββ΄βββββββ΄ββββββββββββββββ
iMacBG:~:%
OK, we're moving forward slowly,
What is the current mpflash --version
you are running?
Failed download of PICO firmware
The issue is that the download command is unable to find the PICO
image as the firmware images have been renamed in v1.20.0.
Likely a similar issue exists for some other boards that were renamed at the same time. I will create a separate issue to track that.
.UF2 flashing
As I understand that the .UF2 flashing part now works thanks to your testing.
Much appreciated
I have updated mpflash v0.8.2
to use that as standard
Update : pip install -U mpflash
should now get you v0.8.2 (is now actually published)
.uf2
on MacOSAFAIK this should now work fine. Please do feel free to re-open if this fails.
Thanks, I gave it a try with a rpi pico and a rpi pico W and both worked perfectly. I then tried a arduino rp2040 connect and it flashed the latest, programs would run, but somehow it lost the ability to load files on the board (probably nothing to do with the MPFlash). I then tried a UM feather ESP32 S3 and this did not work and I had a bunch of error messages. I have not had the time to investigate and make a sensible report on the attempts with these last two boards and I wont have a chance to have another play for a month or so. Many thanks for getting the pico variants working and I hope to have another go with this in a few months time.
To round off the test on the rpi pico, no luck so far. I had done a mpflash download and it downloaded the appropriate mp. I then did a mpflash flash and got a choice of port / board to select but got some errors about something would only run on linux when appropriate choices were made. I did not take a note of this as to start with I wanted to get rid of some of those ports I no longer use as your program took some while to examine them. Now, whilst I can see the pico in the mpflash list, a mpflash download reports already downloaded, but a mpflash flash now never gets to the point of providing a list of what to flash. I always just get the following:
Originally posted by @beetlegigg in https://github.com/micropython/micropython/discussions/14395#discussioncomment-9310160