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
4 changes: 2 additions & 2 deletions tools/projmgr/include/ProjMgrWorker.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ struct DebuggerType {
* images
* selected target-set
* load offset for generated binary
* load modes
* elf load mode
* image only flag
*/
struct ContextItem {
Expand Down Expand Up @@ -494,7 +494,7 @@ struct ContextItem {
std::vector<ImageItem> images;
std::string targetSet;
std::string loadOffset;
StrMap loadMode;
std::string elfLoadMode;
bool imageOnly = false;
};

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 @@ -2371,7 +2371,7 @@
},
"additionalProperties": false,
"oneOf": [
{ "required": ["project-context"], "not": {"required": ["image"]} },
{ "required": ["project-context"], "not": {"required": ["image", "type"]} },
{ "required": ["image"], "not": {"required": ["project-context"]} }
]
},
Expand Down
3 changes: 1 addition & 2 deletions tools/projmgr/src/ProjMgrRunDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,7 @@ void ProjMgrRunDebug::AddGeneratedImage(const ContextItem* context, const string
image.file = file;
image.info = "generate by " + context->name;
image.type = type;
image.load = context->loadMode.find(type) != context->loadMode.end() ? context->loadMode.at(type) :
context->loadMode.find("") != context->loadMode.end() ? context->loadMode.at("") : load;
image.load = type == RteConstants::OUTPUT_TYPE_ELF && !context->elfLoadMode.empty() ? context->elfLoadMode : 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
2 changes: 1 addition & 1 deletion tools/projmgr/src/ProjMgrWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2595,7 +2595,7 @@ 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;
context.elfLoadMode = item.load;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tools/projmgr/test/data/TestRunDebug/core1.cproject.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ project:
device: :cm0_core1

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