summaryrefslogtreecommitdiff
path: root/src/target/cortex_m3.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/cortex_m3.h')
-rw-r--r--src/target/cortex_m3.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/target/cortex_m3.h b/src/target/cortex_m3.h
index 1dd724c8..629db8e1 100644
--- a/src/target/cortex_m3.h
+++ b/src/target/cortex_m3.h
@@ -164,4 +164,11 @@ typedef struct cortex_m3_common_s
void *arch_info;
} cortex_m3_common_t;
+static inline struct cortex_m3_common_s *
+target_to_cm3(struct target_s *target)
+{
+ return container_of(target->arch_info,
+ struct cortex_m3_common_s, armv7m);
+}
+
#endif /* CORTEX_M3_H */