Added pageSize to TargetMemoryDescriptor struct
This commit is contained in:
@@ -696,7 +696,8 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
|||||||
TargetMemoryAddressRange(
|
TargetMemoryAddressRange(
|
||||||
flashStartAddress,
|
flashStartAddress,
|
||||||
flashStartAddress + this->targetParameters->flashSize.value() - 1
|
flashStartAddress + this->targetParameters->flashSize.value() - 1
|
||||||
)
|
),
|
||||||
|
this->targetParameters->flashPageSize
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
namespace Bloom::Targets
|
namespace Bloom::Targets
|
||||||
{
|
{
|
||||||
@@ -26,7 +27,9 @@ namespace Bloom::Targets
|
|||||||
|
|
||||||
TargetMemoryAddressRange() = default;
|
TargetMemoryAddressRange() = default;
|
||||||
TargetMemoryAddressRange(std::uint32_t startAddress, std::uint32_t endAddress)
|
TargetMemoryAddressRange(std::uint32_t startAddress, std::uint32_t endAddress)
|
||||||
: startAddress(startAddress), endAddress(endAddress) {};
|
: startAddress(startAddress)
|
||||||
|
, endAddress(endAddress)
|
||||||
|
{};
|
||||||
|
|
||||||
bool operator == (const TargetMemoryAddressRange& rhs) const {
|
bool operator == (const TargetMemoryAddressRange& rhs) const {
|
||||||
return this->startAddress == rhs.startAddress && this->endAddress == rhs.endAddress;
|
return this->startAddress == rhs.startAddress && this->endAddress == rhs.endAddress;
|
||||||
@@ -56,9 +59,17 @@ namespace Bloom::Targets
|
|||||||
{
|
{
|
||||||
TargetMemoryType type;
|
TargetMemoryType type;
|
||||||
TargetMemoryAddressRange addressRange;
|
TargetMemoryAddressRange addressRange;
|
||||||
|
std::optional<std::uint32_t> pageSize;
|
||||||
|
|
||||||
TargetMemoryDescriptor(TargetMemoryType type, TargetMemoryAddressRange addressRange)
|
TargetMemoryDescriptor(
|
||||||
: type(type), addressRange(addressRange) {};
|
TargetMemoryType type,
|
||||||
|
TargetMemoryAddressRange addressRange,
|
||||||
|
std::optional<std::uint32_t> pageSize = std::nullopt
|
||||||
|
)
|
||||||
|
: type(type)
|
||||||
|
, addressRange(addressRange)
|
||||||
|
, pageSize(pageSize)
|
||||||
|
{};
|
||||||
|
|
||||||
bool operator == (const TargetMemoryDescriptor& rhs) const {
|
bool operator == (const TargetMemoryDescriptor& rhs) const {
|
||||||
return this->type == rhs.type && this->addressRange == rhs.addressRange;
|
return this->type == rhs.type && this->addressRange == rhs.addressRange;
|
||||||
|
|||||||
Reference in New Issue
Block a user