diff --git a/src/DebugServer/Gdb/GdbRspDebugServer.hpp b/src/DebugServer/Gdb/GdbRspDebugServer.hpp index bca435f8..e83d19a4 100644 --- a/src/DebugServer/Gdb/GdbRspDebugServer.hpp +++ b/src/DebugServer/Gdb/GdbRspDebugServer.hpp @@ -100,10 +100,10 @@ namespace DebugServer::Gdb , eventListener(eventListener) , interruptEventNotifier(eventNotifier) , targetState(this->targetControllerService.getTargetState()) - {}; + {} GdbRspDebugServer() = delete; - virtual ~GdbRspDebugServer() = default; + ~GdbRspDebugServer() override = default; GdbRspDebugServer(const GdbRspDebugServer& other) = delete; GdbRspDebugServer(GdbRspDebugServer&& other) = delete; @@ -111,9 +111,6 @@ namespace DebugServer::Gdb GdbRspDebugServer& operator = (const GdbRspDebugServer& other) = delete; GdbRspDebugServer& operator = (GdbRspDebugServer&& other) = delete; - /** - * Prepares the GDB server for listing on the selected address and port. - */ void init() override { this->socketAddress.sin_family = AF_INET; this->socketAddress.sin_port = htons(this->debugServerConfig.listeningPortNumber); @@ -189,9 +186,6 @@ namespace DebugServer::Gdb } } - /** - * Terminates any active debug session and closes the listening socket. - */ void close() override { this->endDebugSession(); @@ -200,11 +194,6 @@ namespace DebugServer::Gdb } } - /** - * Waits for a connection from a GDB client or services an active one. - * - * This function will return when any blocking operation is interrupted via this->interruptEventNotifier. - */ void run() override { try { if (!this->debugSession.has_value()) { @@ -443,10 +432,6 @@ namespace DebugServer::Gdb const auto rawPacketString = std::string{rawPacket.begin() + 1, rawPacket.end()}; - /* - * First byte of the raw packet will be 0x24 ('$'), so std::string::find() should return 1, not 0, when - * looking for a command identifier string. - */ if (rawPacketString.find("qSupported") == 0) { return std::make_unique(rawPacket); } diff --git a/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/AttachTarget.hpp b/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/AttachTarget.hpp index 2c476762..8384b697 100644 --- a/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/AttachTarget.hpp +++ b/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/AttachTarget.hpp @@ -10,7 +10,7 @@ namespace DebugToolDrivers::Wch::Protocols::WchLink::Commands::Control { public: AttachTarget() - : Command(0x0d) + : Command(0x0D) { this->payload = { 0x02 diff --git a/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/DetachTarget.hpp b/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/DetachTarget.hpp index e48feb6e..008804d1 100644 --- a/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/DetachTarget.hpp +++ b/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/DetachTarget.hpp @@ -10,10 +10,10 @@ namespace DebugToolDrivers::Wch::Protocols::WchLink::Commands::Control { public: DetachTarget() - : Command(0x0d) + : Command(0x0D) { this->payload = { - 0xff + 0xFF }; } }; diff --git a/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/GetDeviceInfo.hpp b/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/GetDeviceInfo.hpp index 3cf7bc29..27d264c3 100644 --- a/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/GetDeviceInfo.hpp +++ b/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/GetDeviceInfo.hpp @@ -10,7 +10,7 @@ namespace DebugToolDrivers::Wch::Protocols::WchLink::Commands::Control { public: GetDeviceInfo() - : Command(0x0d) + : Command(0x0D) { this->payload = { 0x01 diff --git a/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/PostAttach.hpp b/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/PostAttach.hpp index 02eb223f..698146b0 100644 --- a/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/PostAttach.hpp +++ b/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/Control/PostAttach.hpp @@ -10,7 +10,7 @@ namespace DebugToolDrivers::Wch::Protocols::WchLink::Commands::Control { public: PostAttach() - : Command(0x0d) + : Command(0x0D) { this->payload = { 0x03 diff --git a/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/SetClockSpeed.hpp b/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/SetClockSpeed.hpp index 9627923e..e835ee5c 100644 --- a/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/SetClockSpeed.hpp +++ b/src/DebugToolDrivers/Wch/Protocols/WchLink/Commands/SetClockSpeed.hpp @@ -10,7 +10,7 @@ namespace DebugToolDrivers::Wch::Protocols::WchLink::Commands { public: SetClockSpeed(std::uint8_t targetGroupId, std::uint8_t speedId) - : Command(0x0c) + : Command(0x0C) { this->payload = { targetGroupId, diff --git a/src/DebugToolDrivers/Wch/WchLinkDebugInterface.cpp b/src/DebugToolDrivers/Wch/WchLinkDebugInterface.cpp index 22533419..3266a151 100644 --- a/src/DebugToolDrivers/Wch/WchLinkDebugInterface.cpp +++ b/src/DebugToolDrivers/Wch/WchLinkDebugInterface.cpp @@ -544,7 +544,7 @@ namespace DebugToolDrivers::Wch * to the block size could result in breaching the boundary of the segment. * * For example, the CH32X035 has a block size of 4096, but its main program segment (`main_program`) has a - * capacity of 62KiB (63488 bytes), which is not a multiple of 4096. This means we cannot access the final, + * capacity of 62 KiB (63488 bytes), which is not a multiple of 4096. This means we cannot access the final, * partial block of that segment, via a full block write. * * Some segments on some WCH RISC-V targets don't even have the capacity to accommodate the block size. diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index f5cbd51b..6f23652b 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -374,7 +374,7 @@ void InsightWindow::selectDefaultVariant() { } Logger::error( - "Unsupported target variant (\"" + descriptor.name + "\") provided via 'defaultVariantKey' parameter" + "Unsupported target variant (\"" + descriptor.name + "\") provided via 'default_variant_key' parameter" ); } else { diff --git a/src/Targets/Microchip/Avr8/Avr8.cpp b/src/Targets/Microchip/Avr8/Avr8.cpp index 98527238..44f402cd 100644 --- a/src/Targets/Microchip/Avr8/Avr8.cpp +++ b/src/Targets/Microchip/Avr8/Avr8.cpp @@ -243,11 +243,9 @@ namespace Targets::Microchip::Avr8 ) { Logger::debug("Attempting OCDEN fuse bit management"); this->updateOcdenFuseBit(false); - - } else { - this->avr8DebugInterface->deactivate(); } + this->avr8DebugInterface->deactivate(); this->activated = false; } catch (const Exception& exception) { diff --git a/src/Targets/RiscV/Opcodes/Opcode.hpp b/src/Targets/RiscV/Opcodes/Opcode.hpp index 1759a9db..69b9f1b4 100644 --- a/src/Targets/RiscV/Opcodes/Opcode.hpp +++ b/src/Targets/RiscV/Opcodes/Opcode.hpp @@ -9,14 +9,14 @@ namespace Targets::RiscV::Opcodes enum class GprNumber: std::uint8_t { - X0 = 0, X2 = 2, X3 = 3, X4 = 4, X5 = 5, X6 = 6, X7 = 7, X8 = 8, X9 = 9, X10 = 10, X11 = 11, X12 = 12, X13 = 13, - X14 = 14, X15 = 15, X16 = 16, X17 = 17, X18 = 18, X19 = 19, X20 = 20, X21 = 21, X22 = 22, X23 = 23, X24 = 24, - X25 = 25, X26 = 26, X27 = 27, X28 = 28, X29 = 29, X30 = 30, X31 = 31, + X0 = 0, X1 = 1, X2 = 2, X3 = 3, X4 = 4, X5 = 5, X6 = 6, X7 = 7, X8 = 8, X9 = 9, X10 = 10, X11 = 11, X12 = 12, + X13 = 13, X14 = 14, X15 = 15, X16 = 16, X17 = 17, X18 = 18, X19 = 19, X20 = 20, X21 = 21, X22 = 22, X23 = 23, + X24 = 24, X25 = 25, X26 = 26, X27 = 27, X28 = 28, X29 = 29, X30 = 30, X31 = 31, }; static constexpr auto Ebreak = Opcode{0x00100073}; static constexpr auto EbreakCompressed = OpcodeCompressed{0x9002}; - static constexpr auto Fence = Opcode{0x0000000f}; - static constexpr auto FenceI = Opcode{0x0000100f}; + static constexpr auto Fence = Opcode{0x0000000F}; + static constexpr auto FenceI = Opcode{0x0000100F}; } diff --git a/src/Targets/RiscV/Wch/WchRiscV.cpp b/src/Targets/RiscV/Wch/WchRiscV.cpp index 473cfd6b..848ff20d 100644 --- a/src/Targets/RiscV/Wch/WchRiscV.cpp +++ b/src/Targets/RiscV/Wch/WchRiscV.cpp @@ -272,11 +272,7 @@ namespace Targets::RiscV::Wch const auto& aliasedSegment = this->selectedProgramSegmentDescriptor; const auto transformedAddress = this->deAliasMappedAddress(startAddress, aliasedSegment); - const auto addressRange = TargetMemoryAddressRange{ - transformedAddress, - static_cast(transformedAddress + bytes - 1) - }; - + const auto addressRange = TargetMemoryAddressRange{transformedAddress, transformedAddress + bytes - 1}; if (!aliasedSegment.addressRange.contains(addressRange)) { throw Exceptions::Exception{ "Read access range (0x" + StringService::toHex(addressRange.startAddress) + " -> 0x"