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
28 changes: 20 additions & 8 deletions tools/projmgr/src/ProjMgrRunDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,26 @@ bool ProjMgrRunDebug::CollectSettings(const vector<ContextItem*>& contexts, cons
if (item.type.empty()) {
item.type = ProjMgrUtils::FileTypeFromExtension(item.image);
}
if (item.load.empty()) {
// files with 'type: elf' get 'load: image+symbols'
// files with 'type: lib' get 'load: none'
// all other file types get 'load: image'
item.load = item.type == RteConstants::OUTPUT_TYPE_ELF ? LOAD_IMAGE_SYMBOLS :
item.type == RteConstants::OUTPUT_TYPE_LIB ? LOAD_NONE : LOAD_IMAGE;
}
m_runDebug.outputs.push_back({ item.image, item.info, item.type, item.load, item.offset, item.pname });
bool merged = false;
for (auto& output : m_runDebug.outputs) {
if (output.file == item.image && output.type == item.type) {
// set load/offset of already inserted output with same image/type
output.load = item.load.empty() ? output.load : item.load;
output.offset = item.offset.empty() ? output.offset : item.offset;
merged = true;
break;
}
}
if (!merged) {
if (item.load.empty()) {
// files with 'type: elf' get 'load: image+symbols'
// files with 'type: lib' get 'load: none'
// all other file types get 'load: image'
item.load = item.type == RteConstants::OUTPUT_TYPE_ELF ? LOAD_IMAGE_SYMBOLS :
item.type == RteConstants::OUTPUT_TYPE_LIB ? LOAD_NONE : LOAD_IMAGE;
}
m_runDebug.outputs.push_back({ item.image, item.info, item.type, item.load, item.offset, item.pname });
}
}

// debug vars
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ cbuild-run:
- file: run-debug/TestHW/run-debug.axf
info: generate by run-debug+TestHW
type: elf
load: symbols
load: none
- file: run-debug/TestHW/run-debug.hex
info: generate by run-debug+TestHW
type: hex
load: image
load: none
- file: run-debug/TestHW/run-debug.bin
info: generate by run-debug+TestHW
type: bin
load: none
load: image
load-offset: 0x0000A000
- file: ../../data/TestRunDebug/customImage.bin
info: load image info
Expand Down
3 changes: 3 additions & 0 deletions tools/projmgr/test/data/TestRunDebug/run-debug.csolution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ solution:
dbgconf: RTE/Device/RteTest1/RteTest1.dbgconf
images:
- project-context: run-debug
load: none
- image: $bin(run-debug)$
load: image
load-offset: 0x0000A000
- image: customImage.bin
info: load image info
Expand Down
Loading