Skip to content

Commit cefdc7a

Browse files
authored
[projmgr] Schema refinements around west
1 parent 584a91d commit cefdc7a

File tree

7 files changed

+13
-16
lines changed

7 files changed

+13
-16
lines changed

tools/projmgr/schemas/common.schema.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,11 @@
389389
]
390390
}
391391
},
392+
"WestDefinesType": {
393+
"title": "west-defs:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#west-defs",
394+
"description": "Defines forwarded to CMake via west build system.",
395+
"$ref": "#/definitions/DefinesType"
396+
},
392397
"DefinesType": {
393398
"title": "define:\nDocumentation: https://open-cmsis-pack.github.io/cmsis-toolbox/YML-Input-Format/#define",
394399
"type": "array",
@@ -611,7 +616,7 @@
611616
"undefine": { "$ref": "#/definitions/UndefinesType" },
612617
"variables": { "$ref": "#/definitions/VariablesType" },
613618
"warnings": { "$ref": "#/definitions/WarningsType" },
614-
"west-defs": { "$ref": "#/definitions/DefinesType" }
619+
"west-defs": { "$ref": "#/definitions/WestDefinesType" }
615620
},
616621
"additionalProperties": false,
617622
"required" : [ "type"]
@@ -649,7 +654,7 @@
649654
"undefine": { "$ref": "#/definitions/UndefinesType" },
650655
"variables": { "$ref": "#/definitions/VariablesType" },
651656
"warnings": { "$ref": "#/definitions/WarningsType" },
652-
"west-defs": { "$ref": "#/definitions/DefinesType" }
657+
"west-defs": { "$ref": "#/definitions/WestDefinesType" }
653658
},
654659
"additionalProperties": false,
655660
"required" : [ "type"]
@@ -676,8 +681,9 @@
676681
"not-for-context": { "$ref": "#/definitions/NotForContext" }
677682
},
678683
"additionalProperties": false,
679-
"oneOf": [
680-
{ "$ref": "#/definitions/TypeListMutualExclusion"}
684+
"allOf": [
685+
{ "$ref": "#/definitions/TypeListMutualExclusion" },
686+
{ "oneOf": [ { "required": ["project"], "not": {"required": ["west"]} }, { "required": ["west"], "not": {"required": ["project"]} } ] }
681687
]
682688
},
683689
"ProcessorTrustzone": {
@@ -2426,7 +2432,7 @@
24262432
"project-id": { "type": "string", "description": "Project identifier (default: last sub-dir name of app-path)." },
24272433
"board": { "type": "string", "description": "Board name used for west build invocation (default: variable $west-board$)."},
24282434
"device": { "$ref": "#/definitions/ProcessorNameType" },
2429-
"west-defs": { "$ref": "#/definitions/DefinesType" },
2435+
"west-defs": { "$ref": "#/definitions/WestDefinesType" },
24302436
"west-opts": { "type": "string", "description": "Options for the west tool (default: empty)." }
24312437
},
24322438
"additionalProperties": false,

tools/projmgr/test/data/WestSupport/core0/core0.cproject.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

tools/projmgr/test/data/WestSupport/core1/core1.cproject.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

tools/projmgr/test/data/WestSupport/ref/core0.Debug+CM0.cbuild.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
build:
22
generated-by: csolution version 0.0.0
33
solution: ../../../../solution.csolution.yml
4-
project: ../../../../core0/core0.cproject.yml
54
context: core0.Debug+CM0
65
compiler: AC6
76
board: Keil::RteTest Dummy board:1.2.3

tools/projmgr/test/data/WestSupport/ref/core1.Debug+CM0.cbuild.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
build:
22
generated-by: csolution version 0.0.0
33
solution: ../../../../solution.csolution.yml
4-
project: ../../../../core1/core1.cproject.yml
54
context: core1.Debug+CM0
65
compiler: AC6
76
board: Keil::RteTest Dummy board:1.2.3

tools/projmgr/test/data/WestSupport/ref/solution.cbuild-idx.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ build-idx:
33
csolution: solution.csolution.yml
44
cbuild-run: out/solution+CM0.cbuild-run.yml
55
tmpdir: tmp
6-
cprojects:
7-
- cproject: core0/core0.cproject.yml
8-
- cproject: core1/core1.cproject.yml
96
cbuilds:
107
- cbuild: out/core0/CM0/Debug/core0.Debug+CM0.cbuild.yml
118
west: true

tools/projmgr/test/data/WestSupport/solution.csolution.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ solution:
2424

2525
# List related projects.
2626
projects:
27-
- project: core0/core0.cproject.yml
28-
west:
27+
- west:
2928
app-path: ./west/core0
3029
device: :cm0_core0
3130
west-defs:
3231
- CORE: 0
33-
- project: core1/core1.cproject.yml
34-
west:
32+
- west:
3533
app-path: ./west/core1
3634
project-id: core1
3735
device: :cm0_core1

0 commit comments

Comments
 (0)