Skip to content

Commit

Permalink
Improve load_map printout
Browse files Browse the repository at this point in the history
Use start->end instead of start+size
  • Loading branch information
will-v-pi committed Nov 19, 2024
1 parent a792948 commit 953378e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3109,17 +3109,18 @@ void info_guts(memory_access &raw_access, void *con) {
auto e = load_map->entries[i];
if (e.storage_address == 0) {
ss << "Clear 0x" << std::hex << e.runtime_address;
ss << "+0x" << std::hex << e.size;
ss << "->0x" << std::hex << e.runtime_address + e.size;
} else if (e.storage_address != e.runtime_address) {
if (is_address_initialized(rp2350_address_ranges_flash, e.runtime_address)) {
ss << "ERROR: COPY TO FLASH NOT PERMITTED ";
}
ss << "Copy 0x" << std::hex << e.storage_address;
ss << "+0x" << std::hex << e.size;
ss << "->0x" << std::hex << e.storage_address + e.size;
ss << " to 0x" << std::hex << e.runtime_address;
ss << "->0x" << std::hex << e.runtime_address; + e.size;
} else {
ss << "Load 0x" << std::hex << e.storage_address;
ss << "+0x" << std::hex << e.size;
ss << "->0x" << std::hex << e.storage_address + e.size;
}
info_pair("load map entry " + std::to_string(i), ss.str());
}
Expand Down

0 comments on commit 953378e

Please sign in to comment.