From e3e37ace4bb1367fa905e732aa2dece2883d2632 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 18 Dec 2022 21:35:10 +0000 Subject: [PATCH] Ignore erase requests for debugWire targets --- src/Targets/Microchip/AVR/AVR8/Avr8.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index 119fff43..dcabff6a 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -376,6 +376,11 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit void Avr8::eraseMemory(TargetMemoryType memoryType) { if (memoryType == TargetMemoryType::FLASH) { + if (this->targetConfig->physicalInterface == PhysicalInterface::DEBUG_WIRE) { + // debugWire targets do not need to be erased + return; + } + return this->avr8DebugInterface->eraseProgramMemory(); }