diff --git a/tools/projmgr/include/ProjMgrRunDebug.h b/tools/projmgr/include/ProjMgrRunDebug.h index ec28ea664..50f94961e 100644 --- a/tools/projmgr/include/ProjMgrRunDebug.h +++ b/tools/projmgr/include/ProjMgrRunDebug.h @@ -211,8 +211,10 @@ struct RunDebugType { std::string compiler; std::string board; std::string boardPack; + std::string boardPackPath; std::string device; std::string devicePack; + std::string devicePackPath; std::vector algorithms; std::vector flashInfo; std::vector outputs; diff --git a/tools/projmgr/include/ProjMgrYamlParser.h b/tools/projmgr/include/ProjMgrYamlParser.h index ea6f1f525..9f3e16fb8 100644 --- a/tools/projmgr/include/ProjMgrYamlParser.h +++ b/tools/projmgr/include/ProjMgrYamlParser.h @@ -41,6 +41,7 @@ static constexpr const char* YAML_BLOCKS = "blocks"; static constexpr const char* YAML_BOARD = "board"; static constexpr const char* YAML_BOARD_BOOKS = "board-books"; static constexpr const char* YAML_BOARD_PACK = "board-pack"; +static constexpr const char* YAML_BOARD_PACK_PATH = "board-pack-path"; static constexpr const char* YAML_BRANCH_PROTECTION = "branch-protection"; static constexpr const char* YAML_BUILD = "build"; static constexpr const char* YAML_BUILD_GEN = "build-gen"; @@ -103,6 +104,7 @@ static constexpr const char* YAML_DESCRIPTION = "description"; static constexpr const char* YAML_DEVICE = "device"; static constexpr const char* YAML_DEVICE_BOOKS = "device-books"; static constexpr const char* YAML_DEVICE_PACK = "device-pack"; +static constexpr const char* YAML_DEVICE_PACK_PATH = "device-pack-path"; static constexpr const char* YAML_DORMANT = "dormant"; static constexpr const char* YAML_DOWNLOAD_URL = "download-url"; static constexpr const char* YAML_DPID = "dpid"; diff --git a/tools/projmgr/schemas/common.schema.json b/tools/projmgr/schemas/common.schema.json index 69d58c614..f07fbbcbd 100644 --- a/tools/projmgr/schemas/common.schema.json +++ b/tools/projmgr/schemas/common.schema.json @@ -2433,8 +2433,10 @@ "compiler": { "type": "string", "description": "Compiler toolchain used for code generation." }, "board": { "$ref": "#/definitions/BoardType" }, "board-pack": { "$ref": "#/definitions/PackID" }, + "board-pack-path": { "type": "string", "description": "Local path to the board pack." }, "device": { "$ref": "#/definitions/DeviceType" }, "device-pack": { "$ref": "#/definitions/PackID" }, + "device-pack-path": { "type": "string", "description": "Local path to the device pack." }, "output": { "$ref": "#/definitions/RunOutputFilesType" }, "system-resources": { "$ref": "#/definitions/SystemResourcesType" }, "system-descriptions": { "$ref": "#/definitions/RunSystemFilesType" }, diff --git a/tools/projmgr/src/ProjMgrCbuildRun.cpp b/tools/projmgr/src/ProjMgrCbuildRun.cpp index 2bcc3d7e7..f25b60ddc 100644 --- a/tools/projmgr/src/ProjMgrCbuildRun.cpp +++ b/tools/projmgr/src/ProjMgrCbuildRun.cpp @@ -47,8 +47,14 @@ ProjMgrCbuildRun::ProjMgrCbuildRun(YAML::Node node, SetNodeValue(node[YAML_COMPILER], debugRun.compiler); SetNodeValue(node[YAML_BOARD], debugRun.board); SetNodeValue(node[YAML_BOARD_PACK], debugRun.boardPack); + if (!debugRun.boardPackPath.empty()) { + SetNodeValue(node[YAML_BOARD_PACK_PATH], FormatPath(debugRun.boardPackPath, m_directory)); + } SetNodeValue(node[YAML_DEVICE], debugRun.device); SetNodeValue(node[YAML_DEVICE_PACK], debugRun.devicePack); + if (!debugRun.devicePackPath.empty()) { + SetNodeValue(node[YAML_DEVICE_PACK_PATH], FormatPath(debugRun.devicePackPath, m_directory)); + } SetFilesNode(node[YAML_OUTPUT], debugRun.outputs); SetResourcesNode(node[YAML_SYSTEM_RESOURCES], debugRun.systemResources); SetFilesNode(node[YAML_SYSTEM_DESCRIPTIONS], debugRun.systemDescriptions); diff --git a/tools/projmgr/src/ProjMgrRunDebug.cpp b/tools/projmgr/src/ProjMgrRunDebug.cpp index 96000705f..dcd9d40d0 100644 --- a/tools/projmgr/src/ProjMgrRunDebug.cpp +++ b/tools/projmgr/src/ProjMgrRunDebug.cpp @@ -70,7 +70,6 @@ bool ProjMgrRunDebug::CollectSettings(const vector& contexts, cons // device collections for (const auto& [pname, processor] : pnames) { if (context0->devicePack) { - m_runDebug.devicePack = context0->devicePack->GetPackageID(true); const auto& deviceAlgorithms = context0->rteDevice->GetEffectiveProperties("algorithm", pname); for (const auto& deviceAlgorithm : deviceAlgorithms) { PushBackUniquely(algorithms, deviceAlgorithm, pname); @@ -126,6 +125,10 @@ bool ProjMgrRunDebug::CollectSettings(const vector& contexts, cons } m_runDebug.systemResources.processors.push_back(item); } + if (context0->devicePack) { + m_runDebug.devicePack = context0->devicePack->GetPackageID(true); + m_runDebug.devicePackPath = context0->devicePack->GetAbsolutePackagePath(); + } // default ramstart/size: use the first memory with default=1 and rwx attribute // if not found, use ramstart/size from other algorithm in DFP @@ -156,6 +159,7 @@ bool ProjMgrRunDebug::CollectSettings(const vector& contexts, cons // board collections if (context0->boardPack) { m_runDebug.boardPack = context0->boardPack->GetPackageID(true); + m_runDebug.boardPackPath = context0->boardPack->GetAbsolutePackagePath(); Collection boardAlgorithms; context0->rteBoard->GetChildrenByTag("algorithm", boardAlgorithms); for (const auto& boardAlgorithm : boardAlgorithms) { diff --git a/tools/projmgr/test/data/ImageOnly/ref/image-only+CM0.cbuild-run.yml b/tools/projmgr/test/data/ImageOnly/ref/image-only+CM0.cbuild-run.yml index b48c78924..bc115cb46 100644 --- a/tools/projmgr/test/data/ImageOnly/ref/image-only+CM0.cbuild-run.yml +++ b/tools/projmgr/test/data/ImageOnly/ref/image-only+CM0.cbuild-run.yml @@ -5,6 +5,7 @@ cbuild-run: target-set: device: ARM::RteTest_ARMCM0 device-pack: ARM::RteTest_DFP@0.2.0 + device-pack-path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0 output: - file: ../images/image1.elf type: elf diff --git a/tools/projmgr/test/data/ImageOnly/ref/image-only-multicore+CM0.cbuild-run.yml b/tools/projmgr/test/data/ImageOnly/ref/image-only-multicore+CM0.cbuild-run.yml index b1a53af0d..cb66e52b9 100644 --- a/tools/projmgr/test/data/ImageOnly/ref/image-only-multicore+CM0.cbuild-run.yml +++ b/tools/projmgr/test/data/ImageOnly/ref/image-only-multicore+CM0.cbuild-run.yml @@ -5,6 +5,7 @@ cbuild-run: target-set: device: ARM::RteTest_ARMCM0_Dual device-pack: ARM::RteTest_DFP@0.2.0 + device-pack-path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0 output: - file: ../images/image1.elf type: elf diff --git a/tools/projmgr/test/data/TestRunDebug/ref/custom+TestHW.cbuild-run.yml b/tools/projmgr/test/data/TestRunDebug/ref/custom+TestHW.cbuild-run.yml index 8d5e80e73..98777c466 100644 --- a/tools/projmgr/test/data/TestRunDebug/ref/custom+TestHW.cbuild-run.yml +++ b/tools/projmgr/test/data/TestRunDebug/ref/custom+TestHW.cbuild-run.yml @@ -6,6 +6,7 @@ cbuild-run: compiler: AC6 device: ARM::RteTest_ARMCM4_NOFP device-pack: ARM::RteTest_DFP@0.2.0 + device-pack-path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0 output: - file: custom/TestHW/custom.axf info: generate by custom+TestHW diff --git a/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW.cbuild-run.yml b/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW.cbuild-run.yml index de6902c40..8be60bf37 100644 --- a/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW.cbuild-run.yml +++ b/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW.cbuild-run.yml @@ -6,8 +6,10 @@ cbuild-run: compiler: AC6 board: Keil::RteTest Test device variant:1.1.1 board-pack: ARM::RteTest_DFP@0.2.0 + board-pack-path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0 device: ARM::RteTest_ARMCM4_NOFP device-pack: ARM::RteTest_DFP@0.2.0 + device-pack-path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0 output: - file: run-debug/TestHW/run-debug.axf info: generate by run-debug+TestHW diff --git a/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW2.cbuild-run.yml b/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW2.cbuild-run.yml index c52fa75f9..ab9eb179d 100644 --- a/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW2.cbuild-run.yml +++ b/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW2.cbuild-run.yml @@ -6,8 +6,10 @@ cbuild-run: compiler: AC6 board: Keil::RteTest-Test-board With.Memory:1.1.1 board-pack: ARM::RteTest_DFP@0.2.0 + board-pack-path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0 device: ARM::RteTest_ARMCM3 device-pack: ARM::RteTest_DFP@0.2.0 + device-pack-path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0 output: - file: run-debug/TestHW2/run-debug.axf info: generate by run-debug+TestHW2 diff --git a/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW3.cbuild-run.yml b/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW3.cbuild-run.yml index 8fce09986..81d44bab3 100644 --- a/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW3.cbuild-run.yml +++ b/tools/projmgr/test/data/TestRunDebug/ref/run-debug+TestHW3.cbuild-run.yml @@ -6,6 +6,7 @@ cbuild-run: compiler: AC6 device: ARM::RteTest_ARMCM0_Dual device-pack: ARM::RteTest_DFP@0.2.0 + device-pack-path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0 output: - file: core0/TestHW3/core0.axf info: generate by core0+TestHW3 diff --git a/tools/projmgr/test/data/WestSupport/ref/solution+CM0.cbuild-run.yml b/tools/projmgr/test/data/WestSupport/ref/solution+CM0.cbuild-run.yml index eece84aa2..8f3f0ef7f 100644 --- a/tools/projmgr/test/data/WestSupport/ref/solution+CM0.cbuild-run.yml +++ b/tools/projmgr/test/data/WestSupport/ref/solution+CM0.cbuild-run.yml @@ -6,8 +6,10 @@ cbuild-run: compiler: AC6 board: Keil::RteTest Dummy board:1.2.3 board-pack: ARM::RteTest_DFP@0.2.0 + board-pack-path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0 device: ARM::RteTest_ARMCM0_Dual device-pack: ARM::RteTest_DFP@0.2.0 + device-pack-path: ${CMSIS_PACK_ROOT}/ARM/RteTest_DFP/0.2.0 output: - file: core0/CM0/Debug/zephyr/zephyr.elf info: generate by core0.Debug+CM0