Do not turn IDLE LED off when port closed and target already detached
This commit is contained in:
parent
e6075d4bd3
commit
74b4b863c1
|
@ -117,8 +117,11 @@ int gdb_main_loop(struct target_controller *tc, bool in_syscall)
|
||||||
while (1) {
|
while (1) {
|
||||||
SET_IDLE_STATE(1);
|
SET_IDLE_STATE(1);
|
||||||
size_t size = gdb_getpacket(pbuf, BUF_SIZE);
|
size_t size = gdb_getpacket(pbuf, BUF_SIZE);
|
||||||
SET_IDLE_STATE(0);
|
// If port closed and target detached, stay idle
|
||||||
switch (pbuf[0]) {
|
if ((pbuf[0] != 0x04) || cur_target) {
|
||||||
|
SET_IDLE_STATE(0);
|
||||||
|
}
|
||||||
|
switch(pbuf[0]) {
|
||||||
/* Implementation of these is mandatory! */
|
/* Implementation of these is mandatory! */
|
||||||
case 'g': { /* 'g': Read general registers */
|
case 'g': { /* 'g': Read general registers */
|
||||||
ERROR_IF_NO_TARGET();
|
ERROR_IF_NO_TARGET();
|
||||||
|
|
Loading…
Reference in New Issue