#include "lpc2000.h"
#include <helper/binarybuffer.h>
#include <target/algorithm.h>
+#include <target/arm_opcodes.h>
#include <target/armv7m.h>
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 */
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:
break;
case lpc2000_v1:
case lpc2000_v2:
- armv4_5_info.common_magic = ARMV4_5_COMMON_MAGIC;
- armv4_5_info.core_mode = ARMV4_5_MODE_SVC;
+ armv4_5_info.common_magic = ARM_COMMON_MAGIC;
+ armv4_5_info.core_mode = ARM_MODE_SVC;
armv4_5_info.core_state = ARM_STATE_ARM;
iap_entry_point = 0x7ffffff1;
break;
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 */