首页 > 解决方案 > 使用 Blackmagic probe 和 platformIO undefinedError 进行调试

问题描述

如前所述,能够使用此设置进行调试,但突然我开始收到错误。我可以将固件上传到目标板(STM32 Bluepill),但是当我开始调试会话时出现以下错误!

undefinedError: Traceback (most recent call last):
File “/Users/engmoh/.platformio/penv/lib/python3.8/site-packages/platformio/main.py”, line 109, in main
cli() # pylint: disable=no-value-for-parameter
File “/Users/engmoh/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/Users/engmoh/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/Users/engmoh/.platformio/penv/lib/python3.8/site-packages/platformio/commands/init.py”, line 44, in invoke
return super(PlatformioCLI, self).invoke(ctx)
File “/Users/engmoh/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Users/engmoh/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/Users/engmoh/.platformio/penv/lib/python3.8/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/Users/engmoh/.platformio/penv/lib/python3.8/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/Users/engmoh/.platformio/penv/lib/python3.8/site-packages/platformio/commands/debug/command.py”, line 117, in cli

    server_executable = debug_options["server"]["executable"].lower()
TypeError: ‘NoneType’ object is not subscriptable

============================================================

An unexpected error occurred. Further steps:

Verify that you have the latest version of PlatformIO using
pip install -U platformio command

Try to find answer in FAQ Troubleshooting section
https://docs.platformio.org/page/faq.html

Report this problem to the developers
https://github.com/platformio/platformio-core/issues

我的环境:

-Mac Os 大苏尔。

-vscode(版本:1.54.3)。

-PlatformIO(核心 5.1.1 - 家庭 3.3.4)。

-BlackMagic 探针克隆(bluepill 转换!)<-- 曾经在最新更新之前工作。

这是 platformio.ini 配置:

[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = cmsis
board_build.mcu = stm32f103c8t6                 ; change microcontroller (override)
board_build.f_cpu = 8000000L                    ; change MCU frequency   (override)
upload_protocol = blackmagic                    ; SWD interface
debug_tool = blackmagic
debug_port = /dev/tty.usbmodem7BBB54AD1
upload_port = /dev/tty.usbmodem7BBB54AD1 

使用 STlink V2 调试正常。

这里可能是什么问题?

标签: debuggingvisual-studio-codestm32platformio

解决方案


推荐阅读