Commit 5b3533f0 authored by Wesley W. Terpstra's avatar Wesley W. Terpstra

Init with status

parent fe8cf1f5
...@@ -40,7 +40,8 @@ SendQueue::const_iterator GDB_Serial::send(SendQueue::const_iterator i, SendQueu ...@@ -40,7 +40,8 @@ SendQueue::const_iterator GDB_Serial::send(SendQueue::const_iterator i, SendQueu
for (; i != end; ++i) { for (; i != end; ++i) {
if (i->master == &reset) { if (i->master == &reset) {
tail = 0; tail = 0;
buffer.clear(); buffer = "$?#3f";
runCommand();
continue; continue;
} }
...@@ -84,7 +85,7 @@ void GDB_Serial::runCommand() { ...@@ -84,7 +85,7 @@ void GDB_Serial::runCommand() {
return; return;
} }
std::string body(buffer, dollar, buffer.size()-dollar-3); std::string body(buffer, dollar+1, buffer.size()-dollar-4);
buffer.clear(); buffer.clear();
uint8_t sum = 0; uint8_t sum = 0;
...@@ -92,6 +93,7 @@ void GDB_Serial::runCommand() { ...@@ -92,6 +93,7 @@ void GDB_Serial::runCommand() {
sum += body[i]; sum += body[i];
if (sum == ((hex1<<4) | hex2)) { if (sum == ((hex1<<4) | hex2)) {
// std::cerr << "Executing " << body << std::endl;
echo(Bits(static_cast<uint8_t>('+'))); echo(Bits(static_cast<uint8_t>('+')));
packet(Bits(body)); packet(Bits(body));
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment