-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[projmgr] Strip build metadata when handling pack versions (#1382)
Strip build metadata when handling pack versions. Throw a warning when specified metadata does not match the one from the loaded pack. Addresses #1339 (comment) Co-authored-by: Daniel Brondani <[email protected]>
- Loading branch information
1 parent
5d6dbb2
commit 6105f2a
Showing
10 changed files
with
164 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
tools/projmgr/test/data/TestSolution/PackMetadata/metadata.cproject.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/schemas/cproject.schema.json | ||
|
||
project: | ||
components: | ||
- component: Device:Startup | ||
- component: CORE |
18 changes: 18 additions & 0 deletions
18
tools/projmgr/test/data/TestSolution/PackMetadata/metadata.csolution.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/schemas/csolution.schema.json | ||
|
||
solution: | ||
|
||
build-types: | ||
- type: Debug | ||
|
||
target-types: | ||
- type: RteTest_ARMCM3 | ||
device: RteTest_ARMCM3 | ||
|
||
compiler: AC6 | ||
|
||
projects: | ||
- project: metadata.cproject.yml | ||
|
||
packs: | ||
- pack: ARM::[email protected]+user_metadata |
62 changes: 62 additions & 0 deletions
62
.../projmgr/test/data/TestSolution/PackMetadata/ref/metadata.Debug+RteTest_ARMCM3.cbuild.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
build: | ||
generated-by: csolution version 0.0.0+gd3ed8151 | ||
solution: ../data/TestSolution/PackMetadata/metadata.csolution.yml | ||
project: ../data/TestSolution/PackMetadata/metadata.cproject.yml | ||
context: metadata.Debug+RteTest_ARMCM3 | ||
compiler: AC6 | ||
device: RteTest_ARMCM3 | ||
device-pack: ARM::[email protected] | ||
processor: | ||
fpu: off | ||
core: Cortex-M3 | ||
packs: | ||
- pack: ARM::[email protected] | ||
path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.1.1 | ||
define: | ||
- ARMCM3 | ||
- _RTE_ | ||
add-path: | ||
- ../data/TestSolution/PackMetadata/RTE/_Debug_RteTest_ARMCM3 | ||
- ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.1.1/Device/ARM/ARMCM3/Include | ||
output-dirs: | ||
intdir: tmp/metadata/RteTest_ARMCM3/Debug | ||
outdir: out/metadata/RteTest_ARMCM3/Debug | ||
rtedir: ../data/TestSolution/PackMetadata/RTE | ||
output: | ||
- type: elf | ||
file: metadata.axf | ||
components: | ||
- component: ARM::Device:Startup&RteTest [email protected] | ||
condition: ARMCM3 RteTest | ||
from-pack: ARM::[email protected] | ||
selected-by: Device:Startup | ||
files: | ||
- file: ../data/TestSolution/PackMetadata/RTE/Device/RteTest_ARMCM3/ARMCM3_ac6.sct | ||
category: linkerScript | ||
attr: config | ||
version: 1.0.0 | ||
- file: ../data/TestSolution/PackMetadata/RTE/Device/RteTest_ARMCM3/startup_ARMCM3.c | ||
category: sourceC | ||
attr: config | ||
version: 2.0.3 | ||
- file: ../data/TestSolution/PackMetadata/RTE/Device/RteTest_ARMCM3/system_ARMCM3.c | ||
category: sourceC | ||
attr: config | ||
version: 1.0.1 | ||
- component: ARM::RteTest:[email protected] | ||
condition: Cortex-M Device | ||
from-pack: ARM::[email protected] | ||
selected-by: CORE | ||
linker: | ||
script: ../data/TestSolution/PackMetadata/RTE/Device/RteTest_ARMCM3/ARMCM3_ac6.sct | ||
constructed-files: | ||
- file: ../data/TestSolution/PackMetadata/RTE/_Debug_RteTest_ARMCM3/RTE_Components.h | ||
category: header | ||
licenses: | ||
- license: <unknown> | ||
packs: | ||
- pack: ARM::[email protected] | ||
components: | ||
- component: ::RteTest:CORE(API) | ||
- component: ARM::Device:Startup&RteTest [email protected] | ||
- component: ARM::RteTest:[email protected] |
31 changes: 31 additions & 0 deletions
31
tools/projmgr/test/data/TestSolution/PackMetadata/ref/metadata.Debug+RteTest_ARMCM3.cprj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> | ||
<cprj schemaVersion="2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd"> | ||
<created timestamp="2024-03-18T17:59:27" tool="csolution 0.0.0+gd3ed8151"/> | ||
|
||
<info isLayer="false"> | ||
<description>Automatically generated project</description> | ||
</info> | ||
|
||
<packages> | ||
<package name="RteTest_DFP" vendor="ARM" version="0.1.1:0.1.1"/> | ||
</packages> | ||
|
||
<compilers> | ||
<compiler name="AC6" version="6.18.0"/> | ||
</compilers> | ||
|
||
<target Dfpu="NO_FPU" Dname="RteTest_ARMCM3" Dvendor="ARM:82"> | ||
<output elf="metadata.axf" intdir="tmp/metadata/RteTest_ARMCM3/Debug" name="metadata" outdir="out/metadata/RteTest_ARMCM3/Debug" rtedir="../data/TestSolution/PackMetadata/RTE" type="exe"/> | ||
<ldflags compiler="AC6" file="../data/TestSolution/PackMetadata/RTE/Device/RteTest_ARMCM3/ARMCM3_ac6.sct"/> | ||
</target> | ||
|
||
<components> | ||
<component Cclass="Device" Cgroup="Startup" Cvariant="RteTest Startup" Cvendor="ARM" Cversion="2.0.3"> | ||
<file attr="config" category="linkerScript" name="Device/ARM/ARMCM3/Source/ARM/ARMCM3_ac6.sct" version="1.0.0"/> | ||
<file attr="config" category="sourceC" name="Device/ARM/ARMCM3/Source/startup_ARMCM3.c" version="2.0.3"/> | ||
<file attr="config" category="sourceC" name="Device/ARM/ARMCM3/Source/system_ARMCM3.c" version="1.0.1"/> | ||
</component> | ||
<component Cclass="RteTest" Cgroup="CORE" Cvendor="ARM" Cversion="0.1.1"/> | ||
</components> | ||
</cprj> | ||
|
5 changes: 5 additions & 0 deletions
5
tools/projmgr/test/data/TestSolution/PackMetadata/ref/metadata.cbuild-pack.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cbuild-pack: | ||
resolved-packs: | ||
- resolved-pack: ARM::[email protected] | ||
selected-by-pack: | ||
- ARM::[email protected]+user_metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters