diff --git a/protob/messages.proto b/protob/messages.proto index 28689636dc..327549d219 100644 --- a/protob/messages.proto +++ b/protob/messages.proto @@ -76,6 +76,10 @@ enum MessageType { MessageType_DebugLinkState = 102 [(wire_debug_out) = true]; MessageType_DebugLinkStop = 103 [(wire_debug_in) = true]; MessageType_DebugLinkLog = 104 [(wire_debug_out) = true]; + MessageType_DebugLinkMemoryRead = 110 [(wire_debug_in) = true]; + MessageType_DebugLinkMemory = 111 [(wire_debug_out) = true]; + MessageType_DebugLinkMemoryWrite = 112 [(wire_debug_in) = true]; + MessageType_DebugLinkFlashErase = 113 [(wire_debug_in) = true]; } //////////////////// @@ -754,3 +758,38 @@ message DebugLinkLog { optional string bucket = 2; optional string text = 3; } + +/** + * Request: Read memory from device + * @next DebugLinkMemory + */ +message DebugLinkMemoryRead { + optional uint32 address = 1; + optional uint32 length = 2; +} + +/** + * Response: Device sends memory back + * @prev DebugLinkMemoryRead + */ +message DebugLinkMemory { + optional bytes memory = 1; +} + +/** + * Request: Write memory to device. WARNING: Writing to the wrong + * location can irreparably break the device. + */ +message DebugLinkMemoryWrite { + optional uint32 address = 1; + optional bytes memory = 2; + optional bool flash = 3; +} + +/** + * Request: Erase block of flash on device. WARNING: Writing to the wrong + * location can irreparably break the device. + */ +message DebugLinkFlashErase { + optional uint32 sector = 1; +}