8000 Handle PSRAM libs in PlatformIO build script (#4911) · DTTerastar/arduino-esp32@4204d1e · GitHub
[go: up one dir, main page]

Skip to content

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 4204d1e

Browse files
authored
Handle PSRAM libs in PlatformIO build script (espressif#4911)
This PR adds PSRAM-specific libraries to the final linker command depending on the `BOARD_HAS_PSRAM` macro. cc @me-no-dev
1 parent d7fda91 commit 4204d1e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/platformio-build.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,14 @@
187187
if not env.BoardConfig().get("build.ldscript", ""):
188188
env.Replace(LDSCRIPT_PATH=env.BoardConfig().get("build.arduino.ldscript", ""))
189189

190+
#
191+
# Add PSRAM-specific libraries
192+
#
193+
194+
flatten_cppdefines = env.Flatten(env["CPPDEFINES"])
195+
if "BOARD_HAS_PSRAM" in flatten_cppdefines:
196+
env.Append(LIBS=["c-psram-workaround", "m-psram-workaround"])
197+
190198
#
191199
# Target: Build Core Library
192200
#

0 commit comments

Comments
 (0)
0