Skip to content

Commit

Permalink
add different frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Oct 28, 2024
1 parent 1723076 commit a0e59a1
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,23 @@
env = DefaultEnvironment()
platform = env.PioPlatform()
config = env.GetProjectConfig()
extra_flags = ''.join([element.replace("-D", " ") for element in env.BoardConfig().get("build.extra_flags", "")])
build_flags = ''.join([element.replace("-D", " ") for element in env.GetProjectOption("build_flags")])
flag_custom_sdkonfig = False
if config.has_option("env:"+env["PIOENV"], "custom_sdkconfig"):
flag_custom_sdkonfig = True

#
# Helpers
#

flag_custom_sdkonfig = False
if config.has_option("env:"+env["PIOENV"], "custom_sdkconfig"):
flag_custom_sdkonfig = True
if "CORE32SOLO1" in extra_flags or "FRAMEWORK_ARDUINO_SOLO1" in build_flags and flag_custom_sdkonfig is False:
FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-solo1")
elif "CORE32ITEAD" in extra_flags or "FRAMEWORK_ARDUINO_ITEAD" in build_flags and flag_custom_sdkonfig is False:
FRAMEWORK_DIR = platform.get_package_dir("framework-arduino-ITEAD")
else:
FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")

FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoespressif32")

def BeforeUpload(target, source, env):
upload_options = {}
Expand Down

0 comments on commit a0e59a1

Please sign in to comment.