From 9b8d4f054b78f3ac8b778a1038420a23da28c9e2 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 5 Jun 2022 16:14:14 +0100 Subject: [PATCH] Enabled programming mode in response to GDB's vFlashErase and vFlashWrite packets --- src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp | 2 ++ src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp index 4ef10da9..cdf42090 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp @@ -52,6 +52,8 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets Logger::debug("Handling FlashErase packet"); try { + targetControllerConsole.enableProgrammingMode(); + targetControllerConsole.writeMemory( Targets::TargetMemoryType::FLASH, this->startAddress, diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp index 606537e9..e8a0dd17 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp @@ -52,6 +52,8 @@ namespace Bloom::DebugServer::Gdb::AvrGdb::CommandPackets Logger::debug("Handling FlashWrite packet"); try { + targetControllerConsole.enableProgrammingMode(); + targetControllerConsole.writeMemory( Targets::TargetMemoryType::FLASH, this->startAddress,