I tried hbreak instead of break, and it worked. I'm using the configuration file "xmc4800-relax.cfg" which refers to "xmc4xxx.cfg", both from OpenOCD. How can I define the flash range correctly?
I found in "xmc4xxx.cfg" line 54: flash bank $_FLASHNAME xmc4xxx 0x0C000000 0 0 0 $_TARGETNAME But I don't have a clue how to fix it. Thanks a lot! Matthias On 06.11.19 12:47, Antonio Borneo wrote: > On Wed, Nov 6, 2019 at 12:16 PM Andreas Fritiofson > <[email protected]> wrote: >> >> >> On Wed, Nov 6, 2019 at 11:56 AM Matthias Stadler >> <[email protected]> wrote: >>> Hi Tommy, >>> >>> Thank you for your input. I put more informations together, hope it >>> helps to get a better understanding of the issue. >>> >>> My workflow is as follows: >>> >>> 1) Start OpenOCD: /opt/openocd/bin/openocd -f board/xmc4800-relax.cfg -d >>> 2) Attach GDB Debug Session: arm-none-eabi-gdb xmc-test -ex 'target >>> remote localhost:3333' >>> 3) Reset and Init MCU: mon reset init >>> 4) Set Breakpoints: break main / break XMC_GPIO_GetInput >>> 5) Run the program >>> 6) Should hit the breakpoints, but does not at main nor at >>> XMC_GPIO_GetInput. Same program works fine with JlinkGDB Server. >>> >>> Attached you find the log files from GDB output and the OpenOCD debug >>> output. >>> >> According to the log, GDB specifically asks for a software breakpoint which >> won't work in Flash. It should not do this if it's aware that the address is >> in flash. Have you not defined a flash bank covering this range? >> > Matthias, > > to verify quickly, you can try to use "hbreak" instead of "break" in GDB. > Or, you send the command "monitor gdb_breakpoint_override hard" before > using "break". > Both should work. > Then "the right" fix is to define the flash range in the config file. > > Antonio Geschäftsführer: Dr.-Ing. Maximilian Krinninger, Dr.-Ing. Stephan Nowatschin _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
