stm32f429 buildroot远程调试

stm32f429 buildroot remote-debugging

我刚刚学习了如何使用 buildroot,并按照其中一个教程将 linux 内核、U-Boot 等的构建映像刷入 beagle bone。一切都很好。因此,我在 stm32f429-disc1 上应用了 buildroot,并将图像刷入电路板。 busybox有bug,想调试一下。问题是我将如何修改下面的 openocd 脚本,以便我可以调试引导过程,大概是在另一个终端中打开 gdb(服务器)?


flash:
    cd $(dir_buildroot)/output/build/host-openocd-0.10.0/tcl && ../../../host/usr/bin/openocd \
    -f board/stm32f429discovery.cfg \
    -c "init" \
    -c "reset init" \
    -c "flash probe 0" \
    -c "flash info 0" \
    -c "flash write_image erase ../../../images/stm32f429i-disco.bin 0x08000000" \
    -c "flash write_image erase ../../../images/stm32f429-disco.dtb 0x08004000" \
    -c "flash write_image erase ../../../images/xipImage 0x08008000" \
    -c "reset run" -c shutdown

我一直在使用 windows 下的 Atollic Truestudio 来调试 stm32 板,而 Atollic 使调试引导加载程序等变得非常容易。我在谷歌上搜索了很多教程,但在我看来其中大部分是为了在用户 space 中调试应用程序而设置的。我使用 Linux 作为主机,我相信我只需要 st-link/v2-1、openocd 和 gdb ?

如有任何意见,我们将不胜感激。

此致, 埃里克

要调试用户空间应用程序,您不会使用 OpenOCD,而是使用 gdb 和 gdbserver 进行纯软件调试。您可以阅读 https://bootlin.com/doc/training/buildroot/buildroot-slides.pdf 从幻灯片 275 开始了解更多详细信息。