forked from platformio/platformio-core
Implement autodetecting of default debug tool
This commit is contained in:
1 parent
cc08bb0fd0
commit
231bd8b294
7 files changed
+63
-16
No files matched your search
@@ -64,7 +64,11 @@ commonvars.AddVariables(
|
||||
("UPLOAD_PROTOCOL",),
|
||||
("UPLOAD_SPEED",),
|
||||
("UPLOAD_FLAGS",),
|
||||
("UPLOAD_RESETMETHOD",)
|
||||
("UPLOAD_RESETMETHOD",),
|
||||
|
||||
# debug options
|
||||
("DEBUG_TOOL",),
|
||||
|
||||
|
||||
) # yapf: disable
|
||||
|
||||
|
||||
@@ -832,9 +832,9 @@ def BuildProjectLibraries(env):
|
||||
project.env = env
|
||||
ldf_mode = LibBuilderBase.lib_ldf_mode.fget(project)
|
||||
|
||||
print "Library Dependency Finder -> http://bit.ly/configure-pio-ldf"
|
||||
print "Modes: Finder/%s Compatibility/%s" % (ldf_mode,
|
||||
project.lib_compat_mode)
|
||||
print "Library Dependency Finder (LDF) -> http://bit.ly/configure-pio-ldf"
|
||||
print "LDF MODES: FINDER/%s COMPATIBILITY/%s" % (ldf_mode,
|
||||
project.lib_compat_mode)
|
||||
|
||||
lib_builders = env.GetLibBuilders()
|
||||
print "Collected %d compatible libraries" % len(lib_builders)
|
||||
|
||||
@@ -99,8 +99,8 @@ def LoadPioPlatform(env, variables):
|
||||
|
||||
|
||||
def PrintConfiguration(env): # pylint: disable=too-many-branches
|
||||
platform_data = ["Platform: %s >" % env.PioPlatform().title]
|
||||
system_data = ["System:"]
|
||||
platform_data = ["PLATFORM: %s >" % env.PioPlatform().title]
|
||||
system_data = ["SYSTEM:"]
|
||||
mcu = env.subst("$BOARD_MCU")
|
||||
f_cpu = env.subst("$BOARD_F_CPU")
|
||||
if mcu:
|
||||
@@ -131,7 +131,10 @@ def PrintConfiguration(env): # pylint: disable=too-many-branches
|
||||
if not debug_tools:
|
||||
return
|
||||
|
||||
data = []
|
||||
data = [
|
||||
"CURRENT/%s" % board_config.get_debug_tool_name(
|
||||
env.subst("$DEBUG_TOOL"))
|
||||
]
|
||||
onboard = []
|
||||
external = []
|
||||
for key, value in debug_tools.items():
|
||||
@@ -144,7 +147,7 @@ def PrintConfiguration(env): # pylint: disable=too-many-branches
|
||||
if external:
|
||||
data.append("EXTERNAL/%s" % ", ".join(sorted(external)))
|
||||
|
||||
print "Debug: %s" % " ".join(data)
|
||||
print "DEBUG: %s" % " ".join(data)
|
||||
|
||||
|
||||
def exists(_):
|
||||
|
||||
@@ -220,9 +220,9 @@ def PrintUploadInfo(env):
|
||||
available.extend(env.BoardConfig().get("upload", {}).get(
|
||||
"protocols", []))
|
||||
if available:
|
||||
print "Available: %s" % ", ".join(sorted(available))
|
||||
print "AVAILABLE: %s" % ", ".join(sorted(available))
|
||||
if configured:
|
||||
print "Configured: upload_protocol = %s" % configured
|
||||
print "CURRENT: upload_protocol = %s" % configured
|
||||
|
||||
|
||||
def exists(_):
|
||||
|
||||
Reference in new issue
Block a user