Commit e7642308 authored by Fabio Utzig's avatar Fabio Utzig
Browse files

Reboot after flashing

parent bcdc9f97
......@@ -25,7 +25,7 @@
#include <sys/types.h>
#include <unistd.h>
#include <libusb-1.0/libusb.h>
#include <libusb.h>
//#define DEBUG 1
......@@ -49,6 +49,7 @@ static const char cmd_str2[] = "debug sreset";
static const char cmd_str3[] = "debug creset";
static const char cmd_str4[] = "set vectorcatch 0";
static const char cmd_str5[] = "debug disable";
static const char cmd_str6[] = "debug hreset";
static const char str_qRcmd[] = "qRcmd,";
static const char str_qSupported[] = "qSupported";
......@@ -476,6 +477,12 @@ static int write_firmware(libusb_device_handle *handle, int fd)
retval = send_qRcmd(handle, cmd_str4, sizeof(cmd_str4) - 1);
retval = send_qRcmd(handle, cmd_str5, sizeof(cmd_str5) - 1);
// reset board
retval = send_X(handle, FPB, 4, 0x03000000);
retval = send_qRcmd(handle, cmd_str6, sizeof(cmd_str6) - 1);
retval = send_qRcmd(handle, cmd_str4, sizeof(cmd_str4) - 1);
retval = send_qRcmd(handle, cmd_str5, sizeof(cmd_str5) - 1);
}
int main(int argc, char *argv[])
......
Supports Markdown
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