Corrected bug with leaving programming mode on Snap and PICkit 4 debug tools
This commit is contained in:
@@ -18,6 +18,7 @@ namespace Bloom::DebugToolDrivers
|
||||
|
||||
try {
|
||||
EdbgDevice::init();
|
||||
this->edbgAvr8Interface->setReactivateJtagTargetPostProgrammingMode(true);
|
||||
|
||||
} catch (const DeviceNotFound& exception) {
|
||||
/*
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Bloom::DebugToolDrivers
|
||||
|
||||
try {
|
||||
EdbgDevice::init();
|
||||
this->edbgAvr8Interface->setReactivateJtagTargetPostProgrammingMode(true);
|
||||
|
||||
} catch (const DeviceNotFound& exception) {
|
||||
/*
|
||||
|
||||
@@ -898,6 +898,12 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
}
|
||||
|
||||
this->programmingModeEnabled = false;
|
||||
|
||||
if (this->configVariant == Avr8ConfigVariant::MEGAJTAG && this->reactivateJtagTargetPostProgrammingMode) {
|
||||
this->deactivatePhysical();
|
||||
this->targetAttached = false;
|
||||
this->activate();
|
||||
}
|
||||
}
|
||||
|
||||
std::map<Family, std::map<PhysicalInterface, Avr8ConfigVariant>>
|
||||
|
||||
@@ -74,6 +74,10 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
this->maximumMemoryAccessSizePerRequest = maximumSize;
|
||||
}
|
||||
|
||||
void setReactivateJtagTargetPostProgrammingMode(bool reactivateJtagTargetPostProgrammingMode) {
|
||||
this->reactivateJtagTargetPostProgrammingMode = reactivateJtagTargetPostProgrammingMode;
|
||||
}
|
||||
|
||||
/*
|
||||
* The public methods below implement the interface defined by the Avr8Interface class.
|
||||
* See the comments in that class for more info on the expected behaviour of each method.
|
||||
@@ -328,6 +332,8 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
*/
|
||||
std::optional<Targets::TargetMemorySize> maximumMemoryAccessSizePerRequest;
|
||||
|
||||
bool reactivateJtagTargetPostProgrammingMode = false;
|
||||
|
||||
/**
|
||||
* We keep record of the current target state for caching purposes. We'll only refresh the target state if the
|
||||
* target is running. If it has already stopped, then we assume it cannot transition to a running state without
|
||||
|
||||
Reference in New Issue
Block a user