-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*.cbuild-index.yml + *.cbuild.yml as long term replacement for *.CPRJ + Proposal for use as lockfile + Generator input #434
Comments
To connect the dots with #119 I'll try to give some feedback. cbuild.yml and lockfile usage
Generator input file usageThe format in this issue is also a good fit for the generator input file to replace the current
|
@slhultgren I agree with most of your suggestions. There are aspects that I suggest to discuss:
The rest seams to be trivial, but I would suggest to use a separate key/value pair for "condition id" as it could be also applied to files. I agree with the usage as Generator Input file, but don't fully understand why multiple project context would be an issue. Q: The packs list I suppose also can point to local packs with relative paths as in the csolution.yml today? So it could be:
If we are all aligned, we should agree on a timeline and the steps of implementation along with ownership. Obviously the first step is a complete specification, followed by the implementation of the output file by the csolution tool (both owned by Arm). This could enable then already the generators flow (should owned by ST or NXP). The rest of the steps seem less time critical to me, but could be: implement the lockfile feature in csolution, implement a new cbuild tool based on cbuild.yml. |
Regarding |
We discussed that in technical review meeting on 30. Aug.
Problems with a generator will be reviewed once we have the first version of the file available. |
This is now reflected in https://github.com/Open-CMSIS-Pack/devtools/blob/main/tools/projmgr/docs/Manual/YML-CBuild-Format.md I'm sure there are some problems, but would apricate if this could be raised in separate tickets. |
We are closing this issue now and plan to develop the lockfile writer based on the documentation here: https://github.com/Open-CMSIS-Pack/devtools/blob/main/tools/projmgr/docs/Manual/YML-CBuild-Format.md |
Feedback concerning the current proposed format of the cbuild.yml file:
|
Agreed, we should rename projects/project to contexts/context.
Under |
Let's keep it open for capturing additional feedback. Once we have a PR we should move discussions there. |
A few more comments on the current proposed format
component-files:
- file: %PACK_LOCATION%/CMSIS/RTOS2/FreeRTOS/Source/ARM/clib_arm.c Or we could allow both forms of strings Generator input file version of
|
@slhultgren @brondani thanks for your feedback, I have incorporated some in #481
I will address the Some remarks about the other proposals:
which is the final absolute path in my system.
Imagine that two people work together on the same project, one person responsible for software, another for hardware. The hardware person has not software tools installed (therefore he cannot recreate the *.cbuild.yml), but uses the
Both work on the same repo. I therefore recommend to use relative paths (relative to the
By providing a complete view to the whole solution, the generator may issue notifications to the user that the setup that is changed applies to other context setups. It should be fairly simple for the generator to select a specific data set that belongs to a context - could you check if this makes really a big difference in the implementation? |
We plan to have a first iteration of the *.cbuild.yml files in csolution 1.2.0 currently in development. |
cbuild output implementation progress:
|
@brondani for the last two me and @ErikLundinSTM have been doing a bit of work, maybe we can have a PR going next week |
Generator usage with cbuild.ymlOur thinking is that for - component: MyVendor::Component:WithGenerator
files:
- file: generated/source_file_renamed_by_generator_to_fit_project.c
category: source
generator-input-files:
- file: ${CMSIS_PACK_ROOT}/MyVendor/CustomPack/1.0.0/source_file.c
category: source
generator: MyCustomGeneratorRenamer By doing it this way we say that the The Also by doing it this way we should be able to use the cbuild.yml as an input file to the generator itself, since the generator can rely on the About PLM file referencesWe are moving in the direction of adding a - component: ARM::Device:[email protected]
condition: ARMCM7 CMSIS
from-pack: ARM::[email protected]
selected-by: ARM::Device:Startup
files:
- file: RTE/Device/ARMCM7/gcc_arm.ld
category: linkerScript
attr: config
version: 2.1.0
origin: ${CMSIS_PACK_ROOT}/ARM/CMSIS/5.9.0/Device/ARM/ARMCM7/Source/GCC/gcc_arm.ld |
generator-input-files: such files can also be indicated by a dedicated file attribute, e.g.
Besides, it might be useful to supply this information in pdsc file as well |
|
After discussing with @brondani and @ErikLundinSTM this is an updated proposal - component: MyVendor::Component:WithGenerator
files:
- file: generated/source_file_renamed_by_generator_to_fit_project.c
category: source
generator: # The generator node is defined once in the context as a base, then each component can override/extend properties
- id: MyCustomGeneratorRenamer # id[#Gvendor][::Gtool][@Gversion]
working-dir: project/relative/folder/or/from/pack/workingDir
command:
- linux: ${CMSIS_PACK_ROOT}/doit.sh $D (but resolved to actual value) $G (pointing to this file)
windows: ${CMSIS_PACK_ROOT}/doit.sh $D (but resolved to actual value) $G (pointing to this file)
mac: ${CMSIS_PACK_ROOT}/doit.sh $D (but resolved to actual value) $G (pointing to this file)
all: ${CMSIS_PACK_ROOT}/doit.sh $D (but resolved to actual value) $G (pointing to this file)
gpdsc: ../relative/path/to/gpdsc/that/generator/creates.gpdsc
files:
- file: ${CMSIS_PACK_ROOT}/MyVendor/CustomPack/1.0.0/source_file.c
category: source
|
Implements required things in the cbuild.yml according to [Generator (Proposal).md](https://github.com/Open-CMSIS-Pack/devtools/blob/main/tools/projmgr/docs/Manual/Generator%20(Proposal).md) and #434 (comment) Adds the following information when generating `*.cbuild.yml` files: - csolution - cproject - input to component generators: * generator command * arguments * files * gpdsc file * working directory In addition, this switches to use `*.cbuild.yml` as input to generators (`$G` set correspondingly) Limitations/future work: - In addition to device, board should probably be added to the build description schema and implementation - GPDSC is not used to update `*.cbuild.yml` - Working dir is inconsistent between `ProjMgrWorker::ExecuteGenerator()` and what is recorded in `*.cbuild.yml` (`gendir` should not be used for working dir, only destination) Contributed by STMicroelectronics Signed-off-by: Erik MÅLLBERG <[email protected]>
This continues into CMSIS-Toolbox 2.1.0 to complete cbuild.yml format. |
Move to at least 2.5.0 in order to keep cbuildgen build flow as fall back. |
The completeness of |
This proposal is to replace (over time) the
*.CPRJ
file(s) with a single*.cbuild.yml
file that:cbuild
tool could selectively generate one project or all projects.build/target types
(and the relatedfor-type:
)for-compiler:
)cbuild
tool-level)from-pack:
) is stated for each componentclayer.yml
/cdefault.yml
information is included (no reference to other files - all self-contained in*.cbuild.yml
file)packs:
with explicit version number (this can be used as loop-back file to csolution tool to lock the pack versions)The file would be generated by the
csolution
tool.Example:
Note: this example is inspired by https://github.com/MDK-Packs/TrustZone
There are for sure things to be discussed such as:
csolution
tool, a back-up of the*.cbuild.yml
could be used to identify the effect of changes in thecsolution
input file(s).The text was updated successfully, but these errors were encountered: