Corrected size() function in TargetMemoryDescriptor scruct.
This was hiding the issue with incorrect end addresses in AVR8 memory descriptors
This commit is contained in:
@@ -38,8 +38,8 @@ namespace Bloom::Targets
|
|||||||
TargetMemoryDescriptor(TargetMemoryType type, TargetMemoryAddressRange addressRange)
|
TargetMemoryDescriptor(TargetMemoryType type, TargetMemoryAddressRange addressRange)
|
||||||
: type(type), addressRange(addressRange) {};
|
: type(type), addressRange(addressRange) {};
|
||||||
|
|
||||||
std::uint32_t size() const {
|
[[nodiscard]] std::uint32_t size() const {
|
||||||
return this->addressRange.endAddress - this->addressRange.startAddress;
|
return (this->addressRange.endAddress - this->addressRange.startAddress) + 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user