Disabling use of the masked memory read command in the EDBG driver, by default

This commit is contained in:
Nav
2022-01-22 16:15:16 +00:00
parent 9ebd2b9d57
commit 20155ee8ff
6 changed files with 4 additions and 26 deletions

View File

@@ -31,15 +31,6 @@ void MplabPickit4::init() {
this->edbgAvr8Interface = std::make_unique<EdbgAvr8Interface>(this->edbgInterface);
/*
* Like the MPLAB Snap, the PICkit 4 doesn't seem to operate correctly when actioning the masked memory read
* command. The data returned in response to the command appears to be completely incorrect.
*
* For the above reason, we avoid using the masked memory read command by implementing the masking on our end.
* See the EdbgAvr8Interface class for more.
*/
this->edbgAvr8Interface->setAvoidMaskedMemoryRead(true);
this->setInitialised(true);
}

View File

@@ -30,16 +30,6 @@ void MplabSnap::init() {
}
this->edbgAvr8Interface = std::make_unique<EdbgAvr8Interface>(this->edbgInterface);
/*
* The MPLAB Snap doesn't seem to operate correctly when actioning the masked memory read command. The data
* returned in response to the command appears to be completely incorrect. It may be a bug in the firmware.
*
* For the above reason, we avoid using the masked memory read command by implementing the masking on our end.
* See the EdbgAvr8Interface class for more.
*/
this->edbgAvr8Interface->setAvoidMaskedMemoryRead(true);
this->setInitialised(true);
}

View File

@@ -30,7 +30,6 @@ void XplainedMini::init() {
}
this->edbgAvr8Interface = std::make_unique<EdbgAvr8Interface>(this->edbgInterface);
this->edbgAvr8Interface->setAvoidMaskedMemoryRead(true);
this->setInitialised(true);
}

View File

@@ -30,7 +30,6 @@ void XplainedNano::init() {
}
this->edbgAvr8Interface = std::make_unique<EdbgAvr8Interface>(this->edbgInterface);
this->edbgAvr8Interface->setAvoidMaskedMemoryRead(true);
this->setInitialised(true);
}

View File

@@ -39,10 +39,6 @@ void XplainedPro::init() {
* This means we must enforce a hard limit on the number of bytes we attempt to access, per request.
*/
this->edbgAvr8Interface->setMaximumMemoryAccessSizePerRequest(256);
// Masked read memory commands are not available on the Xplained Pro debug tool.
this->edbgAvr8Interface->setAvoidMaskedMemoryRead(true);
this->setInitialised(true);
}

View File

@@ -41,6 +41,9 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
* FLASH as invalid memory types, when using the masked memory read command. So any masked reads to non-SRAM
* will result in driver-side masking, regardless of the value of this flag.
*
* NOTE: We now avoid masked memory read commands by default, unless this flag is explicitly set to false.
* This means the default value of this->avoidMaskedMemoryRead is true.
*
* @param avoidMaskedMemoryRead
*/
void setAvoidMaskedMemoryRead(bool avoidMaskedMemoryRead) {
@@ -297,7 +300,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
/**
* See the comment for EdbgAvr8Interface::setAvoidMaskedMemoryRead().
*/
bool avoidMaskedMemoryRead = false;
bool avoidMaskedMemoryRead = true;
/**
* See the comment for EdbgAvr8Interface::setMaximumMemoryAccessSizePerRequest().