Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ti-connected-launchpad
lm4tools_public
Commits
e7642308
Commit
e7642308
authored
Oct 18, 2012
by
Fabio Utzig
Browse files
Reboot after flashing
parent
bcdc9f97
Changes
1
Hide whitespace changes
Inline
Side-by-side
icdiflasher.c
View file @
e7642308
...
...
@@ -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
[])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment