首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“无法启动调试。没有进程与此对象关联。”- Visual代码中包含GDB和openOCD的openOCD。

“无法启动调试。没有进程与此对象关联。”- Visual代码中包含GDB和openOCD的openOCD。
EN

Stack Overflow用户
提问于 2018-10-13 21:04:21
回答 1查看 1.4K关注 0票数 0

Windows 10

VSCode 1.28.1

VSC CPP工具扩展0.19.0

开发板: Multitech MTUDK2-ST

OpenOCD 0.10.0

GDB (7.12.1.20170417.git作为GNU ARM工具链的一部分6-2017-Q2-更新)

尝试对此设置/示例进行调试。使用Mbed (1.8.2)编译二进制文件,从命令提示符中可以很好地工作。还可以在一个命令提示符实例中成功地启动openOCD,并在VS代码终端会话上通过GDB会话与其通信(使用arm-none eabi-gdb启动)。

启动调试会话会在VSC调试控制台上生成以下输出:

代码语言:javascript
复制
1: (628) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'

1: (667) LaunchOptions  ExePath='Z:\VoboNode_vsc_nucleo_f411RE\VoBoNode\BUILD\MTS_MDOT_F411RE\GCC_ARM-DEBUG\VoBoNode.elf'

1: (667) LaunchOptions  WorkingDirectory='Z:\VoboNode_vsc_nucleo_f411RE\VoBoNode'

1: (667) LaunchOptions  ExeArguments=''

1: (667) LaunchOptions MIMode='gdb'

1: (667) LaunchOptions  MIDebuggerPath='C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-gdb.exe'

1: (667) LaunchOptions  WaitDynamicLibLoad='false'

1: (667) LaunchOptions  DebugServer='C:\OpenOCD\openocd-0.10.0\bin\openocd.exe'

1: (667) LaunchOptions  DebugServerArgs='-f C:\OpenOCD\openocd-0.10.0\scripts\board\st_nucleo_f4.cfg -f C:\OpenOCD\openocd-0.10.0\scripts\interface\stlink-v2-1.cfg -c init -c "reset init"'

1: (667) LaunchOptions  ServerStarted='target halted due to debug-request, current mode: Thread'

1: (667) LaunchOptions  FilterStderr='true'

1: (667) LaunchOptions  ServerLaunchTimeout='20000'

1: (667) LaunchOptions>

1: (667) LaunchOptions    <SetupCommands>

1: (668) LaunchOptions        <Command IgnoreFailures='false' Description=''>-environment-cd Z:\VoboNode_vsc_nucleo_f411RE\VoBoNode\BUILD\MTS_MDOT_F411RE\GCC_ARM\</Command>

1: (668) LaunchOptions        <Command IgnoreFailures='false' Description='connect to target'>-target-select remote localhost:3333</Command>

1: (668) LaunchOptions        <Command IgnoreFailures='false' Description='load file'>-file-exec-and-symbols VoBoNode.elf</Command>

1: (668) LaunchOptions        <Command IgnoreFailures='false' Description=''>-interpreter-exec console "monitor endian little"</Command>

1: (668) LaunchOptions        <Command IgnoreFailures='false' Description=''>-interpreter-exec console "monitor reset"</Command>

1: (668) LaunchOptions        <Command IgnoreFailures='false' Description=''>-interpreter-exec console "monitor halt"</Command>

1: (668) LaunchOptions        <Command IgnoreFailures='false' Description=''>-interpreter-exec console "monitor arm semihosting enable"</Command>

1: (668) LaunchOptions        <Command IgnoreFailures='false' Description='flash target'>-target-download</Command>

1: (668) LaunchOptions    </SetupCommands>

1: (668) LaunchOptions</LocalLaunchOptions>

1: (806) Starting: "C:\OpenOCD\openocd-0.10.0\bin\openocd.exe" -f C:\OpenOCD\openocd-0.10.0\scripts\board\st_nucleo_f4.cfg -f C:\OpenOCD\openocd-0.10.0\scripts\interface\stlink-v2-1.cfg -c init -c "reset init"

1: (1007) "C:\OpenOCD\openocd-0.10.0\bin\openocd.exe" exited with code 1 (0x1).

1: (1023) <-logout

注意,使用“start:”(第806行)后面显示的准确的命令行手动启动openOCD很好。我怀疑SetupCommands (多行668)有问题,它阻止了OpenOCD会话的启动。无论如何,我不太清楚OP的GDB命令是如何从手动启动的GDB会话提示符中执行的,所以我很难排除故障。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-10-16 20:46:18

开始起作用了。这似乎是一个问题,内容来自以前的构建是存在于VS代码构建寻找的位置,以加载调试。删除整个文件夹并允许VS代码通过新构建重新填充它,解决了openOCD错误。现在,即使我不从以前的构建中删除内容,构建也能工作。不完全确定为什么会起作用,但确实成功了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52797304

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档