From 4861339500948bd7e0953ec9eba3ad21e1133625 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 27 Mar 2022 16:58:38 -0700 Subject: Attempt to make somewhat less error-prone downloads. --- download.tcl | 2 ++ tool/p8bin2uart.c | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/download.tcl b/download.tcl index 31d4c82..635e54b 100755 --- a/download.tcl +++ b/download.tcl @@ -1,5 +1,7 @@ #!/usr/bin/env expect +set timeout 3600 + set core 0 set wordsperline 1 diff --git a/tool/p8bin2uart.c b/tool/p8bin2uart.c index 14cb207..944227a 100644 --- a/tool/p8bin2uart.c +++ b/tool/p8bin2uart.c @@ -131,7 +131,7 @@ load(FILE *fp) return v; } -#define MAX_LINE_SIZE 1023 +#define MAX_LINE_SIZE 63 char buf[MAX_LINE_SIZE * 2] = {0}; @@ -186,11 +186,8 @@ dump(unsigned int wordsperline) print("!%x ", (unsigned int)((a - nextaddr) / wordsperline)); } print("="); - for (uint_fast32_t i = 0; i < wordsperline; ++i) { - if (i != 0) - print(":"); - print("%04x", (unsigned int)words[i]); - } + for (uint_fast32_t i = 0; i < wordsperline; ++i) + print(i == 0 ? "%x" : ":%04x", (unsigned int)words[i]); print(" "); nextaddr = a + wordsperline; } -- cgit v1.2.3