From cfb1152423715062211cbc545349f8babba07f43 Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 4 May 2022 19:48:41 +0100 Subject: [PATCH] Included FLASH memory descriptor in AVR8 target descriptor --- src/Targets/Microchip/AVR/AVR8/Avr8.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index ea0fcdad..6ff95e16 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -676,6 +676,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit void Avr8::loadTargetMemoryDescriptors() { const auto ramStartAddress = this->targetParameters->ramStartAddress.value(); + const auto flashStartAddress = this->targetParameters->flashStartAddress.value(); this->targetMemoryDescriptorsByType.insert(std::pair( TargetMemoryType::RAM, @@ -688,6 +689,17 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit ) )); + this->targetMemoryDescriptorsByType.insert(std::pair( + TargetMemoryType::FLASH, + TargetMemoryDescriptor( + TargetMemoryType::FLASH, + TargetMemoryAddressRange( + flashStartAddress, + flashStartAddress + this->targetParameters->flashSize.value() - 1 + ) + ) + )); + if (this->targetParameters->eepromStartAddress.has_value() && this->targetParameters->eepromSize.has_value()) { const auto eepromStartAddress = this->targetParameters->eepromStartAddress.value();