Hi Tarek,

I'm sure that any change in the config script cannot fix the problem
(if we keep using maskisr auto and CTI at all).
See target/cortex_m.c:1013, where an internal dummy run is
started and couple of lines further the code waits for halt on breakpoint,
both without emitting any event.

Tom

On 04/02/2021 22:41, Tarek BOUCHKATI wrote:
Hi Tom,

I will be able to play with an STM32H7 b/o next week, I will try to investigate 
further.
In STM32CubeIDE we changed a lot the config files, the way I have lost the 
track.

FTR, adding CTI in config files was the fast way.
The correct one is to do it like in aarch64.
I was into it, but you know, when you have a 99% working solution you just get 
lazy.

Checking closer in st_scripts/targets/stm32h7x.cfg
I was using the 'resume-start' and 'halted' events to do the 
stm32h7x_cti_prepare_restart.
Could you please check if this works for you.
If so, let's fix it upstream.

Tarek

-----Original Message-----
From: Tomas Vanek via OpenOCD-devel <openocd-devel@lists.sourceforge.net>
Sent: Wednesday, February 3, 2021 7:10 PM
To: Tarek BOCHKATI <tarekbouchk...@gmail.com>
Cc: OpenOCD ML <openocd-devel@lists.sourceforge.net>
Subject: [OpenOCD-devel] STM32H7 stepping broken by CTI

Hi Tarek,

I encountered a problem debugging STM32H745 with "set USE_CTI 1".
The step command didn't work, PC didn't advance. I found out that the problem depends on 
setting "cortex_m maskisr auto", it disappears with other maskisr modes.

Well it seems clear: In the maskisr auto mode a dummy run to breakpoint at PC 
address is issued first. It sets CTI signals and later issued C_STEP is 
therefore suppressed.
We would need a stm32h7x_cti_prepare_restart call in between but there is no 
suitable event emitted.

Tom


_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel



_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to