Added new 'disableDebugWirePreDisconnect' target parameter, for automatically disabling debugWire before disconnecting from the target.

This commit is contained in:
Nav
2021-12-27 04:17:15 +00:00
parent b9e579b4bc
commit 1e7e3c45fc
2 changed files with 6 additions and 6 deletions

View File

@@ -85,6 +85,12 @@ void EdbgAvr8Interface::configure(const TargetConfig& targetConfig) {
} }
this->configVariant = this->resolveConfigVariant().value_or(Avr8ConfigVariant::NONE); this->configVariant = this->resolveConfigVariant().value_or(Avr8ConfigVariant::NONE);
if (targetConfig.jsonObject.contains("disableDebugWirePreDisconnect")) {
this->disableDebugWireOnDeactivate = targetConfig.jsonObject.find(
"disableDebugWirePreDisconnect"
)->toBool();
}
} }
void EdbgAvr8Interface::setTargetParameters(const Avr8Bit::TargetParameters& config) { void EdbgAvr8Interface::setTargetParameters(const Avr8Bit::TargetParameters& config) {

View File

@@ -339,12 +339,6 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
* ISP, after they've finished a debug session. After programming the target, the user will need to cycle the * ISP, after they've finished a debug session. After programming the target, the user will need to cycle the
* target power before Bloom can gain access for another debug session. * target power before Bloom can gain access for another debug session.
* *
* NOTE: ATM, this isn't actually used anywhere. It will always be false. We may include this as a target
* config parameter, but we first need to consider the actual demand. AVRDUDE used to handle the disabling of
* the debugWire module, but a recent update resulted in it failing to do so. And that was some time ago, so
* we need to check if AVRDUDE and other programming software (MPLAB IPE) can handle the disabling of the
* debugWire module. If not, then we can come back to this.
*
* See disableDebugWire() method below. * See disableDebugWire() method below.
*/ */
bool disableDebugWireOnDeactivate = false; bool disableDebugWireOnDeactivate = false;