This commit is contained in:
Nav
2021-10-04 23:42:58 +01:00
parent 931b0b430c
commit 8bb19a0874
3 changed files with 14 additions and 8 deletions

View File

@@ -970,7 +970,7 @@ TargetMemoryBuffer EdbgAvr8Interface::readMemory(
* Split the read into numerous reads, whenever we encounter an excluded address.
*
* All values for bytes located at excluded addresses will be returned as 0x00 - this mirrors the behaviour
* of the masked read memory command.
* of the masked read memory EDBG command.
*/
auto output = TargetMemoryBuffer();
auto segmentStartAddress = address;

View File

@@ -73,12 +73,13 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
Targets::Microchip::Avr::Avr8Bit::TargetParameters targetParameters;
/**
* Some EDBG devices don'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. This appears to only occur with
* the MPLAB Snap device.
* Some EDBG devices don't seem to operate correctly when actioning the masked memory read EDBG command. The
* data returned in response to the command appears to be completely incorrect. This appears to only occur
* with the MPLAB Snap device.
*
* Setting this flag to true will mean we implement our own masked memory read, in this driver, as opposed to
* employing the masked memory read command.
* Setting this flag to true will disable the EdbgAvr8Interface driver's use of the masked memory read command.
* The driver will perform the masking itself, and then issue standard read memory commands. See the
* implementation of EdbgAvr8Interface::readMemory() for more.
*/
bool avoidMaskedMemoryRead = false;
@@ -461,6 +462,11 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
explicit EdbgAvr8Interface(EdbgInterface& edbgInterface)
: edbgInterface(edbgInterface) {};
/**
* Disables use of the masked read memory EDBG command. Masking will be performed at the driver-side.
*
* @param avoidMaskedMemoryRead
*/
void setAvoidMaskedMemoryRead(bool avoidMaskedMemoryRead) {
this->avoidMaskedMemoryRead = avoidMaskedMemoryRead;
}

View File

@@ -1,8 +1,8 @@
#include "Application.hpp"
#include <string>
#include <vector>
#include "Application.hpp"
using namespace Bloom;
int main(int argc, char* argv[]) {