diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2010-02-04 14:39:51 -0800 |
---|---|---|
committer | David Brownell <dbrownell@users.sourceforge.net> | 2010-02-04 14:39:51 -0800 |
commit | ff5deeeeaa4f394931e3c5ccfb4cfd33beda0743 (patch) | |
tree | 83d84ac6b1974dfb6001081ce824ab8830839223 /src/target/armv7m.h | |
parent | 3ea9e62189205cfa84a04ec6955aaf1f5184a937 (diff) | |
download | riscv-openocd-ff5deeeeaa4f394931e3c5ccfb4cfd33beda0743.zip riscv-openocd-ff5deeeeaa4f394931e3c5ccfb4cfd33beda0743.tar.gz riscv-openocd-ff5deeeeaa4f394931e3c5ccfb4cfd33beda0743.tar.bz2 |
ARMv7-M: make DAP commands verify target is an ARMv7-M
Init the ARMv7-M magic number. Define predicate verifying it.
Use it to resolve a lurking bug/FIXME: make sure the ARMv7-M
specific DAP ops reject non-ARMv7-M targets.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src/target/armv7m.h')
-rw-r--r-- | src/target/armv7m.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/target/armv7m.h b/src/target/armv7m.h index 9787e30..b6be1d2 100644 --- a/src/target/armv7m.h +++ b/src/target/armv7m.h @@ -131,6 +131,11 @@ target_to_armv7m(struct target *target) return target->arch_info; } +static inline bool is_armv7m(struct armv7m_common *armv7m) +{ + return armv7m->common_magic == ARMV7M_COMMON_MAGIC; +} + struct armv7m_algorithm { int common_magic; |