MCPcopy Create free account
hub / github.com/FastLED/FastLED / main

Function main

ci/docker_utils/qemu_esp32_docker.py:695–750  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

693
694
695def main():
696 parser = argparse.ArgumentParser(
697 description="Run ESP32 firmware in QEMU using Docker"
698 )
699 parser.add_argument(
700 "firmware_path", type=Path, help="Path to firmware.bin file or build directory"
701 )
702 parser.add_argument(
703 "--docker-image",
704 type=str,
705 help=f"Docker image to use (default: {DEFAULT_DOCKER_IMAGE})",
706 )
707 parser.add_argument(
708 "--flash-size", type=int, default=4, help="Flash size in MB (default: 4)"
709 )
710 parser.add_argument(
711 "--timeout", type=int, default=30, help="Timeout in seconds (default: 30)"
712 )
713 parser.add_argument(
714 "--interrupt-regex", type=str, help="Regex pattern to interrupt execution"
715 )
716 parser.add_argument(
717 "--interactive", action="store_true", help="Run in interactive mode"
718 )
719 parser.add_argument("--output-file", type=str, help="File to write QEMU output to")
720 parser.add_argument(
721 "--machine",
722 type=str,
723 default="esp32",
724 help="QEMU machine type: esp32, esp32c3, esp32s3 (default: esp32)",
725 )
726 parser.add_argument(
727 "--skip-pull",
728 action="store_true",
729 help="Skip pulling Docker image (assumes image already exists)",
730 )
731
732 args = parser.parse_args()
733
734 if not args.firmware_path.exists():
735 print(
736 f"ERROR: Firmware path does not exist: {args.firmware_path}",
737 file=sys.stderr,
738 )
739 return 1
740
741 runner = DockerQEMURunner(docker_image=args.docker_image)
742 return runner.run(
743 firmware_path=args.firmware_path,
744 timeout=args.timeout,
745 interrupt_regex=args.interrupt_regex,
746 interactive=args.interactive,
747 output_file=args.output_file,
748 machine=args.machine,
749 skip_pull=args.skip_pull,
750 )
751
752

Callers 1

Calls 4

runMethod · 0.95
DockerQEMURunnerClass · 0.85
parse_argsMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected