Corrected issue with JTAG/debugWire AVR8 parameters including mapped IO memory address offset

This commit is contained in:
Nav
2021-07-04 00:29:43 +01:00
parent 12fbbc892d
commit 8145708851
5 changed files with 61 additions and 7 deletions

View File

@@ -226,6 +226,26 @@ std::optional<MemorySegment> TargetDescriptionFile::getRamMemorySegment() const
return std::nullopt;
}
std::optional<MemorySegment> TargetDescriptionFile::getIoMemorySegment() const {
auto& addressMapping = this->addressSpacesMappedById;
if (addressMapping.contains("data")) {
auto& dataAddressSpace = addressMapping.at("data");
auto& dataMemorySegments = dataAddressSpace.memorySegmentsByTypeAndName;
if (dataMemorySegments.contains(MemorySegmentType::IO)) {
auto& ramMemorySegments = dataMemorySegments.at(MemorySegmentType::IO);
auto ramMemorySegmentIt = ramMemorySegments.begin();
if (ramMemorySegmentIt != ramMemorySegments.end()) {
return ramMemorySegmentIt->second;
}
}
}
return std::nullopt;
}
std::optional<MemorySegment> TargetDescriptionFile::getRegisterMemorySegment() const {
auto& addressMapping = this->addressSpacesMappedById;