FreeCalypso > hg > freecalypso-sw
comparison loadtools/chainload.c @ 53:604648026e9c
fc-xram: baud rate switching implemented per original intent
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 23 Jun 2013 05:16:47 +0000 |
parents | 5ca0ad4003a0 |
children | 771d9fda7630 |
comparison
equal
deleted
inserted
replaced
52:b015036286f3 | 53:604648026e9c |
---|---|
9 #include <string.h> | 9 #include <string.h> |
10 #include <strings.h> | 10 #include <strings.h> |
11 #include "srecreader.h" | 11 #include "srecreader.h" |
12 | 12 |
13 struct srecreader xramimage; | 13 struct srecreader xramimage; |
14 | |
15 extern struct baudrate *current_baud_rate; | |
16 extern struct baudrate *xram_run_baudrate; | |
14 | 17 |
15 static void | 18 static void |
16 make_ml_arg(rec, buf) | 19 make_ml_arg(rec, buf) |
17 u_char *rec; | 20 u_char *rec; |
18 char *buf; | 21 char *buf; |
88 fprintf(stderr, | 91 fprintf(stderr, |
89 "%s line %d: S7 without any preceding S3 data records\n", | 92 "%s line %d: S7 without any preceding S3 data records\n", |
90 xramimage.filename, xramimage.lineno); | 93 xramimage.filename, xramimage.lineno); |
91 exit(1); | 94 exit(1); |
92 } | 95 } |
96 if (xram_run_baudrate != current_baud_rate) { | |
97 resp = loadagent_switch_baud(xram_run_baudrate); | |
98 if (resp) | |
99 exit(1); | |
100 } | |
93 printf("Sending jump command\n"); | 101 printf("Sending jump command\n"); |
94 sprintf(srecarg, "%lX", (u_long) xramimage.addr); | 102 sprintf(srecarg, "%lX", (u_long) xramimage.addr); |
95 argv[0] = "jump"; | 103 argv[0] = "jump"; |
96 tpinterf_make_cmd(argv); | 104 tpinterf_make_cmd(argv); |
97 if (tpinterf_send_cmd()) | 105 if (tpinterf_send_cmd()) |