We use a chip support XIP in SPI Flash(If SPI Flash controller is enabled, we can access SPI Flash by memory mapping).
After reset, the SPI Flash controller is disabled in default, and it is enabled in bootloader.
After the SPI Flash controller is enalbed, we can set a breakpoint in SPI Flash address space. But If we quit debug state without disable or delete breakpoints, and enter debug state again, J-Link will try to set breakpoints before bootloader run, and this make CPU crash.
Because Cortex-M only has a few hardware breakpoints. It is said that If we set a breakpoint, J-Link will try to set software breakpoint first, if fails, then J-Link uses hardware breakpoints.
I found there are some configure options in JLinkSettings.ini, can I use JLinkSettings.ini to make J-Link always uses hardware breakpoint in SPI Flash address space?
[BREAKPOINTS]
ForceImpTypeAny = 0
ShowInfoWin = 1
EnableFlashBP = 2
BPDuringExecution = 0
......
[MEM]
RdOverrideOrMask = 0x00
RdOverrideAndMask = 0xFFFFFFFF
RdOverrideAddr = 0xFFFFFFFF
WrOverrideOrMask = 0x00
WrOverrideAndMask = 0xFFFFFFFF
WrOverrideAddr = 0xFFFFFFFF
After reset, the SPI Flash controller is disabled in default, and it is enabled in bootloader.
After the SPI Flash controller is enalbed, we can set a breakpoint in SPI Flash address space. But If we quit debug state without disable or delete breakpoints, and enter debug state again, J-Link will try to set breakpoints before bootloader run, and this make CPU crash.
Because Cortex-M only has a few hardware breakpoints. It is said that If we set a breakpoint, J-Link will try to set software breakpoint first, if fails, then J-Link uses hardware breakpoints.
I found there are some configure options in JLinkSettings.ini, can I use JLinkSettings.ini to make J-Link always uses hardware breakpoint in SPI Flash address space?
[BREAKPOINTS]
ForceImpTypeAny = 0
ShowInfoWin = 1
EnableFlashBP = 2
BPDuringExecution = 0
......
[MEM]
RdOverrideOrMask = 0x00
RdOverrideAndMask = 0xFFFFFFFF
RdOverrideAddr = 0xFFFFFFFF
WrOverrideOrMask = 0x00
WrOverrideAndMask = 0xFFFFFFFF
WrOverrideAddr = 0xFFFFFFFF