From 816ecc8c5cc98d55d8eef193fe9970686cd5a800 Mon Sep 17 00:00:00 2001 From: Daniel Brondani Date: Thu, 31 Jul 2025 09:24:09 +0200 Subject: [PATCH] [csolution] Remove filtering of component files having `gen*` categories --- .../0.1.0/ARM.RteTestGenerator.pdsc | 7 +++++ tools/projmgr/src/ProjMgrWorker.cpp | 30 +++++++------------ .../core0.Debug+MultiCore.cbuild-gen.yml | 19 ++++++++++++ .../core1.Debug+MultiCore.cbuild-gen.yml | 19 ++++++++++++ .../single-core.Debug+Board.cbuild.yml | 19 ++++++++++++ .../single-core.Debug+CM0.cbuild-gen.yml | 19 ++++++++++++ .../single-core.Debug+CM0.cbuild.yml | 19 ++++++++++++ .../ref/TrustZone/ns.Debug+CM0.cbuild-gen.yml | 19 ++++++++++++ .../ref/TrustZone/s.Debug+CM0.cbuild-gen.yml | 19 ++++++++++++ 9 files changed, 151 insertions(+), 19 deletions(-) diff --git a/test/packs/ARM/RteTestGenerator/0.1.0/ARM.RteTestGenerator.pdsc b/test/packs/ARM/RteTestGenerator/0.1.0/ARM.RteTestGenerator.pdsc index a52ca479e..b732712bd 100644 --- a/test/packs/ARM/RteTestGenerator/0.1.0/ARM.RteTestGenerator.pdsc +++ b/test/packs/ARM/RteTestGenerator/0.1.0/ARM.RteTestGenerator.pdsc @@ -186,6 +186,13 @@ Component addressing external + + + + + + + Component with overlaping file lists diff --git a/tools/projmgr/src/ProjMgrWorker.cpp b/tools/projmgr/src/ProjMgrWorker.cpp index baba5377a..d3ca62e46 100644 --- a/tools/projmgr/src/ProjMgrWorker.cpp +++ b/tools/projmgr/src/ProjMgrWorker.cpp @@ -2334,15 +2334,6 @@ bool ProjMgrWorker::ProcessComponentFiles(ContextItem& context) { const auto& language = componentFile->GetAttribute("language"); const auto& select = componentFile->GetAttribute("select"); const auto& version = componentFile->GetSemVer(); - switch (RteFile::CategoryFromString(category)) { - case RteFile::Category::GEN_SOURCE: - case RteFile::Category::GEN_HEADER: - case RteFile::Category::GEN_PARAMS: - case RteFile::Category::GEN_ASSET: - continue; // ignore gen files - default: - break; - }; context.componentFiles[componentId].push_back({ name, attr, category, language, scope, version, select }); } // config files @@ -2357,21 +2348,12 @@ bool ProjMgrWorker::ProcessComponentFiles(ContextItem& context) { const auto& category = configFile->GetAttribute("category"); const auto& language = configFile->GetAttribute("language"); const auto& scope = configFile->GetAttribute("scope"); - switch (RteFile::CategoryFromString(category)) { - case RteFile::Category::GEN_SOURCE: - case RteFile::Category::GEN_HEADER: - case RteFile::Category::GEN_PARAMS: - case RteFile::Category::GEN_ASSET: - continue; // ignore gen files - default: - break; - }; const auto& version = originalFile ? originalFile->GetSemVer() : ""; context.componentFiles[componentId].push_back({ filename, "config", category, language, scope, version }); } } } - // input files for component generator. This list of files is directly fetched from the PDSC. + // input files for 'bootstrap' component generator. This list of files is directly fetched from the PDSC. RteComponentInstance* rteBootstrapInstance = context.bootstrapComponents.find(componentId) != context.bootstrapComponents.end() ? context.bootstrapMap.find(componentId) != context.bootstrapMap.end() ? context.bootstrapComponents.at(context.bootstrapMap.at(componentId)).instance : context.bootstrapComponents.at(componentId).instance : nullptr; @@ -2396,6 +2378,16 @@ bool ProjMgrWorker::ProcessComponentFiles(ContextItem& context) { const auto& filename = (attr == "config" && configFilePaths.find(rteFile) != configFilePaths.end()) ? configFilePaths[rteFile] : rteFile->GetOriginalAbsolutePath(); context.generatorInputFiles[componentId].push_back({ filename, attr, category, language, scope, version }); + // remove file from parent component list to avoid duplicates + auto& componentFiles = context.componentFiles[componentId]; + componentFiles.erase( + std::remove_if( + componentFiles.begin(), + componentFiles.end(), + [filename](const ComponentFileItem& item) { return item.name == filename;} + ), + componentFiles.end() + ); } } } diff --git a/tools/projmgr/test/data/ExternalGenerator/ref/MultiCore/core0.Debug+MultiCore.cbuild-gen.yml b/tools/projmgr/test/data/ExternalGenerator/ref/MultiCore/core0.Debug+MultiCore.cbuild-gen.yml index a3cafa89b..2daed9901 100644 --- a/tools/projmgr/test/data/ExternalGenerator/ref/MultiCore/core0.Debug+MultiCore.cbuild-gen.yml +++ b/tools/projmgr/test/data/ExternalGenerator/ref/MultiCore/core0.Debug+MultiCore.cbuild-gen.yml @@ -30,9 +30,11 @@ build-gen: - _RTE_ add-path: - ${DEVTOOLS(data)}/ExternalGenerator/multi_0/RTE/_Debug_MultiCore + - ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include - ${DEVTOOLS(packs)}/ARM/RteTest_DFP/0.2.0/Device/ARM/ARMCM0/Include add-path-asm: - ${DEVTOOLS(data)}/ExternalGenerator/multi_0/RTE/_Debug_MultiCore + - ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include - ${DEVTOOLS(packs)}/ARM/RteTest_DFP/0.2.0/Device/ARM/ARMCM0/Include output-dirs: intdir: ${DEVTOOLS(data)}/ExternalGenerator/tmp @@ -45,6 +47,23 @@ build-gen: - component: ARM::RteTestGenerator:Check Global Generator@0.9.0 from-pack: ARM::RteTestGenerator@0.1.0 selected-by: RteTestGenerator:Check Global Generator + files: + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include/RteTestInc.h + category: header + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTest.gpdsc.template + category: genAsset + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.c.template + category: genSource + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.h.template + category: genHeader + version: 1.0.0 + - file: ${DEVTOOLS(data)}/ExternalGenerator/multi_0/RTE/RteTestGenerator/RteTestGen.params + category: genParams + attr: config + version: 0.9.0 generator: id: RteTestExternalGenerator path: ${DEVTOOLS(data)}/ExternalGenerator/generated/MultiCore/core0.cgen.yml diff --git a/tools/projmgr/test/data/ExternalGenerator/ref/MultiCore/core1.Debug+MultiCore.cbuild-gen.yml b/tools/projmgr/test/data/ExternalGenerator/ref/MultiCore/core1.Debug+MultiCore.cbuild-gen.yml index 355e1d3dc..fd1375da1 100644 --- a/tools/projmgr/test/data/ExternalGenerator/ref/MultiCore/core1.Debug+MultiCore.cbuild-gen.yml +++ b/tools/projmgr/test/data/ExternalGenerator/ref/MultiCore/core1.Debug+MultiCore.cbuild-gen.yml @@ -30,9 +30,11 @@ build-gen: - _RTE_ add-path: - ${DEVTOOLS(data)}/ExternalGenerator/multi_1/RTE/_Debug_MultiCore + - ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include - ${DEVTOOLS(packs)}/ARM/RteTest_DFP/0.2.0/Device/ARM/ARMCM0/Include add-path-asm: - ${DEVTOOLS(data)}/ExternalGenerator/multi_1/RTE/_Debug_MultiCore + - ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include - ${DEVTOOLS(packs)}/ARM/RteTest_DFP/0.2.0/Device/ARM/ARMCM0/Include output-dirs: intdir: ${DEVTOOLS(data)}/ExternalGenerator/tmp @@ -45,6 +47,23 @@ build-gen: - component: ARM::RteTestGenerator:Check Global Generator@0.9.0 from-pack: ARM::RteTestGenerator@0.1.0 selected-by: RteTestGenerator:Check Global Generator + files: + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include/RteTestInc.h + category: header + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTest.gpdsc.template + category: genAsset + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.c.template + category: genSource + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.h.template + category: genHeader + version: 1.0.0 + - file: ${DEVTOOLS(data)}/ExternalGenerator/multi_1/RTE/RteTestGenerator/RteTestGen.params + category: genParams + attr: config + version: 0.9.0 generator: id: RteTestExternalGenerator path: ${DEVTOOLS(data)}/ExternalGenerator/generated/MultiCore/core1.cgen.yml diff --git a/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+Board.cbuild.yml b/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+Board.cbuild.yml index 7d964e043..0d7d7cef9 100644 --- a/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+Board.cbuild.yml +++ b/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+Board.cbuild.yml @@ -44,12 +44,14 @@ build: - ../../../../single/generated/RTE/RteTest - ${CMSIS_PACK_ROOT}/ARM/RteTest/0.1.0/GlobalLevel - ${CMSIS_PACK_ROOT}/ARM/RteTest/0.1.0/Include + - ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Include - ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0/Device/ARM/ARMCM4/Include add-path-asm: - ../../../../single/RTE/_Debug_Board - ../../../../single/generated/RTE/RteTest - ${CMSIS_PACK_ROOT}/ARM/RteTest/0.1.0/GlobalLevel - ${CMSIS_PACK_ROOT}/ARM/RteTest/0.1.0/Include + - ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Include - ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0/Device/ARM/ARMCM4/Include output-dirs: intdir: ../../../../tmp @@ -86,6 +88,23 @@ build: - component: ARM::RteTestGenerator:Check Global Generator@0.9.0 from-pack: ARM::RteTestGenerator@0.1.0 selected-by: RteTestGenerator:Check Global Generator + files: + - file: ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Include/RteTestInc.h + category: header + version: 1.0.0 + - file: ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Templates/RteTest.gpdsc.template + category: genAsset + version: 1.0.0 + - file: ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.c.template + category: genSource + version: 1.0.0 + - file: ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.h.template + category: genHeader + version: 1.0.0 + - file: ../../../../single/RTE/RteTestGenerator/RteTestGen.params + category: genParams + attr: config + version: 0.9.0 generator: id: RteTestExternalGenerator path: ../../../../single/generated/single-core.cgen.yml diff --git a/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+CM0.cbuild-gen.yml b/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+CM0.cbuild-gen.yml index 59704670a..c2eb4b641 100644 --- a/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+CM0.cbuild-gen.yml +++ b/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+CM0.cbuild-gen.yml @@ -19,8 +19,10 @@ build-gen: - _RTE_ add-path: - ${DEVTOOLS(data)}/ExternalGenerator/single/RTE/_Debug_CM0 + - ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include add-path-asm: - ${DEVTOOLS(data)}/ExternalGenerator/single/RTE/_Debug_CM0 + - ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include output-dirs: intdir: ${DEVTOOLS(data)}/ExternalGenerator/tmp outdir: ${DEVTOOLS(data)}/ExternalGenerator/out/single-core/CM0/Debug @@ -32,6 +34,23 @@ build-gen: - component: ARM::RteTestGenerator:Check Global Generator@0.9.0 from-pack: ARM::RteTestGenerator@0.1.0 selected-by: RteTestGenerator:Check Global Generator + files: + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include/RteTestInc.h + category: header + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTest.gpdsc.template + category: genAsset + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.c.template + category: genSource + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.h.template + category: genHeader + version: 1.0.0 + - file: ${DEVTOOLS(data)}/ExternalGenerator/single/RTE/RteTestGenerator/RteTestGen.params + category: genParams + attr: config + version: 0.9.0 generator: id: RteTestExternalGenerator path: ${DEVTOOLS(data)}/ExternalGenerator/single/generated/single-core.cgen.yml diff --git a/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+CM0.cbuild.yml b/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+CM0.cbuild.yml index dc67b56ef..8bc0e6cb8 100644 --- a/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+CM0.cbuild.yml +++ b/tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/single-core.Debug+CM0.cbuild.yml @@ -22,11 +22,13 @@ build: - ../../../../single/generated/RTE/RteTest - ${CMSIS_PACK_ROOT}/ARM/RteTest/0.1.0/GlobalLevel - ${CMSIS_PACK_ROOT}/ARM/RteTest/0.1.0/Include + - ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Include add-path-asm: - ../../../../single/RTE/_Debug_CM0 - ../../../../single/generated/RTE/RteTest - ${CMSIS_PACK_ROOT}/ARM/RteTest/0.1.0/GlobalLevel - ${CMSIS_PACK_ROOT}/ARM/RteTest/0.1.0/Include + - ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Include output-dirs: intdir: ../../../../tmp outdir: . @@ -63,6 +65,23 @@ build: - component: ARM::RteTestGenerator:Check Global Generator@0.9.0 from-pack: ARM::RteTestGenerator@0.1.0 selected-by: RteTestGenerator:Check Global Generator + files: + - file: ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Include/RteTestInc.h + category: header + version: 1.0.0 + - file: ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Templates/RteTest.gpdsc.template + category: genAsset + version: 1.0.0 + - file: ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.c.template + category: genSource + version: 1.0.0 + - file: ${CMSIS_PACK_ROOT}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.h.template + category: genHeader + version: 1.0.0 + - file: ../../../../single/RTE/RteTestGenerator/RteTestGen.params + category: genParams + attr: config + version: 0.9.0 generator: id: RteTestExternalGenerator path: ../../../../single/generated/single-core.cgen.yml diff --git a/tools/projmgr/test/data/ExternalGenerator/ref/TrustZone/ns.Debug+CM0.cbuild-gen.yml b/tools/projmgr/test/data/ExternalGenerator/ref/TrustZone/ns.Debug+CM0.cbuild-gen.yml index e22c05231..471255f5c 100644 --- a/tools/projmgr/test/data/ExternalGenerator/ref/TrustZone/ns.Debug+CM0.cbuild-gen.yml +++ b/tools/projmgr/test/data/ExternalGenerator/ref/TrustZone/ns.Debug+CM0.cbuild-gen.yml @@ -20,8 +20,10 @@ build-gen: - _RTE_ add-path: - ${DEVTOOLS(data)}/ExternalGenerator/tz_ns/RTE/_Debug_CM0 + - ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include add-path-asm: - ${DEVTOOLS(data)}/ExternalGenerator/tz_ns/RTE/_Debug_CM0 + - ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include output-dirs: intdir: ${DEVTOOLS(data)}/ExternalGenerator/tmp outdir: ${DEVTOOLS(data)}/ExternalGenerator/out/ns/CM0/Debug @@ -33,6 +35,23 @@ build-gen: - component: ARM::RteTestGenerator:Check Global Generator@0.9.0 from-pack: ARM::RteTestGenerator@0.1.0 selected-by: RteTestGenerator:Check Global Generator + files: + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include/RteTestInc.h + category: header + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTest.gpdsc.template + category: genAsset + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.c.template + category: genSource + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.h.template + category: genHeader + version: 1.0.0 + - file: ${DEVTOOLS(data)}/ExternalGenerator/tz_ns/RTE/RteTestGenerator/RteTestGen.params + category: genParams + attr: config + version: 0.9.0 generator: id: RteTestExternalGenerator path: ${DEVTOOLS(data)}/ExternalGenerator/generated/CM0/ns.cgen.yml diff --git a/tools/projmgr/test/data/ExternalGenerator/ref/TrustZone/s.Debug+CM0.cbuild-gen.yml b/tools/projmgr/test/data/ExternalGenerator/ref/TrustZone/s.Debug+CM0.cbuild-gen.yml index 4c0cbcf0c..e94c1908e 100644 --- a/tools/projmgr/test/data/ExternalGenerator/ref/TrustZone/s.Debug+CM0.cbuild-gen.yml +++ b/tools/projmgr/test/data/ExternalGenerator/ref/TrustZone/s.Debug+CM0.cbuild-gen.yml @@ -20,8 +20,10 @@ build-gen: - _RTE_ add-path: - ${DEVTOOLS(data)}/ExternalGenerator/tz_s/RTE/_Debug_CM0 + - ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include add-path-asm: - ${DEVTOOLS(data)}/ExternalGenerator/tz_s/RTE/_Debug_CM0 + - ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include output-dirs: intdir: ${DEVTOOLS(data)}/ExternalGenerator/tmp outdir: ${DEVTOOLS(data)}/ExternalGenerator/out/s/CM0/Debug @@ -35,6 +37,23 @@ build-gen: - component: ARM::RteTestGenerator:Check Global Generator@0.9.0 from-pack: ARM::RteTestGenerator@0.1.0 selected-by: RteTestGenerator:Check Global Generator + files: + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Include/RteTestInc.h + category: header + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTest.gpdsc.template + category: genAsset + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.c.template + category: genSource + version: 1.0.0 + - file: ${DEVTOOLS(packs)}/ARM/RteTestGenerator/0.1.0/Templates/RteTestGen.h.template + category: genHeader + version: 1.0.0 + - file: ${DEVTOOLS(data)}/ExternalGenerator/tz_s/RTE/RteTestGenerator/RteTestGen.params + category: genParams + attr: config + version: 0.9.0 generator: id: RteTestExternalGenerator path: ${DEVTOOLS(data)}/ExternalGenerator/generated/CM0/s.cgen.yml