project-generator / project_generator

Project generators for various embedded tools (IDE). IAR, uVision, Makefile, CoIDE, Eclipse and many more in the roadmap!
Apache License 2.0
267 stars 95 forks source link

pre_build_script and post_build_script API #477

Open mbrossard opened 3 years ago

mbrossard commented 3 years ago

Looking at the DAPLink project it seems the different pre-build and post-build scripts have an implied calling convention: they should be called with a build directory named after the current project that needs to be 3 directories down from top-level with a build sub-directory with the binaries.

I think the scripts should be given explicitly the different parameters:

I can see two implementation strategies:

0xc0170 commented 3 years ago

Can you share references of these in DAPlink, what they do and how ? I do not fully understand the usage of these in the applications.

mathias-arm commented 3 years ago

Currently DAPLink uses wrapper shell scripts like:

They use wildcard for input and convention (firmware) for outputs. This branch uses the name of current working directory to get the project name: https://github.com/mbrossard/DAPLink/blob/feature/compilers/tools/post_build_script_gcc.py