|
31 | 31 | from platformio.package.version import pepver_to_semver
|
32 | 32 |
|
33 | 33 | env = DefaultEnvironment()
|
| 34 | +platform = env.PioPlatform() |
34 | 35 |
|
35 | 36 | extra_flags = ''.join([element.replace("-D", " ") for element in env.BoardConfig().get("build.extra_flags", "")])
|
36 | 37 | build_flags = ''.join([element.replace("-D", " ") for element in env.GetProjectOption("build_flags")])
|
37 | 38 |
|
38 | 39 | SConscript("_embed_files.py", exports="env")
|
39 | 40 |
|
40 | 41 | if ("CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags) and ("arduino" in env.subst("$PIOFRAMEWORK") and "espidf" not in env.subst("$PIOFRAMEWORK")):
|
41 |
| - SConscript( |
42 |
| - join(DefaultEnvironment().PioPlatform().get_package_dir( |
43 |
| - "framework-arduino-solo1"), "tools", "platformio-build.py")) |
44 |
| - |
| 42 | + FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-solo1") |
45 | 43 | elif ("CORE32ITEAD" in extra_flags or "FRAMEWORK_ARDUINO_ITEAD" in build_flags) and ("arduino" in env.subst("$PIOFRAMEWORK") and "espidf" not in env.subst("$PIOFRAMEWORK")):
|
46 |
| - SConscript( |
47 |
| - join(DefaultEnvironment().PioPlatform().get_package_dir( |
48 |
| - "framework-arduino-ITEAD"), "tools", "platformio-build.py")) |
49 |
| - |
| 44 | + FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-ITEAD") |
50 | 45 | elif "arduino" in env.subst("$PIOFRAMEWORK") and "CORE32SOLO1" not in extra_flags and "FRAMEWORK_ARDUINO_SOLO1" not in build_flags and "CORE32ITEAD" not in extra_flags and "FRAMEWORK_ARDUINO_ITEAD" not in build_flags and "espidf" not in env.subst("$PIOFRAMEWORK"):
|
51 |
| - SConscript( |
52 |
| - join(DefaultEnvironment().PioPlatform().get_package_dir( |
53 |
| - "framework-arduinoespressif32"), "tools", "platformio-build.py")) |
| 46 | + FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32") |
| 47 | + |
| 48 | +if "espidf" not in env.subst("$PIOFRAMEWORK"): |
| 49 | + SConscript(join(FRAMEWORK_DIR, "tools", "platformio-build.py")) |
54 | 50 |
|
55 | 51 | def install_python_deps():
|
56 | 52 | def _get_installed_pip_packages():
|
|
0 commit comments