Skip to content

Commit d71d49b

Browse files
authored
[cbuild-gen-idx.yml] Always output fully qualified device and board identifier
1 parent 262175a commit d71d49b

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

tools/projmgr/src/ProjMgrCbuildGenIdx.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,16 @@ ProjMgrCbuildGenIdx::ProjMgrCbuildGenIdx(YAML::Node node, const vector<ContextIt
2828
YAML::Node generatorNode;
2929
SetNodeValue(generatorNode[YAML_ID], generator.id);
3030
SetNodeValue(generatorNode[YAML_OUTPUT], FormatPath(gendir, output));
31-
SetNodeValue(generatorNode[YAML_DEVICE], context->deviceItem.name);
32-
SetNodeValue(generatorNode[YAML_BOARD], context->board);
31+
if (!context->deviceItem.name.empty()) {
32+
const auto& device = context->deviceItem.vendor + "::" + context->deviceItem.name +
33+
(context->deviceItem.pname.empty() ? "" : ":" + context->deviceItem.pname);
34+
SetNodeValue(generatorNode[YAML_DEVICE], device);
35+
}
36+
if (!context->boardItem.name.empty()) {
37+
const auto& board = context->boardItem.vendor + "::" + context->boardItem.name +
38+
(context->boardItem.revision.empty() ? "" : ":" + context->boardItem.revision);
39+
SetNodeValue(generatorNode[YAML_BOARD], board);
40+
}
3341
SetNodeValue(generatorNode[YAML_PROJECT_TYPE], type);
3442
for (const auto& sibling : siblings) {
3543
YAML::Node cbuildGenNode;

tools/projmgr/test/data/ExternalGenerator/ref/MultiCore/extgen.cbuild-gen-idx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ build-gen-idx:
33
generators:
44
- id: RteTestExternalGenerator
55
output: ${DEVTOOLS(data)}/ExternalGenerator/generated/MultiCore
6-
device: RteTest_ARMCM0_Dual
6+
device: ARM::RteTest_ARMCM0_Dual:cm0_core0
77
project-type: multi-core
88
cbuild-gens:
99
- cbuild-gen: ${DEVTOOLS(data)}/ExternalGenerator/tmp/boot.Debug+MultiCore.cbuild-gen.yml

tools/projmgr/test/data/ExternalGenerator/ref/SingleCore/extgen.cbuild-gen-idx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ build-gen-idx:
33
generators:
44
- id: RteTestExternalGenerator
55
output: ${DEVTOOLS(data)}/ExternalGenerator/single/generated
6-
device: RteTestGen_ARMCM0
6+
device: ARM::RteTestGen_ARMCM0
77
project-type: single-core
88
cbuild-gens:
99
- cbuild-gen: ${DEVTOOLS(data)}/ExternalGenerator/tmp/single-core.Debug+CM0.cbuild-gen.yml

tools/projmgr/test/data/ExternalGenerator/ref/TrustZone/extgen.cbuild-gen-idx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ build-gen-idx:
33
generators:
44
- id: RteTestExternalGenerator
55
output: ${DEVTOOLS(data)}/ExternalGenerator/generated/CM0
6-
device: RteTestGen_ARMCM0
6+
device: ARM::RteTestGen_ARMCM0
77
project-type: trustzone
88
cbuild-gens:
99
- cbuild-gen: ${DEVTOOLS(data)}/ExternalGenerator/tmp/ns.Debug+CM0.cbuild-gen.yml

0 commit comments

Comments
 (0)