Skip to content

Commit

Permalink
Add --board-options arg passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancheek committed Aug 14, 2024
1 parent c8209c3 commit d9174ae
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/arduino_cli_cmake_wrapper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ def parse_arguments(arguments: List[str]) -> argparse.Namespace:
required=False,
default=[],
)
parser.add_argument(
"--board-options",
type=str,
nargs="*",
help="List of board options to supply",
required=False,
default=[],
)
parser.add_argument(
"-p",
"--post-link",
Expand Down Expand Up @@ -232,13 +240,16 @@ def main(arguments: List[str] = None):
output_directory = Path(arguments.output)
logging.basicConfig(level=logging.DEBUG) if arguments.debug else logging.basicConfig(level=logging.INFO)

properties = []
pass_args = []
for property in arguments.properties:
properties.append("--build-property")
properties.append(property)
pass_args.append("--build-property")
pass_args.append(property)
for board_option in arguments.board_options:
pass_args.append("--board-options")
pass_args.append(board_option)

# Run the build
test_file_map, stdout, stderr = build(arguments.board, arguments.libraries, properties)
test_file_map, stdout, stderr = build(arguments.board, arguments.libraries, pass_args)

# Parse the output into stages
stages = parse(stdout)
Expand Down

0 comments on commit d9174ae

Please sign in to comment.