Skip to content

Commit 3db610f

Browse files
s-hadingerd-a-v
andauthored
Ability to define -DFP_IN_IROM when generating ld script (#7188)
Co-authored-by: Stephan Hadinger <stephan.hadinger@gmail.com> Co-authored-by: david gauchard <gauchard@laas.fr>
1 parent c548958 commit 3db610f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/platformio-build.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,12 @@ def scons_patched_match_splitext(path, suffixes=None):
247247
#
248248

249249
current_vtables = None
250+
fp_in_irom = ""
250251
for d in flatten_cppdefines:
251252
if str(d).startswith("VTABLES_IN_"):
252253
current_vtables = d
254+
if str(d) == "FP_IN_IROM":
255+
fp_in_irom = "-DFP_IN_IROM"
253256
if not current_vtables:
254257
current_vtables = "VTABLES_IN_FLASH"
255258
env.Append(CPPDEFINES=[current_vtables])
@@ -260,7 +263,7 @@ def scons_patched_match_splitext(path, suffixes=None):
260263
join("$BUILD_DIR", "ld", "local.eagle.app.v6.common.ld"),
261264
join(FRAMEWORK_DIR, "tools", "sdk", "ld", "eagle.app.v6.common.ld.h"),
262265
env.VerboseAction(
263-
"$CC -CC -E -P -D%s $SOURCE -o $TARGET" % current_vtables,
266+
"$CC -CC -E -P -D%s %s $SOURCE -o $TARGET" % (current_vtables, fp_in_irom),
264267
"Generating LD script $TARGET"))
265268
env.Depends("$BUILD_DIR/$PROGNAME$PROGSUFFIX", app_ld)
266269

0 commit comments

Comments
 (0)