mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Update docs for PIO Unified Debugger; add wiring connections and debug probes pictures
This commit is contained in:
2
docs
2
docs
Submodule docs updated: 9d8e84d527...4600f5e495
2
examples
2
examples
Submodule examples updated: ebff9ae73f...cab374e8c9
@ -141,22 +141,22 @@ You can switch between debugging :ref:`debugging_tools` using
|
|||||||
""")
|
""")
|
||||||
if onboard_debug:
|
if onboard_debug:
|
||||||
lines.append("""
|
lines.append("""
|
||||||
On-Board tools
|
On-Board Debug Tools
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Boards listed below have on-board debugging tools and **ARE READY** for debugging!
|
Boards listed below have on-board debug tool and **ARE READY** for debugging!
|
||||||
You do not need to use/buy external debugger.
|
You do not need to use/buy external debug tool.
|
||||||
""")
|
""")
|
||||||
lines.extend(
|
lines.extend(
|
||||||
generate_boards(
|
generate_boards(
|
||||||
onboard_debug, extend_debug=True, skip_columns=skip_columns))
|
onboard_debug, extend_debug=True, skip_columns=skip_columns))
|
||||||
if external_debug:
|
if external_debug:
|
||||||
lines.append("""
|
lines.append("""
|
||||||
External tools
|
External Debug Tools
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Boards listed below are compatible with :ref:`piodebug` but depend on external
|
Boards listed below are compatible with :ref:`piodebug` but **DEPEND ON**
|
||||||
debugging tools. See "Debug" column for compatible debugging tools.
|
external debug tool. See "Debug" column for compatible debug tools.
|
||||||
""")
|
""")
|
||||||
lines.extend(
|
lines.extend(
|
||||||
generate_boards(
|
generate_boards(
|
||||||
@ -614,12 +614,20 @@ popular embedded boards and IDE.
|
|||||||
|
|
||||||
|
|
||||||
def update_debugging():
|
def update_debugging():
|
||||||
|
tools_to_platforms = {}
|
||||||
vendors = {}
|
vendors = {}
|
||||||
platforms = []
|
platforms = []
|
||||||
frameworks = []
|
frameworks = []
|
||||||
for data in BOARDS:
|
for data in BOARDS:
|
||||||
if not data['debug']:
|
if not data['debug']:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
for tool in data['debug']['tools']:
|
||||||
|
tool = str(tool)
|
||||||
|
if tool not in tools_to_platforms:
|
||||||
|
tools_to_platforms[tool] = []
|
||||||
|
tools_to_platforms[tool].append(data['platform'])
|
||||||
|
|
||||||
platforms.append(data['platform'])
|
platforms.append(data['platform'])
|
||||||
frameworks.extend(data['frameworks'])
|
frameworks.extend(data['frameworks'])
|
||||||
vendor = data['vendor']
|
vendor = data['vendor']
|
||||||
@ -628,6 +636,24 @@ def update_debugging():
|
|||||||
else:
|
else:
|
||||||
vendors[vendor] = [data]
|
vendors[vendor] = [data]
|
||||||
|
|
||||||
|
def _update_tool_compat_platforms(content):
|
||||||
|
begin_tpl = ".. begin_compatible_platforms_"
|
||||||
|
end_tpl = ".. end_compatible_platforms_"
|
||||||
|
for tool, platforms in tools_to_platforms.items():
|
||||||
|
begin = begin_tpl + tool
|
||||||
|
end = end_tpl + tool
|
||||||
|
begin_index = content.index(begin)
|
||||||
|
end_index = content.index(end)
|
||||||
|
chunk = ["\n\n**Compatible development platforms:**\n"]
|
||||||
|
chunk.extend([
|
||||||
|
"* :ref:`platform_%s`" % str(p)
|
||||||
|
for p in sorted(set(platforms))
|
||||||
|
])
|
||||||
|
chunk.extend(["\n"])
|
||||||
|
content = content[:begin_index + len(begin)] + "\n".join(
|
||||||
|
chunk) + content[end_index:]
|
||||||
|
return content
|
||||||
|
|
||||||
lines = []
|
lines = []
|
||||||
# Platforms
|
# Platforms
|
||||||
lines.append(""".. _debugging_platforms:
|
lines.append(""".. _debugging_platforms:
|
||||||
@ -681,7 +707,7 @@ Boards
|
|||||||
with open(
|
with open(
|
||||||
join(util.get_source_dir(), "..", "docs", "plus", "debugging.rst"),
|
join(util.get_source_dir(), "..", "docs", "plus", "debugging.rst"),
|
||||||
"r+") as fp:
|
"r+") as fp:
|
||||||
content = fp.read()
|
content = _update_tool_compat_platforms(fp.read())
|
||||||
fp.seek(0)
|
fp.seek(0)
|
||||||
fp.truncate()
|
fp.truncate()
|
||||||
fp.write(content[:content.index(".. _debugging_platforms:")] +
|
fp.write(content[:content.index(".. _debugging_platforms:")] +
|
||||||
|
Reference in New Issue
Block a user