首页 > 解决方案 > stm32f429 buildroot 远程调试

问题描述

那里

我刚刚学会了如何使用 buildroot 并按照其中一个教程将 linux 内核、U-Boot 等的构建映像刷写到小猎犬骨头上。这一切都很好。所以我在 stm32f429-disc1 上应用了 buildroot 并将图像刷到了板上。busybox 上有一个错误,我想调试它。问题是我将如何修改下面的 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 使得调试引导加载程序等变得超级容易。我在谷歌上搜索了很多教程,但在我看来,其中大部分是为调试应用程序设置的在用户空间。我使用 Linux 作为主机,我相信我需要的只是 st-link/v2-1、openocd 和 gdb?

任何评论表示赞赏。

问候, 埃里克

标签: remote-debuggingstm32buildroot

解决方案


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


推荐阅读