summaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-12-07 14:54:12 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2009-12-07 14:57:43 -0800
commita4a2808c2a849eddd5d7d454c048ffdfd89ca9c6 (patch)
tree25c8eccb1e9cfafdf61b1f6ed5dc940f24c489c6 /src/flash
parent7b0314c377cc7c6a90db34d6d3e9e723d6d2b94a (diff)
downloadopenocd_libswd-a4a2808c2a849eddd5d7d454c048ffdfd89ca9c6.tar.gz
openocd_libswd-a4a2808c2a849eddd5d7d454c048ffdfd89ca9c6.tar.bz2
openocd_libswd-a4a2808c2a849eddd5d7d454c048ffdfd89ca9c6.tar.xz
openocd_libswd-a4a2808c2a849eddd5d7d454c048ffdfd89ca9c6.zip
ARM: move opcode macros to <target/arm_opcodes.h>
Move the ARM opcode macros from <target/armv4_5.h>, and a few Thumb2 ones from <target/armv7m.h>, to more appropriate homes in a new <target/arm_opcodes.h> file. Removed duplicate opcodes from that v7m/Thumb2 set. Protected a few macro argument references by adding missing parentheses. Tightening up some of the line lengths turned up a curious artifact: the macros for the Thumb opcodes are all 32 bits wide, not 16 bits. There's currently no explanation for why it's done that way... Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/nor/lpc2000.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/flash/nor/lpc2000.c b/src/flash/nor/lpc2000.c
index 0caf3e09..18896f7b 100644
--- a/src/flash/nor/lpc2000.c
+++ b/src/flash/nor/lpc2000.c
@@ -29,6 +29,7 @@
#include "lpc2000.h"
#include <helper/binarybuffer.h>
#include <target/algorithm.h>
+#include <target/arm_opcodes.h>
#include <target/armv7m.h>
@@ -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: