Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bde2d64

Browse filesBrowse files
authored
Sync PlatformIO build scripts (espressif#8488)
Added special handling of the `ARDUINO_BUILD_CORE` macro required only for the core files
1 parent 21b8865 commit bde2d64
Copy full SHA for bde2d64

File tree

Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-2
lines changed

‎tools/platformio-build.py

Copy file name to clipboardExpand all lines: tools/platformio-build.py
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ def add_tinyuf2_extra_image():
172172
# Target: Build Core Library
173173
#
174174

175+
# Set -DARDUINO_CORE_BUILD only for the core library
176+
corelib_env = env.Clone()
177+
corelib_env.Append(CPPDEFINES=["ARDUINO_CORE_BUILD"])
178+
175179
libs = []
176180

177181
variants_dir = join(FRAMEWORK_DIR, "variants")
@@ -181,13 +185,14 @@ def add_tinyuf2_extra_image():
181185

182186
if "build.variant" in board_config:
183187
env.Append(CPPPATH=[join(variants_dir, board_config.get("build.variant"))])
184-
env.BuildSources(
188+
corelib_env.Append(CPPPATH=[join(variants_dir, board_config.get("build.variant"))])
189+
corelib_env.BuildSources(
185190
join("$BUILD_DIR", "FrameworkArduinoVariant"),
186191
join(variants_dir, board_config.get("build.variant")),
187192
)
188193

189194
libs.append(
190-
env.BuildLibrary(
195+
corelib_env.BuildLibrary(
191196
join("$BUILD_DIR", "FrameworkArduino"),
192197
join(FRAMEWORK_DIR, "cores", board_config.get("build.core")),
193198
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.