diff --git a/src/Targets/Microchip/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR8/Avr8.cpp index 23989968..3bb7d5e4 100644 --- a/src/Targets/Microchip/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR8/Avr8.cpp @@ -335,6 +335,14 @@ namespace Targets::Microchip::Avr8 } } + for (auto& [addressSpaceKey, addressSpaceDescriptor] : descriptor.addressSpaceDescriptorsByKey) { + for (auto& [segmentKey, segmentDescriptor] : addressSpaceDescriptor.segmentDescriptorsByKey) { + if (segmentDescriptor.type == TargetMemorySegmentType::FLASH) { + segmentDescriptor.debugModeAccess.writeable = false; + } + } + } + // Make RAM, FLASH and EEPROM available for inspection the Insight GUI. descriptor.getMemorySegmentDescriptor("data", "internal_ram").inspectionEnabled = true; descriptor.getMemorySegmentDescriptor("prog", "internal_program_memory").inspectionEnabled = true;