Giter Club home page Giter Club logo

Comments (4)

Josverl avatar Josverl commented on July 24, 2024

mpflash v0.7.6 has been updated to interactively ask for the serial port if --board ? has been specified but no --serial has been specified.
in addition the list of serial ports has been improved by adding the comports description (if available) .

mpflash flash --board ?
Should allow you to select the serial port ,Micropython Port , and Board
and then continue to flash the esp32/esp8266

@wovo, @beetlegigg Could you verify if this version works for you ?

Below a sample run

> mpflash flash --board ?
[?] Which serial port do you want to flash ?:
 > COM8 Microsoft USB Serial Device (COM8)
   COM20 Silicon Labs CP210x USB to UART Bridge (COM20)
   COM21 Microsoft USB Serial Device (COM21)
   Other

[?] Which port do you want to flash to COM8 Microsoft USB Serial Device (COM8) ?:
 > esp32
   esp8266
   mimxrt
   nrf
   renesas-ra
   rp2
   samd
   stm32


Cancelled by user

PS D:\MyPython\micropython-stubber\src\mpflash> mpflash flash --board ?
[?] Which serial port do you want to flash ?:
   COM8 Microsoft USB Serial Device (COM8)
 > COM20 Silicon Labs CP210x USB to UART Bridge (COM20)
   COM21 Microsoft USB Serial Device (COM21)
   Other

[?] Which port do you want to flash to COM20 Silicon Labs CP210x USB to UART Bridge (COM20) ?:                                                                                                  
 > esp32
   esp8266
   mimxrt
   nrf
   renesas-ra
   rp2
   samd
   stm32

[?] Which esp32 board firmware do you want to flash to COM20 Silicon Labs CP210x USB to UART Bridge (COM20) ?:
   v1.22.2 Arduino Nano ESP32 with ESP32S3
 > v1.22.2 Generic ESP32 module with SPIRAM
   v1.22.2 ESP32C3 module with ESP32C3
   v1.22.2 FeatherS2 Neo with ESP32-S2FN4R2
   v1.22.2 FeatherS2 with ESP32-S2
   v1.22.2 FeatherS3 with ESP32-S3
   v1.22.2 Generic ESP32S2 module with ESP32S2
   v1.22.2 Generic ESP32S3 module with Octal-SPIRAM
   v1.22.2 LILYGO TTGO LoRa32 with ESP32
   v1.22.2 LOLIN_C3_MINI with ESP32-C3FH4
   v1.22.2 LOLIN_S2_MINI with ESP32-S2FN4R2
   v1.22.2 LOLIN_S2_PICO with ESP32-S2FN4R2
   v1.22.2 M5Stack ATOM with ESP32-PICO-D4

23:44:59 | ℹ️ Updating ESP32_GENERIC on COM20 to 1.22.2
23:44:59 | ℹ️ Flashing C:\Users\josverl\Downloads\firmware\esp32\ESP32_GENERIC-v1.22.2.bin on ESP32_GENERIC on COM20
23:44:59 | ℹ️ Running esptool --chip esp32 --port COM20 erase_flash 
....

from micropython-stubber.

beetlegigg avatar beetlegigg commented on July 24, 2024

BTW This looks as if it will be a very useful tool and thanks for your efforts. No luck with the install on my macOS yet. I post the terminal output so you can see the commands I entered.

iMacBG:~:% mpflash --version
mpflash, version 0.7.6

iMacBG:~:% mpflash flash --board ?
zsh: no matches found: ?

iMacBG:~:% mpflash list
Error: Failed to get mcu_info for /dev/cu.Bluetooth-Incoming-Port

<img width="642" alt="image" src="https://github.com/Josverl/micropython-stubber/assets/34552737/d9cec4e6-c0be-45a7-8906-00e2e81322d7">

iMacBG:~:% mpflash list --ignore cu.Bluetooth-Incoming-Port
00:16:39 | ❌ Error: No such option: --ignore

iMacBG:~:% mpflash flash --serial cu.usbmodem141101 --board rp2
00:18:46 | ❌ Board rp2 not found in board_info.json
00:18:46 | ❌ No boards were flashed

iMacBG:~:% mpflash flash --serial cu.usbmodem141101            
Error: Failed to get mcu_info for /dev/cu.Bluetooth-Incoming-Port

00:19:44 | ℹ️ Try (2) to find a firmware for the board PICO
00:19:44 | ℹ️ Updating PICO on cu.usbmodem141101 to 1.22.2
00:19:44 | ℹ️ Entering bootloader on PICO on cu.usbmodem141101
00:19:44 | ℹ️ failed to access cu.usbmodem141101 (it may be in use by another program)
00:19:46 | ℹ️ Erasing not yet implemented for UF2 flashing.
00:19:46 | ⚠️ OS darwin not tested/supported
Waiting for mcu to mount as a drive ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--00:19:46 | ❌ pumount only works on Linux
00:19:46 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--00:19:47 | ❌ pumount only works on Linux
00:19:47 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  10% -:--:--00:19:48 | ❌ pumount only works on Linux
00:19:48 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  20% 0:00:0900:19:49 | ❌ pumount only works on Linux
00:19:49 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━  30% 0:00:0800:19:50 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━  30% 0:00:0800:19:50 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━  40% 0:00:0700:19:51 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━  40% 0:00:0700:19:51 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━  50% 0:00:0600:19:52 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━  50% 0:00:0600:19:52 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━  60% 0:00:0500:19:53 | ❌ pumount only works on Linux
00:19:53 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━  70% 0:00:0400:19:54 | ❌ pumount only works on Linux
00:19:54 | ❌ pumount only works on Linux
Waiting for mcu to mount as a drive ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━━  80% 0:00:0300:19:55 | ❌ pumount only works on Linux
00:19:55 | ❌ pumount only works on Linux
00:19:56 | ❌ Failed to flash PICO on cu.usbmodem141101
00:19:56 | ❌ No boards were flashed
iMacBG:~:% 

from micropython-stubber.

Josverl avatar Josverl commented on July 24, 2024

Thanks for testing - I understand the error you are experiencing on the rp2.
the flash process for the rp2 and other .uf2 boards is :

  • get the board details
  • run the mpremote bootloader command. This causes a rp2 to restart and it should show up as a drive
  • on linux this may not be the case ( depending on lots of things) - and thus I use the pumount utility to mount / unmount the drive to the filesystem
  • I assumed this would also work on mac , but alas this works different on macos

the ignore is for all commands - to it should be like this:
mpflash --ignore cu.Bluetooth-Incoming-Port list
or
mpflash --verbose --ignore cu.Bluetooth-Incoming-Port list to show more info

What I can do is make a change so at least the pumount tool is not used on macos.
Ill post an update here If I have something to test.

from micropython-stubber.

Josverl avatar Josverl commented on July 24, 2024

as far as I am aware this now works as expected, but I have no hardware to verify first hand.
Please feel free to re-open if this this is still a problem

from micropython-stubber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.