Skip to content

Commit 9629874

Browse files
mhightower83devyte
authored andcommitted
Run makecorever.py before specific prebuild hooks. (#6504)
* Run makecorever.py before specific prebuild hooks. When a sketch needs information that is in `core_version.h`, you have to build a dummy sketch 1st to get `core_version.h` created. Since `core_version.h` is created after the sketch is compiled. Moved rebuild recipe hook for running `makecorever.py` core to run before all _specific_ prebuild hooks. While this form of prebuild hook is not explicitly listed, it seems like an intuitive expectation. Recipie hooks of this form: ``` recipe.hooks.prebuild.NUMBER.pattern=... ``` build before recipies of this form: ``` recipe.hooks.SPECIFIC.prebuild.NUMBER.pattern=... ``` where `SPECIFIC` would be: sketch, libraries, core, linking, ... * Added hack comment to platform.txt.
1 parent 2d1acfa commit 9629874

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

platform.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ compiler.elf2hex.extra_flags=
8585
## generate file with git version number
8686
## needs git
8787
recipe.hooks.sketch.prebuild.pattern="{runtime.tools.python3.path}/python3" "{runtime.tools.signing}" --mode header --publickey "{build.source.path}/public.key" --out "{build.path}/core/Updater_Signing.h"
88-
recipe.hooks.core.prebuild.pattern="{runtime.tools.python3.path}/python3" "{runtime.tools.makecorever}" --build_path "{build.path}" --platform_path "{runtime.platform.path}" --version "unix-{version}"
88+
# This is quite a working hack. This form of prebuild hook, while intuitive, is not explicitly documented.
89+
recipe.hooks.prebuild.10.pattern="{runtime.tools.python3.path}/python3" "{runtime.tools.makecorever}" --build_path "{build.path}" --platform_path "{runtime.platform.path}" --version "unix-{version}"
8990

9091
## Build the app.ld linker file
9192
recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -CC -E -P {build.vtable_flags} "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "{build.path}/local.eagle.app.v6.common.ld"

0 commit comments

Comments
 (0)