Remove FSF address from GPL notices
[openocd.git] / src / target / xscale.c
index b64a1bff2a51795c5aee477e0e5087979a018c6c..3d5abdf7753c9637bffa27bd7e1c7eaa0b8dce5f 100644 (file)
@@ -19,9 +19,7 @@
  *   GNU General Public License for more details.                          *
  *                                                                         *
  *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.           *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -78,7 +76,7 @@ static const uint8_t xscale_debug_handler[] = {
 #include "xscale_debug.inc"
 };
 
-static char *const xscale_reg_list[] = {
+static const char *const xscale_reg_list[] = {
        "XSCALE_MAINID",                /* 0 */
        "XSCALE_CACHETYPE",
        "XSCALE_CTRL",
@@ -1446,6 +1444,13 @@ static int xscale_assert_reset(struct target *target)
 {
        struct xscale_common *xscale = target_to_xscale(target);
 
+       /* TODO: apply hw reset signal in not examined state */
+       if (!(target_was_examined(target))) {
+               LOG_WARNING("Reset is not asserted because the target is not examined.");
+               LOG_WARNING("Use a reset button or power cycle the target.");
+               return ERROR_TARGET_NOT_EXAMINED;
+       }
+
        LOG_DEBUG("target->state: %s",
                target_state_name(target));
 
@@ -1573,7 +1578,6 @@ static int xscale_deassert_reset(struct target *target)
 
                        address += buf_cnt;
                }
-               ;
 
                retval = xscale_load_ic(target, 0x0,
                                xscale->low_vectors);
@@ -1621,7 +1625,7 @@ static int xscale_read_core_reg(struct target *target, struct reg *r,
 }
 
 static int xscale_write_core_reg(struct target *target, struct reg *r,
-       int num, enum arm_mode mode, uint32_t value)
+       int num, enum arm_mode mode, uint8_t *value)
 {
        /** \todo add debug handler support for core register writes */
        LOG_ERROR("not implemented");
@@ -3245,8 +3249,8 @@ COMMAND_HANDLER(xscale_handle_vector_catch_command)
                                return ERROR_COMMAND_SYNTAX_ERROR;
                        }
                }
-               *(uint32_t *)(dcsr_reg->value) &= ~DCSR_TRAP_MASK;
-               *(uint32_t *)(dcsr_reg->value) |= catch;
+               buf_set_u32(dcsr_reg->value, 0, 32,
+                               (buf_get_u32(dcsr_reg->value, 0, 32) & ~DCSR_TRAP_MASK) | catch);
                xscale_write_dcsr(target, -1, -1);
        }
 
@@ -3426,7 +3430,7 @@ COMMAND_HANDLER(xscale_handle_dump_trace_command)
        struct target *target = get_current_target(CMD_CTX);
        struct xscale_common *xscale = target_to_xscale(target);
        struct xscale_trace_data *trace_data;
-       struct fileio file;
+       struct fileio *file;
        int retval;
 
        retval = xscale_verify_pointer(CMD_CTX, xscale);
@@ -3454,19 +3458,19 @@ COMMAND_HANDLER(xscale_handle_dump_trace_command)
        while (trace_data) {
                int i;
 
-               fileio_write_u32(&file, trace_data->chkpt0);
-               fileio_write_u32(&file, trace_data->chkpt1);
-               fileio_write_u32(&file, trace_data->last_instruction);
-               fileio_write_u32(&file, trace_data->depth);
+               fileio_write_u32(file, trace_data->chkpt0);
+               fileio_write_u32(file, trace_data->chkpt1);
+               fileio_write_u32(file, trace_data->last_instruction);
+               fileio_write_u32(file, trace_data->depth);
 
                for (i = 0; i < trace_data->depth; i++)
-                       fileio_write_u32(&file, trace_data->entries[i].data |
+                       fileio_write_u32(file, trace_data->entries[i].data |
                                ((trace_data->entries[i].type & 0xffff) << 16));
 
                trace_data = trace_data->next;
        }
 
-       fileio_close(&file);
+       fileio_close(file);
 
        return ERROR_OK;
 }

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)