Thanks, this is a very useful feature. > On 24 Sep 2019, at 3.50, Christopher Collins <ch...@runtime.io> wrote: > ... > > A package specifies custom commands in its `pkg.yml` file. There are > two types of commands: 1) pre_cmds (run before the build), and 2) > post_cmds (run after the build). > > ### EXAMPLE > > Example (apps/blinky/pkg.yml): > > pkg.pre_cmds: > scripts/pre_build1.sh: 100 > scripts/pre_build2.sh: 200 > > pkg.post_cmds: > scripts/post_build.sh: 100 > > For each command, the string on the left specifies the command to run. > The number on the right indicates the command's relative ordering.
I wasn’t sure about need for numbering, but I can see a use if execution of custom commands depends on a syscfg variable being set. I think one useful addition would be to have another class of commands for linking phase. Often there’s a need to convert the binary to some other format, or slap in another header (like with DA1469x bootloader). Maybe have such an option for BSP packages? pkg.post_cmds would get executed after generating object files, and maybe pkg.post_link_cmds would get executed after linking?