Copy all ESP32 QEMU artifacts to output location.
(self, output_path: str, sketch_name: str)
| 316 | self.discovery = ESP32ArtifactDiscovery(build_dir, board_name) |
| 317 | |
| 318 | def copy_qemu_artifacts(self, output_path: str, sketch_name: str) -> bool: |
| 319 | """Copy all ESP32 QEMU artifacts to output location.""" |
| 320 | # Discover artifacts |
| 321 | artifacts = self.discovery.discover() |
| 322 | if not artifacts.required_files_present: |
| 323 | print(f"❌ Missing required artifacts: {artifacts.missing_files()}") |
| 324 | return False |
| 325 | |
| 326 | # Read flash configuration |
| 327 | flash_config = self.discovery.read_flash_config() |
| 328 | |
| 329 | # Warn about QEMU compatibility |
| 330 | if not flash_config.is_qemu_compatible(): |
| 331 | print( |
| 332 | f"⚠️ Warning: Flash mode {flash_config.mode.value} may not be QEMU compatible" |
| 333 | ) |
| 334 | print(" QEMU works best with DIO mode") |
| 335 | |
| 336 | # Determine output directory |
| 337 | output_dir = self._resolve_output_dir(output_path) |
| 338 | |
| 339 | # Copy artifacts |
| 340 | copier = ESP32ArtifactCopier(artifacts, flash_config) |
| 341 | return copier.copy_for_qemu(output_dir, self.board_name) |
| 342 | |
| 343 | def _resolve_output_dir(self, output_path: str) -> Path: |
| 344 | """Resolve output path to directory, making relative paths absolute.""" |
no test coverage detected