From: Paul F. <fer...@gm...> - 2025-07-16 08:42:19
|
Hi Zixian, On Wed, Jul 16, 2025 at 01:01:37PM +0800, Zixian Zeng wrote: > I like using OpenOCD and GDB to debug programs on STM32. On STM32 I just > need to do > > openocd -f board/stm32f3discovery.cfg > > arm-none-eabi-gdb <executable> #in other terminal > And using `tar ext :3333` Good to hear you like it and it's easy with STM32F3, your commands are correct. BTW, you can use gdb-multiarch (or just gdb on Fedora) from your distro repository, no need for a special arm-none-eabi version. > I found board/ti_mspm0_launchpad.cfg in mainline repo, and using the > latest openocd right away. I can connect to the board and program it. > But I can not debug it What exactly "can not debug" implies? You can see full interaction between GDB and OpenOCD if you do "set debug remote 1" before running "target" command. > and nothing happens when I reset board through GDB "monitor > mspm0_board_reset" command. That is a special command to simulate power on reset it seems. Why exactly are you trying to use it, what you expect and what actually happens? > Info : accepting 'gdb' connection on tcp/3333 <----- GDB attaching > [mspm0x.cpu] halted due to debug-request, current mode: Thread > xPSR: 0x01000000 pc: 0x0000016a msp: 0x20208000 > Info : Data region NOT available! Everything looks correct so far. The last message means target MCU doesn't have any dedicated data flash region but that's to be expected, right? > I want to ask if the GDB debugging feature is under developing or I used > it incorrectly? Thanks for any suggestions. It should just work, Cortex-M is not a new target. -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fer...@gm... |