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(); }