Resolve board name using the same logic as ci-compile.py. This handles cases where a board has both a board_name (canonical name used for build directories) and a real_board_name (PlatformIO board identifier). For example: 'blackpill_f411ce' (real_board_name) resolves to 'stm32f411ce'
(board_input: str)
| 19 | |
| 20 | |
| 21 | def resolve_board_name(board_input: str) -> str: |
| 22 | """Resolve board name using the same logic as ci-compile.py. |
| 23 | |
| 24 | This handles cases where a board has both a board_name (canonical name used for |
| 25 | build directories) and a real_board_name (PlatformIO board identifier). |
| 26 | |
| 27 | For example: 'blackpill_f411ce' (real_board_name) resolves to 'stm32f411ce' (board_name). |
| 28 | |
| 29 | Args: |
| 30 | board_input: The board name or alias provided by the user |
| 31 | |
| 32 | Returns: |
| 33 | The canonical board_name used for build directories |
| 34 | """ |
| 35 | from ci.boards import create_board |
| 36 | |
| 37 | board = create_board(board_input) |
| 38 | return board.board_name |
| 39 | |
| 40 | |
| 41 | def find_platformio_project_dir(build_root: Path, board_name: str) -> Path | None: |