Make cortex_m3 functions public accessible.
authorMathias K <kesmtp@freenet.de>
Thu, 15 Dec 2011 10:38:35 +0000 (11:38 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 3 Jan 2012 21:11:51 +0000 (21:11 +0000)
Change this functions to make it accessible for other
target implementations.

Change-Id: Ib41fc793cfb4de5439af026c2e8b52e7a9507c85
Signed-off-by: Mathias K <kesmtp@freenet.de>
Reviewed-on: http://openocd.zylin.com/278
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/cortex_m.c
src/target/cortex_m.h

index 0f26cda4d057737572ded0c2bec2e55084e6a58d..2fbd71da5eac1455efe5d9fe319d7e130aa0933b 100644 (file)
@@ -59,9 +59,6 @@
 
 
 /* forward declarations */
-static int cortex_m3_set_breakpoint(struct target *target, struct breakpoint *breakpoint);
-static int cortex_m3_unset_breakpoint(struct target *target, struct breakpoint *breakpoint);
-static void cortex_m3_enable_watchpoints(struct target *target);
 static int cortex_m3_store_core_reg_u32(struct target *target,
                enum armv7m_regtype type, uint32_t num, uint32_t value);
 
@@ -1142,7 +1139,7 @@ static int cortex_m3_deassert_reset(struct target *target)
        return ERROR_OK;
 }
 
-static int
+int
 cortex_m3_set_breakpoint(struct target *target, struct breakpoint *breakpoint)
 {
        int retval;
@@ -1217,7 +1214,7 @@ cortex_m3_set_breakpoint(struct target *target, struct breakpoint *breakpoint)
        return ERROR_OK;
 }
 
-static int
+int
 cortex_m3_unset_breakpoint(struct target *target, struct breakpoint *breakpoint)
 {
        int retval;
@@ -1272,7 +1269,7 @@ cortex_m3_unset_breakpoint(struct target *target, struct breakpoint *breakpoint)
        return ERROR_OK;
 }
 
-static int
+int
 cortex_m3_add_breakpoint(struct target *target, struct breakpoint *breakpoint)
 {
        struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
@@ -1322,7 +1319,7 @@ cortex_m3_add_breakpoint(struct target *target, struct breakpoint *breakpoint)
        return cortex_m3_set_breakpoint(target, breakpoint);
 }
 
-static int
+int
 cortex_m3_remove_breakpoint(struct target *target, struct breakpoint *breakpoint)
 {
        struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
@@ -1350,7 +1347,7 @@ cortex_m3_remove_breakpoint(struct target *target, struct breakpoint *breakpoint
        return ERROR_OK;
 }
 
-static int
+int
 cortex_m3_set_watchpoint(struct target *target, struct watchpoint *watchpoint)
 {
        int dwt_num = 0;
@@ -1415,7 +1412,7 @@ cortex_m3_set_watchpoint(struct target *target, struct watchpoint *watchpoint)
        return ERROR_OK;
 }
 
-static int
+int
 cortex_m3_unset_watchpoint(struct target *target, struct watchpoint *watchpoint)
 {
        struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
@@ -1452,7 +1449,7 @@ cortex_m3_unset_watchpoint(struct target *target, struct watchpoint *watchpoint)
        return ERROR_OK;
 }
 
-static int
+int
 cortex_m3_add_watchpoint(struct target *target, struct watchpoint *watchpoint)
 {
        struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
@@ -1503,7 +1500,7 @@ cortex_m3_add_watchpoint(struct target *target, struct watchpoint *watchpoint)
        return ERROR_OK;
 }
 
-static int
+int
 cortex_m3_remove_watchpoint(struct target *target, struct watchpoint *watchpoint)
 {
        struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
@@ -1526,7 +1523,7 @@ cortex_m3_remove_watchpoint(struct target *target, struct watchpoint *watchpoint
        return ERROR_OK;
 }
 
-static void cortex_m3_enable_watchpoints(struct target *target)
+void cortex_m3_enable_watchpoints(struct target *target)
 {
        struct watchpoint *watchpoint = target->watchpoints;
 
@@ -1820,7 +1817,7 @@ cortex_m3_dwt_addreg(struct target *t, struct reg *r, struct dwt_reg *d)
        r->type = &dwt_reg_type;
 }
 
-static void
+void
 cortex_m3_dwt_setup(struct cortex_m3_common *cm3, struct target *target)
 {
        uint32_t dwtcr;
index e16aa89feb96544664d4997f8e032843656341bd..789e8530f8066f7dd8d6bd94ae15958ec3ae6a00 100644 (file)
@@ -185,4 +185,15 @@ target_to_cm3(struct target *target)
                        struct cortex_m3_common, armv7m);
 }
 
+int cortex_m3_set_breakpoint(struct target *target, struct breakpoint *breakpoint);
+int cortex_m3_unset_breakpoint(struct target *target, struct breakpoint *breakpoint);
+int cortex_m3_add_breakpoint(struct target *target, struct breakpoint *breakpoint);
+int cortex_m3_remove_breakpoint(struct target *target, struct breakpoint *breakpoint);
+int cortex_m3_set_watchpoint(struct target *target, struct watchpoint *watchpoint);
+int cortex_m3_unset_watchpoint(struct target *target, struct watchpoint *watchpoint);
+int cortex_m3_add_watchpoint(struct target *target, struct watchpoint *watchpoint);
+int cortex_m3_remove_watchpoint(struct target *target, struct watchpoint *watchpoint);
+void cortex_m3_enable_watchpoints(struct target *target);
+void cortex_m3_dwt_setup(struct cortex_m3_common *cm3, struct target *target);
+
 #endif /* CORTEX_M3_H */

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)