Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tools/platformio-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,12 @@ def scons_patched_match_splitext(path, suffixes=None):
#

current_vtables = None
fp_in_irom = ""
for d in flatten_cppdefines:
if str(d).startswith("VTABLES_IN_"):
current_vtables = d
if str(d) == "FP_IN_IROM":
fp_in_irom = "-DFP_IN_IROM"
if not current_vtables:
current_vtables = "VTABLES_IN_FLASH"
env.Append(CPPDEFINES=[current_vtables])
Expand All @@ -260,7 +263,7 @@ def scons_patched_match_splitext(path, suffixes=None):
join("$BUILD_DIR", "ld", "local.eagle.app.v6.common.ld"),
join(FRAMEWORK_DIR, "tools", "sdk", "ld", "eagle.app.v6.common.ld.h"),
env.VerboseAction(
"$CC -CC -E -P -D%s $SOURCE -o $TARGET" % current_vtables,
"$CC -CC -E -P -D%s %s $SOURCE -o $TARGET" % (current_vtables, fp_in_irom),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't speak pythonese or use platformio; however, shouldn't there be a -D in front of the new '%s'.
Déjà Vu, I changed the same line in a PoC PR

"$CC -CC -E -P -D%s -D%s $SOURCE -o $TARGET" % (current_vtables, current_mmu_iram_size),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, because the second parameter can be absent. This would result in -D being inserted and potentially causing an error.
The -D is already included above here: fp_in_irom = "-DFP_IN_IROM"

"Generating LD script $TARGET"))
env.Depends("$BUILD_DIR/$PROGNAME$PROGSUFFIX", app_ld)

Expand Down