aboutsummaryrefslogtreecommitdiff
path: root/src/nrf51.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nrf51.c')
-rw-r--r--src/nrf51.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nrf51.c b/src/nrf51.c
index ed0137c..a75b356 100644
--- a/src/nrf51.c
+++ b/src/nrf51.c
@@ -26,6 +26,7 @@
#include "target.h"
#include "command.h"
#include "gdb_packet.h"
+#include "cortexm.h"
static int nrf51_flash_erase(struct target_s *target, uint32_t addr, size_t len);
static int nrf51_flash_write(struct target_s *target, uint32_t dest,
@@ -229,7 +230,7 @@ static int nrf51_flash_write(struct target_s *target, uint32_t dest,
/* Write stub and data to target ram and set PC */
target_mem_write(target, 0x20000000, nrf51_flash_write_stub, 0x28);
target_mem_write(target, 0x20000028, data, len + 8);
- target_pc_write(target, 0x20000000);
+ cortexm_pc_write(target, 0x20000000);
if(target_check_error(target))
return -1;