Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tools/projmgr/include/ProjMgrWorker.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ struct DebuggerType {
* images
* selected target-set
* load offset for generated binary
* load modes
*/
struct ContextItem {
CdefaultItem* cdefault = nullptr;
Expand Down Expand Up @@ -426,6 +427,7 @@ struct ContextItem {
std::vector<ImageItem> images;
std::string targetSet;
std::string loadOffset;
StrMap loadMode;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion tools/projmgr/schemas/common.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2363,7 +2363,7 @@
},
"additionalProperties": false,
"oneOf": [
{ "required": ["project-context"], "not": {"required": ["image", "load", "type"]} },
{ "required": ["project-context"], "not": {"required": ["image"]} },
{ "required": ["image"], "not": {"required": ["project-context"]} }
]
},
Expand Down
3 changes: 2 additions & 1 deletion tools/projmgr/src/ProjMgrRunDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ void ProjMgrRunDebug::AddGeneratedImage(const ContextItem* context, const string
image.file = file;
image.info = "generate by " + context->name;
image.type = type;
image.load = load;
image.load = context->loadMode.find(type) != context->loadMode.end() ? context->loadMode.at(type) :
context->loadMode.find("") != context->loadMode.end() ? context->loadMode.at("") : load;
image.pname = context->deviceItem.pname;
image.offset = type == RteConstants::OUTPUT_TYPE_BIN ? context->loadOffset : RteUtils::EMPTY_STRING;
m_runDebug.outputs.push_back(image);
Expand Down
3 changes: 3 additions & 0 deletions tools/projmgr/src/ProjMgrWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2540,6 +2540,9 @@ bool ProjMgrWorker::ProcessImages(ContextItem& context) {
}
else if (item.context == context.cproject->name + (context.type.build.empty() ? "" : '.' + context.type.build)) {
context.loadOffset = item.offset;
if (!item.load.empty()) {
context.loadMode[item.type] = item.load;
}
}
}
return true;
Expand Down
3 changes: 3 additions & 0 deletions tools/projmgr/test/data/TestRunDebug/core1.cproject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
project:

device: :cm0_core1

output:
type: [elf, bin]
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ cbuild-run:
- file: out/core0/TestHW3/core0.axf
info: generate by core0+TestHW3
type: elf
load: image+symbols
load: none
pname: cm0_core0
- file: out/core1/TestHW3/core1.axf
info: generate by core1+TestHW3
type: elf
load: image+symbols
load: none
pname: cm0_core1
- file: out/core1/TestHW3/core1.bin
info: generate by core1+TestHW3
type: bin
load: image
pname: cm0_core1
system-resources:
memory:
Expand Down
6 changes: 6 additions & 0 deletions tools/projmgr/test/data/TestRunDebug/run-debug.csolution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ solution:
- set:
images:
- project-context: core0
load: none
- project-context: core1
type: elf
load: none
- project-context: core1
type: bin
load: image
debugger:
name: CMSIS-DAP
start-pname: cm0_core1
Expand Down
Loading