Skip to content

Conversation

@pkoscik
Copy link
Contributor

@pkoscik pkoscik commented Nov 7, 2025

HWMv2 boards do not support this field. As a result of this, running west boards -f '{arch}' results in:

Traceback (most recent call last):
  File "/usr/bin/west", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3.13/site-packages/west/app/main.py", line 1199, in main
    app.run(argv or sys.argv[1:])
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/west/app/main.py", line 278, in run
    self.run_command(argv, early_args)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/west/app/main.py", line 584, in run_command
    self.run_extension(args.command, argv)
    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/west/app/main.py", line 739, in run_extension
    self.cmd.run(args, unknown, self.topdir, manifest=self.manifest,
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                 config=self.config)
                 ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/west/commands.py", line 200, in run
    self.do_run(args, unknown)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/pkoscik/zephyrproject/zephyr/scripts/west_commands/boards.py", line 105, in do_run
    args.format.format(
    ~~~~~~~~~~~~~~~~~~^
        name=board.name,
        ^^^^^^^^^^^^^^^^
    ...<6 lines>...
        qualifiers=list_boards.board_v2_qualifiers_csv(board),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
KeyError: 'arch'

Even after patching this KeyError, there are no boards where arch is set, since this enumerates board.yml files - where schema does not support arch https://github.com/zephyrproject-rtos/zephyr/blob/main/scripts/schemas/board-schema.yaml

This patch removes this format option from the --help page.

HWMv2 boards do not support this field

Signed-off-by: Patryk Koscik <[email protected]>
@pkoscik pkoscik force-pushed the 86396-west_boards_fix branch from 07bedde to 637c5ac Compare November 7, 2025 15:20
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: West West utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants