Skip to content

Change build/clean commands to use BOARD<-VARIANT> format. #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewleech
Copy link
Contributor

When boards have variants available in micropython, the resulting build / filename is in the form <BOARD>-<VARIANT>-<date/version/etc>.hex

Similarly micropython has recently had a feature added to query on device what it's build is: micropython/micropython#16843
>>> sys.implementation._build will now return the build being run like <BOARD>-<VARIANT> for microcontroller ports (the variant is optional)

This PR modifies the build and clean cli commands to accept <BOARD>-<VARIANT> in the same format.

  • Modify build and clean commands to use combined BOARD-VARIANT format instead of separate arguments
  • Implement two-stage autocompletion: first suggest boards, then -VARIANT after a complete board name
  • Update README.md to reflect new command format

In use this looks like:
image


I used Claude Code to assist with this change, starting from the prompt:

╭───────────────────────────────────────────────────────────────────╮
│ > the tool supports the build command in the form `mpbuild build  │
│   BOARD VARIANT` where `VARIANT` is optional. Instead I'd like    │
│   `mpbuild build BOARD-VARIANT` where the `-VARIANT` is still     │
│   optional. I want autocomplete to only suggest the BOARD         │
│   portion first, only when a full existing `BOARD` is on the      │
│   command line should another tab key press start suggesting      │
│   possible `-VARIANT` options.                                    │
╰───────────────────────────────────────────────────────────────────╯

- Modify build and clean commands to use combined BOARD-VARIANT format instead of separate arguments
- Implement two-stage autocompletion: first suggest boards, then -VARIANT after a complete board name
- Update README.md to reflect new command format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy