Repository navigation
feat(ebuild): add runner args support for flash tools - #161
Merged
Merged
Conversation
Allows developers to pass extra arguments to underlying flash tools (like OpenOCD, esptool, pyOCD) without modifying the ebuild source. Runner arguments are resolved using the following precedence chain: 1. CLI passthrough 2. Environment variable (EBUILD_FLASH_RUNNER_ARGS) 3. Project configuration Signed-off-by: Benjamín Guzmán <code@bguzman.dev>
BenjaminGuzman
marked this pull request as ready for review
September 24, 2026 20:17
BenjaminGuzman
requested review from
hshanmug12 and
srpatcha
as code owners
September 24, 2026 20:17
srpatcha
approved these changes
Sep 25, 2026
This was referenced Oct 1, 2026
srpatcha
added a commit
to BenjaminGuzman/ebuild
that referenced
this pull request
Oct 2, 2026
…g#161 work dropped by the 09-30 batch merge The embeddedos-org#141 merge (40d5a65) took an old copy of ebuild/cli/commands.py and deleted three merged features. It now has runner args for flash (embeddedos-org#161), the lockfile read before resolving (embeddedos-org#146) and ninja_command() (embeddedos-org#160) again. embeddedos-org#141's own change stays: executable_output_path comes from ebuild.build.layout. The embeddedos-org#137 merge (18b3ee5) replaced embeddedos-org#138's archive rule, which runs recreate_archive.py by path, with an inline python -c command. embeddedos-org#138's helper and tests were still in the tree, so its rule is back. The helper checks that the archiver can run before it unlinks $out. The archive-member tests from embeddedos-org#137 and embeddedos-org#138 expected keep.o. Since embeddedos-org#133, _object_path keeps the source extension, so the member is keep.c.o. Also fixes ruff's 13 trailing-whitespace errors in tests/unit/cli/test_commands_utils.py. Fixes embeddedos-org#165
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allows developers to pass extra arguments to underlying flash tools (like OpenOCD, esptool, pyOCD) without modifying the ebuild source.
Runner arguments are resolved using the following precedence chain:
Type of Change
Changes
_resolve_runner_argsutility function to handle precedence of runner arguments via CLI, Environment, and build.yaml.flashsubcommand using Click'signore_unknown_options=Truecontext setting.--no-runner-argsflag to safely and explicitly clear argument overrides.openocd,esptool,pyocd,nrfjprog, andstflash.Testing
ctest --test-dir build --output-on-failure)test_index_sync.pyare currently failing onmaster. It looks like PR fix(packages): validate recipe list fields #112 recently removed theto_dictmethod fromPackageRecipewhileindex_sync.pystill depends on it (fix in PR fix: repair master — the dropped to_dict() fields, vendored drift, scorecard pins (lint landed via #122) #132). My tests suite is passing successfully though.Pre-Submission Checklist
-Wall -Wextra -Werrorfor C)<type>(<scope>): <description>conventionmasterRelated Issue
Closes #162
Screenshots / Logs
Additional Notes
--targtinstead of--target). Instead, the typo will be silently consumed and forwarded to the runner tool, which will eventually throw its own error. This is an accepted tradeoff to optimize for the developer experience, but of course I'm also open to change the behavior to be more constrained and less lax.