Support for reserved hardware breakpoint (for stepping on AVR8 targets)

This commit is contained in:
Nav
2023-09-23 21:50:04 +01:00
parent 0851da3a7a
commit 9904d93314
5 changed files with 68 additions and 18 deletions

View File

@@ -697,7 +697,7 @@ namespace Targets::Microchip::Avr::Avr8Bit
}
BreakpointResources Avr8::getBreakpointResources() {
auto maxHardwareBreakpoints = 0;
auto maxHardwareBreakpoints = static_cast<std::uint16_t>(0);
switch (this->targetConfig.physicalInterface) {
case PhysicalInterface::JTAG: {
@@ -719,7 +719,11 @@ namespace Targets::Microchip::Avr::Avr8Bit
return BreakpointResources(
maxHardwareBreakpoints,
std::nullopt
std::nullopt,
std::min(
static_cast<std::uint16_t>(this->targetConfig.reserveSteppingBreakpoint ? 1 : 0),
maxHardwareBreakpoints
)
);
}