Hi,
Is it possible to exclude this file from the build somehow?
C:\Users\eyaln.platformio\packages\framework-arduinoteensy\cores\teensy4\new.cpp
I’m running a teensy4.1 with freertos and would like to overload operators new & delete, but Arduino implemented these without a weak attribute, so ld complains about multiple definitions if I just provide an overload.
Yes, I did.
Using the following syntax:
src_filter = -<C:/Users/eyaln.platformio/packages/framework-arduinoteensy/cores/teensy4/new.cpp>
But, it does not get filtered out.
Mhmm I’ve played around a bit with various src_filters in the platformio.ini and with Advanced scripting (a post-script with env.Append(SRC_FILTER=["-<new.cpp>"]) basically, but that didn’t help either… Still got built.
I came up with a hack though: Renaming the new.cpp file to new.txt just before the to-be-built files are analyzed in a pre: script to prevent if from being included, then renaming it back shortly afterwards.
That’s great, at least it’s something.
I actually tried deleting the object file from the build directory using a post script, but that didn’t work either. Possibly because I got the something wrong in the script.
Import("env")
def skip_file(node):
# to ignore file from a build process, just return None
return None
env.AddBuildMiddleware(skip_file, "*/teensy4/new.cpp")