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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user