Delta programming - where we only upload what's changed
This commit is contained in:
@@ -656,6 +656,7 @@ namespace Targets::Microchip::Avr8
|
||||
return;
|
||||
}
|
||||
|
||||
this->avr8DebugInterface->clearAllBreakpoints();
|
||||
this->avr8DebugInterface->enableProgrammingMode();
|
||||
this->activeProgrammingSession = ProgrammingSession();
|
||||
}
|
||||
@@ -687,6 +688,32 @@ namespace Targets::Microchip::Avr8
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
DeltaProgramming::DeltaProgrammingInterface* Avr8::deltaProgrammingInterface() {
|
||||
if (
|
||||
this->targetConfig.physicalInterface == TargetPhysicalInterface::DEBUG_WIRE
|
||||
|| this->targetConfig.physicalInterface == TargetPhysicalInterface::UPDI
|
||||
) {
|
||||
return this;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
TargetMemorySize Avr8::deltaBlockSize(
|
||||
const TargetAddressSpaceDescriptor& addressSpaceDescriptor,
|
||||
const TargetMemorySegmentDescriptor& memorySegmentDescriptor
|
||||
) {
|
||||
return memorySegmentDescriptor.pageSize.value_or(1);
|
||||
}
|
||||
|
||||
bool Avr8::shouldAbandonSession(
|
||||
const TargetAddressSpaceDescriptor& addressSpaceDescriptor,
|
||||
const TargetMemorySegmentDescriptor& memorySegmentDescriptor,
|
||||
const std::vector<DeltaProgramming::Session::WriteOperation::Region>& deltaSegments
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::map<TargetPadId, GpioPadDescriptor> Avr8::generateGpioPadDescriptorMapping(
|
||||
const std::vector<TargetPeripheralDescriptor>& portPeripheralDescriptors
|
||||
) {
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "src/Targets/TargetBitFieldDescriptor.hpp"
|
||||
#include "src/Targets/TargetPadDescriptor.hpp"
|
||||
#include "src/Targets/TargetBreakpoint.hpp"
|
||||
#include "src/Targets/DeltaProgramming/DeltaProgrammingInterface.hpp"
|
||||
|
||||
#include "TargetDescriptionFile.hpp"
|
||||
|
||||
@@ -29,7 +30,9 @@
|
||||
|
||||
namespace Targets::Microchip::Avr8
|
||||
{
|
||||
class Avr8: public Target
|
||||
class Avr8
|
||||
: public Target
|
||||
, public DeltaProgramming::DeltaProgrammingInterface
|
||||
{
|
||||
public:
|
||||
explicit Avr8(const TargetConfig& targetConfig, TargetDescriptionFile&& targetDescriptionFile);
|
||||
@@ -111,6 +114,17 @@ namespace Targets::Microchip::Avr8
|
||||
std::string passthroughCommandHelpText() override;
|
||||
std::optional<PassthroughResponse> invokePassthroughCommand(const PassthroughCommand& command) override;
|
||||
|
||||
DeltaProgramming::DeltaProgrammingInterface* deltaProgrammingInterface() override;
|
||||
TargetMemorySize deltaBlockSize(
|
||||
const TargetAddressSpaceDescriptor& addressSpaceDescriptor,
|
||||
const TargetMemorySegmentDescriptor& memorySegmentDescriptor
|
||||
) override;
|
||||
bool shouldAbandonSession(
|
||||
const TargetAddressSpaceDescriptor& addressSpaceDescriptor,
|
||||
const TargetMemorySegmentDescriptor& memorySegmentDescriptor,
|
||||
const std::vector<DeltaProgramming::Session::WriteOperation::Region>& deltaSegments
|
||||
) override;
|
||||
|
||||
protected:
|
||||
DebugToolDrivers::TargetInterfaces::TargetPowerManagementInterface* targetPowerManagementInterface = nullptr;
|
||||
DebugToolDrivers::TargetInterfaces::Microchip::Avr8::Avr8DebugInterface* avr8DebugInterface = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user