使用 Blackmagic 探针和 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 big sur。

-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 调试正常。

这里可能有什么问题?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)