From 53459deca84ac7574399b8e2f5b8a36bb06f7f0d Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Tue, 14 Mar 2017 17:19:39 +0100 Subject: [PATCH] Fix stlink on mingw64 --- src/gdbserver/gdb-server.c | 24 ++++++++++++------------ src/tools/info.c | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/gdbserver/gdb-server.c b/src/gdbserver/gdb-server.c index fddf48fcf..09e80f32a 100644 --- a/src/gdbserver/gdb-server.c +++ b/src/gdbserver/gdb-server.c @@ -393,20 +393,20 @@ static const char* const memory_map_template_F2 = "" "" - " " // code = sram, bootrom or flash; flash is bigger - " " // sram + " " // code = sram, bootrom or flash; flash is bigger + " " // sram " " //Sectors 0..3 " 0x4000" //16kB " " " " //Sector 4 " 0x10000" //64kB " " - " " //Sectors 5.. + " " //Sectors 5.. " 0x20000" //128kB " " " " // peripheral regs " " // cortex regs - " " // bootrom + " " // bootrom " " // option byte area ""; @@ -415,10 +415,10 @@ static const char* const memory_map_template_L4 = "" "" - " " // code = sram, bootrom or flash; flash is bigger + " " // code = sram, bootrom or flash; flash is bigger " " // SRAM2 (32 KB) " " // SRAM1 (96 KB) - " " + " " " 0x800" " " " " // peripheral regs @@ -434,14 +434,14 @@ static const char* const memory_map_template = "" "" - " " // code = sram, bootrom or flash; flash is bigger - " " // sram 8k - " " - " 0x%zx" + " " // code = sram, bootrom or flash; flash is bigger + " " // sram 8k + " " + " 0x%x" " " " " // peripheral regs " " // cortex regs - " " // bootrom + " " // bootrom " " // option byte area ""; @@ -452,7 +452,7 @@ static const char* const memory_map_template_F7 = "" " " // ITCM ram 16kB " " // ITCM flash - " " // sram + " " // sram " " // Sectors 0..3 " 0x8000" // 32kB " " diff --git a/src/tools/info.c b/src/tools/info.c index 2e3efc64d..54e6ec87c 100644 --- a/src/tools/info.c +++ b/src/tools/info.c @@ -114,11 +114,11 @@ static int print_data(char **av) stlink_enter_swd_mode(sl); if (strcmp(av[1], "--flash") == 0) - printf("0x%zx\n", sl->flash_size); + printf("0x%x\n", sl->flash_size); else if (strcmp(av[1], "--sram") == 0) - printf("0x%zx\n", sl->sram_size); + printf("0x%x\n", sl->sram_size); else if (strcmp(av[1], "--pagesize") == 0) - printf("0x%zx\n", sl->flash_pgsz); + printf("0x%x\n", sl->flash_pgsz); else if (strcmp(av[1], "--chipid") == 0) printf("0x%.4x\n", sl->chip_id); else if (strcmp(av[1], "--serial") == 0)