From 49cb5da8726ad3c859081072d65635e1df9a86ce Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 10 Oct 2021 23:17:36 +0100 Subject: [PATCH] Corrected memory descriptor address range for internal RAM on AVR8 targets --- src/Targets/Microchip/AVR/AVR8/Avr8.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index d543eb0c..b8f06706 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -554,13 +554,16 @@ void Avr8::loadTargetRegisterDescriptors() { } void Avr8::loadTargetMemoryDescriptors() { + auto ramSize = this->targetParameters->ramSize.value(); + auto ramStartAddress = this->targetParameters->ramStartAddress.value(); + this->targetMemoryDescriptorsByType.insert(std::pair( TargetMemoryType::RAM, TargetMemoryDescriptor( TargetMemoryType::RAM, TargetMemoryAddressRange( - this->targetParameters->ramStartAddress.value(), - this->targetParameters->ramSize.value() + ramStartAddress, + ramStartAddress + ramSize ) ) ));