target/cortex_m: support DWT version 2.1 for Archv8_M
According to Arm®v8-M Architecture Reference Manual: section D1.2.59 DWT_DEVARCH, DWT Device Architecture Register, the field REVISION bits [19:16] defines two DWT architectures revision Signed-off-by: Fedi Bouzazi <fedi.bouzazi@st.com> Change-Id: I948dae0710ac921a7f0fbcef3ccacdae99184fe4 Reviewed-on: https://review.openocd.org/c/openocd/+/7800 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
8bbbff185f
commit
fb52ba4fa1
|
@ -1959,7 +1959,8 @@ static int cortex_m_set_watchpoint(struct target *target, struct watchpoint *wat
|
||||||
target_write_u32(target, comparator->dwt_comparator_address + 0,
|
target_write_u32(target, comparator->dwt_comparator_address + 0,
|
||||||
comparator->comp);
|
comparator->comp);
|
||||||
|
|
||||||
if ((cortex_m->dwt_devarch & 0x1FFFFF) != DWT_DEVARCH_ARMV8M) {
|
if ((cortex_m->dwt_devarch & 0x1FFFFF) != DWT_DEVARCH_ARMV8M_V2_0
|
||||||
|
&& (cortex_m->dwt_devarch & 0x1FFFFF) != DWT_DEVARCH_ARMV8M_V2_1) {
|
||||||
uint32_t mask = 0, temp;
|
uint32_t mask = 0, temp;
|
||||||
|
|
||||||
/* watchpoint params were validated earlier */
|
/* watchpoint params were validated earlier */
|
||||||
|
|
|
@ -92,7 +92,8 @@ struct cortex_m_part_info {
|
||||||
#define DWT_FUNCTION0 0xE0001028
|
#define DWT_FUNCTION0 0xE0001028
|
||||||
#define DWT_DEVARCH 0xE0001FBC
|
#define DWT_DEVARCH 0xE0001FBC
|
||||||
|
|
||||||
#define DWT_DEVARCH_ARMV8M 0x101A02
|
#define DWT_DEVARCH_ARMV8M_V2_0 0x101A02
|
||||||
|
#define DWT_DEVARCH_ARMV8M_V2_1 0x111A02
|
||||||
|
|
||||||
#define FP_CTRL 0xE0002000
|
#define FP_CTRL 0xE0002000
|
||||||
#define FP_REMAP 0xE0002004
|
#define FP_REMAP 0xE0002004
|
||||||
|
|
Loading…
Reference in New Issue