X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Farm.h;h=30e2c76eabb2fcea9e040461277a12be91dda13f;hp=ce8cbe193e8bf2bfdd3d2e259668ec1b9b5bf0ec;hb=e1c40cb1c116d6e49f787f59dcb3c0b87a52aa56;hpb=0f3bbcf09683904c1f21b6961cbb0f36b07043c0 diff --git a/src/target/arm.h b/src/target/arm.h index ce8cbe193e..30e2c76eab 100644 --- a/src/target/arm.h +++ b/src/target/arm.h @@ -23,6 +23,7 @@ * Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #ifndef ARM_H #define ARM_H @@ -124,6 +125,9 @@ struct arm { /** Flag reporting unavailability of the BKPT instruction. */ bool is_armv4; + /** Flag reporting armv6m based core. */ + bool is_armv6m; + /** Flag reporting whether semihosting is active. */ bool is_semihosting; @@ -176,12 +180,14 @@ struct arm { /** Convert target handle to generic ARM target state handle. */ static inline struct arm *target_to_arm(struct target *target) { + assert(target != NULL); return target->arch_info; } static inline bool is_arm(struct arm *arm) { - return arm && arm->common_magic == ARM_COMMON_MAGIC; + assert(arm != NULL); + return arm->common_magic == ARM_COMMON_MAGIC; } struct arm_algorithm { @@ -195,7 +201,7 @@ struct arm_reg { int num; enum arm_mode mode; struct target *target; - struct arm *armv4_5_common; + struct arm *arm; uint32_t value; };