diff --git a/HISTORY.rst b/HISTORY.rst index 4114d0f1..71c68c40 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -16,6 +16,7 @@ Release History * Implemented (especially for `SmartAnthill `_) ``platformio run -t uploadlazy`` target (no dependencies to framework libs, ELF and etc.) +* Allowed to skip default packages via ``platformio install--skip-default-package`` flag 0.3.1 (2014-06-21) diff --git a/README.rst b/README.rst index af542c26..de8bebe7 100644 --- a/README.rst +++ b/README.rst @@ -93,7 +93,7 @@ Platform ``atmelavr`` * ``diecimilaatmega168`` Arduino Duemilanove or Diecimila (ATmega168) * ``diecimilaatmega328`` Arduino Duemilanove or Diecimila (ATmega328) * ``fio`` Arduino Fio -* ``leonardo`` Arduino Leonard +* ``leonardo`` Arduino Leonardo * ``LilyPadUSB`` Arduino LilyPad USB * ``lilypadatmega168`` Arduino LilyPad (ATmega168) * ``lilypadatmega328`` Arduino LilyPad (ATmega328) @@ -158,7 +158,7 @@ Quickstart $ platformio run For more detailed information please follow to `Installation <#installation>`_ -and `User Guide <#user-guide>`_ sections. +and `Documentation <#documentation>`_ sections. Installation @@ -311,11 +311,12 @@ can install one of them: .. code-block:: bash $ platformio install SomePlatform - $ platformio install SomePlatform --with-package=PackageName - $ platformio install SomePlatform --without-package=PackageName + $ platformio install SomePlatform --with-package=toolchain|uploader|PackageName + $ platformio install SomePlatform --without-package=toolchain|uploader|PackageName + $ platformio install SomePlatform --skip-default-package # Example - $ platformio install timsp430 --with-package=framework-energiamsp430 + $ platformio install timsp430 Installing toolchain-timsp430 package: Downloading [####################################] 100% Unpacking [####################################] 100% @@ -327,6 +328,13 @@ can install one of them: Unpacking [####################################] 100% The platform 'timsp430' has been successfully installed! + # Skip default packages and install uploader utility only + $ platformio install timsp430 --skip-default-package --with-package=uploader + Installing tool-mspdebug package: + Downloading [####################################] 100% + Unpacking [####################################] 100% + The platform 'timsp430' has been successfully installed! + ``platformio list`` ~~~~~~~~~~~~~~~~~~~ diff --git a/platformio/commands/install.py b/platformio/commands/install.py index 56cb6e3f..834ce14c 100644 --- a/platformio/commands/install.py +++ b/platformio/commands/install.py @@ -8,14 +8,13 @@ from platformio.platforms.base import PlatformFactory @command("install", short_help="Install new platforms") @argument("platforms", nargs=-1) -@option('--with-package', multiple=True, metavar="") -@option('--without-package', multiple=True, metavar="") -def cli(platforms, with_package, without_package): +@option("--with-package", multiple=True, metavar="") +@option("--without-package", multiple=True, metavar="") +@option("--skip-default-package", is_flag=True) +def cli(platforms, with_package, without_package, skip_default_package): for platform in platforms: - p = PlatformFactory().newPlatform(platform) - - if p.install(with_package, without_package): + if p.install(with_package, without_package, skip_default_package): secho("The platform '%s' has been successfully installed!" % platform, fg="green") diff --git a/platformio/platforms/atmelavr.py b/platformio/platforms/atmelavr.py index 2e2971f6..4ba6e117 100644 --- a/platformio/platforms/atmelavr.py +++ b/platformio/platforms/atmelavr.py @@ -16,12 +16,14 @@ class AtmelavrPlatform(BasePlatform): "toolchain-atmelavr": { "path": join("tools", "toolchain"), + "alias": "toolchain", "default": True }, "tool-avrdude": { "path": join("tools", "avrdude"), - "default": True, + "alias": "uploader", + "default": True }, "framework-arduinoavr": { diff --git a/platformio/platforms/timsp430.py b/platformio/platforms/timsp430.py index 03966eae..7058af16 100644 --- a/platformio/platforms/timsp430.py +++ b/platformio/platforms/timsp430.py @@ -16,12 +16,14 @@ class Timsp430Platform(BasePlatform): "toolchain-timsp430": { "path": join("tools", "toolchain"), + "alias": "toolchain", "default": True }, "tool-mspdebug": { "path": join("tools", "mspdebug"), - "default": True, + "alias": "uploader", + "default": True }, "framework-energiamsp430": { diff --git a/platformio/platforms/titiva.py b/platformio/platforms/titiva.py index cee2709b..ed89cb44 100644 --- a/platformio/platforms/titiva.py +++ b/platformio/platforms/titiva.py @@ -16,12 +16,14 @@ class TitivaPlatform(BasePlatform): "toolchain-gccarmnoneeabi": { "path": join("tools", "toolchain"), + "alias": "toolchain", "default": True }, "tool-lm4flash": { "path": join("tools", "lm4flash"), - "default": True, + "alias": "uploader", + "default": True }, "framework-energiativa": {