Make OpenOCD build using -Og.
[openocd.git] / src / target / xscale.c
index 898d080ef05adb23c6a29cb6ca122647d2703919..140ea586bf12f74efc26e062eedfabf247bec985 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
@@ -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");
@@ -2663,7 +2667,7 @@ static int xscale_analyze_trace(struct target *target, struct command_context *c
        struct xscale_common *xscale = target_to_xscale(target);
        struct xscale_trace_data *trace_data = xscale->trace.data;
        int i, retval;
-       uint32_t breakpoint_pc;
+       uint32_t breakpoint_pc = 0;
        struct arm_instruction instruction;
        uint32_t current_pc = 0;/* initialized when address determined */
 
@@ -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)