Remove misleading typedef and redundant suffix from struct cortex_m3_common.
static int cortex_m3_write_debug_halt_mask(target_t *target,
uint32_t mask_on, uint32_t mask_off)
{
static int cortex_m3_write_debug_halt_mask(target_t *target,
uint32_t mask_on, uint32_t mask_off)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
/* mask off status bits */
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
/* mask off status bits */
static int cortex_m3_clear_halt(target_t *target)
{
static int cortex_m3_clear_halt(target_t *target)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
/* clear step if any */
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
/* clear step if any */
static int cortex_m3_single_step_core(target_t *target)
{
static int cortex_m3_single_step_core(target_t *target)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
uint32_t dhcsr_save;
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
uint32_t dhcsr_save;
{
int i;
uint32_t dcb_demcr;
{
int i;
uint32_t dcb_demcr;
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
cortex_m3_fp_comparator_t *fp_list = cortex_m3->fp_comparator_list;
cortex_m3_dwt_comparator_t *dwt_list = cortex_m3->dwt_comparator_list;
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
cortex_m3_fp_comparator_t *fp_list = cortex_m3->fp_comparator_list;
cortex_m3_dwt_comparator_t *dwt_list = cortex_m3->dwt_comparator_list;
static int cortex_m3_examine_debug_reason(target_t *target)
{
static int cortex_m3_examine_debug_reason(target_t *target)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
/* THIS IS NOT GOOD, TODO - better logic for detection of debug state reason */
/* only check the debug reason if we don't know it already */
/* THIS IS NOT GOOD, TODO - better logic for detection of debug state reason */
/* only check the debug reason if we don't know it already */
int i;
uint32_t xPSR;
int retval;
int i;
uint32_t xPSR;
int retval;
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct armv7m_common *armv7m = &cortex_m3->armv7m;
struct swjdp_common *swjdp = &armv7m->swjdp_info;
struct armv7m_common *armv7m = &cortex_m3->armv7m;
struct swjdp_common *swjdp = &armv7m->swjdp_info;
{
int retval;
enum target_state prev_target_state = target->state;
{
int retval;
enum target_state prev_target_state = target->state;
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
/* Read from Debug Halting Control and Status Register */
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
/* Read from Debug Halting Control and Status Register */
static int cortex_m3_soft_reset_halt(struct target_s *target)
{
static int cortex_m3_soft_reset_halt(struct target_s *target)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
uint32_t dcb_dhcsr = 0;
int retval, timeout = 0;
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
uint32_t dcb_dhcsr = 0;
int retval, timeout = 0;
static int cortex_m3_step(struct target_s *target, int current,
uint32_t address, int handle_breakpoints)
{
static int cortex_m3_step(struct target_s *target, int current,
uint32_t address, int handle_breakpoints)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct armv7m_common *armv7m = &cortex_m3->armv7m;
struct swjdp_common *swjdp = &armv7m->swjdp_info;
breakpoint_t *breakpoint = NULL;
struct armv7m_common *armv7m = &cortex_m3->armv7m;
struct swjdp_common *swjdp = &armv7m->swjdp_info;
breakpoint_t *breakpoint = NULL;
static int cortex_m3_assert_reset(target_t *target)
{
static int cortex_m3_assert_reset(target_t *target)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
int assert_srst = 1;
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
int assert_srst = 1;
int retval;
int fp_num = 0;
uint32_t hilo;
int retval;
int fp_num = 0;
uint32_t hilo;
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
cortex_m3_fp_comparator_t *comparator_list = cortex_m3->fp_comparator_list;
if (breakpoint->set)
cortex_m3_fp_comparator_t *comparator_list = cortex_m3->fp_comparator_list;
if (breakpoint->set)
cortex_m3_unset_breakpoint(struct target_s *target, breakpoint_t *breakpoint)
{
int retval;
cortex_m3_unset_breakpoint(struct target_s *target, breakpoint_t *breakpoint)
{
int retval;
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
cortex_m3_fp_comparator_t * comparator_list = cortex_m3->fp_comparator_list;
if (!breakpoint->set)
cortex_m3_fp_comparator_t * comparator_list = cortex_m3->fp_comparator_list;
if (!breakpoint->set)
static int
cortex_m3_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint)
{
static int
cortex_m3_add_breakpoint(struct target_s *target, breakpoint_t *breakpoint)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
if (cortex_m3->auto_bp_type)
{
if (cortex_m3->auto_bp_type)
{
static int
cortex_m3_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoint)
{
static int
cortex_m3_remove_breakpoint(struct target_s *target, breakpoint_t *breakpoint)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
/* REVISIT why check? FBP can be updated with core running ... */
if (target->state != TARGET_HALTED)
/* REVISIT why check? FBP can be updated with core running ... */
if (target->state != TARGET_HALTED)
{
int dwt_num = 0;
uint32_t mask, temp;
{
int dwt_num = 0;
uint32_t mask, temp;
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
/* watchpoint params were validated earlier */
mask = 0;
/* watchpoint params were validated earlier */
mask = 0;
static int
cortex_m3_unset_watchpoint(struct target_s *target, struct watchpoint *watchpoint)
{
static int
cortex_m3_unset_watchpoint(struct target_s *target, struct watchpoint *watchpoint)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
cortex_m3_dwt_comparator_t *comparator;
int dwt_num;
cortex_m3_dwt_comparator_t *comparator;
int dwt_num;
static int
cortex_m3_add_watchpoint(struct target_s *target, struct watchpoint *watchpoint)
{
static int
cortex_m3_add_watchpoint(struct target_s *target, struct watchpoint *watchpoint)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
/* REVISIT why check? DWT can be updated with core running ... */
if (target->state != TARGET_HALTED)
/* REVISIT why check? DWT can be updated with core running ... */
if (target->state != TARGET_HALTED)
static int
cortex_m3_remove_watchpoint(struct target_s *target, struct watchpoint *watchpoint)
{
static int
cortex_m3_remove_watchpoint(struct target_s *target, struct watchpoint *watchpoint)
{
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
/* REVISIT why check? DWT can be updated with core running ... */
if (target->state != TARGET_HALTED)
/* REVISIT why check? DWT can be updated with core running ... */
if (target->state != TARGET_HALTED)
-cortex_m3_dwt_setup(cortex_m3_common_t *cm3, struct target_s *target)
+cortex_m3_dwt_setup(struct cortex_m3_common *cm3, struct target_s *target)
{
uint32_t dwtcr;
struct reg_cache_s *cache;
{
uint32_t dwtcr;
struct reg_cache_s *cache;
int retval;
uint32_t cpuid, fpcr;
int i;
int retval;
uint32_t cpuid, fpcr;
int i;
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
if ((retval = ahbap_debugport_init(swjdp)) != ERROR_OK)
struct swjdp_common *swjdp = &cortex_m3->armv7m.swjdp_info;
if ((retval = ahbap_debugport_init(swjdp)) != ERROR_OK)
}
static int cortex_m3_init_arch_info(target_t *target,
}
static int cortex_m3_init_arch_info(target_t *target,
- cortex_m3_common_t *cortex_m3, struct jtag_tap *tap)
+ struct cortex_m3_common *cortex_m3, struct jtag_tap *tap)
{
int retval;
struct armv7m_common *armv7m = &cortex_m3->armv7m;
{
int retval;
struct armv7m_common *armv7m = &cortex_m3->armv7m;
static int cortex_m3_target_create(struct target_s *target, Jim_Interp *interp)
{
static int cortex_m3_target_create(struct target_s *target, Jim_Interp *interp)
{
- cortex_m3_common_t *cortex_m3 = calloc(1,sizeof(cortex_m3_common_t));
+ struct cortex_m3_common *cortex_m3 = calloc(1,sizeof(struct cortex_m3_common));
cortex_m3->common_magic = CORTEX_M3_COMMON_MAGIC;
cortex_m3_init_arch_info(target, cortex_m3, target->tap);
cortex_m3->common_magic = CORTEX_M3_COMMON_MAGIC;
cortex_m3_init_arch_info(target, cortex_m3, target->tap);
/*--------------------------------------------------------------------------*/
static int cortex_m3_verify_pointer(struct command_context_s *cmd_ctx,
/*--------------------------------------------------------------------------*/
static int cortex_m3_verify_pointer(struct command_context_s *cmd_ctx,
- struct cortex_m3_common_s *cm3)
+ struct cortex_m3_common *cm3)
{
if (cm3->common_magic != CORTEX_M3_COMMON_MAGIC) {
command_print(cmd_ctx, "target is not a Cortex-M3");
{
if (cm3->common_magic != CORTEX_M3_COMMON_MAGIC) {
command_print(cmd_ctx, "target is not a Cortex-M3");
{
int retval;
target_t *target = get_current_target(cmd_ctx);
{
int retval;
target_t *target = get_current_target(cmd_ctx);
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
uint32_t address;
unsigned long count = 1;
arm_instruction_t cur_instruction;
uint32_t address;
unsigned long count = 1;
arm_instruction_t cur_instruction;
COMMAND_HANDLER(handle_cortex_m3_vector_catch_command)
{
target_t *target = get_current_target(cmd_ctx);
COMMAND_HANDLER(handle_cortex_m3_vector_catch_command)
{
target_t *target = get_current_target(cmd_ctx);
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
struct armv7m_common *armv7m = &cortex_m3->armv7m;
struct swjdp_common *swjdp = &armv7m->swjdp_info;
uint32_t demcr = 0;
struct armv7m_common *armv7m = &cortex_m3->armv7m;
struct swjdp_common *swjdp = &armv7m->swjdp_info;
uint32_t demcr = 0;
COMMAND_HANDLER(handle_cortex_m3_mask_interrupts_command)
{
target_t *target = get_current_target(cmd_ctx);
COMMAND_HANDLER(handle_cortex_m3_mask_interrupts_command)
{
target_t *target = get_current_target(cmd_ctx);
- struct cortex_m3_common_s *cortex_m3 = target_to_cm3(target);
+ struct cortex_m3_common *cortex_m3 = target_to_cm3(target);
int retval;
retval = cortex_m3_verify_pointer(cmd_ctx, cortex_m3);
int retval;
retval = cortex_m3_verify_pointer(cmd_ctx, cortex_m3);
uint32_t dwt_comparator_address;
} cortex_m3_dwt_comparator_t;
uint32_t dwt_comparator_address;
} cortex_m3_dwt_comparator_t;
-typedef struct cortex_m3_common_s
{
int common_magic;
struct arm_jtag jtag_info;
{
int common_magic;
struct arm_jtag jtag_info;
struct reg_cache_s *dwt_cache;
struct armv7m_common armv7m;
struct reg_cache_s *dwt_cache;
struct armv7m_common armv7m;
-static inline struct cortex_m3_common_s *
+static inline struct cortex_m3_common *
target_to_cm3(struct target_s *target)
{
return container_of(target->arch_info,
target_to_cm3(struct target_s *target)
{
return container_of(target->arch_info,
- struct cortex_m3_common_s, armv7m);
+ struct cortex_m3_common, armv7m);
}
#endif /* CORTEX_M3_H */
}
#endif /* CORTEX_M3_H */
Linking to existing account procedure
If you already have an account and want to add another login method
you
MUST first sign in with your existing account and
then change URL to read
https://review.openocd.org/login/?link
to get to this page again but this time it'll work for linking. Thank you.
SSH host keys fingerprints
1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=.. |
|+o.. . |
|*.o . . |
|+B . . . |
|Bo. = o S |
|Oo.+ + = |
|oB=.* = . o |
| =+=.+ + E |
|. .=o . o |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)