I’m running into an issue which appears to be somewhat similar to Unclear mechanics of extrascript from library.json …
- the top level of my repository is a library with
library.json
,jee.h
,jee.cpp
, etc - in the
examples/
subdir, I have aplatformio.ini
based project - the ini file has
lib_deps = jeeh=symlink://..
, so that the top-level will be found and used
So far, so good:
Library Manager: Installing symlink://..
Library Manager: JeeH@2.0.0-alpha has been installed!
Now on to the issue this topic is really about: I’m trying to auto-generate a header in this library, which depends on the board being compiled for. I could do this in the example project (and have successfully done so in other contexts), but it would be much simpler if the library itself would take care of it, for each project where this library is used.
I’ve added “board” "build": { "extraScript": "extra.py" }
to library.json
, which according to the docs should get called whenever the library is built (as part of some PIO project). I’ve also added extra.py
in the top level of course, with print statements at the top (to stdout and stderr).
But for some reason, I can’t get extra.py
to run, no matter what I try … I don’t think it’s related the the “examples-inside-library” structure I’ve used, but I’m mentioning that just to be complete. There are no warnings in the pio run -v
output. The build completes just fine, but it’s missing the header-generation step (or re-generation in this case).