What do you want the compiler to do with your .ino file?
Include it in the top of every compilation unit? (Which is weird, since it’s a code file.). Then that’s the same as build_flags = -include ../include/M5CoreS3/examples/Basic/wakeup/wakeup.ino
Add the directory in which the .ino file is in to include search path, so that #include <wakeup.ino> may be found? This is weird because the .ino file is not pre-proprocessed to be proper C++ code. It’s also simliar to build_flags = -I ../include/M5CoreS3/examples/Basic/wakeup/
I can divide my question into two completely separate parts:
What I would like to do in this question is to pass parameters to a Python script called with extra_scripts.
But in the end, what I’m trying to do is to be able to test very quickly in PIO examples intended to be used basically in the Arduino IDE. The idea is to make as few modifications as possible to the examples. My current DIY solution works as follows:
Create a PIO project.
Copy the directory containing the examples into the include directory.
In platformio.ini, create an example environment that I want to test.
Correct the ino file if necessary.
Each environment calls a Python script which creates a src/main.cpp file containing two #include: