changeset 536:dc05170ab113

fc-xram JTAG mode (-j) implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 19 Jun 2019 22:20:24 +0000
parents 88962b111edc
children 018488f6343b
files loadtools/chainload.c loadtools/clmain.c
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/loadtools/chainload.c	Wed Jun 19 21:23:08 2019 +0000
+++ b/loadtools/chainload.c	Wed Jun 19 22:20:24 2019 +0000
@@ -14,6 +14,7 @@
 
 extern struct baudrate *current_baud_rate;
 extern struct baudrate *xram_run_baudrate;
+extern int xram_jtag_mode;
 
 static void
 make_ml_arg(rec, buf)
@@ -103,6 +104,12 @@
 		if (resp)
 			exit(1);
 	}
+	if (xram_jtag_mode) {
+		printf(
+      "Leaving target in loadagent for JTAG; image start address is 0x%08lX\n",
+			(u_long) xramimage.addr);
+		exit(0);
+	}
 	printf("Sending jump command\n");
 	sprintf(srecarg, "%lX", (u_long) xramimage.addr);
 	argv[0] = "jump";
--- a/loadtools/clmain.c	Wed Jun 19 21:23:08 2019 +0000
+++ b/loadtools/clmain.c	Wed Jun 19 22:20:24 2019 +0000
@@ -25,6 +25,7 @@
 
 struct baudrate *xram_load_baudrate;
 struct baudrate *xram_run_baudrate = baud_rate_table;	/* 1st entry default */
+int xram_jtag_mode;
 
 char **passon_argv;
 int passon_argc;
@@ -37,7 +38,7 @@
 	int c;
 	struct baudrate *br;
 
-	while ((c = getopt(argc, argv, "+a:b:B:c:C:h:H:i:nr:")) != EOF)
+	while ((c = getopt(argc, argv, "+a:b:B:c:C:h:H:i:jnr:")) != EOF)
 		switch (c) {
 		case 'a':
 			iramimage.filename = optarg;
@@ -66,6 +67,9 @@
 		case 'i':
 			set_beacon_interval(optarg);
 			continue;
+		case 'j':
+			xram_jtag_mode = 1;
+			continue;
 		case 'n':
 			gta_modem_poweron = 0;
 			continue;