Hi there,
I suddenly got this error when I try to debug my nrf52(832) application using a black magic probe. This worked no problems when suddenly this error appeared in the debug console of VS Code. It does’nt matter if i skip pre-debug or do a clean build. Pio debug runs fine in the shell. I’m a little out of ideas here…
undefinedError: Traceback (most recent call last):
File "c:\users\tobia\.platformio\penv\lib\site-packages\platformio\__main__.py", line 109, in main
cli() # pylint: disable=no-value-for-parameter
File "c:\users\tobia\.platformio\penv\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "c:\users\tobia\.platformio\penv\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\users\tobia\.platformio\penv\lib\site-packages\platformio\commands\__init__.py", line 44, in invoke
return super(PlatformioCLI, self).invoke(ctx)
File "c:\users\tobia\.platformio\penv\lib\site-packages\click\core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\tobia\.platformio\penv\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\tobia\.platformio\penv\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\users\tobia\.platformio\penv\lib\site-packages\click\decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\tobia\.platformio\penv\lib\site-packages\platformio\commands\debug\command.py", line 117, in cli
debug_options = platform.configure_debug_options(debug_options, ide_data)
File "C:\Users\tobia\.platformio\platforms\nordicnrf52\platform.py", line 169, in configure_debug_options
server_executable = debug_options["server"]["executable"].lower()
TypeError: 'NoneType' object is not subscriptable
============================================================
An unexpected error occurred. Further steps:
[…]
My platformio.ini looks like this:
[base]
platform = nordicnrf52
board = generic_nrf52832
framework = arduino
extra_scripts = pre:version.py
lib_deps =
mikalhart/TinyGPSPlus@^1.0.2
etherkit/Etherkit Si5351@^2.1.4
etherkit/Etherkit JTEncode@^1.2.1
lib_ldf_mode = chain+
debug_init_cmds =
define pio_reset_halt_target
monitor hard_srst
monitor swdp_scan
attach 1
$INIT_BREAK
start
end
define pio_reset_run_target
start
end
target extended-remote $DEBUG_PORT
monitor tpwr enable
monitor hard_srst
monitor swdp_scan
attach 1
set mem inaccessible-by-default off
interrupt
$INIT_BREAK
$LOAD_CMDS
[balloon1]
extends = base
build_flags = -Os
-Wl,--gc-sections
-Wl,-Map,output.map
-DNRF52832_XXAA
-DARDUINO_GENERIC
-DRESET_PIN=21
-UUSE_LFXO -DUSE_LFRC
-DCONFIG_NFCT_PINS_AS_GPIOS
-DHW_BALLOON1R1
upload_protocol = blackmagic
debug_tool = blackmagic
monitor_speed = 115200
[env:mockup]
extends = base
build_flags = -Os
-Wl,--gc-sections
-Wl,-Map,output.map
-DNRF52832_XXAA
-DARDUINO_GENERIC
-DRESET_PIN=21
-UUSE_LFXO
-DUSE_LFRC
-DCONFIG_NFCT_PINS_AS_GPIOS
-DHW_MOCKUP
-DRADIOLIB_SOFTWARE_SERIAL_UNSUPPORTED
-DRADIOLIB_HARDWARE_SERIAL_PORT="Serial"
-DRADIOLIB_TONE_UNSUPPORTED
-DRADIOLIB_DEBUG
upload_protocol = blackmagic
upload_port = \\.\COM12
debug_tool = blackmagic
debug_port = \\.\COM12
monitor_speed = 115200
monitor_port = \\.\COM13
[env:balloon1win]
extends = balloon1
upload_port = \\.\COM12
debug_port = \\.\COM12
monitor_port = \\.\COM13
[env:balloon1linux]
extends = balloon1
upload_port = /dev/ttyACM0
debug_port = /dev/ttyACM0
monitor_port = /dev/ttyACM1
The error occurs in the “mockup” and “balloon1win” environments.
Any ideas?
BTW version.py just counts builds and advances version numbers and runs in evrery build, so no problem there.
Thanks! (and sorry couldn’t figure out code formatting here…)