Support for vFlashErase GDB command packet

This commit is contained in:
Nav
2022-05-28 22:47:25 +01:00
parent ce33ecba99
commit 9bf0e30de8
4 changed files with 102 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
#include "CommandPackets/ReadMemory.hpp"
#include "CommandPackets/WriteMemory.hpp"
#include "CommandPackets/ReadMemoryMap.hpp"
#include "CommandPackets/FlashErase.hpp"
namespace Bloom::DebugServer::Gdb::AvrGdb
{
@@ -34,6 +35,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb
using AvrGdb::CommandPackets::ReadMemory;
using AvrGdb::CommandPackets::WriteMemory;
using AvrGdb::CommandPackets::ReadMemoryMap;
using AvrGdb::CommandPackets::FlashErase;
if (rawPacket.size() >= 2) {
if (rawPacket[1] == 'm') {
@@ -49,6 +51,10 @@ namespace Bloom::DebugServer::Gdb::AvrGdb
if (rawPacketString.find("qXfer:memory-map:read::") == 0) {
return std::make_unique<ReadMemoryMap>(rawPacket);
}
if (rawPacketString.find("vFlashErase") == 0) {
return std::make_unique<FlashErase>(rawPacket);
}
}
return GdbRspDebugServer::resolveCommandPacket(rawPacket);