dsp5680xx - relocating code
authorrodrigo_l_rosa <rodrigorosa.lg@gmail.com>
Sat, 3 Sep 2011 04:15:54 +0000 (21:15 -0700)
committerØyvind Harboe <oyvindharboe@gmail.com>
Thu, 24 Nov 2011 23:22:34 +0000 (23:22 +0000)
moved reset_jtag to the top, since it will be needed in future changes.
also send a define to the .h

Change-Id: I53ef9c02ffa70e7d0416364525a6fbfef855e222
Signed-off-by: Rodrigo L. Rosa <rodrigorosa.lg@gmail.com>
Reviewed-on: http://openocd.zylin.com/216
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
src/target/dsp5680xx.c
src/target/dsp5680xx.h

index 69ae7aa4cba4b47ef72618825e33e0c589e12380..bbd7995e00ee8c8a6f6d43e91ef34df2dbdc0866 100644 (file)
@@ -40,6 +40,23 @@ int dsp5680xx_execute_queue(void){
   return retval;
 }
 
+/**
+ * Reset state machine
+ */
+static int reset_jtag(void){
+       int retval;
+       tap_state_t states[2];
+       const char *cp = "RESET";
+       states[0] = tap_state_by_name(cp);
+       retval = jtag_add_statemove(states[0]);
+       err_check_propagate(retval);
+       retval = jtag_execute_queue();
+       err_check_propagate(retval);
+       jtag_add_pathmove(0, states + 1);
+       retval = jtag_execute_queue();
+       return retval;
+}
+
 static int dsp5680xx_drscan(struct target * target, uint8_t * data_to_shift_into_dr, uint8_t * data_shifted_out_of_dr, int len){
 // -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 //
@@ -547,7 +564,6 @@ static int eonce_enter_debug_mode_without_reset(struct target * target, uint16_t
        return retval;
 }
 
-#define TIME_DIV_FREESCALE 0.3
 /**
  * Puts the core into debug mode, enabling the EOnCE module.
  *
@@ -1611,21 +1627,6 @@ int dsp5680xx_f_wr(struct target * target, uint8_t *buffer, uint32_t address, ui
   return retval;
 }
 
-// Reset state machine
-static int reset_jtag(void){
-  int retval;
-  tap_state_t states[2];
-  const char *cp = "RESET";
-  states[0] = tap_state_by_name(cp);
-  retval = jtag_add_statemove(states[0]);
-  err_check_propagate(retval);
-  retval = jtag_execute_queue();
-  err_check_propagate(retval);
-  jtag_add_pathmove(0, states + 1);
-  retval = jtag_execute_queue();
-  return retval;
-}
-
 int dsp5680xx_f_unlock(struct target * target){
   int retval = ERROR_OK;
   uint16_t eonce_status;
index 9c8f435ce59caf2363c0338b459ae063eacd8237..ea5715c7d9efa3e563a271d10af36d5df3a4693a 100644 (file)
@@ -39,6 +39,7 @@
 
 
 #define S_FILE_DATA_OFFSET 0x200000
+#define TIME_DIV_FREESCALE 0.3
 
 //----------------------------------------------------------------
 // JTAG

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)