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

Function _detect_platform_from_paths

ci/util/bin_2_elf.py:45–61  ·  view source on GitHub ↗

Detect the target platform from toolchain paths. Returns: str: Platform name (esp32, avr, arm, etc.)

(as_path: Path, ld_path: Path)

Source from the content-addressed store, hash-verified

43
44
45def _detect_platform_from_paths(as_path: Path, ld_path: Path):
46 """
47 Detect the target platform from toolchain paths.
48
49 Returns:
50 str: Platform name (esp32, avr, arm, etc.)
51 """
52 path_str = str(as_path).lower()
53
54 if "xtensa-esp32" in path_str or "esp32" in path_str:
55 return "esp32"
56 elif "avr" in path_str:
57 return "avr"
58 elif "arm" in path_str:
59 return "arm"
60 else:
61 return "unknown"
62
63
64@dataclass(slots=True)

Callers 1

bin_to_elfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected