mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Debugging tools/probes
This commit is contained in:
2
docs
2
docs
Submodule docs updated: 04b38ceaec...ac0f59ad37
@ -36,7 +36,7 @@ def is_compat_platform_and_framework(platform, framework):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def generate_boards(boards):
|
def generate_boards(boards, extend_debug=False):
|
||||||
|
|
||||||
def _round_memory_size(size):
|
def _round_memory_size(size):
|
||||||
if size == 1:
|
if size == 1:
|
||||||
@ -59,17 +59,34 @@ def generate_boards(boards):
|
|||||||
* - ID
|
* - ID
|
||||||
- Name
|
- Name
|
||||||
- Platform
|
- Platform
|
||||||
|
- Debug
|
||||||
- Microcontroller
|
- Microcontroller
|
||||||
- Frequency
|
- Frequency
|
||||||
- Flash
|
- Flash
|
||||||
- RAM""")
|
- RAM""")
|
||||||
|
|
||||||
for data in sorted(boards, key=lambda item: item['id']):
|
for data in sorted(boards, key=lambda item: item['id']):
|
||||||
|
debug = [":ref:`Yes <debugging>`" if data['debug'] else ""]
|
||||||
|
if extend_debug and data['debug']:
|
||||||
|
debug = []
|
||||||
|
for name, options in data['debug']['tools'].items():
|
||||||
|
attrs = []
|
||||||
|
if options.get("default"):
|
||||||
|
attrs.append("default")
|
||||||
|
if options.get("onboard"):
|
||||||
|
attrs.append("on-board")
|
||||||
|
tool = ":ref:`debugging_tool_%s`" % name
|
||||||
|
if attrs:
|
||||||
|
debug.append("%s (%s)" % (tool, ", ".join(attrs)))
|
||||||
|
else:
|
||||||
|
debug.append(tool)
|
||||||
|
|
||||||
board_ram = float(data['ram']) / 1024
|
board_ram = float(data['ram']) / 1024
|
||||||
lines.append("""
|
lines.append("""
|
||||||
* - ``{id}``
|
* - ``{id}``
|
||||||
- `{name} <{url}>`_
|
- `{name} <{url}>`_
|
||||||
- :ref:`{platform_title} <platform_{platform}>`
|
- :ref:`{platform_title} <platform_{platform}>`
|
||||||
|
- {debug}
|
||||||
- {mcu}
|
- {mcu}
|
||||||
- {f_cpu:d} MHz
|
- {f_cpu:d} MHz
|
||||||
- {rom} Kb
|
- {rom} Kb
|
||||||
@ -78,6 +95,7 @@ def generate_boards(boards):
|
|||||||
name=data['name'],
|
name=data['name'],
|
||||||
platform=data['platform'],
|
platform=data['platform'],
|
||||||
platform_title=platforms[data['platform']],
|
platform_title=platforms[data['platform']],
|
||||||
|
debug=", ".join(debug),
|
||||||
url=data['url'],
|
url=data['url'],
|
||||||
mcu=data['mcu'].upper(),
|
mcu=data['mcu'].upper(),
|
||||||
f_cpu=int(data['fcpu']) / 1000000,
|
f_cpu=int(data['fcpu']) / 1000000,
|
||||||
@ -493,7 +511,7 @@ Boards
|
|||||||
for vendor, boards in sorted(vendors.iteritems()):
|
for vendor, boards in sorted(vendors.iteritems()):
|
||||||
lines.append(str(vendor))
|
lines.append(str(vendor))
|
||||||
lines.append("~" * len(vendor))
|
lines.append("~" * len(vendor))
|
||||||
lines.append(generate_boards(boards))
|
lines.append(generate_boards(boards, extend_debug=True))
|
||||||
|
|
||||||
with open(
|
with open(
|
||||||
join(util.get_source_dir(), "..", "docs", "plus",
|
join(util.get_source_dir(), "..", "docs", "plus",
|
||||||
|
Reference in New Issue
Block a user