diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index 9e5d3825..1f5f37b8 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -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 `_. .. contents:: diff --git a/docs/platforms/atmelsam.rst b/docs/platforms/atmelsam.rst index a420f7c2..891a79cd 100644 --- a/docs/platforms/atmelsam.rst +++ b/docs/platforms/atmelsam.rst @@ -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 `_. .. contents:: diff --git a/docs/platforms/freescalekinetis.rst b/docs/platforms/freescalekinetis.rst index f86aba8f..3f18e84b 100644 --- a/docs/platforms/freescalekinetis.rst +++ b/docs/platforms/freescalekinetis.rst @@ -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 `_. .. contents:: diff --git a/docs/platforms/nordicnrf51.rst b/docs/platforms/nordicnrf51.rst index c270dd4b..69bbb131 100644 --- a/docs/platforms/nordicnrf51.rst +++ b/docs/platforms/nordicnrf51.rst @@ -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 `_. .. contents:: diff --git a/docs/platforms/nxplpc.rst b/docs/platforms/nxplpc.rst index 3e3fac3a..8b40bf1a 100644 --- a/docs/platforms/nxplpc.rst +++ b/docs/platforms/nxplpc.rst @@ -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 `_. .. contents:: diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index eeb9179e..9b6d41d9 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -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 `_. .. contents:: diff --git a/docs/platforms/teensy.rst b/docs/platforms/teensy.rst index 6f1bd642..8db6cc08 100644 --- a/docs/platforms/teensy.rst +++ b/docs/platforms/teensy.rst @@ -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 `_. .. contents:: diff --git a/docs/platforms/timsp430.rst b/docs/platforms/timsp430.rst index c6d2f7c5..e53198cb 100644 --- a/docs/platforms/timsp430.rst +++ b/docs/platforms/timsp430.rst @@ -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 `_. .. contents:: diff --git a/docs/platforms/titiva.rst b/docs/platforms/titiva.rst index 53cbeb43..9b85cc7f 100644 --- a/docs/platforms/titiva.rst +++ b/docs/platforms/titiva.rst @@ -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 `_. .. contents:: diff --git a/platformio/commands/search.py b/platformio/commands/search.py index 210829aa..e46e0bb0 100644 --- a/platformio/commands/search.py +++ b/platformio/commands/search.py @@ -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() diff --git a/platformio/commands/show.py b/platformio/commands/show.py index 989b9aaf..ae9106f2 100644 --- a/platformio/commands/show.py +++ b/platformio/commands/show.py @@ -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(): diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index e9dfd914..eadad863 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -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() diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 316c61f6..71e1009a 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -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 ------