Menu

#237 Regression cannot add breakpoint on STM32F7 with code from ITCM

0.9.0
new
nobody
None
cortex_m.c
2019-05-11
2019-05-11
benjarobin
No

Hello,

After an update of openOCD debugging was no longer working with an STM32F7 with code running from ITCM interface.
The code is still in the internal flash of the STM32, but access from the ITCM bus (0x02000000) instead of the AXI bus (0x80000000)

I bisect the problem to the following commit :

Prior to this commit, the breakpoint was forced to be an BKPT_HARD since the address 0x02000000 is smaller than 0x20000000:
BKPT_TYPE_BY_ADDR(addr) ((addr) < 0x20000000 ? BKPT_HARD : BKPT_SOFT)

By default eclipse use Regular breakpoint, and it looks like it is hardcoded:

If I manually configure the breakpoint to be an hardware breakpoint, I can run to the configured hardware breakpoint, but stepping cannot be realized since it use internally a regular breakpoint.

Discussion

  • benjarobin

    benjarobin - 2019-05-11

    Small mistake, the ITCM bus is at address 0x00200000 and the AXIM bus at address 0x08000000
    This does not change anything...

    I just don't know why it is working with code running from AXIM interface:

    • Why a software (regular) breakpoint can be added if running from AXIM interface
    • And why it is not working with the ITCM interface ?
     
  • benjarobin

    benjarobin - 2019-05-11

    Ok, found the correct solution, just add in stm32f7x.cfg after the main "flash bank" declaration:

    flash bank vbank0 virtual 0x00200000 0 0 0 $_TARGETNAME $_FLASHNAME
    
     

Log in to post a comment.

MongoDB Logo MongoDB