X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Flpc2000.c;h=ae0a384b6febff60c80ae9a81de35fe9f15b2ad4;hb=e40f6380638ed3f7780b78ceb1411f8b7059a073;hp=6888b76838cc8c1d694960780068a5a6e8d75475;hpb=e51b9a4ac7afa0fde11690268ba88861e1000f60;p=openocd.git diff --git a/src/flash/nor/lpc2000.c b/src/flash/nor/lpc2000.c index 6888b76838..ae0a384b6f 100644 --- a/src/flash/nor/lpc2000.c +++ b/src/flash/nor/lpc2000.c @@ -29,6 +29,7 @@ #include "lpc2000.h" #include #include +#include #include @@ -242,7 +243,7 @@ static int lpc2000_iap_call(struct flash_bank *bank, int code, uint32_t param_ta struct target *target = bank->target; struct mem_param mem_params[2]; struct reg_param reg_params[5]; - struct armv4_5_algorithm armv4_5_info; /* for LPC2000 */ + struct arm_algorithm armv4_5_info; /* for LPC2000 */ struct armv7m_algorithm armv7m_info; /* for LPC1700 */ uint32_t status_code; uint32_t iap_entry_point = 0; /* to make compiler happier */ @@ -263,8 +264,10 @@ static int lpc2000_iap_call(struct flash_bank *bank, int code, uint32_t param_ta switch(lpc2000_info->variant) { case lpc1700: - target_buffer_set_u32(target, jump_gate, ARMV7M_T_BX(12)); - target_buffer_set_u32(target, jump_gate + 4, ARMV7M_T_B(0xfffffe)); + target_buffer_set_u32(target, jump_gate, + ARMV4_5_T_BX(12)); + target_buffer_set_u32(target, jump_gate + 4, + ARMV4_5_T_B(0xfffffe)); break; case lpc2000_v1: case lpc2000_v2: @@ -340,7 +343,7 @@ static int lpc2000_iap_call(struct flash_bank *bank, int code, uint32_t param_ta case lpc2000_v1: case lpc2000_v2: /* IAP stack */ - init_reg_param(®_params[3], "r13_svc", 32, PARAM_OUT); + init_reg_param(®_params[3], "sp_svc", 32, PARAM_OUT); buf_set_u32(reg_params[3].value, 0, 32, lpc2000_info->iap_working_area->address + 0xb4); /* return address */