Hey Guys!
I get the following error when I try to build my code with the STLink V2 debugger support:
DebugInvalidOptions: Unknown debug tool `stlink`. Please use one of `blackmagic, jlink` or `custom`:
I’m using an Arduino Due, based on the documentation what I found here: Arduino Due (Programming Port) — PlatformIO latest documentation and here: ST-LINK — PlatformIO latest documentation
I guessed it should work without any hacking.
This is my .ini project file:
[env:due]
platform = atmelsam
board = due
framework = arduino
debug_tool = stlink
upload_protocol = stlink
And the full output of the build command:
> Executing task in folder center_fire: platformio run <
Processing due (platform: atmelsam; board: due; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/due.html
PLATFORM: Atmel SAM > Arduino Due (Programming Port)
HARDWARE: AT91SAM3X8E 84MHz 32KB RAM (512KB Flash)
DebugInvalidOptions: Unknown debug tool `stlink`. Please use one of `blackmagic, jlink` or `custom`:
File "/Users/peter/.platformio/penv/lib/python2.7/site-packages/platformio/builder/main.py", line 173:
env.SConscript("$BUILD_SCRIPT")
File "/Users/peter/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "/Users/peter/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 250:
exec _file_ in call_stack[-1].globals
File "/Users/peter/.platformio/platforms/atmelsam/builder/main.py", line 162:
target_elf = env.BuildProgram()
File "/Users/peter/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "/Users/peter/.platformio/penv/lib/python2.7/site-packages/platformio/builder/tools/platformio.py", line 90:
env.PrintConfiguration()
File "/Users/peter/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "/Users/peter/.platformio/penv/lib/python2.7/site-packages/platformio/builder/tools/pioplatform.py", line 167:
env.subst("$DEBUG_TOOL"))
File "/Users/peter/.platformio/penv/lib/python2.7/site-packages/platformio/managers/platform.py", line 763:
(tool_name, ", ".join(sorted(list(debug_tools)))))
================================================================== [ERROR] Took 0.58 seconds ==================================================================
The terminal process terminated with exit code: 1
What do I miss here?
Thanks!