From 609400b375b3e3a2a19210cf1998510485184047 Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 28 Aug 2024 19:10:47 +0100 Subject: [PATCH] Tweaks to help text for GDB monitor commands --- .../Gdb/CommandPackets/HelpMonitorInfo.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/DebugServer/Gdb/CommandPackets/HelpMonitorInfo.cpp b/src/DebugServer/Gdb/CommandPackets/HelpMonitorInfo.cpp index 09a7335a..573b7a17 100644 --- a/src/DebugServer/Gdb/CommandPackets/HelpMonitorInfo.cpp +++ b/src/DebugServer/Gdb/CommandPackets/HelpMonitorInfo.cpp @@ -99,7 +99,7 @@ namespace DebugServer::Gdb::CommandPackets + StringService::applyTerminalColor("ABS_REG_GROUP_KEY", PARAM_COLOR) + "] [" + StringService::applyTerminalColor("REG_KEY", PARAM_COLOR) + "] [" + StringService::applyTerminalColor("VALUE_HEX", PARAM_COLOR) + "]\n\n"; - output += leftPadding + "Writes the given value to the given register.\n"; + output += leftPadding + "Writes the given value to the given register. The value must take the form of a hexadecimal string.\n"; output += leftPadding + "The register group key can be omitted if the peripheral contains a single register group,\n"; output += leftPadding + "and the subject register resides directly within that group (not in any subgroup).\n\n"; output += leftPadding + "Examples:\n\n"; @@ -118,11 +118,18 @@ namespace DebugServer::Gdb::CommandPackets if (targetDescriptor.family == Targets::TargetFamily::AVR_8) { output += StringService::applyTerminalColor("eeprom fill", CMD_COLOR) + " [" + StringService::applyTerminalColor("VALUE", PARAM_COLOR) + "]\n\n"; - output += leftPadding + "Fills the target's EEPROM with the specified value. The value should be in hexadecimal\n"; - output += leftPadding + "format: \"monitor eeprom fill AABBCC\". If the specified value is smaller than the EEPROM\n"; - output += leftPadding + "memory segment size, it will be repeated across the entire segment address range. If the\n"; - output += leftPadding + "value size is not a multiple of the segment size, the value will be truncated in the final\n"; - output += leftPadding + "repetition. The value size must not exceed the segment size.\n"; + output += leftPadding + "Fills the target's EEPROM with the specified value. The value must take the form of a hexadecimal string.\n"; + output += leftPadding + "If the specified value is smaller than the EEPROM memory segment size, it will be repeated\n"; + output += leftPadding + "across the entire segment address range. If the value size is not a multiple of the segment\n"; + output += leftPadding + "size, the value will be truncated in the final repetition. The value size must not\n"; + output += leftPadding + "exceed the segment size.\n\n"; + output += leftPadding + "Examples:\n\n"; + output += leftPadding + "mon " + StringService::applyTerminalColor("eeprom fill", CMD_COLOR) + " " + + StringService::applyTerminalColor("0xFF", PARAM_COLOR) + "\n"; + output += leftPadding + " To write 0xFF to the entirety of the target's EEPROM memory segment.\n\n"; + output += leftPadding + "mon " + StringService::applyTerminalColor("eeprom fill", CMD_COLOR) + " " + + StringService::applyTerminalColor("FF00FF00AABBCC", PARAM_COLOR) + "\n"; + output += leftPadding + " To repeat the hexadecimal sequence 'FF00FF00AABBCC' across the entirety of the target's EEPROM memory segment.\n\n"; } output += "\n";