This is an automated email from Gerrit. Rémi PRUD'HOMME ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/2755
-- gerrit commit 2cccd1e63a55d30bbb03823bd84eea02938f15a9 Author: Rémi PRUD’HOMME <[email protected]> Date: Wed Apr 29 15:54:03 2015 +0200 Add flash breakpoint support for Cortex M7 src/target/cortex_m.c and src/target/cortex_m.h The format of fbp have evolved with cortex M7, more simple now. At the bit 0, there is an enable bit, and at the bit 31-1, the address of the breakpoint. Change-Id: I3abff38c9b43d777b7c51220e2e22453f4f6da1e Signed-off-by: Rémi PRUD'HOMME <[email protected]> diff --git a/src/target/cortex_m.c b/src/target/cortex_m.c index 2cb83a4..2b93a94 100644 --- a/src/target/cortex_m.c +++ b/src/target/cortex_m.c @@ -1145,9 +1145,15 @@ int cortex_m_set_breakpoint(struct target *target, struct breakpoint *breakpoint return ERROR_FAIL; } breakpoint->set = fp_num + 1; - hilo = (breakpoint->address & 0x2) ? FPCR_REPLACE_BKPT_HIGH : FPCR_REPLACE_BKPT_LOW; comparator_list[fp_num].used = 1; + + if (cortex_m->cortex_m7) { + comparator_list[fp_num].fpcr_value = breakpoint->address | 1; + } else { + hilo = (breakpoint->address & 0x2) ? FPCR_REPLACE_BKPT_HIGH : FPCR_REPLACE_BKPT_LOW; comparator_list[fp_num].fpcr_value = (breakpoint->address & 0x1FFFFFFC) | hilo | 1; + } + target_write_u32(target, comparator_list[fp_num].fpcr_address, comparator_list[fp_num].fpcr_value); LOG_DEBUG("fpc_num %i fpcr_value 0x%" PRIx32 "", diff --git a/src/target/cortex_m.h b/src/target/cortex_m.h index 028b4c8..446c07a 100644 --- a/src/target/cortex_m.h +++ b/src/target/cortex_m.h @@ -172,6 +172,7 @@ struct cortex_m_common { uint32_t nvic_icsr; /* Interrupt Control State Register - shows active and pending IRQ */ /* Flash Patch and Breakpoint (FPB) */ + int cortex_m7; int fp_num_lit; int fp_num_code; int fp_code_available; -- ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
