From ee361f7c91c662ebdc59f2c262bd07e17a48e9d4 Mon Sep 17 00:00:00 2001 From: Daniel Brondani Date: Mon, 27 Jul 2026 09:35:40 +0200 Subject: [PATCH] [projmgr] Add `memory.pname` into input target `type` node --- tools/projmgr/include/ProjMgrParser.h | 2 ++ tools/projmgr/schemas/common.schema.json | 1 + tools/projmgr/src/ProjMgrRunDebug.cpp | 1 + tools/projmgr/src/ProjMgrYamlParser.cpp | 1 + .../data/TestRunDebug/ref/run-debug+TestHW3.cbuild-run.yml | 5 +++++ .../projmgr/test/data/TestRunDebug/run-debug.csolution.yml | 6 ++++++ 6 files changed, 16 insertions(+) diff --git a/tools/projmgr/include/ProjMgrParser.h b/tools/projmgr/include/ProjMgrParser.h index b270dcef4..93853b1f0 100644 --- a/tools/projmgr/include/ProjMgrParser.h +++ b/tools/projmgr/include/ProjMgrParser.h @@ -120,6 +120,7 @@ struct ProcessorItem { * start * size * algorithm + * pname */ struct MemoryItem { std::string name; @@ -127,6 +128,7 @@ struct MemoryItem { std::string start; std::string size; std::string algorithm; + std::string pname; }; /** diff --git a/tools/projmgr/schemas/common.schema.json b/tools/projmgr/schemas/common.schema.json index d4e75671c..5ef42b77c 100644 --- a/tools/projmgr/schemas/common.schema.json +++ b/tools/projmgr/schemas/common.schema.json @@ -2108,6 +2108,7 @@ "access": { "title": "access:", "$ref": "#/definitions/MemoryAccessType" }, "start": { "title": "start:", "type": "number", "description": "Base address of the memory." }, "size": { "title": "size:", "type": "number", "description": "Size of the memory." }, + "pname": { "title": "pname:", "type": "string", "description": "Only accessible by the specified processor." }, "algorithm":{ "title": "algorithm:", "type": "string", "description": "Programming algorithm for download." } }, "additionalProperties": false, diff --git a/tools/projmgr/src/ProjMgrRunDebug.cpp b/tools/projmgr/src/ProjMgrRunDebug.cpp index 59e992410..0f6f2a7be 100644 --- a/tools/projmgr/src/ProjMgrRunDebug.cpp +++ b/tools/projmgr/src/ProjMgrRunDebug.cpp @@ -229,6 +229,7 @@ bool ProjMgrRunDebug::CollectSettings(const vector& contexts, cons memItem.access = memory.access; memItem.start = RteUtils::StringToULL(memory.start); memItem.size = RteUtils::StringToULL(memory.size); + memItem.pname = memory.pname; m_runDebug.systemResources.memories.push_back(memItem); if (!memory.algorithm.empty()) { AlgorithmType algoItem; diff --git a/tools/projmgr/src/ProjMgrYamlParser.cpp b/tools/projmgr/src/ProjMgrYamlParser.cpp index ad7cc8577..8220afd97 100644 --- a/tools/projmgr/src/ProjMgrYamlParser.cpp +++ b/tools/projmgr/src/ProjMgrYamlParser.cpp @@ -1097,6 +1097,7 @@ bool ProjMgrYamlParser::ParseTargetType(const YAML::Node& parent, const string& MemoryItem memoryItem; ParseString(memoryEntry, YAML_NAME, memoryItem.name); ParseString(memoryEntry, YAML_ACCESS, memoryItem.access); + ParseString(memoryEntry, YAML_PNAME, memoryItem.pname); ParseString(memoryEntry, YAML_ALGORITHM, memoryItem.algorithm); ParseNumber(memoryEntry, file, YAML_START, memoryItem.start); ParseNumber(memoryEntry, file, YAML_SIZE, memoryItem.size); 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 9a174fff4..d12c87712 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 @@ -60,6 +60,11 @@ cbuild-run: size: 0x00020000 default: true from-pack: ARM::RteTest_DFP@0.2.0 + - name: CustomMemoryCore0 + access: rwx + start: 0x40000000 + size: 0x00020000 + pname: cm0_core0 processors: - core: Cortex-M0 revision: r0p0 diff --git a/tools/projmgr/test/data/TestRunDebug/run-debug.csolution.yml b/tools/projmgr/test/data/TestRunDebug/run-debug.csolution.yml index a25e9fa70..c567e051d 100644 --- a/tools/projmgr/test/data/TestRunDebug/run-debug.csolution.yml +++ b/tools/projmgr/test/data/TestRunDebug/run-debug.csolution.yml @@ -46,6 +46,12 @@ solution: - image: customLibrary.x type: lib - type: TestHW3 + memory: + - start: 0x40000000 + size: 0x00020000 + name: CustomMemoryCore0 + access: rwx + pname: cm0_core0 target-set: - set: images: