Bypass cache flag in ReadMemory TC command
This commit is contained in:
@@ -62,6 +62,7 @@ void CaptureMemorySnapshot::run(TargetControllerService& targetControllerService
|
|||||||
(memorySize - this->data->size()) >= readSize
|
(memorySize - this->data->size()) >= readSize
|
||||||
? readSize
|
? readSize
|
||||||
: static_cast<Targets::TargetMemorySize>(memorySize - this->data->size()),
|
: static_cast<Targets::TargetMemorySize>(memorySize - this->data->size()),
|
||||||
|
true,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ void ReadTargetMemory::run(TargetControllerService& targetControllerService) {
|
|||||||
(this->size - data.size()) >= readSize
|
(this->size - data.size()) >= readSize
|
||||||
? readSize
|
? readSize
|
||||||
: static_cast<Targets::TargetMemorySize>(this->size - data.size()),
|
: static_cast<Targets::TargetMemorySize>(this->size - data.size()),
|
||||||
|
true,
|
||||||
this->excludedAddressRanges
|
this->excludedAddressRanges
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ namespace Services
|
|||||||
TargetMemoryType memoryType,
|
TargetMemoryType memoryType,
|
||||||
TargetMemoryAddress startAddress,
|
TargetMemoryAddress startAddress,
|
||||||
TargetMemorySize bytes,
|
TargetMemorySize bytes,
|
||||||
|
bool bypassCache,
|
||||||
const std::set<TargetMemoryAddressRange>& excludedAddressRanges
|
const std::set<TargetMemoryAddressRange>& excludedAddressRanges
|
||||||
) const {
|
) const {
|
||||||
return this->commandManager.sendCommandAndWaitForResponse(
|
return this->commandManager.sendCommandAndWaitForResponse(
|
||||||
@@ -190,6 +191,7 @@ namespace Services
|
|||||||
memoryType,
|
memoryType,
|
||||||
startAddress,
|
startAddress,
|
||||||
bytes,
|
bytes,
|
||||||
|
bypassCache,
|
||||||
excludedAddressRanges
|
excludedAddressRanges
|
||||||
),
|
),
|
||||||
this->defaultTimeout,
|
this->defaultTimeout,
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ namespace Services
|
|||||||
* @param memoryType
|
* @param memoryType
|
||||||
* @param startAddress
|
* @param startAddress
|
||||||
* @param bytes
|
* @param bytes
|
||||||
|
* @param bypassCache
|
||||||
* @param excludedAddressRanges
|
* @param excludedAddressRanges
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -116,6 +117,7 @@ namespace Services
|
|||||||
Targets::TargetMemoryType memoryType,
|
Targets::TargetMemoryType memoryType,
|
||||||
Targets::TargetMemoryAddress startAddress,
|
Targets::TargetMemoryAddress startAddress,
|
||||||
Targets::TargetMemorySize bytes,
|
Targets::TargetMemorySize bytes,
|
||||||
|
bool bypassCache = false,
|
||||||
const std::set<Targets::TargetMemoryAddressRange>& excludedAddressRanges = {}
|
const std::set<Targets::TargetMemoryAddressRange>& excludedAddressRanges = {}
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|||||||
@@ -21,17 +21,25 @@ namespace TargetController::Commands
|
|||||||
Targets::TargetMemoryType memoryType;
|
Targets::TargetMemoryType memoryType;
|
||||||
Targets::TargetMemoryAddress startAddress;
|
Targets::TargetMemoryAddress startAddress;
|
||||||
Targets::TargetMemorySize bytes;
|
Targets::TargetMemorySize bytes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Currently, we only cache program memory. This flag has no effect when reading from other memories.
|
||||||
|
*/
|
||||||
|
bool bypassCache;
|
||||||
|
|
||||||
std::set<Targets::TargetMemoryAddressRange> excludedAddressRanges;
|
std::set<Targets::TargetMemoryAddressRange> excludedAddressRanges;
|
||||||
|
|
||||||
ReadTargetMemory(
|
ReadTargetMemory(
|
||||||
Targets::TargetMemoryType memoryType,
|
Targets::TargetMemoryType memoryType,
|
||||||
Targets::TargetMemoryAddress startAddress,
|
Targets::TargetMemoryAddress startAddress,
|
||||||
Targets::TargetMemorySize bytes,
|
Targets::TargetMemorySize bytes,
|
||||||
const std::set<Targets::TargetMemoryAddressRange>& excludedAddressRanges
|
bool bypassCache = false,
|
||||||
|
const std::set<Targets::TargetMemoryAddressRange>& excludedAddressRanges = {}
|
||||||
)
|
)
|
||||||
: memoryType(memoryType)
|
: memoryType(memoryType)
|
||||||
, startAddress(startAddress)
|
, startAddress(startAddress)
|
||||||
, bytes(bytes)
|
, bytes(bytes)
|
||||||
|
, bypassCache(bypassCache)
|
||||||
, excludedAddressRanges(excludedAddressRanges)
|
, excludedAddressRanges(excludedAddressRanges)
|
||||||
{};
|
{};
|
||||||
|
|
||||||
|
|||||||
@@ -802,6 +802,7 @@ namespace TargetController
|
|||||||
const auto& targetDescriptor = this->getTargetDescriptor();
|
const auto& targetDescriptor = this->getTargetDescriptor();
|
||||||
if (
|
if (
|
||||||
command.memoryType == targetDescriptor.programMemoryType
|
command.memoryType == targetDescriptor.programMemoryType
|
||||||
|
&& !command.bypassCache
|
||||||
&& this->environmentConfig.targetConfig.programMemoryCache
|
&& this->environmentConfig.targetConfig.programMemoryCache
|
||||||
) {
|
) {
|
||||||
assert(this->programMemoryCache);
|
assert(this->programMemoryCache);
|
||||||
|
|||||||
Reference in New Issue
Block a user