gdb_main: Fixed a small DEBUG_GDB regression for vFlashErase and vFlashWrite debugging
This commit is contained in:
parent
e2f07b359a
commit
37efd257e8
|
@ -618,7 +618,7 @@ static void handle_v_packet(char *packet, const size_t plen)
|
||||||
|
|
||||||
} else if (sscanf(packet, "vFlashErase:%08" PRIx32 ",%08" PRIx32, &addr, &len) == 2) {
|
} else if (sscanf(packet, "vFlashErase:%08" PRIx32 ",%08" PRIx32, &addr, &len) == 2) {
|
||||||
/* Erase Flash Memory */
|
/* Erase Flash Memory */
|
||||||
DEBUG_GDB("Flash Erase %08zX %08zX\n", addr, len);
|
DEBUG_GDB("Flash Erase %08" PRIX32 " %08" PRIX32 "\n", addr, len);
|
||||||
if (!cur_target) {
|
if (!cur_target) {
|
||||||
gdb_putpacketz("EFF");
|
gdb_putpacketz("EFF");
|
||||||
return;
|
return;
|
||||||
|
@ -639,8 +639,8 @@ static void handle_v_packet(char *packet, const size_t plen)
|
||||||
|
|
||||||
} else if (sscanf(packet, "vFlashWrite:%08" PRIx32 ":%n", &addr, &bin) == 1) {
|
} else if (sscanf(packet, "vFlashWrite:%08" PRIx32 ":%n", &addr, &bin) == 1) {
|
||||||
/* Write Flash Memory */
|
/* Write Flash Memory */
|
||||||
const size_t count = plen - bin;
|
const uint32_t count = plen - bin;
|
||||||
DEBUG_GDB("Flash Write %08zX %08zX\n", addr, count);
|
DEBUG_GDB("Flash Write %08" PRIX32 " %08" PRIX32 "\n", addr, count);
|
||||||
if (cur_target && target_flash_write(cur_target, addr, (void*)packet + bin, count) == 0)
|
if (cur_target && target_flash_write(cur_target, addr, (void*)packet + bin, count) == 0)
|
||||||
gdb_putpacketz("OK");
|
gdb_putpacketz("OK");
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue