From 274b8185173d1bd0b28f1174ee29e2d2fdacbcae Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Sun, 29 Mar 2015 16:48:51 -0700 Subject: [PATCH] Make cortexm_pc_write static. --- src/cortexm.c | 9 +-------- src/include/cortexm.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/cortexm.c b/src/cortexm.c index 0c0bf02e..c2684b5f 100644 --- a/src/cortexm.c +++ b/src/cortexm.c @@ -24,9 +24,6 @@ * ARM doc DDI0403C. * * Also supports Cortex-M0 / ARMv6-M - * - * Issues: - * There are way too many magic numbers used here. */ #include "general.h" #include "exception.h" @@ -421,16 +418,12 @@ static uint32_t cortexm_pc_read(target *t) { target_mem_write32(t, CORTEXM_DCRSR, 0x0F); return target_mem_read32(t, CORTEXM_DCRDR); - - return 0; } -int cortexm_pc_write(target *t, const uint32_t val) +static void cortexm_pc_write(target *t, const uint32_t val) { target_mem_write32(t, CORTEXM_DCRDR, val); target_mem_write32(t, CORTEXM_DCRSR, CORTEXM_DCRSR_REGWnR | 0x0F); - - return 0; } /* The following three routines implement target halt/resume diff --git a/src/include/cortexm.h b/src/include/cortexm.h index ec3369ca..f7396bf9 100644 --- a/src/include/cortexm.h +++ b/src/include/cortexm.h @@ -148,7 +148,6 @@ void cortexm_detach(target *t); void cortexm_halt_resume(target *t, bool step); int cortexm_run_stub(target *t, uint32_t loadaddr, uint32_t r0, uint32_t r1, uint32_t r2, uint32_t r3); -int cortexm_pc_write(target *t, const uint32_t val); #endif