diff options
| -rwxr-xr-x | download.tcl | 2 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | #!/usr/bin/env expect | 1 | #!/usr/bin/env expect |
| 2 | 2 | ||
| 3 | set timeout 3600 | ||
| 4 | |||
| 3 | set core 0 | 5 | set core 0 |
| 4 | set wordsperline 1 | 6 | set wordsperline 1 |
| 5 | 7 | ||
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) | |||
| 131 | return v; | 131 | return v; |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | #define MAX_LINE_SIZE 1023 | 134 | #define MAX_LINE_SIZE 63 |
| 135 | 135 | ||
| 136 | char buf[MAX_LINE_SIZE * 2] = {0}; | 136 | char buf[MAX_LINE_SIZE * 2] = {0}; |
| 137 | 137 | ||
| @@ -186,11 +186,8 @@ dump(unsigned int wordsperline) | |||
| 186 | print("!%x ", (unsigned int)((a - nextaddr) / wordsperline)); | 186 | print("!%x ", (unsigned int)((a - nextaddr) / wordsperline)); |
| 187 | } | 187 | } |
| 188 | print("="); | 188 | print("="); |
| 189 | for (uint_fast32_t i = 0; i < wordsperline; ++i) { | 189 | for (uint_fast32_t i = 0; i < wordsperline; ++i) |
| 190 | if (i != 0) | 190 | print(i == 0 ? "%x" : ":%04x", (unsigned int)words[i]); |
| 191 | print(":"); | ||
| 192 | print("%04x", (unsigned int)words[i]); | ||
| 193 | } | ||
| 194 | print(" "); | 191 | print(" "); |
| 195 | nextaddr = a + wordsperline; | 192 | nextaddr = a + wordsperline; |
| 196 | } | 193 | } |
