Skip to content

omip skips what the firmware froze; WSL flashes a usbipd board with Linux esptool - #265

Merged
bdbarnett merged 2 commits into
mainfrom
wsl-linux-tty-flash
Nov 25, 2026
Merged

bdbarnett merged 2 commits into
mainfrom
wsl-linux-tty-flash

Conversation

@bdbarnett

Copy link
Copy Markdown
Collaborator

Fixes #264.

mcuctl omip copied every package in a dependency tree onto the board, including the ones its firmware already had frozen in. On an rp2 --modules all build that was 490 KB of copies that never get imported. It now asks the board, with the same rule as omip.install on the board (PyDevices/omnipython#844):

  • A package that's frozen in is skipped.
  • A partly frozen package gets only the modules the firmware lacks.
  • Modules a frozen _omip_left_out names are left out on purpose.
  • When the target comes ahead of .frozen on sys.path, everything is still copied.

The board-side probe was run on unix MicroPython and on an ESP32 Audio Kit, and gave the expected frozen, missing and built-in states.

firmware flash under WSL always ran Windows esptool and handed it a Windows path, so a board attached with usbipd (/dev/ttyUSB0) couldn't be flashed: OSError(22, 'Incorrect function.'). Only a COMn port goes to the Windows side now. An Audio Kit on /dev/ttyUSB0 was erased and flashed this way, and the hash verified.

Tests: test_omip.py (5 new; 3 fail without the change) and a new test_wsl_esptool.py. test_s2_rom_usb and test_app_image_offset pass.

A board attached to WSL with usbipd got Windows esptool and a Windows path for
its image, which can't open /dev/ttyUSB0. Only a COM port goes to the Windows
side now.
…he board does

mcuctl omip copied every package in the tree, frozen or not. Now it asks the
board, by the same rule as omnipython's omip: a frozen package is skipped, a
partly frozen one gets only the modules it lacks, and modules a frozen
_omip_left_out names are left out on purpose. A target ahead of .frozen on
sys.path still gets everything.
@bdbarnett
bdbarnett merged commit a80eb4d into main Nov 25, 2026
9 checks passed
@bdbarnett
bdbarnett deleted the wsl-linux-tty-flash branch November 25, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

omip installs packages the firmware already has frozen

1 participant