Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 2 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,31 +155,10 @@ mount: ## Mount lib/ on the board for live testing

.PHONY: list-frozen
list-frozen: ## List frozen modules on the connected board
@$(PYTHON) -m mpremote connect $(PORT) exec "\
import sys;\
frozen = [];\
mods = help('modules');\
" 2>/dev/null
@$(PYTHON) -m mpremote connect $(PORT) exec "help('modules')"
@echo ""
@echo "--- Frozen driver modules ---"
@$(PYTHON) -m mpremote connect $(PORT) exec "\
import sys;\
drivers = ['apds9960','bme280','bq27441','daplink_bridge','daplink_flash',\
'gc9a01','hts221','im34dt05','ism330dl','lis2mdl','mcp23009e',\
'ssd1327','steami_config','vl53l1x','wsen_hids','wsen_pads'];\
for d in drivers:\
try:\
mod = __import__(d);\
f = getattr(mod, '__file__', None);\
if f and '.frozen' in f:\
print(' ' + d + ' -> frozen');\
elif f:\
print(' ' + d + ' -> filesystem: ' + f);\
else:\
print(' ' + d + ' -> built-in');\
except ImportError:\
print(' ' + d + ' -> NOT AVAILABLE');\
"
@$(PYTHON) -m mpremote connect $(PORT) run scripts/list_frozen_drivers.py
Comment on lines 156 to +161
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title/description indicates firmware manifest was updated to freeze daplink_bridge and bme280, but this PR only changes the Makefile/script + Ruff config in this repository. If the board manifest change lives in the gitignored .build/micropython-steami clone, it won’t be reflected by this PR and Closes #347 may be premature; consider either removing the auto-close, or including a committed change in the appropriate repo / a documented patching step in the build.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. The manifest change is in a separate PR on the firmware repo: steamicc/micropython-steami#1. This PR handles the tooling side (list-frozen fix + ruff config). Issue #347 will be fully resolved when both PRs are merged.


# --- Release ---

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ max-statements = 65
"lib/mcp23009e/examples/i2c_scan.py" = ["PERF203"]
"tests/**/*.py" = ["T20", "PLR0911", "PLR0912", "PLR0915"]
"lib/lis2mdl/**/*.py" = ["RUF001", "RUF002", "RUF003"] # µ (microtesla) is intentional
"scripts/**/*.py" = ["T20", "PERF203"]

[tool.ruff.format]
quote-style = "double"
Expand Down
33 changes: 33 additions & 0 deletions scripts/list_frozen_drivers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"""List STeaMi driver modules and their source (frozen, filesystem, or missing)."""

drivers = [
"apds9960",
"bme280",
"bq27441",
"daplink_bridge",
"daplink_flash",
"gc9a01",
"hts221",
"im34dt05",
"ism330dl",
"lis2mdl",
"mcp23009e",
"ssd1327",
"steami_config",
"vl53l1x",
"wsen_hids",
"wsen_pads",
]

for d in drivers:
try:
mod = __import__(d)
f = getattr(mod, "__file__", None)
if f is None:
print(" " + d + " -> built-in")
elif f.startswith("/"):
print(" " + d + " -> filesystem: " + f)
else:
print(" " + d + " -> frozen")
except ImportError:
print(" " + d + " -> NOT AVAILABLE")
Loading