mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Split platform __doc__ to description and vedor url
This commit is contained in:
@ -2,14 +2,9 @@
|
||||
|
||||
Platform ``atmelavr``
|
||||
=====================
|
||||
Atmel AVR 8- and 32-bit MCUs deliver a unique combination of performance, power efficiency and design flexibility. Optimized to speed time to market-and easily adapt to new ones-they are based on the industrys most code-efficient architecture for C and assembly programming.
|
||||
|
||||
Atmel AVR 8- and 32-bit MCUs deliver a unique combination of
|
||||
performance, power efficiency and design flexibility. Optimized to
|
||||
speed time to market-and easily adapt to new ones-they are based on
|
||||
the industrys most code-efficient architecture for C and assembly
|
||||
programming.
|
||||
|
||||
http://www.atmel.com/products/microcontrollers/avr/default.aspx
|
||||
For more detailed information please visit `vendor site <http://www.atmel.com/products/microcontrollers/avr/default.aspx>`_.
|
||||
|
||||
.. contents::
|
||||
|
||||
|
@ -2,12 +2,9 @@
|
||||
|
||||
Platform ``atmelsam``
|
||||
=====================
|
||||
Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix.
|
||||
|
||||
Atmel | SMART offers Flash- based ARM products based on the ARM
|
||||
Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB
|
||||
to 2MB of Flash including a rich peripheral and feature mix.
|
||||
|
||||
http://www.atmel.com/products/microcontrollers/arm/default.aspx
|
||||
For more detailed information please visit `vendor site <http://www.atmel.com/products/microcontrollers/arm/default.aspx>`_.
|
||||
|
||||
.. contents::
|
||||
|
||||
|
@ -2,13 +2,9 @@
|
||||
|
||||
Platform ``freescalekinetis``
|
||||
=============================
|
||||
Freescale Kinetis Microcontrollers is family of multiple hardware- and software-compatible ARM Cortex-M0+, Cortex-M4 and Cortex-M7-based MCU series. Kinetis MCUs offer exceptional low-power performance, scalability and feature integration.
|
||||
|
||||
Freescale Kinetis Microcontrollers is family of multiple hardware- and
|
||||
software-compatible ARM Cortex-M0+, Cortex-M4 and Cortex-M7-based MCU
|
||||
series. Kinetis MCUs offer exceptional low-power performance,
|
||||
scalability and feature integration.
|
||||
|
||||
http://www.freescale.com/webapp/sps/site/homepage.jsp?code=KINETIS
|
||||
For more detailed information please visit `vendor site <http://www.freescale.com/webapp/sps/site/homepage.jsp?code=KINETIS>`_.
|
||||
|
||||
.. contents::
|
||||
|
||||
|
@ -2,15 +2,9 @@
|
||||
|
||||
Platform ``nordicnrf51``
|
||||
========================
|
||||
The Nordic nRF51 Series is a family of highly flexible, multi-protocol, system-on-chip (SoC) devices for ultra-low power wireless applications. nRF51 Series devices support a range of protocol stacks including Bluetooth Smart (previously called Bluetooth low energy), ANT and proprietary 2.4GHz protocols such as Gazell.
|
||||
|
||||
The Nordic nRF51 Series is a family of highly flexible,
|
||||
multi-protocol, system-on-chip (SoC) devices for ultra-low power
|
||||
wireless applications. nRF51 Series devices support a range of
|
||||
protocol stacks including Bluetooth Smart (previously called
|
||||
Bluetooth low energy), ANT and proprietary 2.4GHz protocols such as
|
||||
Gazell.
|
||||
|
||||
https://www.nordicsemi.com/eng/Products/nRF51-Series-SoC
|
||||
For more detailed information please visit `vendor site <https://www.nordicsemi.com/eng/Products/nRF51-Series-SoC>`_.
|
||||
|
||||
.. contents::
|
||||
|
||||
|
@ -2,15 +2,9 @@
|
||||
|
||||
Platform ``nxplpc``
|
||||
===================
|
||||
The NXP LPC is a family of 32-bit microcontroller integrated circuits by NXP Semiconductors. The LPC chips are grouped into related series that are based around the same 32-bit ARM processor core, such as the Cortex-M4F, Cortex-M3, Cortex-M0+, or Cortex-M0. Internally, each microcontroller consists of the processor core, static RAM memory, flash memory, debugging interface, and various peripherals.
|
||||
|
||||
The NXP LPC is a family of 32-bit microcontroller integrated circuits
|
||||
by NXP Semiconductors. The LPC chips are grouped into related series
|
||||
that are based around the same 32-bit ARM processor core, such as the
|
||||
Cortex-M4F, Cortex-M3, Cortex-M0+, or Cortex-M0. Internally, each
|
||||
microcontroller consists of the processor core, static RAM memory,
|
||||
flash memory, debugging interface, and various peripherals.
|
||||
|
||||
http://www.nxp.com/products/microcontrollers/
|
||||
For more detailed information please visit `vendor site <http://www.nxp.com/products/microcontrollers/>`_.
|
||||
|
||||
.. contents::
|
||||
|
||||
|
@ -2,15 +2,9 @@
|
||||
|
||||
Platform ``ststm32``
|
||||
====================
|
||||
The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development.
|
||||
|
||||
The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M
|
||||
processor is designed to offer new degrees of freedom to MCU users.
|
||||
It offers a 32-bit product range that combines very high performance,
|
||||
real-time capabilities, digital signal processing, and low-power,
|
||||
low-voltage operation, while maintaining full integration and ease of
|
||||
development.
|
||||
|
||||
http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32
|
||||
For more detailed information please visit `vendor site <http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32>`_.
|
||||
|
||||
.. contents::
|
||||
|
||||
|
@ -2,14 +2,9 @@
|
||||
|
||||
Platform ``teensy``
|
||||
===================
|
||||
Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via the USB port. No special programmer is needed, only a standard "Mini-B" USB cable and a PC or Macintosh with a USB port.
|
||||
|
||||
Teensy is a complete USB-based microcontroller development system, in
|
||||
a very small footprint, capable of implementing many types of projects.
|
||||
All programming is done via the USB port. No special programmer is
|
||||
needed, only a standard "Mini-B" USB cable and a PC or Macintosh with
|
||||
a USB port.
|
||||
|
||||
https://www.pjrc.com/teensy
|
||||
For more detailed information please visit `vendor site <https://www.pjrc.com/teensy>`_.
|
||||
|
||||
.. contents::
|
||||
|
||||
|
@ -2,13 +2,9 @@
|
||||
|
||||
Platform ``timsp430``
|
||||
=====================
|
||||
MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are 16-bit, RISC-based, mixed-signal processors designed for ultra-low power. These MCUs offer the lowest power consumption and the perfect mix of integrated peripherals for thousands of applications.
|
||||
|
||||
MSP430 microcontrollers (MCUs) from Texas Instruments (TI)
|
||||
are 16-bit, RISC-based, mixed-signal processors designed for ultra-low
|
||||
power. These MCUs offer the lowest power consumption and the perfect
|
||||
mix of integrated peripherals for thousands of applications.
|
||||
|
||||
http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/msp/overview.page
|
||||
For more detailed information please visit `vendor site <http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/msp/overview.page>`_.
|
||||
|
||||
.. contents::
|
||||
|
||||
|
@ -2,13 +2,9 @@
|
||||
|
||||
Platform ``titiva``
|
||||
===================
|
||||
Texas Instruments TM4C12x MCUs offer the industrys most popular ARM Cortex-M4 core with scalable memory and package options, unparalleled connectivity peripherals, advanced application functions, industry-leading analog integration, and extensive software solutions.
|
||||
|
||||
Texas Instruments TM4C12x MCUs offer the industrys most popular
|
||||
ARM Cortex-M4 core with scalable memory and package options, unparalleled
|
||||
connectivity peripherals, advanced application functions, industry-leading
|
||||
analog integration, and extensive software solutions.
|
||||
|
||||
http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/c2000_performance/control_automation/tm4c12x/overview.page
|
||||
For more detailed information please visit `vendor site <http://www.ti.com/lsds/ti/microcontrollers_16-bit_32-bit/c2000_performance/control_automation/tm4c12x/overview.page>`_.
|
||||
|
||||
.. contents::
|
||||
|
||||
|
@ -19,18 +19,18 @@ def cli(query, json_output):
|
||||
for platform in platforms:
|
||||
p = PlatformFactory.newPlatform(platform)
|
||||
name = p.get_name()
|
||||
info = p.get_short_info()
|
||||
description = p.get_description()
|
||||
|
||||
if query == "all":
|
||||
query = ""
|
||||
|
||||
search_data = "%s %s %s" % (name, info, p.get_packages())
|
||||
search_data = "%s %s %s" % (name, description, p.get_packages())
|
||||
if query and query.lower() not in search_data.lower():
|
||||
continue
|
||||
|
||||
data.append({
|
||||
"name": name,
|
||||
"info": info,
|
||||
"description": description,
|
||||
"packages": p.get_packages()
|
||||
})
|
||||
|
||||
@ -42,5 +42,5 @@ def cli(query, json_output):
|
||||
click.echo(" (available packages: %s)" % ", ".join(
|
||||
p.get_packages().keys()))
|
||||
click.secho("-" * len(item['name']), fg="cyan")
|
||||
click.echo(item['info'])
|
||||
click.echo(item['description'])
|
||||
click.echo()
|
||||
|
@ -12,7 +12,7 @@ from platformio.pkgmanager import PackageManager
|
||||
from platformio.platforms.base import PlatformFactory
|
||||
|
||||
|
||||
@click.command("show", short_help="Show details about installed platforms")
|
||||
@click.command("show", short_help="Show details about installed platform")
|
||||
@click.argument("platform")
|
||||
@click.pass_context
|
||||
def cli(ctx, platform):
|
||||
@ -29,8 +29,9 @@ def cli(ctx, platform):
|
||||
raise PlatformNotInstalledYet(platform)
|
||||
|
||||
p = PlatformFactory.newPlatform(platform)
|
||||
click.echo("{name:<20} - {info}".format(
|
||||
name=click.style(p.get_name(), fg="cyan"), info=p.get_short_info()))
|
||||
click.echo("{name:<20} - {description} [ {url} ]".format(
|
||||
name=click.style(p.get_name(), fg="cyan"),
|
||||
description=p.get_description(), url=p.get_vendor_url()))
|
||||
|
||||
installed_packages = PackageManager.get_installed()
|
||||
for name in p.get_installed_packages():
|
||||
|
@ -176,10 +176,17 @@ class BasePlatform(object):
|
||||
return builtin
|
||||
raise NotImplementedError()
|
||||
|
||||
def get_short_info(self):
|
||||
def get_description(self):
|
||||
if self.__doc__:
|
||||
doclines = [l.strip() for l in self.__doc__.splitlines()]
|
||||
return " ".join(doclines).strip()
|
||||
doclines = [l.strip() for l in self.__doc__.splitlines() if
|
||||
l.strip()]
|
||||
return " ".join(doclines[:-1]).strip()
|
||||
else:
|
||||
raise NotImplementedError()
|
||||
|
||||
def get_vendor_url(self):
|
||||
if self.__doc__ and "http" in self.__doc__:
|
||||
return self.__doc__[self.__doc__.index("http"):].strip()
|
||||
else:
|
||||
raise NotImplementedError()
|
||||
|
||||
|
@ -99,9 +99,13 @@ def generate_platform(name):
|
||||
lines.append("=" * len(_title))
|
||||
|
||||
p = PlatformFactory.newPlatform(name)
|
||||
lines.extend([l.strip() for l in p.__doc__.split("\n")])
|
||||
lines.append(p.get_description())
|
||||
lines.append("""
|
||||
For more detailed information please visit `vendor site <%s>`_.""" %
|
||||
p.get_vendor_url())
|
||||
|
||||
lines.append(""".. contents::""")
|
||||
lines.append("""
|
||||
.. contents::""")
|
||||
lines.append("""
|
||||
Packages
|
||||
--------
|
||||
@ -153,8 +157,9 @@ def generate_framework(name, data):
|
||||
lines.append(_title)
|
||||
lines.append("=" * len(_title))
|
||||
lines.append(data['description'])
|
||||
lines.append("""\n.. contents::""")
|
||||
lines.append("""
|
||||
.. contents::
|
||||
|
||||
Boards
|
||||
------
|
||||
|
||||
|
Reference in New Issue
Block a user