From 2224f98d2d696b7e26c01720bd82e2262220ed88 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 6 Mar 2015 19:05:41 +0200 Subject: [PATCH 01/58] Cache long command for "gcc-ar" --- platformio/__init__.py | 2 +- platformio/builder/tools/pioar.py | 22 +++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 4d895b31..cd24c147 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,7 +1,7 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -VERSION = (1, 1, 0) +VERSION = (1, 2, "0.dev0") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/builder/tools/pioar.py b/platformio/builder/tools/pioar.py index e3b2fed4..c98fa6c0 100644 --- a/platformio/builder/tools/pioar.py +++ b/platformio/builder/tools/pioar.py @@ -1,29 +1,21 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -import atexit -from os import remove -from tempfile import mkstemp +from hashlib import md5 +from os.path import join +from tempfile import gettempdir MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 -def _remove_tmpfile(path): - try: - remove(path) - except WindowsError: # pylint: disable=E0602 - pass - - def _huge_sources_hook(sources): - if len(str(sources)) < MAX_SOURCES_LENGTH: + _sources = str(sources).replace("\\", "/") + if len(str(_sources)) < MAX_SOURCES_LENGTH: return sources - _, tmp_file = mkstemp() + tmp_file = join(gettempdir(), "pioarargs-%s" % md5(_sources).hexdigest()) with open(tmp_file, "w") as f: - f.write(str(sources).replace("\\", "/")) - - atexit.register(_remove_tmpfile, tmp_file) + f.write(_sources) return "@%s" % tmp_file From 6742629efb9b612e4d9430e58fb2303c78b58e2d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 6 Mar 2015 19:22:20 +0200 Subject: [PATCH 02/58] Change options to references via titles --- docs/envvars.rst | 14 ++++++------ docs/userguide/cmd_settings.rst | 39 +++++++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 16 deletions(-) diff --git a/docs/envvars.rst b/docs/envvars.rst index ec8fd586..765ec0a3 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -85,36 +85,36 @@ Allows to override PlatformIO settings. You can manage them via PLATFORMIO_SETTING_AUTO_UPDATE_LIBRARIES ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Allows to override setting :option:`auto_update_libraries`. +Allows to override setting :ref:`setting_auto_update_libraries`. PLATFORMIO_SETTING_AUTO_UPDATE_PLATFORMS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Allows to override setting :option:`auto_update_platforms`. +Allows to override setting :ref:`setting_auto_update_platforms`. PLATFORMIO_SETTING_CHECK_LIBRARIES_INTERVAL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Allows to override setting :option:`check_libraries_interval`. +Allows to override setting :ref:`setting_check_libraries_interval`. PLATFORMIO_SETTING_CHECK_PLATFORMIO_INTERVAL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Allows to override setting :option:`check_platformio_interval`. +Allows to override setting :ref:`setting_check_platformio_interval`. PLATFORMIO_SETTING_CHECK_PLATFORMS_INTERVAL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Allows to override setting :option:`check_platforms_interval`. +Allows to override setting :ref:`setting_check_platforms_interval`. .. _envvar_PLATFORMIO_SETTING_ENABLE_PROMPTS: PLATFORMIO_SETTING_ENABLE_PROMPTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Allows to override setting :option:`enable_prompts`. +Allows to override setting :ref:`setting_enable_prompts`. PLATFORMIO_SETTING_ENABLE_TELEMETRY ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Allows to override setting :option:`enable_telemetry`. +Allows to override setting :ref:`setting_enable_telemetry`. diff --git a/docs/userguide/cmd_settings.rst b/docs/userguide/cmd_settings.rst index 4fe14304..d1355dcf 100644 --- a/docs/userguide/cmd_settings.rst +++ b/docs/userguide/cmd_settings.rst @@ -23,45 +23,63 @@ Description Get/List existing settings -Options -~~~~~~~ +Settings +~~~~~~~~ -.. option:: auto_update_libraries +.. _setting_auto_update_libraries: + +``auto_update_libraries`` +^^^^^^^^^^^^^^^^^^^^^^^^^ :Default: Yes :Values: Yes/No Automatically update libraries. -.. option:: auto_update_platforms +.. _setting_auto_update_platforms: + +``auto_update_platforms`` +^^^^^^^^^^^^^^^^^^^^^^^^^ :Default: Yes :Values: Yes/No Automatically update platforms. -.. option:: check_libraries_interval +.. _setting_check_libraries_interval: + +``check_libraries_interval`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :Default: 7 :Values: Days (Number) Check for the library updates interval. -.. option:: check_platformio_interval +.. _setting_check_platformio_interval: + +``check_platformio_interval`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :Default: 3 :Values: Days (Number) Check for the new PlatformIO interval. -.. option:: check_platforms_interval +.. _setting_check_platforms_interval: + +``check_platforms_interval`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :Default: 7 :Values: Days (Number) Check for the platform updates interval. -.. option:: enable_prompts +.. _setting_enable_prompts: + +``enable_prompts`` +^^^^^^^^^^^^^^^^^^ :Default: Yes :Values: Yes/No @@ -76,7 +94,10 @@ Can PlatformIO communicate with you via prompts? If you are going to run *PlatformIO* from **subprocess**, you **MUST DISABLE** all prompts. It will allow you to avoid blocking. -.. option:: enable_telemetry +.. _setting_enable_telemetry: + +``enable_telemetry`` +^^^^^^^^^^^^^^^^^^^^ :Default: Yes :Values: Yes/No From 13455987aea545f0ceacf4fa941a90a864e4d430 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Mon, 9 Mar 2015 12:18:46 +0200 Subject: [PATCH 03/58] Rename "stm32" platform to "ststm32" --- docs/platforms/index.rst | 2 +- docs/platforms/stm32.rst | 104 ------- docs/platforms/ststm32.rst | 224 ++++++++++++++ .../stm32/stm32-cmsis-blink/platformio.ini | 18 +- .../stm32/stm32-opencm3-blink/platformio.ini | 18 +- examples/stm32/stm32-spl-blink/platformio.ini | 18 +- platformio/boards/stm32.json | 56 ---- platformio/boards/ststm32.json | 280 ++++++++++++++++++ .../builder/scripts/{stm32.py => ststm32.py} | 21 +- platformio/platforms/{stm32.py => ststm32.py} | 8 +- tests/commands/test_boards.py | 2 +- 11 files changed, 554 insertions(+), 197 deletions(-) delete mode 100644 docs/platforms/stm32.rst create mode 100644 docs/platforms/ststm32.rst delete mode 100644 platformio/boards/stm32.json create mode 100644 platformio/boards/ststm32.json rename platformio/builder/scripts/{stm32.py => ststm32.py} (67%) rename platformio/platforms/{stm32.py => ststm32.py} (79%) diff --git a/docs/platforms/index.rst b/docs/platforms/index.rst index 5aa06bcc..ee95d183 100644 --- a/docs/platforms/index.rst +++ b/docs/platforms/index.rst @@ -16,7 +16,7 @@ MCU, upload protocol or etc. Please use ``board`` option. atmelavr atmelsam - stm32 + ststm32 teensy timsp430 titiva diff --git a/docs/platforms/stm32.rst b/docs/platforms/stm32.rst deleted file mode 100644 index 4748f6a9..00000000 --- a/docs/platforms/stm32.rst +++ /dev/null @@ -1,104 +0,0 @@ -.. _platform_stm32: - -Platform ``stm32`` -================== - -`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 unparalleled and large range of STM32 devices, based on an industry-standard core and accompanied by a vast choice of tools and software, makes this family of products the ideal choice, both for small projects and for entire platform decisions. - -.. contents:: - -Packages --------- - -.. list-table:: - :header-rows: 1 - - * - Name - - Alias - - Contents - * - ``toolchain-gccarmnoneeabi`` - - toolchain - - `gcc-arm-embedded `_, - `GDB `_ - * - ``tool-stlink`` - - uploader - - `STLink `_ - * - ``framework-cmsis`` - - - - See below in :ref:`stm32_frameworks` - * - ``framework-spl`` - - - - See below in :ref:`stm32_frameworks` - * - ``framework-opencm3`` - - - - See below in :ref:`stm32_frameworks` - -.. warning:: - **Linux Users:** Don't forget to install "udev" rules file - `99-platformio-udev.rules `_ (an instruction is located in the file). - - -.. _stm32_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``cmsis`` - - Vendor-independent hardware abstraction layer for the Cortex-M processor series - - `Documentation `__ - * - ``spl`` - - Standard Peripheral Library for STM32 MCUs - - `Documentation `__ - * - ``opencm3`` - - libOpenCM3 Framework - - `Documentation `__ - - -Boards ------- - -.. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command - * For more detailed ``board`` information please scroll tables below by - horizontal. - -.. list-table:: - :header-rows: 1 - - * - Type ``board`` - - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` - - Flash - - RAM - * - ``stm32ldiscovery`` - - `Discovery kit for STM32L151/152 line `_ - - STM32L152rbt6 ``cortex-m3`` - - 32 MHz ``32000000L`` - - 128 Kb - - 16 Kb - * - ``stm32f3discovery`` - - `Discovery kit for STM32F303xx microcontrollers - `_ - - STM32F303vct6 ``cortex-m4`` - - 72 MHz ``72000000L`` - - 256 Kb - - 48 Kb - * - ``stm32f4discovery`` - - `Discovery kit for STM32F407/417 lines - `_ - - STM32F407vgt6 ``cortex-m4`` - - 168 Mhz ``168000000L`` - - 1 Mb - - 192 Kb - -More detailed information you can find here -`STM32 Discovery kits `_. diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst new file mode 100644 index 00000000..4f024041 --- /dev/null +++ b/docs/platforms/ststm32.rst @@ -0,0 +1,224 @@ +.. _platform_ststm32: + +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 unparalleled and large range of STM32 devices, based on an industry-standard core and accompanied by a vast choice of tools and software, makes this family of products the ideal choice, both for small projects and for entire platform decisions. + +.. contents:: + +Packages +-------- + +.. list-table:: + :header-rows: 1 + + * - Name + - Alias + - Contents + * - ``toolchain-gccarmnoneeabi`` + - toolchain + - `gcc-arm-embedded `_, + `GDB `_ + * - ``tool-stlink`` + - uploader + - `STLink `_ + * - ``framework-cmsis`` + - + - See below in :ref:`ststm32_frameworks` + * - ``framework-spl`` + - + - See below in :ref:`ststm32_frameworks` + * - ``framework-opencm3`` + - + - See below in :ref:`ststm32_frameworks` + * - ``framework-mbed`` + - + - See below in :ref:`ststm32_frameworks` + +.. warning:: + **Linux Users:** Don't forget to install "udev" rules file + `99-platformio-udev.rules `_ (an instruction is located in the file). + + +.. _ststm32_frameworks: + +Frameworks +---------- + +.. list-table:: + :header-rows: 1 + + * - Type ``framework`` + - Name + - Reference + * - ``cmsis`` + - Vendor-independent hardware abstraction layer for the Cortex-M processor series + - `Documentation `__ + * - ``spl`` + - Standard Peripheral Library for ST STM32 MCUs + - `Documentation `__ + * - ``opencm3`` + - libOpenCM3 Framework + - `Documentation `__ + * - ``mbed`` + - MBED Framework + - `Documentation `__ + + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by + horizontal. + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller ``board_mcu`` + - Frequency ``board_f_cpu`` + - Flash + - RAM + * - ``disco_l152rb`` + - `STM32LDISCOVERY + `_ + - STM32L152rbt6 ``cortex-m3`` + - 32 MHz ``32000000L`` + - 128 Kb + - 16 Kb + * - ``disco_f303vc`` + - `STM32F3DISCOVERY + `_ + - STM32F303vct6 ``cortex-m4`` + - 72 MHz ``72000000L`` + - 256 Kb + - 48 Kb + * - ``disco_f407vg`` + - `STM32F4DISCOVERY + `_ + - STM32F407vgt6 ``cortex-m4`` + - 168 Mhz ``168000000L`` + - 1 Mb + - 192 Kb + * - ``disco_f100rb`` + - `STM32VLDISCOVERY + `_ + - STM32F100rbt6 ``cortex-m3`` + - 24 Mhz ``24000000L`` + - 128 Kb + - 8 Kb + * - ``disco_f051r8`` + - `STM32F0DISCOVERY + `_ + - STM32F051r8t6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 64 Kb + - 8 Kb + * - ``disco_f334c8`` + - `32F3348DISCOVERY + `_ + - STM32F334c8t6 ``cortex-m4`` + - 72 Mhz ``72000000L`` + - 64 Kb + - 16 Kb + * - ``disco_f401vc`` + - `32F401CDISCOVERY + `_ + - STM32F401vct6 ``cortex-m4`` + - 84 Mhz ``84000000L`` + - 256 Kb + - 64 Kb + * - ``disco_f429zi`` + - `32F429IDISCOVERY + `_ + - STM32F429zit6 ``cortex-m4`` + - 180 Mhz ``180000000L`` + - 2 Mb + - 256 Kb + * - ``nucleo_f030r8`` + - `ST Nucleo F030R8 + `_ + - STM32F030r8t6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 64 Kb + - 8 Kb + * - ``nucleo_f070rb`` + - `ST Nucleo F070RB + `_ + - STM32F070rbt6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 128 Kb + - 16 Kb + * - ``nucleo_f072rb`` + - `ST Nucleo F072RB + `_ + - STM32F072rbt6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 128 Kb + - 16 Kb + * - ``nucleo_f091rc`` + - `ST Nucleo F091RC + `_ + - STM32F091rct6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 256 Kb + - 32 Kb + * - ``nucleo_f103rb`` + - `ST Nucleo F103RB + `_ + - STM32F103rbt6 ``cortex-m3`` + - 72 Mhz ``72000000L`` + - 128 Kb + - 20 Kb + * - ``nucleo_f302r8`` + - `ST Nucleo F302R8 + `_ + - STM32F302r8t6 ``cortex-m4`` + - 72 Mhz ``72000000L`` + - 64 Kb + - 16 Kb + * - ``nucleo_f334r8`` + - `ST Nucleo F334R8 + `_ + - STM32F334r8t6 ``cortex-m4`` + - 72 Mhz ``72000000L`` + - 64 Kb + - 16 Kb + * - ``nucleo_f401re`` + - `ST Nucleo F401RE + `_ + - STM32F401ret6 ``cortex-m4`` + - 84 Mhz ``84000000L`` + - 512 Kb + - 96 Kb + * - ``nucleo_f411re`` + - `ST Nucleo F411RE + `_ + - STM32F411ret6 ``cortex-m4`` + - 100 Mhz ``100000000L`` + - 512 Kb + - 128 Kb + * - ``nucleo_l053r8`` + - `ST Nucleo L053R8 + `_ + - STM32L053r8t6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 64 Kb + - 8 Kb + * - ``nucleo_l152re`` + - `ST Nucleo L152RE + `_ + - STM32L152ret6 ``cortex-m3`` + - 32 Mhz ``32000000L`` + - 512 Kb + - 80 Kb + +More detailed information you can find here +`STM32 Discovery kits `_ and here +`ST Nucleo boards with MBED support `_. diff --git a/examples/stm32/stm32-cmsis-blink/platformio.ini b/examples/stm32/stm32-cmsis-blink/platformio.ini index c90f099e..d19acf8d 100644 --- a/examples/stm32/stm32-cmsis-blink/platformio.ini +++ b/examples/stm32/stm32-cmsis-blink/platformio.ini @@ -17,17 +17,17 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:stm32f4discovery] -platform = stm32 +[env:disco_f407vg] +platform = ststm32 framework = cmsis -board = stm32f4discovery +board = disco_f407vg -[env:stm32ldiscovery] -platform = stm32 +[env:disco_l152rb] +platform = ststm32 framework = cmsis -board = stm32ldiscovery +board = disco_l152rb -[env:stm32f3discovery] -platform = stm32 +[env:disco_f303vc] +platform = ststm32 framework = cmsis -board = stm32f3discovery +board = disco_f303vc \ No newline at end of file diff --git a/examples/stm32/stm32-opencm3-blink/platformio.ini b/examples/stm32/stm32-opencm3-blink/platformio.ini index 3c472f00..4055d71f 100644 --- a/examples/stm32/stm32-opencm3-blink/platformio.ini +++ b/examples/stm32/stm32-opencm3-blink/platformio.ini @@ -17,17 +17,17 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:stm32f4discovery] -platform = stm32 +[env:disco_f407vg] +platform = ststm32 framework = opencm3 -board = stm32f4discovery +board = disco_f407vg -[env:stm32ldiscovery] -platform = stm32 +[env:disco_l152rb] +platform = ststm32 framework = opencm3 -board = stm32ldiscovery +board = disco_l152rb -[env:stm32f3discovery] -platform = stm32 +[env:disco_f303vc] +platform = ststm32 framework = opencm3 -board = stm32f3discovery +board = disco_f303vc diff --git a/examples/stm32/stm32-spl-blink/platformio.ini b/examples/stm32/stm32-spl-blink/platformio.ini index 6ba5b0c1..1324053c 100644 --- a/examples/stm32/stm32-spl-blink/platformio.ini +++ b/examples/stm32/stm32-spl-blink/platformio.ini @@ -17,17 +17,17 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:stm32f4discovery] -platform = stm32 +[env:disco_f407vg] +platform = ststm32 framework = cmsis,spl -board = stm32f4discovery +board = disco_f407vg -[env:stm32ldiscovery] -platform = stm32 +[env:disco_l152rb] +platform = ststm32 framework = cmsis,spl -board = stm32ldiscovery +board = disco_l152rb -[env:stm32f3discovery] -platform = stm32 +[env:disco_f303vc] +platform = ststm32 framework = cmsis,spl -board = stm32f3discovery +board = disco_f303vc diff --git a/platformio/boards/stm32.json b/platformio/boards/stm32.json deleted file mode 100644 index 2dae3544..00000000 --- a/platformio/boards/stm32.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "stm32f4discovery": { - "build": { - "core": "stm32", - "extra_flags": "-DSTM32F40_41xxx", - "f_cpu": "168000000L", - "ldscript": "stm32f405x6.ld", - "cpu": "cortex-m4", - "mcu": "stm32f407vgt6", - "variant": "stm32f4" - }, - "framework": "cmsis", - "name": "STM32F4Discovery (168 MHz) with digital accelerometer, digital microphone, audio DAC", - "platform": "stm32", - "upload": { - "maximum_ram_size": 131071, - "maximum_size": 1048575 - } - }, - "stm32ldiscovery": { - "build": { - "core": "stm32", - "extra_flags": "-DSTM32L1XX_MD", - "f_cpu": "32000000L", - "ldscript": "stm32l15xx6.ld", - "cpu": "cortex-m3", - "mcu": "stm32l152rbt6", - "variant": "stm32l1" - }, - "framework": "cmsis", - "name": "STM32LDiscovery (32 MHz) ultra low-power development kit", - "platform": "stm32", - "upload": { - "maximum_ram_size": 16384, - "maximum_size": 131072 - } - }, - "stm32f3discovery": { - "build": { - "core": "stm32", - "extra_flags": "-DSTM32F303xC", - "f_cpu": "72000000L", - "ldscript": "stm32f30xx.ld", - "cpu": "cortex-m4", - "mcu": "stm32f303vct6", - "variant": "stm32f3" - }, - "framework": "cmsis", - "name": "STM32F3Discovery (72 MHz) with accelerometer, gyroscope and e-compass", - "platform": "stm32", - "upload": { - "maximum_ram_size": 262144, - "maximum_size": 131072 - } - } -} \ No newline at end of file diff --git a/platformio/boards/ststm32.json b/platformio/boards/ststm32.json new file mode 100644 index 00000000..0f5f673d --- /dev/null +++ b/platformio/boards/ststm32.json @@ -0,0 +1,280 @@ +{ + "disco_f407vg": { + "build": { + "core": "stm32", + "extra_flags": "-DSTM32F40_41xxx", + "f_cpu": "168000000L", + "ldscript": "stm32f405x6.ld", + "cpu": "cortex-m4", + "mcu": "stm32f407vgt6", + "variant": "stm32f4" + }, + "framework": "cmsis", + "name": "STM32F4DISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 131072, + "maximum_size": 1048576 + } + }, + "disco_l152rb": { + "build": { + "core": "stm32", + "extra_flags": "-DSTM32L1XX_MD", + "f_cpu": "32000000L", + "ldscript": "stm32l15xx6.ld", + "cpu": "cortex-m3", + "mcu": "stm32l152rbt6", + "variant": "stm32l1" + }, + "framework": "cmsis", + "name": "STM32LDISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 131072 + } + }, + "disco_f303vc": { + "build": { + "core": "stm32", + "extra_flags": "-DSTM32F303xC", + "f_cpu": "72000000L", + "ldscript": "stm32f30xx.ld", + "cpu": "cortex-m4", + "mcu": "stm32f303vct6", + "variant": "stm32f3" + }, + "framework": "cmsis", + "name": "STM32F3DISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 49152, + "maximum_size": 262144 + } + }, + "disco_f100rb": { + "build": { + "f_cpu": "24000000L", + "cpu": "cortex-m3", + "mcu": "stm32f100rbt6" + }, + "framework": "mbed", + "name": "STM32VLDISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 131072 + } + }, + "disco_f051r8": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32f051r8t6" + }, + "framework": "mbed", + "name": "STM32F0DISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 65536 + } + }, + "disco_f334c8": { + "build": { + "f_cpu": "72000000L", + "cpu": "cortex-m4", + "mcu": "stm32f334c8t6" + }, + "framework": "mbed", + "name": "32F3348DISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 65536 + } + }, + "disco_f401vc": { + "build": { + "f_cpu": "84000000L", + "cpu": "cortex-m4", + "mcu": "stm32f401vct6" + }, + "framework": "mbed", + "name": "32F401CDISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 65536, + "maximum_size": 262144 + } + }, + "disco_f429zi": { + "build": { + "f_cpu": "180000000L", + "cpu": "cortex-m4", + "mcu": "stm32f429zit6" + }, + "framework": "mbed", + "name": "32F429IDISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 262144, + "maximum_size": 2097152 + } + }, + "nucleo_f030r8": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32f030r8t6" + }, + "framework": "mbed", + "name": "ST Nucleo F030R8", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 65536 + } + }, + "nucleo_f070rb": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32f070rbt6" + }, + "framework": "mbed", + "name": "ST Nucleo F070RB", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 131072 + } + }, + "nucleo_f072rb": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32f072rbt6" + }, + "framework": "mbed", + "name": "ST Nucleo F072RB", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 131072 + } + }, + "nucleo_f091rc": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32f091rct6" + }, + "framework": "mbed", + "name": "ST Nucleo F091RC", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 32768, + "maximum_size": 262144 + } + }, + "nucleo_f103rb": { + "build": { + "f_cpu": "72000000L", + "cpu": "cortex-m3", + "mcu": "stm32f103rbt6" + }, + "framework": "mbed", + "name": "ST Nucleo F103RB", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 20480, + "maximum_size": 131072 + } + }, + "nucleo_f302r8": { + "build": { + "f_cpu": "72000000L", + "cpu": "cortex-m4", + "mcu": "stm32f302r8t6" + }, + "framework": "mbed", + "name": "ST Nucleo F302R8", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 65536 + } + }, + "nucleo_f334r8": { + "build": { + "f_cpu": "72000000L", + "cpu": "cortex-m4", + "mcu": "stm32f334r8t6" + }, + "framework": "mbed", + "name": "ST Nucleo F334R8", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 65536 + } + }, + "nucleo_f401re": { + "build": { + "f_cpu": "84000000L", + "cpu": "cortex-m4", + "mcu": "stm32f401ret6" + }, + "framework": "mbed", + "name": "ST Nucleo F401RE", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 98304, + "maximum_size": 524288 + } + }, + "nucleo_f411re": { + "build": { + "f_cpu": "100000000L", + "cpu": "cortex-m4", + "mcu": "stm32f411ret6" + }, + "framework": "mbed", + "name": "ST Nucleo F411RE", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 131072, + "maximum_size": 524288 + } + }, + "nucleo_l053r8": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32l053r8t6" + }, + "framework": "mbed", + "name": "ST Nucleo L053R8", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 65536 + } + }, + "nucleo_l152re": { + "build": { + "f_cpu": "32000000L", + "cpu": "cortex-m3", + "mcu": "stm32l152ret6" + }, + "framework": "mbed", + "name": "ST Nucleo L152RE", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 81920, + "maximum_size": 524288 + } + } +} \ No newline at end of file diff --git a/platformio/builder/scripts/stm32.py b/platformio/builder/scripts/ststm32.py similarity index 67% rename from platformio/builder/scripts/stm32.py rename to platformio/builder/scripts/ststm32.py index 4cd991af..9bc2f4c8 100644 --- a/platformio/builder/scripts/stm32.py +++ b/platformio/builder/scripts/ststm32.py @@ -2,15 +2,23 @@ # See LICENSE for details. """ - Builder for STMicroelectronics - STM32 Series ARM microcontrollers. + Builder for ST STM32 Series ARM microcontrollers. """ from os.path import join +from shutil import copyfile from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, DefaultEnvironment, SConscript) + +def UploadToDisk(target, source, env): # pylint: disable=W0613,W0621 + env.AutodetectUploadPort() + copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), + join(env.subst("$UPLOAD_PORT"), "firmware.bin")) + print ("Firmware has been successfully uploaded.\n" + "Please restart your board.") + env = DefaultEnvironment() SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) @@ -38,13 +46,11 @@ env.Append( ] ) -CORELIBS = env.ProcessGeneral() - # # Target: Build executable and linkable firmware # -target_elf = env.BuildFirmware(["c", "gcc", "m", "nosys"] + CORELIBS) +target_elf = env.BuildFirmware() # # Target: Build the .bin file @@ -66,7 +72,10 @@ AlwaysBuild(target_size) # Target: Upload by default .bin file # -upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD") +if "mbed" in env.subst("$FRAMEWORK"): + upload = env.Alias(["upload", "uploadlazy"], target_firm, UploadToDisk) +else: + upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD") AlwaysBuild(upload) # diff --git a/platformio/platforms/stm32.py b/platformio/platforms/ststm32.py similarity index 79% rename from platformio/platforms/stm32.py rename to platformio/platforms/ststm32.py index 63607d95..bf1e99bf 100644 --- a/platformio/platforms/stm32.py +++ b/platformio/platforms/ststm32.py @@ -4,10 +4,10 @@ from platformio.platforms.base import BasePlatform -class Stm32Platform(BasePlatform): +class Ststm32Platform(BasePlatform): """ - An embedded platform for STMicroelectronics ARM microcontrollers + An embedded platform for ST STM32 ARM microcontrollers """ PACKAGES = { @@ -36,5 +36,9 @@ class Stm32Platform(BasePlatform): "framework-opencm3": { "default": True + }, + + "framework-mbed": { + "default": True } } diff --git a/tests/commands/test_boards.py b/tests/commands/test_boards.py index 3dfd1a11..dfeef591 100644 --- a/tests/commands/test_boards.py +++ b/tests/commands/test_boards.py @@ -44,7 +44,7 @@ def test_board_options(platformio_setup, clirunner, validate_cliresult): def test_board_ldscripts(platformio_setup, clirunner, validate_cliresult): result = clirunner.invoke( install_cli, [ - "stm32", + "ststm32", "--skip-default-package", "--with-package=ldscripts" ]) From 5fa0a176a7ede46f296fb69ec0d87ccf546a0478 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Mon, 9 Mar 2015 12:22:24 +0200 Subject: [PATCH 04/58] Refactor CORELIBS per platform --- docs/platforms/creating_platform.rst | 6 +-- platformio/builder/scripts/atmelavr.py | 4 +- platformio/builder/scripts/atmelsam.py | 4 +- platformio/builder/scripts/basearm.py | 11 +++-- platformio/builder/scripts/baseavr.py | 2 + .../builder/scripts/frameworks/arduino.py | 4 +- .../builder/scripts/frameworks/cmsis.py | 4 +- .../builder/scripts/frameworks/energia.py | 4 +- .../builder/scripts/frameworks/opencm3.py | 4 +- platformio/builder/scripts/frameworks/spl.py | 4 +- platformio/builder/scripts/teensy.py | 4 +- platformio/builder/scripts/timsp430.py | 6 +-- platformio/builder/scripts/titiva.py | 4 +- platformio/builder/tools/platformio.py | 40 +++++++++++-------- 14 files changed, 50 insertions(+), 51 deletions(-) diff --git a/docs/platforms/creating_platform.rst b/docs/platforms/creating_platform.rst index 5347be01..9865beec 100644 --- a/docs/platforms/creating_platform.rst +++ b/docs/platforms/creating_platform.rst @@ -217,6 +217,8 @@ base template of ``test-builder.py``. CPPDEFINES=["DEFINE_1", "DEFINE=2", "DEFINE_N"], + LIBS=["additional", "libs", "here"], + UPLOADER=join("$PIOPACKAGES_DIR", "tool-bar", "uploader"), UPLOADCMD="$UPLOADER $SOURCES" ) @@ -238,12 +240,10 @@ base template of ``test-builder.py``. # The source code of "platformio-build-tool" is here # https://github.com/ivankravets/platformio/blob/develop/platformio/builder/tools/platformio.py - CORELIBS = env.ProcessGeneral() - # # Target: Build executable and linkable firmware # - target_elf = env.BuildFirmware(CORELIBS + ["additional", "libs", "here"]) + target_elf = env.BuildFirmware() # # Target: Build the .bin file diff --git a/platformio/builder/scripts/atmelavr.py b/platformio/builder/scripts/atmelavr.py index c32fe8b1..eacb925b 100644 --- a/platformio/builder/scripts/atmelavr.py +++ b/platformio/builder/scripts/atmelavr.py @@ -82,13 +82,11 @@ else: UPLOADEEPCMD='"$UPLOADER" $UPLOADERFLAGS -U eeprom:w:$SOURCES:i' ) -CORELIBS = env.ProcessGeneral() - # # Target: Build executable and linkable firmware # -target_elf = env.BuildFirmware(["m"] + CORELIBS) +target_elf = env.BuildFirmware() # # Target: Extract EEPROM data (from EEMEM directive) to .eep file diff --git a/platformio/builder/scripts/atmelsam.py b/platformio/builder/scripts/atmelsam.py index 347cb75a..596872c8 100644 --- a/platformio/builder/scripts/atmelsam.py +++ b/platformio/builder/scripts/atmelsam.py @@ -68,13 +68,11 @@ env.Append( ] ) -CORELIBS = env.ProcessGeneral() - # # Target: Build executable and linkable firmware # -target_elf = env.BuildFirmware(["m", "gcc"] + CORELIBS) +target_elf = env.BuildFirmware() # # Target: Build the .bin file diff --git a/platformio/builder/scripts/basearm.py b/platformio/builder/scripts/basearm.py index 0cb81b83..9ae00990 100644 --- a/platformio/builder/scripts/basearm.py +++ b/platformio/builder/scripts/basearm.py @@ -50,16 +50,15 @@ env.Replace( "-mcpu=${BOARD_OPTIONS['build']['cpu']}" ], + LIBS=["c", "gcc", "m"], + SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES' ) -if env.get("BOARD_OPTIONS", {}).get("build", {}).get("cpu", "")[-2:] == "m4": +if env.get("BOARD_OPTIONS", {}).get("build", {}).get( + "cpu", "")[-2:] == "m4" and env.get("BOARD") != "frdm_k20d50m": env.Append( - ASFLAGS=[ - "-mfloat-abi=hard", - "-mfpu=fpv4-sp-d16" - ], - CCFLAGS=[ + CPPFLAGS=[ "-mfloat-abi=hard", "-mfpu=fpv4-sp-d16", "-fsingle-precision-constant" diff --git a/platformio/builder/scripts/baseavr.py b/platformio/builder/scripts/baseavr.py index bfe19df8..8a0384f1 100644 --- a/platformio/builder/scripts/baseavr.py +++ b/platformio/builder/scripts/baseavr.py @@ -47,6 +47,8 @@ env.Replace( "-Wl,--gc-sections" ], + LIBS=["m"], + SIZEPRINTCMD='"$SIZETOOL" --mcu=$BOARD_MCU -C -d $SOURCES' ) diff --git a/platformio/builder/scripts/frameworks/arduino.py b/platformio/builder/scripts/frameworks/arduino.py index 77ef6c88..f154d5c9 100644 --- a/platformio/builder/scripts/frameworks/arduino.py +++ b/platformio/builder/scripts/frameworks/arduino.py @@ -8,7 +8,7 @@ from os import listdir, walk from os.path import isfile, join -from SCons.Script import DefaultEnvironment, Return +from SCons.Script import DefaultEnvironment env = DefaultEnvironment() @@ -178,4 +178,4 @@ if env.subst("${PLATFORMFW_DIR}")[-3:] == "sam": join("$PLATFORMFW_DIR", "system", "libsam", "source") )) -Return("libs") +env.Append(LIBS=libs) diff --git a/platformio/builder/scripts/frameworks/cmsis.py b/platformio/builder/scripts/frameworks/cmsis.py index 4af5b98a..66bc005c 100644 --- a/platformio/builder/scripts/frameworks/cmsis.py +++ b/platformio/builder/scripts/frameworks/cmsis.py @@ -7,7 +7,7 @@ from os.path import join -from SCons.Script import DefaultEnvironment, Return +from SCons.Script import DefaultEnvironment env = DefaultEnvironment() @@ -39,4 +39,4 @@ libs.append(envsafe.BuildLibrary( join("$PLATFORMFW_DIR", "variants", "${BOARD_OPTIONS['build']['variant']}") )) -Return("libs") +env.Append(LIBS=libs) diff --git a/platformio/builder/scripts/frameworks/energia.py b/platformio/builder/scripts/frameworks/energia.py index a4f72a63..8e1e4901 100644 --- a/platformio/builder/scripts/frameworks/energia.py +++ b/platformio/builder/scripts/frameworks/energia.py @@ -7,7 +7,7 @@ from os.path import join -from SCons.Script import DefaultEnvironment, Return +from SCons.Script import DefaultEnvironment env = DefaultEnvironment() @@ -52,4 +52,4 @@ libs.append(env.BuildLibrary( join("$PLATFORMFW_DIR", "cores", "${BOARD_OPTIONS['build']['core']}") )) -Return("libs") +env.Append(LIBS=libs) diff --git a/platformio/builder/scripts/frameworks/opencm3.py b/platformio/builder/scripts/frameworks/opencm3.py index 5742429c..330fcd07 100644 --- a/platformio/builder/scripts/frameworks/opencm3.py +++ b/platformio/builder/scripts/frameworks/opencm3.py @@ -9,7 +9,7 @@ import re from os import listdir, sep, walk from os.path import isfile, join, normpath -from SCons.Script import DefaultEnvironment, Return +from SCons.Script import DefaultEnvironment from platformio.util import exec_command @@ -168,4 +168,4 @@ libs.append(env.Library( get_source_files(root_dir) )) -Return("libs") +env.Append(LIBS=libs) diff --git a/platformio/builder/scripts/frameworks/spl.py b/platformio/builder/scripts/frameworks/spl.py index ee19fc0c..b4644678 100644 --- a/platformio/builder/scripts/frameworks/spl.py +++ b/platformio/builder/scripts/frameworks/spl.py @@ -7,7 +7,7 @@ from os.path import join -from SCons.Script import DefaultEnvironment, Return +from SCons.Script import DefaultEnvironment env = DefaultEnvironment() @@ -61,4 +61,4 @@ libs.append(envsafe.BuildLibrary( ignore_files )) -Return("libs") +env.Append(LIBS=libs) diff --git a/platformio/builder/scripts/teensy.py b/platformio/builder/scripts/teensy.py index a6f9837c..140fa8fd 100644 --- a/platformio/builder/scripts/teensy.py +++ b/platformio/builder/scripts/teensy.py @@ -53,13 +53,11 @@ else: UPLOADHEXCMD='"$UPLOADER" $UPLOADERFLAGS' ) -CORELIBS = env.ProcessGeneral() - # # Target: Build executable and linkable firmware # -target_elf = env.BuildFirmware(["m"] + CORELIBS) +target_elf = env.BuildFirmware() # # Target: Build the firmware file diff --git a/platformio/builder/scripts/timsp430.py b/platformio/builder/scripts/timsp430.py index 98fbd1d1..90507539 100644 --- a/platformio/builder/scripts/timsp430.py +++ b/platformio/builder/scripts/timsp430.py @@ -48,6 +48,8 @@ env.Replace( "-Wl,-gc-sections,-u,main" ], + LIBS=["m"], + SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES', UPLOADER=join("$PIOPACKAGES_DIR", "tool-mspdebug", "mspdebug"), @@ -74,13 +76,11 @@ env.Append( ) ) -CORELIBS = env.ProcessGeneral() - # # Target: Build executable and linkable firmware # -target_elf = env.BuildFirmware(["m"] + CORELIBS) +target_elf = env.BuildFirmware() # # Target: Build the .hex diff --git a/platformio/builder/scripts/titiva.py b/platformio/builder/scripts/titiva.py index b96d4b70..db14ecdf 100644 --- a/platformio/builder/scripts/titiva.py +++ b/platformio/builder/scripts/titiva.py @@ -27,13 +27,11 @@ env.Append( ] ) -CORELIBS = env.ProcessGeneral() - # # Target: Build executable and linkable firmware # -target_elf = env.BuildFirmware(["c", "gcc", "m"] + CORELIBS) +target_elf = env.BuildFirmware() # # Target: Build the .bin file diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 37931953..e83bf8d4 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -10,7 +10,7 @@ from SCons.Script import SConscript, SConscriptChdir from SCons.Util import case_sensitive_suffixes -def ProcessGeneral(env): +def BuildFirmware(env): # fix ASM handling under non-casitive OS if not case_sensitive_suffixes('.s', '.S'): env.Replace( @@ -24,20 +24,8 @@ def ProcessGeneral(env): if "BUILD_FLAGS" in env: env.MergeFlags(env['BUILD_FLAGS']) - corelibs = [] - if "FRAMEWORK" in env: - if env['FRAMEWORK'] in ("arduino", "energia"): - env.ConvertInoToCpp() - for f in env['FRAMEWORK'].split(","): - SConscriptChdir(0) - corelibs += SConscript( - env.subst(join("$PIOBUILDER_DIR", "scripts", "frameworks", - "%s.py" % f.strip().lower())) - ) - return corelibs + env.BuildFramework() - -def BuildFirmware(env, corelibs): firmenv = env.Clone() vdirs = firmenv.VariantDirRecursive( join("$BUILD_DIR", "src"), "$PROJECTSRC_DIR") @@ -59,12 +47,15 @@ def BuildFirmware(env, corelibs): _LIBFLAGS=" -Wl,--end-group" ) - firmenv.MergeFlags(getenv("PLATFORMIO_SRCBUILD_FLAGS", "$SRCBUILD_FLAGS")) + _srcbuild_flags = getenv("PLATFORMIO_SRCBUILD_FLAGS", + env.subst("$SRCBUILD_FLAGS")) + if _srcbuild_flags: + firmenv.MergeFlags(_srcbuild_flags) return firmenv.Program( join("$BUILD_DIR", "firmware"), [firmenv.GlobCXXFiles(vdir) for vdir in vdirs], - LIBS=corelibs + deplibs, + LIBS=env.get("LIBS") + deplibs, LIBPATH="$BUILD_DIR", PROGSUFFIX=".elf" ) @@ -95,6 +86,21 @@ def VariantDirRecursive(env, variant_dir, src_dir, duplicate=True, return variants +def BuildFramework(env): + if "FRAMEWORK" not in env: + return + + if env['FRAMEWORK'].lower() in ("arduino", "energia"): + env.ConvertInoToCpp() + + for f in env['FRAMEWORK'].split(","): + SConscriptChdir(0) + SConscript( + env.subst(join("$PIOBUILDER_DIR", "scripts", "frameworks", + "%s.py" % f.strip().lower())) + ) + + def BuildLibrary(env, variant_dir, library_dir, ignore_files=None): lib = env.Clone() vdirs = lib.VariantDirRecursive( @@ -303,10 +309,10 @@ def exists(_): def generate(env): - env.AddMethod(ProcessGeneral) env.AddMethod(BuildFirmware) env.AddMethod(GlobCXXFiles) env.AddMethod(VariantDirRecursive) + env.AddMethod(BuildFramework) env.AddMethod(BuildLibrary) env.AddMethod(BuildDependentLibraries) env.AddMethod(ConvertInoToCpp) From 4a8cd9914b0fbe68fa0d01f40a5cda25b0431690 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Mon, 9 Mar 2015 12:27:30 +0200 Subject: [PATCH 05/58] Add new platforms and boards: Freescale, Nordic, NXP and etc. --- docs/platforms/freescalekinetis.rst | 104 ++++++++++ docs/platforms/index.rst | 3 + docs/platforms/nordicnrf51.rst | 110 +++++++++++ docs/platforms/nxplpc.rst | 146 ++++++++++++++ platformio/boards/adafruit.json | 4 +- platformio/boards/freescalekinetis.json | 87 +++++++++ platformio/boards/nordicnrf51.json | 102 ++++++++++ platformio/boards/nxplpc.json | 184 ++++++++++++++++++ .../builder/scripts/freescalekinetis.py | 59 ++++++ platformio/builder/scripts/nordicnrf51.py | 59 ++++++ platformio/builder/scripts/nxplpc.py | 59 ++++++ platformio/commands/boards.py | 2 +- platformio/platforms/freescalekinetis.py | 23 +++ platformio/platforms/nordicnrf51.py | 23 +++ platformio/platforms/nxplpc.py | 23 +++ 15 files changed, 985 insertions(+), 3 deletions(-) create mode 100644 docs/platforms/freescalekinetis.rst create mode 100644 docs/platforms/nordicnrf51.rst create mode 100644 docs/platforms/nxplpc.rst create mode 100644 platformio/boards/freescalekinetis.json create mode 100644 platformio/boards/nordicnrf51.json create mode 100644 platformio/boards/nxplpc.json create mode 100644 platformio/builder/scripts/freescalekinetis.py create mode 100644 platformio/builder/scripts/nordicnrf51.py create mode 100644 platformio/builder/scripts/nxplpc.py create mode 100644 platformio/platforms/freescalekinetis.py create mode 100644 platformio/platforms/nordicnrf51.py create mode 100644 platformio/platforms/nxplpc.py diff --git a/docs/platforms/freescalekinetis.rst b/docs/platforms/freescalekinetis.rst new file mode 100644 index 00000000..de5f7aa4 --- /dev/null +++ b/docs/platforms/freescalekinetis.rst @@ -0,0 +1,104 @@ +.. _platform_freescalekinetis: + +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. + +.. contents:: + +Packages +-------- + +.. list-table:: + :header-rows: 1 + + * - Name + - Alias + - Contents + * - ``toolchain-gccarmnoneeabi`` + - toolchain + - `gcc-arm-embedded `_, + `GDB `_ + * - ``framework-mbed`` + - + - See below in :ref:`freescalekinetis_frameworks` + +.. warning:: + **Linux Users:** Don't forget to install "udev" rules file + `99-platformio-udev.rules `_ (an instruction is located in the file). + + +.. _freescalekinetis_frameworks: + +Frameworks +---------- + +.. list-table:: + :header-rows: 1 + + * - Type ``framework`` + - Name + - Reference + * - ``mbed`` + - MBED Framework + - `Documentation `__ + + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by + horizontal. + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller ``board_mcu`` + - Frequency ``board_f_cpu`` + - Flash + - RAM + * - ``frdm_kl05z`` + - `Freescale Kinetis FRDM-KL05Z `_ + - MKL05Z32VFM4 ``cortex-m0plus`` + - 48 MHz ``48000000L`` + - 32 Kb + - 4 Kb + * - ``frdm_kl25z`` + - `Freescale Kinetis FRDM-KL25Z `_ + - MKL25Z128VLK4 ``cortex-m0plus`` + - 48 MHz ``48000000L`` + - 128 Kb + - 16 Kb + * - ``frdm_kl46z`` + - `Freescale Kinetis FRDM-KL46Z `_ + - MKL46Z256Vll4 ``cortex-m0plus`` + - 48 MHz ``48000000L`` + - 256 Kb + - 32 Kb + * - ``frdm_k22f`` + - `Freescale Kinetis FRDM-K22F `_ + - MK22FN512VLH12 ``cortex-m4`` + - 120 MHz ``120000000L`` + - 512 Kb + - 128 Kb + * - ``frdm_k64f`` + - `Freescale Kinetis FRDM-K64F `_ + - MK64fN1M0VLL12 ``cortex-m4`` + - 120 MHz ``120000000L`` + - 1 Mb + - 256 Kb + * - ``frdm_k20d50m`` + - `Freescale Kinetis FRDM-K20D50M `_ + - MK20DX128VLH5 ``cortex-m4`` + - 48 MHz ``48000000L`` + - 128 Kb + - 16 Kb + + +More detailed information you can find here +`Freescale Kinetis platforms with support MBED framework `_. diff --git a/docs/platforms/index.rst b/docs/platforms/index.rst index ee95d183..220c3a67 100644 --- a/docs/platforms/index.rst +++ b/docs/platforms/index.rst @@ -16,6 +16,9 @@ MCU, upload protocol or etc. Please use ``board`` option. atmelavr atmelsam + freescalekinetis + nordicnrf51 + nxplpc ststm32 teensy timsp430 diff --git a/docs/platforms/nordicnrf51.rst b/docs/platforms/nordicnrf51.rst new file mode 100644 index 00000000..6241ee64 --- /dev/null +++ b/docs/platforms/nordicnrf51.rst @@ -0,0 +1,110 @@ +.. _platform_nordicnrf51: + +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. + +.. contents:: + +Packages +-------- + +.. list-table:: + :header-rows: 1 + + * - Name + - Alias + - Contents + * - ``toolchain-gccarmnoneeabi`` + - toolchain + - `gcc-arm-embedded `_, + `GDB `_ + * - ``framework-mbed`` + - + - See below in :ref:`nordicnrf51_frameworks` + +.. warning:: + **Linux Users:** Don't forget to install "udev" rules file + `99-platformio-udev.rules `_ (an instruction is located in the file). + + +.. _nordicnrf51_frameworks: + +Frameworks +---------- + +.. list-table:: + :header-rows: 1 + + * - Type ``framework`` + - Name + - Reference + * - ``mbed`` + - MBED Framework + - `Documentation `__ + + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by + horizontal. + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller ``board_mcu`` + - Frequency ``board_f_cpu`` + - Flash + - RAM + * - ``nrf51_mkit`` + - `Nordic nRF51822-mKIT `_ + - nrf51822 ``cortex-m0`` + - 16 MHz ``16000000L`` + - 128 Kb + - 16 Kb + * - ``nrf51_dongle`` + - `Nordic nRF51-Dongle `_ + - nrf51822/nrf51422 ``cortex-m0`` + - 32 MHz ``32000000L`` + - 256 Kb + - 16 Kb + * - ``nrf51_dk`` + - `Nordic nRF51-DK `_ + - nrf51822/nrf51422 ``cortex-m0`` + - 32 MHz ``32000000L`` + - 256 Kb + - 16 Kb + * - ``redBearLab`` + - `RedBearLab nRF51822 `_ + - nrf51822 ``cortex-m0`` + - 16 MHz ``16000000L`` + - 256 Kb + - 16 Kb + * - ``redBearLabBLENano`` + - `RedBearLab BLE Nano `_ + - nrf51822 ``cortex-m0`` + - 16 MHz ``16000000L`` + - 256 Kb + - 16 Kb + * - ``wallBotBLE`` + - `JKSoft Wallbot BLE `_ + - nrf51822 ``cortex-m0`` + - 16 MHz ``16000000L`` + - 128 Kb + - 16 Kb + * - ``hrm1017`` + - `Switch Science mbed HRM1017 `_ + - nrf51822 ``cortex-m0`` + - 16 MHz ``16000000L`` + - 128 Kb + - 16 Kb + + +More detailed information you can find here +`nRF51 platforms with support MBED framework `_. diff --git a/docs/platforms/nxplpc.rst b/docs/platforms/nxplpc.rst new file mode 100644 index 00000000..d8dcff37 --- /dev/null +++ b/docs/platforms/nxplpc.rst @@ -0,0 +1,146 @@ +.. _platform_nxplpc: + +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. + +.. contents:: + +Packages +-------- + +.. list-table:: + :header-rows: 1 + + * - Name + - Alias + - Contents + * - ``toolchain-gccarmnoneeabi`` + - toolchain + - `gcc-arm-embedded `_, + `GDB `_ + * - ``framework-mbed`` + - + - See below in :ref:`nxplpc_frameworks` + +.. warning:: + **Linux Users:** Don't forget to install "udev" rules file + `99-platformio-udev.rules `_ (an instruction is located in the file). + + +.. _nxplpc_frameworks: + +Frameworks +---------- + +.. list-table:: + :header-rows: 1 + + * - Type ``framework`` + - Name + - Reference + * - ``mbed`` + - MBED Framework + - `Documentation `__ + + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by + horizontal. + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller ``board_mcu`` + - Frequency ``board_f_cpu`` + - Flash + - RAM + * - ``lpc1549`` + - `LPCXpresso1549 `_ + - LPC1549 ``cortex-m3`` + - 72 MHz ``72000000L`` + - 256 Kb + - 36 Kb + * - ``lpc1768`` + - `mbed LPC1768 `_ + - LPC1768 ``cortex-m3`` + - 96 MHz ``96000000L`` + - 512 Kb + - 32 Kb + * - ``seeeduinoArchPro`` + - `Seeeduino-Arch-Pro `_ + - LPC1768 ``cortex-m3`` + - 96 MHz ``96000000L`` + - 512 Kb + - 32 Kb + * - ``ubloxc027`` + - `U-blox C027 `_ + - LPC1768 ``cortex-m3`` + - 96 MHz ``96000000L`` + - 512 Kb + - 32 Kb + * - ``lpc1114fn28`` + - `mbed LPC1114FN28 `_ + - LPC1114FN28 ``cortex-m0`` + - 48 MHz ``48000000L`` + - 32 Kb + - 4 Kb + * - ``lpc11u24`` + - `mbed LPC11U24 `_ + - LPC11U24 ``cortex-m0`` + - 48 MHz ``48000000L`` + - 32 Kb + - 8 Kb + * - ``dipcortexm0`` + - `DipCortex M0 `_ + - LPC11U24 ``cortex-m0`` + - 50 MHz ``50000000L`` + - 32 Kb + - 8 Kb + * - ``blueboard_lpc11u24`` + - `BlueBoard-LPC11U24 `_ + - LPC11U24 ``cortex-m0`` + - 48 MHz ``48000000L`` + - 32 Kb + - 8 Kb + * - ``mbuino`` + - `Outrageous Circuits mBuino `_ + - LPC11U24 ``cortex-m0`` + - 50 MHz ``50000000L`` + - 32 Kb + - 8 Kb + * - ``lpc11u35`` + - `EA LPC11U35 QuickStart Board `_ + - LPC11U35 ``cortex-m0`` + - 48 MHz ``48000000L`` + - 64 Kb + - 10 Kb + * - ``lpc11u35_501`` + - `TG-LPC11U35-501 QuickStart Board `_ + - LPC11U35 ``cortex-m0`` + - 48 MHz ``48000000L`` + - 64 Kb + - 10 Kb + * - ``lpc4088`` + - `EA LPC4088 QuickStart Board `_ + - LPC4088 ``cortex-m4`` + - 120 MHz ``120000000L`` + - 512 Kb + - 96 Kb + * - ``lpc4088_dm`` + - `EA LPC4088 Display Module `_ + - LPC4088 ``cortex-m4`` + - 120 MHz ``120000000L`` + - 512 Kb + - 96 Kb + + +More detailed information you can find here +`NXP platforms with support MBED framework `_. diff --git a/platformio/boards/adafruit.json b/platformio/boards/adafruit.json index 4e7832d0..3ace87a3 100644 --- a/platformio/boards/adafruit.json +++ b/platformio/boards/adafruit.json @@ -34,7 +34,7 @@ "variant": "tiny8" }, "framework": "arduino", - "name": "Adafruit Trinket 8MHz", + "name": "Adafruit Trinket 3V/8MHz", "platform": "atmelavr", "upload": { "maximum_ram_size": 512, @@ -52,7 +52,7 @@ "variant": "tiny8" }, "framework": "arduino", - "name": "Adafruit Trinket 16MHz", + "name": "Adafruit Trinket 5V/16MHz", "platform": "atmelavr", "upload": { "maximum_ram_size": 512, diff --git a/platformio/boards/freescalekinetis.json b/platformio/boards/freescalekinetis.json new file mode 100644 index 00000000..9eb9a25e --- /dev/null +++ b/platformio/boards/freescalekinetis.json @@ -0,0 +1,87 @@ +{ + "frdm_kl25z": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0plus", + "mcu": "mkl25z128vlk4" + }, + "framework": "mbed", + "name": "Freescale Kinetis FRDM-KL25Z", + "platform": "freescalekinetis", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 131072 + } + }, + "frdm_kl46z": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0plus", + "mcu": "mkl46z256vll4" + }, + "framework": "mbed", + "name": "Freescale Kinetis FRDM-KL46Z", + "platform": "freescalekinetis", + "upload": { + "maximum_ram_size": 32768, + "maximum_size": 262144 + } + }, + "frdm_k64f": { + "build": { + "f_cpu": "120000000L", + "cpu": "cortex-m4", + "mcu": "mk64fn1m0vll12" + }, + "framework": "mbed", + "name": "Freescale Kinetis FRDM-K64F", + "platform": "freescalekinetis", + "upload": { + "maximum_ram_size": 262144, + "maximum_size": 1048567 + } + }, + "frdm_kl05z": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0plus", + "mcu": "mkl05z32vfm4" + }, + "framework": "mbed", + "name": "Freescale Kinetis FRDM-KL05Z", + "platform": "freescalekinetis", + "upload": { + "maximum_ram_size": 4096, + "maximum_size": 32768 + } + }, + "frdm_k20d50m": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m4", + "mcu": "mk20dx128vlh5" + }, + "framework": "mbed", + "name": "Freescale Kinetis FRDM-K20D50M", + "platform": "freescalekinetis", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 131072 + } + } + , + "frdm_k22f": { + "build": { + "f_cpu": "120000000L", + "cpu": "cortex-m4", + "mcu": "mk22fn512vlh12" + }, + "framework": "mbed", + "name": "Freescale Kinetis FRDM-K22F", + "platform": "freescalekinetis", + "upload": { + "maximum_ram_size": 131072, + "maximum_size": 524288 + } + } +} \ No newline at end of file diff --git a/platformio/boards/nordicnrf51.json b/platformio/boards/nordicnrf51.json new file mode 100644 index 00000000..f7202b31 --- /dev/null +++ b/platformio/boards/nordicnrf51.json @@ -0,0 +1,102 @@ +{ + "nrf51_mkit": { + "build": { + "f_cpu": "16000000L", + "cpu": "cortex-m0", + "mcu": "nrf51822" + }, + "framework": "mbed", + "name": "Nordic nRF51822-mKIT", + "platform": "nordicnrf51", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 131072 + } + }, + "hrm1017": { + "build": { + "f_cpu": "16000000L", + "cpu": "cortex-m0", + "mcu": "nrf51822" + }, + "framework": "mbed", + "name": "Switch Science mbed HRM1017", + "platform": "nordicnrf51", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 262144 + } + }, + "redBearLab": { + "build": { + "f_cpu": "16000000L", + "cpu": "cortex-m0", + "mcu": "nrf51822" + }, + "framework": "mbed", + "name": "RedBearLab nRF51822", + "platform": "nordicnrf51", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 262144 + } + }, + "nrf51_dk": { + "build": { + "f_cpu": "32000000L", + "cpu": "cortex-m0", + "mcu": "nrf51822" + }, + "framework": "mbed", + "name": "Nordic nRF51-DK", + "platform": "nordicnrf51", + "upload": { + "maximum_ram_size": 32384, + "maximum_size": 262144 + } + }, + "redBearLabBLENano": { + "build": { + "f_cpu": "16000000L", + "cpu": "cortex-m0", + "mcu": "nrf51822" + }, + "framework": "mbed", + "name": "RedBearLab BLE Nano", + "platform": "nordicnrf51", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 262144 + } + }, + "nrf51_dongle": { + "build": { + "f_cpu": "32000000L", + "cpu": "cortex-m0", + "mcu": "nrf51822" + }, + "framework": "mbed", + "name": "Nordic nRF51-Dongle", + "platform": "nordicnrf51", + "upload": { + "maximum_ram_size": 32384, + "maximum_size": 262144 + } + } + , + "wallBotBLE": { + "build": { + "f_cpu": "16000000L", + "cpu": "cortex-m0", + "mcu": "nrf51822" + }, + "framework": "mbed", + "name": "JKSoft Wallbot BLE", + "platform": "nordicnrf51", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 131072 + } + } + +} \ No newline at end of file diff --git a/platformio/boards/nxplpc.json b/platformio/boards/nxplpc.json new file mode 100644 index 00000000..de012c48 --- /dev/null +++ b/platformio/boards/nxplpc.json @@ -0,0 +1,184 @@ +{ + "lpc1768": { + "build": { + "f_cpu": "96000000L", + "cpu": "cortex-m3", + "mcu": "lpc1768" + }, + "framework": "mbed", + "name": "mbed LPC1768", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 32768, + "maximum_size": 524288 + } + }, + "lpc11u24": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "lpc11u24" + }, + "framework": "mbed", + "name": "mbed LPC11U24", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 32768 + } + }, + "lpc4088": { + "build": { + "f_cpu": "120000000L", + "cpu": "cortex-m4", + "mcu": "lpc4088" + }, + "framework": "mbed", + "name": "EA LPC4088 QuickStart Board", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 98304, + "maximum_size": 524288 + } + }, + "dipcortexm0": { + "build": { + "f_cpu": "50000000L", + "cpu": "cortex-m0", + "mcu": "lpc11u24" + }, + "framework": "mbed", + "name": "DipCortex M0", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 32768 + } + }, + "blueboard_lpc11u24": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "lpc11u24" + }, + "framework": "mbed", + "name": "BlueBoard-LPC11U24", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 32768 + } + }, + "seeeduinoArchPro": { + "build": { + "f_cpu": "96000000L", + "cpu": "cortex-m3", + "mcu": "lpc1768" + }, + "framework": "mbed", + "name": "Seeeduino-Arch-Pro", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 32768, + "maximum_size": 524288 + } + }, + "ubloxc027": { + "build": { + "f_cpu": "96000000L", + "cpu": "cortex-m3", + "mcu": "lpc1768" + }, + "framework": "mbed", + "name": "u-blox C027", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 32768, + "maximum_size": 524288 + } + }, + "lpc1114fn28": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "lpc1114fn28" + }, + "framework": "mbed", + "name": "mbed LPC1114FN28", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 4096, + "maximum_size": 32768 + } + }, + "lpc11u35": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "lpc11u35" + }, + "framework": "mbed", + "name": "EA LPC11U35 QuickStart Board", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 10240, + "maximum_size": 65536 + } + }, + "lpc11u35_501": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "lpc11u35" + }, + "framework": "mbed", + "name": "TG-LPC11U35-501", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 10240, + "maximum_size": 65536 + } + }, + "lpc1549": { + "build": { + "f_cpu": "72000000L", + "cpu": "cortex-m3", + "mcu": "lpc1549" + }, + "framework": "mbed", + "name": "LPCXpresso1549", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 36864, + "maximum_size": 262144 + } + }, + "mbuino": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "lpc11u24" + }, + "framework": "mbed", + "name": "Outrageous Circuits mBuino", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 32768 + } + }, + "lpc4088_dm": { + "build": { + "f_cpu": "120000000L", + "cpu": "cortex-m4", + "mcu": "lpc4088" + }, + "framework": "mbed", + "name": "EA LPC4088 Display Module", + "platform": "nxplpc", + "upload": { + "maximum_ram_size": 98304, + "maximum_size": 524288 + } + } +} \ No newline at end of file diff --git a/platformio/builder/scripts/freescalekinetis.py b/platformio/builder/scripts/freescalekinetis.py new file mode 100644 index 00000000..bb5f7048 --- /dev/null +++ b/platformio/builder/scripts/freescalekinetis.py @@ -0,0 +1,59 @@ +# Copyright (C) Ivan Kravets +# See LICENSE for details. + +""" + Builder for Freescale Kinetis series ARM microcontrollers. +""" + +from os.path import join +from shutil import copyfile + +from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, + DefaultEnvironment, SConscript) + + +def UploadToDisk(target, source, env): # pylint: disable=W0613,W0621 + env.AutodetectUploadPort() + copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), + join(env.subst("$UPLOAD_PORT"), "firmware.bin")) + print ("Firmware has been successfully uploaded.\n" + "Please restart your board.") + +env = DefaultEnvironment() + +SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) + +# +# Target: Build executable and linkable firmware +# + +target_elf = env.BuildFirmware() + +# +# Target: Build the .bin file +# + +if "uploadlazy" in COMMAND_LINE_TARGETS: + target_firm = join("$BUILD_DIR", "firmware.bin") +else: + target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf) + +# +# Target: Print binary size +# + +target_size = env.Alias("size", target_elf, "$SIZEPRINTCMD") +AlwaysBuild(target_size) + +# +# Target: Upload by default .bin file +# + +upload = env.Alias(["upload", "uploadlazy"], target_firm, UploadToDisk) +AlwaysBuild(upload) + +# +# Target: Define targets +# + +Default([target_firm, target_size]) diff --git a/platformio/builder/scripts/nordicnrf51.py b/platformio/builder/scripts/nordicnrf51.py new file mode 100644 index 00000000..1460b81d --- /dev/null +++ b/platformio/builder/scripts/nordicnrf51.py @@ -0,0 +1,59 @@ +# Copyright (C) Ivan Kravets +# See LICENSE for details. + +""" + Builder for Nordic nRF51 series ARM microcontrollers. +""" + +from os.path import join +from shutil import copyfile + +from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, + DefaultEnvironment, SConscript) + + +def UploadToDisk(target, source, env): # pylint: disable=W0613,W0621 + env.AutodetectUploadPort() + copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), + join(env.subst("$UPLOAD_PORT"), "firmware.bin")) + print ("Firmware has been successfully uploaded.\n" + "Please restart your board.") + +env = DefaultEnvironment() + +SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) + +# +# Target: Build executable and linkable firmware +# + +target_elf = env.BuildFirmware() + +# +# Target: Build the .bin file +# + +if "uploadlazy" in COMMAND_LINE_TARGETS: + target_firm = join("$BUILD_DIR", "firmware.bin") +else: + target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf) + +# +# Target: Print binary size +# + +target_size = env.Alias("size", target_elf, "$SIZEPRINTCMD") +AlwaysBuild(target_size) + +# +# Target: Upload by default .bin file +# + +upload = env.Alias(["upload", "uploadlazy"], target_firm, UploadToDisk) +AlwaysBuild(upload) + +# +# Target: Define targets +# + +Default([target_firm, target_size]) diff --git a/platformio/builder/scripts/nxplpc.py b/platformio/builder/scripts/nxplpc.py new file mode 100644 index 00000000..4782c81e --- /dev/null +++ b/platformio/builder/scripts/nxplpc.py @@ -0,0 +1,59 @@ +# Copyright (C) Ivan Kravets +# See LICENSE for details. + +""" + Builder for NXP LPC series ARM microcontrollers. +""" + +from os.path import join +from shutil import copyfile + +from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, + DefaultEnvironment, SConscript) + + +def UploadToDisk(target, source, env): # pylint: disable=W0613,W0621 + env.AutodetectUploadPort() + copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), + join(env.subst("$UPLOAD_PORT"), "firmware.bin")) + print ("Firmware has been successfully uploaded.\n" + + "Please restart your board.") + +env = DefaultEnvironment() + +SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) + +# +# Target: Build executable and linkable firmware +# + +target_elf = env.BuildFirmware() + +# +# Target: Build the .bin file +# + +if "uploadlazy" in COMMAND_LINE_TARGETS: + target_firm = join("$BUILD_DIR", "firmware.bin") +else: + target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf) + +# +# Target: Print binary size +# + +target_size = env.Alias("size", target_elf, "$SIZEPRINTCMD") +AlwaysBuild(target_size) + +# +# Target: Upload by default .bin file +# + +upload = env.Alias(["upload", "uploadlazy"], target_firm, UploadToDisk) +AlwaysBuild(upload) + +# +# Target: Define targets +# + +Default([target_firm, target_size]) diff --git a/platformio/commands/boards.py b/platformio/commands/boards.py index 400a4ae4..1bb89f21 100644 --- a/platformio/commands/boards.py +++ b/platformio/commands/boards.py @@ -16,7 +16,7 @@ def cli(query, json_output): # pylint: disable=R0912 if json_output: return ouput_boards_json(query) - BOARDLIST_TPL = ("{type:<30} {mcu:<13} {frequency:<8} " + BOARDLIST_TPL = ("{type:<30} {mcu:<14} {frequency:<8} " " {flash:<7} {ram:<6} {name}") grpboards = {} diff --git a/platformio/platforms/freescalekinetis.py b/platformio/platforms/freescalekinetis.py new file mode 100644 index 00000000..09243ec8 --- /dev/null +++ b/platformio/platforms/freescalekinetis.py @@ -0,0 +1,23 @@ +# Copyright (C) Ivan Kravets +# See LICENSE for details. + +from platformio.platforms.base import BasePlatform + + +class FreescalekinetisPlatform(BasePlatform): + + """ + An embedded platform for Freescale Kinetis series ARM microcontrollers + """ + + PACKAGES = { + + "toolchain-gccarmnoneeabi": { + "alias": "toolchain", + "default": True + }, + + "framework-mbed": { + "default": True + } + } diff --git a/platformio/platforms/nordicnrf51.py b/platformio/platforms/nordicnrf51.py new file mode 100644 index 00000000..17126aac --- /dev/null +++ b/platformio/platforms/nordicnrf51.py @@ -0,0 +1,23 @@ +# Copyright (C) Ivan Kravets +# See LICENSE for details. + +from platformio.platforms.base import BasePlatform + + +class Nordicnrf51Platform(BasePlatform): + + """ + An embedded platform for Nordic nRF51 series ARM microcontrollers + """ + + PACKAGES = { + + "toolchain-gccarmnoneeabi": { + "alias": "toolchain", + "default": True + }, + + "framework-mbed": { + "default": True + } + } diff --git a/platformio/platforms/nxplpc.py b/platformio/platforms/nxplpc.py new file mode 100644 index 00000000..9c9e3152 --- /dev/null +++ b/platformio/platforms/nxplpc.py @@ -0,0 +1,23 @@ +# Copyright (C) Ivan Kravets +# See LICENSE for details. + +from platformio.platforms.base import BasePlatform + + +class NxplpcPlatform(BasePlatform): + + """ + An embedded platform for NXP LPC series ARM microcontrollers + """ + + PACKAGES = { + + "toolchain-gccarmnoneeabi": { + "alias": "toolchain", + "default": True + }, + + "framework-mbed": { + "default": True + } + } From d3b9322d3bad2e983c500865721516456256cf11 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Mon, 9 Mar 2015 12:27:54 +0200 Subject: [PATCH 06/58] Initial support for MBED Framework --- examples/mbed/mbed-blink/README.rst | 21 +++ examples/mbed/mbed-blink/platformio.ini | 43 ++++++ examples/mbed/mbed-blink/src/main.cpp | 12 ++ platformio/builder/scripts/frameworks/mbed.py | 140 ++++++++++++++++++ platformio/builder/tools/pioupload.py | 26 +++- platformio/util.py | 29 +++- scripts/mbed_to_package.py | 64 ++++++++ 7 files changed, 326 insertions(+), 9 deletions(-) create mode 100644 examples/mbed/mbed-blink/README.rst create mode 100644 examples/mbed/mbed-blink/platformio.ini create mode 100644 examples/mbed/mbed-blink/src/main.cpp create mode 100644 platformio/builder/scripts/frameworks/mbed.py create mode 100644 scripts/mbed_to_package.py diff --git a/examples/mbed/mbed-blink/README.rst b/examples/mbed/mbed-blink/README.rst new file mode 100644 index 00000000..b36ea0e3 --- /dev/null +++ b/examples/mbed/mbed-blink/README.rst @@ -0,0 +1,21 @@ +How to buid PlatformIO based project +==================================== + +1. `Install PlatformIO `_ +2. Download `source code with examples `_ +3. Extract ZIP archive +4. Run these commands: + +.. code-block:: bash + + # Change directory to example + > cd platformio-develop/examples/mbed/mbed-blink + + # Process example project + > platformio run + + # Upload firmware + > platformio run --target upload + + # Clean build files + > platformio run --target clean diff --git a/examples/mbed/mbed-blink/platformio.ini b/examples/mbed/mbed-blink/platformio.ini new file mode 100644 index 00000000..bbef0cbe --- /dev/null +++ b/examples/mbed/mbed-blink/platformio.ini @@ -0,0 +1,43 @@ +# +# Project Configuration File +# +# A detailed documentation with the EXAMPLES is located here: +# http://docs.platformio.org/en/latest/projectconf.html +# + +# A sign `#` at the beginning of the line indicates a comment +# Comment lines are ignored. + +# Simple and base environment +# [env:mybaseenv] +# platform = %INSTALLED_PLATFORM_NAME_HERE% +# framework = +# board = +# +# Automatic targets - enable auto-uploading +# targets = upload + + +# NXP LPC Platform +[env:lpc1768] +platform = nxplpc +framework = mbed +board = lpc1768 + +# Nordic nRF51 Platform +[env:nrf51_mkit] +platform = nordicnrf51 +framework = mbed +board = nrf51_mkit + +# Freescale FRDM Platform +[env:frdm_k64f] +platform = freescalekinetis +framework = mbed +board = frdm_k64f + +# ST STM32 Platform +[env:nucleo_f401re] +platform = ststm32 +framework = mbed +board = nucleo_f401re \ No newline at end of file diff --git a/examples/mbed/mbed-blink/src/main.cpp b/examples/mbed/mbed-blink/src/main.cpp new file mode 100644 index 00000000..8247a2e9 --- /dev/null +++ b/examples/mbed/mbed-blink/src/main.cpp @@ -0,0 +1,12 @@ +#include "mbed.h" + +DigitalOut myled(LED1); + +int main() { + while(1) { + myled = 1; + wait(1); + myled = 0; + wait(1); + } +} \ No newline at end of file diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py new file mode 100644 index 00000000..03f54616 --- /dev/null +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -0,0 +1,140 @@ +# Copyright (C) Ivan Kravets +# See LICENSE for details. + +""" + Build script for Mbed Framework +""" + +import xml.etree.ElementTree as ElementTree +from binascii import crc32 +from os.path import join, normpath + +from SCons.Script import DefaultEnvironment + +env = DefaultEnvironment() + +BOARD_OPTS = env.get("BOARD_OPTIONS", {}).get("build", {}) + +env.Replace( + PLATFORMFW_DIR=join("$PIOPACKAGES_DIR", "framework-mbed") +) + +MBED_VARIANTS = { + "stm32f3discovery": "DISCO_F303VC", + "stm32f4discovery": "DISCO_F407VG", + "stm32f429discovery": "DISCO_F429ZI", + "blueboard_lpc11u24": "LPC11U24", + "dipcortexm0": "LPC11U24", + "seeeduinoArchPro": "ARCH_PRO", + "ubloxc027": "UBLOX_C027", + "lpc1114fn28": "LPC1114", + "lpc11u35": "LPC11U35_401", + "mbuino": "LPC11U24", + "nrf51_mkit": "NRF51822", + "redBearLab": "NRF51822", + "nrf51-dt": "NRF51_DK", + "redBearLabBLENano": "NRF51822", + "wallBotBLE": "NRF51822", + "frdm_kl25z": "KL25Z", + "frdm_kl46z": "KL46Z", + "frdm_k64f": "K64F", + "frdm_kl05z": "KL05Z", + "frdm_k20d50m": "K20D50M", + "frdm_k22f": "K22F" +} + + +def parse_eix_file(filename): + result = {} + paths = ( + ("CFLAGS", "./Target/Source/CC/Switch"), + ("CXXFLAGS", "./Target/Source/CPPC/Switch"), + ("CPPDEFINES", "./Target/Source/Symbols/Symbol"), + ("FILES", "./Target/Files/File"), + ("LINKFLAGS", "./Target/Source/LD/Switch"), + ("STDLIBS", "./Target/Source/Syslibs/Library"), + ("LDSCRIPT_PATH", "./Target/Source/Scriptfile"), + ("CPPPATH", "./Target/Compiler/Includepaths/Includepath") + ) + + tree = ElementTree.parse(filename) + + for (key, path) in paths: + if key not in result: + result[key] = [] + + for node in tree.findall(path): + _nkeys = node.keys() + result[key].append( + node.get(_nkeys[0]) if len(_nkeys) == 1 else node.attrib) + + return result + + +def get_source_files(flist): + files = [] + for f in flist: + if f['type'] == "h" or not f['name'].startswith("mbed"): + continue + files.append(join("$BUILD_DIR", "FrameworkMBED", f['name'][5:])) + return files + + +def get_build_flags(data): + flags = {} + cflags = set(data.get("CFLAGS", [])) + cxxflags = set(data.get("CXXFLAGS", [])) + cppflags = set(cflags & cxxflags) + flags['CPPFLAGS'] = list(cppflags) + flags['CXXFLAGS'] = list(cxxflags - cppflags) + flags['CFLAGS'] = list(cflags - cppflags) + return flags + +board_type = env.subst("$BOARD") +variant = MBED_VARIANTS[ + board_type] if board_type in MBED_VARIANTS else board_type.upper() +eixdata = parse_eix_file( + join(env.subst("$PLATFORMFW_DIR"), "variant", variant, "%s.eix" % variant)) + +build_flags = get_build_flags(eixdata) +env.Replace( + CPPFLAGS=build_flags.get("CPPFLAGS", []), + CFLAGS=build_flags.get("CFLAGS", []), + CXXFLAGS=build_flags.get("CXXFLAGS", []), + LINKFLAGS=eixdata.get("LINKFLAGS", []), + CPPDEFINES=[define for define in eixdata.get("CPPDEFINES", [])], + LDSCRIPT_PATH=normpath(join( + "$PLATFORMFW_DIR", "core", eixdata.get("LDSCRIPT_PATH")[0][5:])) +) + +# Hook for K64F and K22F +if board_type in ("frdm_k22f", "frdm_k64f"): + env.Append( + LINKFLAGS=["-Wl,--start-group"] + ) + +for lib_path in eixdata.get("CPPPATH"): + _vdir = join("$BUILD_DIR", "FrameworkMbedInc%d" % crc32(lib_path)) + env.VariantDir( + _vdir, + join("$PLATFORMFW_DIR", "core", lib_path[5:]) + ) + env.Append(CPPPATH=[_vdir]) + + +# +# Target: Build MBED Library +# + +libs = [l for l in eixdata.get("STDLIBS", []) if l not in env.get("LIBS")] + +env.VariantDir( + join("$BUILD_DIR", "FrameworkMBED"), + join("$PLATFORMFW_DIR", "core") +) +libs.append(env.Library( + join("$BUILD_DIR", "FrameworkMBED"), + get_source_files(eixdata.get("FILES", [])) +)) + +env.Append(LIBS=libs) diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index 130fd22f..512615b6 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -7,7 +7,7 @@ from time import sleep from SCons.Script import Exit from serial import Serial -from platformio.util import get_serialports +from platformio.util import get_logicaldisks, get_serialports def FlushSerialBuffer(env, port): @@ -52,16 +52,28 @@ def WaitForNewSerialPort(_, before): def AutodetectUploadPort(env): - if "UPLOAD_PORT" not in env: + if "UPLOAD_PORT" in env: + return + + if env.subst("$FRAMEWORK") == "mbed": + for item in get_logicaldisks(): + if not item['name'] or "mbed" != item['name'].lower(): + continue + print "Auto-detected UPLOAD_PORT: %s" % item['disk'] + env.Replace(UPLOAD_PORT=item['disk']) + break + else: for item in get_serialports(): - if "VID:PID" in item['hwid']: - print "Auto-detected UPLOAD_PORT: %s" % item['port'] - env.Replace(UPLOAD_PORT=item['port']) - break + if "VID:PID" not in item['hwid']: + continue + print "Auto-detected UPLOAD_PORT: %s" % item['port'] + env.Replace(UPLOAD_PORT=item['port']) + break if "UPLOAD_PORT" not in env: Exit("Error: Please specify `upload_port` for environment or use " - "global `--upload-port` option.\n") + "global `--upload-port` option.\n" + "For the some development platforms it can be USB flash drive\n") def exists(_): diff --git a/platformio/util.py b/platformio/util.py index b4f0473c..9c1007b8 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -3,8 +3,10 @@ import json import os +import re import subprocess -from os.path import abspath, dirname, expanduser, isdir, isfile, join, realpath +from os.path import (abspath, basename, dirname, expanduser, isdir, isfile, + join, realpath) from platform import system, uname from threading import Thread @@ -173,7 +175,30 @@ def get_serialports(): from serial.tools.list_ports_posix import comports else: raise exception.GetSerialPortsError(os.name) - return[{"port": p, "description": d, "hwid": h} for p, d, h in comports()] + return [{"port": p, "description": d, "hwid": h} for p, d, h in comports()] + + +def get_logicaldisks(): + disks = [] + if system() == "Windows": + result = exec_command( + ["wmic", "logicaldisk", "get", "name,VolumeName"]).get("out") + disknamere = re.compile(r"^([A-Z]{1}\:)\s*(\S+)?") + for line in result.split("\n"): + match = disknamere.match(line.strip()) + if not match: + continue + disks.append({"disk": match.group(1), "name": match.group(2)}) + else: + result = exec_command(["df"]).get("out") + disknamere = re.compile(r"\d+\%\s+([a-z\d\-_/]+)$", flags=re.I) + for line in result.split("\n"): + match = disknamere.search(line.strip()) + if not match: + continue + disks.append({"disk": match.group(1), + "name": basename(match.group(1))}) + return disks def get_api_result(path, params=None, data=None): diff --git a/scripts/mbed_to_package.py b/scripts/mbed_to_package.py new file mode 100644 index 00000000..e56d0f05 --- /dev/null +++ b/scripts/mbed_to_package.py @@ -0,0 +1,64 @@ +# Copyright (C) Ivan Kravets +# See LICENSE for details. + +from os import getcwd, mkdir, makedirs, listdir +from os.path import isfile, isdir, join +from shutil import copy2, rmtree, copytree +from sys import exit as sys_exit +from sys import path +import zipfile + + +MBED_DIR = "/home/valeros/mbed-master" +OUTPUT_DIR = "/home/valeros/mbed-framework" +CORE_DIR = join(OUTPUT_DIR, "core") +VARIANT_DIR = join(OUTPUT_DIR, "variant") + +path.append("..") +path.append(MBED_DIR) +from workspace_tools.export import gccarm +from platformio.util import exec_command + + +def _unzip_generated_file(mcu): + filename = join( + MBED_DIR, "build", "export", "MBED_A1_emblocks_%s.zip" % mcu) + variant_dir = join(VARIANT_DIR, mcu) + if isfile(filename): + print "Processing board: %s" % mcu + with zipfile.ZipFile(filename) as zfile: + mkdir(variant_dir) + file_data = zfile.read("MBED_A1/MBED_A1.eix") + with open(join(variant_dir, "%s.eix" % mcu), "w") as f: + f.write(file_data) + else: + print "Warning! Skipped board: %s" % mcu + + +def main(): + print "Starting..." + if isdir(OUTPUT_DIR): + rmtree(OUTPUT_DIR) + print "Delete previous framework dir" + makedirs(VARIANT_DIR) + # copy MBED library + mbedlib_dir = join(MBED_DIR, "libraries", "mbed") + for item in listdir(mbedlib_dir): + src = join(mbedlib_dir, item) + dst = join(CORE_DIR, item) + if isdir(src): + copytree(src, dst) + else: + copy2(src, dst) + # make .eix files + for mcu in set(gccarm.GccArm.TARGETS): + exec_command( + ["python", join(MBED_DIR, "workspace_tools", "project.py"), + "--mcu", mcu, "-i", "emblocks", "-p", "0"], cwd=getcwd() + ) + _unzip_generated_file(mcu) + print "Complete!" + + +if __name__ == "__main__": + sys_exit(main()) From 36c926bed70c49ce87f0d2fe5c91735430b396a8 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 9 Mar 2015 15:45:46 +0200 Subject: [PATCH 07/58] Add Cloud Compiling and Continuos Integration --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 31522103..71e5c345 100644 --- a/README.rst +++ b/README.rst @@ -59,7 +59,7 @@ settings for most popular `Embedded Boards `_. * Configurable `build -flags/-options `_ * Automatic **firmware uploading** * Integration with `development environments (IDE) `_ -* Ready for **cloud compilers** +* Ready for **Cloud Compiling** and **Continuous Integration** * Pre-built tool chains, frameworks for the popular `Hardware Platforms `_ .. image:: https://raw.githubusercontent.com/ivankravets/platformio-web/develop/app/images/platformio-embedded-development.png From 19a9f153b925b64fc4712c432cfb8671afff27c0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 9 Mar 2015 22:06:19 +0200 Subject: [PATCH 08/58] Add configuration example for VIM/YouCompleteMe by @ajford --- docs/ide.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/ide.rst b/docs/ide.rst index b7d76fa7..a7dd0afc 100644 --- a/docs/ide.rst +++ b/docs/ide.rst @@ -39,9 +39,11 @@ VIM Recommended bundles: * Syntax highlight - `Arduino-syntax-file `_ -* Code Completion - `YouCompleteMe `_ +* Code Completion - `YouCompleteMe `_ (see configuration example by **Anthony Ford** `PlatformIO/YouCompleteMe Integration `_) * Syntax checking - `Syntastic `_ + + Put to the project directory ``Makefile`` wrapper with contents: .. code-block:: make From d4740c4dafc7cf2505a8b6117a5953ae8f2b9a6e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 10 Mar 2015 13:23:49 +0200 Subject: [PATCH 09/58] Update "setuptools" while install PlatformIO --- scripts/get-platformio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get-platformio.py b/scripts/get-platformio.py index 16c7cd1d..47d34bc7 100644 --- a/scripts/get-platformio.py +++ b/scripts/get-platformio.py @@ -99,7 +99,7 @@ def main(): ("Fixing Windows %PATH% Environment", fix_winpython_pathenv, []), ("Installing Python Package Manager", install_pip, []), ("Installing PlatformIO and dependencies", install_pypi_packages, [ - [["platformio"], [ + [["setuptools"], ["platformio"], [ "--egg", "http://sourceforge.net/projects/scons/files/latest/download" ]] From 326cf0da7dc553e4de0b3d14aecb5ce38baa560f Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 17:48:04 +0200 Subject: [PATCH 10/58] Add "vendor" and "url" field to board options, change "framework" field to "frameworks" // Resolve #113 --- platformio/boards/adafruit.json | 42 ++++--- platformio/boards/arduino.json | 190 ++++++++++++++++++++---------- platformio/boards/digistump.json | 30 +++-- platformio/boards/engduino.json | 18 ++- platformio/boards/microduino.json | 54 ++++++--- platformio/boards/misc.json | 22 ++-- platformio/boards/teensy.json | 24 ++-- platformio/boards/timsp430.json | 44 ++++--- platformio/boards/titiva.json | 18 ++- 9 files changed, 293 insertions(+), 149 deletions(-) diff --git a/platformio/boards/adafruit.json b/platformio/boards/adafruit.json index 3ace87a3..9618e995 100644 --- a/platformio/boards/adafruit.json +++ b/platformio/boards/adafruit.json @@ -10,7 +10,7 @@ "variant": "flora", "vid": "0x239A" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Adafruit Flora", "platform": "atmelavr", "upload": { @@ -22,7 +22,9 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": false - } + }, + "url": "http://www.adafruit.com/product/659", + "vendor": "Adafruit" }, "trinket3": { @@ -33,14 +35,16 @@ "mcu": "attiny85", "variant": "tiny8" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Adafruit Trinket 3V/8MHz", "platform": "atmelavr", "upload": { "maximum_ram_size": 512, "maximum_size": 8192, "protocol": "usbtiny" - } + }, + "url": "http://www.adafruit.com/products/1500", + "vendor": "Adafruit" }, "trinket5": { @@ -51,14 +55,16 @@ "mcu": "attiny85", "variant": "tiny8" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Adafruit Trinket 5V/16MHz", "platform": "atmelavr", "upload": { "maximum_ram_size": 512, "maximum_size": 8192, "protocol": "usbtiny" - } + }, + "url": "http://www.adafruit.com/products/1501", + "vendor": "Adafruit" }, "protrinket3": { @@ -69,14 +75,16 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Pro Trinket 3V/12MHz (USB)", "platform": "atmelavr", "upload": { "maximum_ram_size": 2048, "maximum_size": 28672, "protocol": "usbtiny" - } + }, + "url": "http://www.adafruit.com/products/2010", + "vendor": "Adafruit" }, "protrinket5": { @@ -87,14 +95,16 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Pro Trinket 5V/16MHz (USB)", "platform": "atmelavr", "upload": { "maximum_ram_size": 2048, "maximum_size": 28672, "protocol": "usbtiny" - } + }, + "url": "http://www.adafruit.com/products/2000", + "vendor": "Adafruit" }, "protrinket3ftdi": { "build": { @@ -104,7 +114,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Pro Trinket 3V/12MHz (FTDI)", "platform": "atmelavr", "upload": { @@ -113,7 +123,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "http://www.adafruit.com/products/2010", + "vendor": "Adafruit" }, "protrinket5ftdi": { "build": { @@ -123,7 +135,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Pro Trinket 5V/16MHz (USB)", "platform": "atmelavr", "upload": { @@ -132,6 +144,8 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "http://www.adafruit.com/products/2000", + "vendor": "Adafruit" } } \ No newline at end of file diff --git a/platformio/boards/arduino.json b/platformio/boards/arduino.json index 43779bc1..76f90725 100644 --- a/platformio/boards/arduino.json +++ b/platformio/boards/arduino.json @@ -10,7 +10,7 @@ "variant": "leonardo", "vid": "0x1B4F" }, - "framework": "arduino", + "frameworks": "arduino", "name": "LilyPad Arduino USB", "platform": "atmelavr", "upload": { @@ -22,7 +22,9 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardLilyPadUSB", + "vendor": "Arduino" }, "atmegangatmega168": { "build": { @@ -32,7 +34,7 @@ "mcu": "atmega168", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino NG or older ATmega168", "platform": "atmelavr", "upload": { @@ -41,7 +43,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 19200 - } + }, + "url": "http://arduino.cc/en/main/boards", + "vendor": "Arduino" }, "atmegangatmega8": { "build": { @@ -51,7 +55,7 @@ "mcu": "atmega8", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino NG or older ATmega8", "platform": "atmelavr", "upload": { @@ -60,7 +64,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 19200 - } + }, + "url": "http://arduino.cc/en/main/boards", + "vendor": "Arduino" }, "btatmega168": { "build": { @@ -70,7 +76,7 @@ "mcu": "atmega168", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino BT ATmega168", "platform": "atmelavr", "upload": { @@ -80,7 +86,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 19200 - } + }, + "url": "http://arduino.cc/en/main/boards", + "vendor": "Arduino" }, "btatmega328": { "build": { @@ -90,7 +98,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino BT ATmega328", "platform": "atmelavr", "upload": { @@ -100,7 +108,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 19200 - } + }, + "url": "http://arduino.cc/en/main/boards", + "vendor": "Arduino" }, "diecimilaatmega168": { "build": { @@ -110,7 +120,7 @@ "mcu": "atmega168", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Duemilanove or Diecimila ATmega168", "platform": "atmelavr", "upload": { @@ -119,7 +129,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 19200 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardDiecimila", + "vendor": "Arduino" }, "diecimilaatmega328": { "build": { @@ -129,7 +141,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Duemilanove or Diecimila ATmega328", "platform": "atmelavr", "upload": { @@ -138,7 +150,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardDiecimila", + "vendor": "Arduino" }, "esplora": { "build": { @@ -151,7 +165,7 @@ "variant": "leonardo", "vid": "0x2341" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Esplora", "platform": "atmelavr", "upload": { @@ -163,7 +177,9 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardEsplora", + "vendor": "Arduino" }, "ethernet": { "build": { @@ -173,7 +189,7 @@ "mcu": "atmega328p", "variant": "ethernet" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Ethernet", "platform": "atmelavr", "upload": { @@ -182,7 +198,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardEthernet", + "vendor": "Arduino" }, "fio": { "build": { @@ -192,7 +210,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Fio", "platform": "atmelavr", "upload": { @@ -201,7 +219,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardFio", + "vendor": "Arduino" }, "leonardo": { "build": { @@ -214,7 +234,7 @@ "variant": "leonardo", "vid": "0x2341" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Leonardo", "platform": "atmelavr", "upload": { @@ -226,7 +246,9 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://arduino.cc/en/Main/arduinoBoardLeonardo", + "vendor": "Arduino" }, "lilypadatmega168": { "build": { @@ -236,7 +258,7 @@ "mcu": "atmega168", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "LilyPad Arduino ATmega168", "platform": "atmelavr", "upload": { @@ -245,7 +267,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 19200 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardLilyPad", + "vendor": "Arduino" }, "lilypadatmega328": { "build": { @@ -255,7 +279,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "LilyPad Arduino ATmega328", "platform": "atmelavr", "upload": { @@ -264,7 +288,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardLilyPad", + "vendor": "Arduino" }, "megaADK": { "build": { @@ -274,7 +300,7 @@ "mcu": "atmega2560", "variant": "mega" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Mega ADK", "platform": "atmelavr", "upload": { @@ -283,7 +309,9 @@ "protocol": "wiring", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardMegaADK", + "vendor": "Arduino" }, "megaatmega1280": { "build": { @@ -293,7 +321,7 @@ "mcu": "atmega1280", "variant": "mega" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Mega or Mega 2560 ATmega1280", "platform": "atmelavr", "upload": { @@ -302,7 +330,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "http://arduino.cc/en/Main/arduinoBoardMega", + "vendor": "Arduino" }, "megaatmega2560": { "build": { @@ -312,7 +342,7 @@ "mcu": "atmega2560", "variant": "mega" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Mega or Mega 2560 ATmega2560 (Mega 2560)", "platform": "atmelavr", "upload": { @@ -321,7 +351,9 @@ "protocol": "wiring", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "http://arduino.cc/en/Main/arduinoBoardMega2560", + "vendor": "Arduino" }, "micro": { "build": { @@ -334,7 +366,7 @@ "variant": "micro", "vid": "0x2341" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Micro", "platform": "atmelavr", "upload": { @@ -346,7 +378,9 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardMicro", + "vendor": "Arduino" }, "miniatmega168": { "build": { @@ -356,7 +390,7 @@ "mcu": "atmega168", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Mini ATmega168", "platform": "atmelavr", "upload": { @@ -365,7 +399,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 19200 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardMini", + "vendor": "Arduino" }, "miniatmega328": { "build": { @@ -375,7 +411,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Mini ATmega328", "platform": "atmelavr", "upload": { @@ -384,7 +420,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardMini", + "vendor": "Arduino" }, "nanoatmega168": { "build": { @@ -394,7 +432,7 @@ "mcu": "atmega168", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Nano ATmega168", "platform": "atmelavr", "upload": { @@ -403,7 +441,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 19200 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardNano", + "vendor": "Arduino" }, "nanoatmega328": { "build": { @@ -413,7 +453,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Nano ATmega328", "platform": "atmelavr", "upload": { @@ -422,7 +462,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardNano", + "vendor": "Arduino" }, "pro16MHzatmega168": { "build": { @@ -432,7 +474,7 @@ "mcu": "atmega168", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz)", "platform": "atmelavr", "upload": { @@ -441,7 +483,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 19200 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardProMini", + "vendor": "Arduino" }, "pro16MHzatmega328": { "build": { @@ -451,7 +495,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz)", "platform": "atmelavr", "upload": { @@ -460,7 +504,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardProMini", + "vendor": "Arduino" }, "pro8MHzatmega168": { "build": { @@ -470,7 +516,7 @@ "mcu": "atmega168", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz)", "platform": "atmelavr", "upload": { @@ -479,7 +525,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 19200 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardProMini", + "vendor": "Arduino" }, "pro8MHzatmega328": { "build": { @@ -489,7 +537,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Pro or Pro Mini ATmega328 (3.3V, 8 MHz)", "platform": "atmelavr", "upload": { @@ -498,7 +546,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardProMini", + "vendor": "Arduino" }, "robotControl": { "build": { @@ -511,7 +561,7 @@ "variant": "robot_control", "vid": "0x2341" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Robot Control", "platform": "atmelavr", "upload": { @@ -523,7 +573,9 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://arduino.cc/en/Main/Robot", + "vendor": "Arduino" }, "robotMotor": { "build": { @@ -536,7 +588,7 @@ "variant": "robot_motor", "vid": "0x2341" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Robot Motor", "platform": "atmelavr", "upload": { @@ -548,7 +600,9 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://arduino.cc/en/Main/Robot", + "vendor": "Arduino" }, "uno": { "build": { @@ -558,7 +612,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Uno", "platform": "atmelavr", "upload": { @@ -567,7 +621,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardUno", + "vendor": "Arduino" }, "yun": { "build": { @@ -580,7 +636,7 @@ "variant": "yun", "vid": "0x2341" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Yun", "platform": "atmelavr", "upload": { @@ -593,7 +649,9 @@ "use_1200bps_touch": true, "via_ssh": true, "wait_for_upload_port": true - } + }, + "url": "http://arduino.cc/en/Main/ArduinoBoardYun", + "vendor": "Arduino" }, "due": { "build": { @@ -608,18 +666,20 @@ "vid": "0x2341", "ldscript": "sam3x8e.ld" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Due (Programming Port)", "platform": "atmelsam", "upload": { "disable_flushing": true, - "maximum_ram_size": 28672, + "maximum_ram_size": 32768, "maximum_size": 524288, "protocol": "sam-ba", "require_upload_port" : true, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://arduino.cc/en/Main/arduinoBoardDue", + "vendor": "Arduino" }, "dueUSB": { "build": { @@ -634,17 +694,19 @@ "vid": "0x2341", "ldscript": "sam3x8e.ld" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Arduino Due (USB Native Port)", "platform": "atmelsam", "upload": { "disable_flushing": true, - "maximum_ram_size": 28672, + "maximum_ram_size": 32768, "maximum_size": 524288, "protocol": "sam-ba", "require_upload_port" : true, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://arduino.cc/en/Main/arduinoBoardDue", + "vendor": "Arduino" } } diff --git a/platformio/boards/digistump.json b/platformio/boards/digistump.json index 8e0dc576..0f0f135e 100644 --- a/platformio/boards/digistump.json +++ b/platformio/boards/digistump.json @@ -7,14 +7,16 @@ "mcu": "attiny85", "variant": "digispark_tiny" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Digispark (Default - 16 MHz)", "platform": "atmelavr", "upload": { "maximum_ram_size": 512, "maximum_size": 6012, "protocol": "digispark" - } + }, + "url": "http://digistump.com/products/1", + "vendor": "Digistump" }, "digispark-pro": { "build": { @@ -24,14 +26,16 @@ "mcu": "attiny167", "variant": "digispark_pro" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Digispark Pro (Default 16 MHz)", "platform": "atmelavr", "upload": { "maximum_ram_size": 512, "maximum_size": 14844, "protocol": "digispark" - } + }, + "url": "http://digistump.com/products/109", + "vendor": "Digistump" }, "digispark-pro32": { "build": { @@ -41,14 +45,16 @@ "mcu": "attiny167", "variant": "digispark_pro32" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Digispark Pro (16 MHz) (32 byte buffer)", "platform": "atmelavr", "upload": { "maximum_ram_size": 512, "maximum_size": 14844, "protocol": "digispark" - } + }, + "url": "http://digistump.com/products/109", + "vendor": "Digistump" }, "digispark-pro64": { "build": { @@ -58,14 +64,16 @@ "mcu": "attiny167", "variant": "digispark_pro64" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Digispark Pro (16 MHz) (64 byte buffer)", "platform": "atmelavr", "upload": { "maximum_ram_size": 512, "maximum_size": 14844, "protocol": "digispark" - } + }, + "url": "http://digistump.com/products/109", + "vendor": "Digistump" }, "digix": { "build": { @@ -80,7 +88,7 @@ "variant": "digispark_digix", "vid": "0x16D0" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Digistump DigiX", "platform": "atmelsam", "upload": { @@ -91,6 +99,8 @@ "require_upload_port" : true, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://digistump.com/products/50", + "vendor": "Digistump" } } \ No newline at end of file diff --git a/platformio/boards/engduino.json b/platformio/boards/engduino.json index 32235a93..159887a1 100644 --- a/platformio/boards/engduino.json +++ b/platformio/boards/engduino.json @@ -10,7 +10,7 @@ "variant": "engduinov1", "vid": "0x1B4F" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Engduino 1", "platform": "atmelavr", "upload": { @@ -22,7 +22,9 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://www.engduino.org", + "vendor": "Engduino" }, "engduinov2": { "build": { @@ -35,7 +37,7 @@ "variant": "engduinov2", "vid": "0x1B4F" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Engduino 2", "platform": "atmelavr", "upload": { @@ -47,7 +49,9 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://www.engduino.org", + "vendor": "Engduino" }, "engduinov3": { "build": { @@ -60,7 +64,7 @@ "variant": "engduinov3", "vid": "0x1B4F" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Engduino 3", "platform": "atmelavr", "upload": { @@ -72,6 +76,8 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://www.engduino.org", + "vendor": "Engduino" } } \ No newline at end of file diff --git a/platformio/boards/microduino.json b/platformio/boards/microduino.json index 86d09dcf..42b3411f 100644 --- a/platformio/boards/microduino.json +++ b/platformio/boards/microduino.json @@ -7,7 +7,7 @@ "mcu": "atmega1284p", "variant": "plus" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Microduino Core+ (ATmega1284P@16M,5V)", "platform": "atmelavr", "upload": { @@ -16,7 +16,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B", + "vendor": "Microduino" }, "1284p8m": { "build": { @@ -26,7 +28,7 @@ "mcu": "atmega1284p", "variant": "plus" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Microduino Core+ (ATmega1284P@8M,3.3V)", "platform": "atmelavr", "upload": { @@ -35,7 +37,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B", + "vendor": "Microduino" }, "168pa16m": { "build": { @@ -45,7 +49,7 @@ "mcu": "atmega168p", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Microduino Core (Atmega168PA@16M,5V)", "platform": "atmelavr", "upload": { @@ -54,7 +58,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "https://www.microduino.cc/wiki/index.php?title=Microduino-Core", + "vendor": "Microduino" }, "168pa8m": { "build": { @@ -64,7 +70,7 @@ "mcu": "atmega168p", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Microduino Core (Atmega168PA@8M,3.3V)", "platform": "atmelavr", "upload": { @@ -73,7 +79,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "https://www.microduino.cc/wiki/index.php?title=Microduino-Core", + "vendor": "Microduino" }, "328p16m": { "build": { @@ -83,7 +91,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Microduino Core (Atmega328P@16M,5V)", "platform": "atmelavr", "upload": { @@ -92,7 +100,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "https://www.microduino.cc/wiki/index.php?title=Microduino-Core", + "vendor": "Microduino" }, "328p8m": { "build": { @@ -102,7 +112,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Microduino Core (Atmega328P@8M,3.3V)", "platform": "atmelavr", "upload": { @@ -111,7 +121,9 @@ "require_upload_port" : true, "protocol": "arduino", "speed": 57600 - } + }, + "url": "https://www.microduino.cc/wiki/index.php?title=Microduino-Core", + "vendor": "Microduino" }, "32u416m": { "build": { @@ -123,7 +135,7 @@ "variant": "32u4", "vid": "0x2341" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Microduino Core USB (ATmega32U4@16M,5V)", "platform": "atmelavr", "upload": { @@ -135,7 +147,9 @@ "speed": 57600, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "https://www.microduino.cc/wiki/index.php?title=Microduino-CoreUSB", + "vendor": "Microduino" }, "644pa16m": { "build": { @@ -145,7 +159,7 @@ "mcu": "atmega644p", "variant": "plus" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Microduino Core+ (Atmega644PA@16M,5V)", "platform": "atmelavr", "upload": { @@ -154,7 +168,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 115200 - } + }, + "url": "https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B", + "vendor": "Microduino" }, "644pa8m": { "build": { @@ -164,7 +180,7 @@ "mcu": "atmega644p", "variant": "plus" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Microduino Core+ (Atmega644PA@8M,3.3V)", "platform": "atmelavr", "upload": { @@ -173,6 +189,8 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "https://www.microduino.cc/wiki/index.php?title=Microduino-Core%2B", + "vendor": "Microduino" } } \ No newline at end of file diff --git a/platformio/boards/misc.json b/platformio/boards/misc.json index 8c1e85a0..2b24d002 100644 --- a/platformio/boards/misc.json +++ b/platformio/boards/misc.json @@ -7,7 +7,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Raspduino", "platform": "atmelavr", "upload": { @@ -16,7 +16,9 @@ "protocol": "arduino", "require_upload_port" : true, "speed": 57600 - } + }, + "url": "http://www.bitwizard.nl/wiki/index.php/Raspduino", + "vendor": "BitWizard" }, "sainSmartDue": { "build": { @@ -31,18 +33,20 @@ "vid": "0x2341", "ldscript": "sam3x8e.ld" }, - "framework": "arduino", + "frameworks": "arduino", "name": "SainSmart Due (Programming Port)", "platform": "atmelsam", "upload": { "disable_flushing": true, - "maximum_ram_size": 28672, + "maximum_ram_size": 32768, "maximum_size": 524288, "protocol": "sam-ba", "require_upload_port" : true, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://www.sainsmart.com/arduino/control-boards/sainsmart-due-atmel-sam3x8e-arm-cortex-m3-board-black.html", + "vendor": "SainSmart" }, "sainSmartDueUSB": { "build": { @@ -57,17 +61,19 @@ "vid": "0x2341", "ldscript": "sam3x8e.ld" }, - "framework": "arduino", + "frameworks": "arduino", "name": "SainSmart Due (USB Native Port)", "platform": "atmelsam", "upload": { "disable_flushing": true, - "maximum_ram_size": 28672, + "maximum_ram_size": 32768, "maximum_size": 524288, "protocol": "sam-ba", "require_upload_port" : true, "use_1200bps_touch": true, "wait_for_upload_port": true - } + }, + "url": "http://www.sainsmart.com/arduino/control-boards/sainsmart-due-atmel-sam3x8e-arm-cortex-m3-board-black.html", + "vendor": "SainSmart" } } \ No newline at end of file diff --git a/platformio/boards/teensy.json b/platformio/boards/teensy.json index 49403ecb..6914b37a 100644 --- a/platformio/boards/teensy.json +++ b/platformio/boards/teensy.json @@ -5,13 +5,15 @@ "f_cpu": "16000000L", "mcu": "atmega32u4" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Teensy 2.0", "platform": "teensy", "upload": { "maximum_ram_size": 2560, "maximum_size": 32256 - } + }, + "url": "https://www.pjrc.com/store/teensy.html", + "vendor": "Teensy" }, "teensy20pp": { @@ -20,13 +22,15 @@ "f_cpu": "16000000L", "mcu": "at90usb1286" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Teensy++ 2.0", "platform": "teensy", "upload": { "maximum_ram_size": 8192, "maximum_size": 130048 - } + }, + "url": "https://www.pjrc.com/store/teensypp.html", + "vendor": "Teensy" }, "teensy30": { @@ -38,13 +42,15 @@ "mcu": "mk20dx128", "cpu": "cortex-m4" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Teensy 3.0", "platform": "teensy", "upload": { "maximum_ram_size": 16384, "maximum_size": 131072 - } + }, + "url": "https://www.pjrc.com/store/teensy3.html", + "vendor": "Teensy" }, "teensy31": { @@ -56,12 +62,14 @@ "mcu": "mk20dx256", "cpu": "cortex-m4" }, - "framework": "arduino", + "frameworks": "arduino", "name": "Teensy 3.1", "platform": "teensy", "upload": { "maximum_ram_size": 65536, "maximum_size": 262144 - } + }, + "url": "https://www.pjrc.com/store/teensy31.html", + "vendor": "Teensy" } } diff --git a/platformio/boards/timsp430.json b/platformio/boards/timsp430.json index a8d2b46f..b93e9fab 100644 --- a/platformio/boards/timsp430.json +++ b/platformio/boards/timsp430.json @@ -6,14 +6,16 @@ "mcu": "msp430f5529", "variant": "launchpad_f5529" }, - "framework": "energia", + "frameworks": "energia", "name": "LaunchPad w/ msp430f5529 (16MHz)", "platform": "timsp430", "upload": { "maximum_ram_size": 1024, "maximum_size": 131072, "protocol": "tilib" - } + }, + "url": "http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html", + "vendor": "TI" }, "lpmsp430f5529_25": { "build": { @@ -22,14 +24,16 @@ "mcu": "msp430f5529", "variant": "launchpad_f5529" }, - "framework": "energia", + "frameworks": "energia", "name": "LaunchPad w/ msp430f5529 (25MHz)", "platform": "timsp430", "upload": { "maximum_ram_size": 1024, "maximum_size": 131072, "protocol": "tilib" - } + }, + "url": "http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html", + "vendor": "TI" }, "lpmsp430fr5739": { "build": { @@ -38,14 +42,16 @@ "mcu": "msp430fr5739", "variant": "fraunchpad" }, - "framework": "energia", + "frameworks": "energia", "name": "FraunchPad w/ msp430fr5739", "platform": "timsp430", "upload": { "maximum_ram_size": 1024, "maximum_size": 15872, "protocol": "rf2500" - } + }, + "url": "http://www.ti.com/tool/msp-exp430fr5739", + "vendor": "TI" }, "lpmsp430fr5969": { "build": { @@ -54,14 +60,16 @@ "mcu": "msp430fr5969", "variant": "launchpad_fr5969" }, - "framework": "energia", + "frameworks": "energia", "name": "LaunchPad w/ msp430fr5969", "platform": "timsp430", "upload": { "maximum_ram_size": 1024, "maximum_size": 65536, "protocol": "tilib" - } + }, + "url": "http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430fr5969.html", + "vendor": "TI" }, "lpmsp430g2231": { "build": { @@ -70,14 +78,16 @@ "mcu": "msp430g2231", "variant": "launchpad" }, - "framework": "energia", - "name": "LaunchPad w/ msp430g2231 (1MHz)", + "frameworks": "energia", + "name": "LaunchPad w/ msp430g2231 (1 MHz)", "platform": "timsp430", "upload": { "maximum_ram_size": 128, "maximum_size": 2048, "protocol": "rf2500" - } + }, + "url": "http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html", + "vendor": "TI" }, "lpmsp430g2452": { "build": { @@ -86,14 +96,16 @@ "mcu": "msp430g2452", "variant": "launchpad" }, - "framework": "energia", + "frameworks": "energia", "name": "LaunchPad w/ msp430g2452 (16MHz)", "platform": "timsp430", "upload": { "maximum_ram_size": 256, "maximum_size": 8192, "protocol": "rf2500" - } + }, + "url": "http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html", + "vendor": "TI" }, "lpmsp430g2553": { "build": { @@ -102,13 +114,15 @@ "mcu": "msp430g2553", "variant": "launchpad" }, - "framework": "energia", + "frameworks": "energia", "name": "LaunchPad w/ msp430g2553 (16MHz)", "platform": "timsp430", "upload": { "maximum_ram_size": 512, "maximum_size": 16384, "protocol": "rf2500" - } + }, + "url": "http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html", + "vendor": "TI" } } \ No newline at end of file diff --git a/platformio/boards/titiva.json b/platformio/boards/titiva.json index 757ee6fa..0fcbc576 100644 --- a/platformio/boards/titiva.json +++ b/platformio/boards/titiva.json @@ -8,13 +8,15 @@ "mcu": "lplm4f120h5qr", "variant": "stellarpad" }, - "framework": "energia", + "frameworks": "energia,opencm3", "name": "LaunchPad (Stellaris) w/ lm4f120 (80MHz)", "platform": "titiva", "upload": { "maximum_ram_size": 32768, "maximum_size": 262144 - } + }, + "url": "http://www.ti.com/tool/ek-lm4f120xl", + "vendor": "TI" }, "lptm4c1230c3pm": { "build": { @@ -25,13 +27,15 @@ "mcu": "lptm4c1230c3pm", "variant": "stellarpad" }, - "framework": "energia", + "frameworks": "energia,opencm3", "name": "LaunchPad (Tiva C) w/ tm4c123 (80MHz)", "platform": "titiva", "upload": { "maximum_ram_size": 32768, "maximum_size": 262144 - } + }, + "url": "http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c123gxl.html", + "vendor": "TI" }, "lptm4c1294ncpdt": { "build": { @@ -42,12 +46,14 @@ "mcu": "lptm4c1294ncpdt", "variant": "launchpad_129" }, - "framework": "energia", + "frameworks": "energia,opencm3", "name": "LaunchPad (Tiva C) w/ tm4c129 (120MHz)", "platform": "titiva", "upload": { "maximum_ram_size": 262144, "maximum_size": 1048576 - } + }, + "url": "http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c1294xl.html", + "vendor": "TI" } } \ No newline at end of file From 7e58eb8094248e12be9078fd7a44847ab430b55d Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 17:50:15 +0200 Subject: [PATCH 11/58] Add checking incompatibility between board and frameworks // Resolve #112 --- platformio/builder/tools/platformio.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index e83bf8d4..ca464b25 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -6,7 +6,7 @@ import re from os import getenv, listdir, remove, sep, walk from os.path import basename, dirname, isdir, isfile, join, normpath -from SCons.Script import SConscript, SConscriptChdir +from SCons.Script import Exit, SConscript, SConscriptChdir from SCons.Util import case_sensitive_suffixes @@ -94,11 +94,16 @@ def BuildFramework(env): env.ConvertInoToCpp() for f in env['FRAMEWORK'].split(","): - SConscriptChdir(0) - SConscript( - env.subst(join("$PIOBUILDER_DIR", "scripts", "frameworks", - "%s.py" % f.strip().lower())) - ) + framework = f.strip().lower() + if framework in env.get("BOARD_OPTIONS", {}).get("frameworks"): + SConscriptChdir(0) + SConscript( + env.subst(join("$PIOBUILDER_DIR", "scripts", "frameworks", + "%s.py" % framework)) + ) + else: + Exit("Error: This board doesn't support %s framework!" % + framework) def BuildLibrary(env, variant_dir, library_dir, ignore_files=None): From af9c23ad877c3ba2bcfb6fc22e587e96c734d1ae Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 17:53:46 +0200 Subject: [PATCH 12/58] Automatically generate environment with first supported framework --- platformio/commands/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/commands/init.py b/platformio/commands/init.py index c5f58aaa..355597e4 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -94,7 +94,7 @@ def fill_project_envs(project_file, board_types, disable_auto_uploading): data = builtin_boards[type_] # find default framework for board - framework = data.get("framework", None) + framework = data.get("frameworks", None).split(",")[0] content.append("[env:autogen_%s]" % type_) content.append("platform = %s" % data['platform']) if framework: From e22890ac18bdd482518b98d9f97bc09c6166e1b7 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 17:56:46 +0200 Subject: [PATCH 13/58] Add "vendor" and "url" field to board options, change "framework" field to "frameworks" // Resolve #113 --- platformio/boards/freescalekinetis.json | 38 +++++--- platformio/boards/nordicnrf51.json | 46 ++++++---- platformio/boards/nxplpc.json | 78 ++++++++++------ platformio/boards/ststm32.json | 114 ++++++++++++++++-------- 4 files changed, 183 insertions(+), 93 deletions(-) diff --git a/platformio/boards/freescalekinetis.json b/platformio/boards/freescalekinetis.json index 9eb9a25e..b33cbd84 100644 --- a/platformio/boards/freescalekinetis.json +++ b/platformio/boards/freescalekinetis.json @@ -5,13 +5,15 @@ "cpu": "cortex-m0plus", "mcu": "mkl25z128vlk4" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Freescale Kinetis FRDM-KL25Z", "platform": "freescalekinetis", "upload": { "maximum_ram_size": 16384, "maximum_size": 131072 - } + }, + "url": "https://developer.mbed.org/platforms/KL25Z/", + "vendor": "Freescale" }, "frdm_kl46z": { "build": { @@ -19,13 +21,15 @@ "cpu": "cortex-m0plus", "mcu": "mkl46z256vll4" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Freescale Kinetis FRDM-KL46Z", "platform": "freescalekinetis", "upload": { "maximum_ram_size": 32768, "maximum_size": 262144 - } + }, + "url": "https://developer.mbed.org/platforms/FRDM-KL46Z/", + "vendor": "Freescale" }, "frdm_k64f": { "build": { @@ -33,13 +37,15 @@ "cpu": "cortex-m4", "mcu": "mk64fn1m0vll12" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Freescale Kinetis FRDM-K64F", "platform": "freescalekinetis", "upload": { "maximum_ram_size": 262144, - "maximum_size": 1048567 - } + "maximum_size": 1048576 + }, + "url": "https://developer.mbed.org/platforms/FRDM-K64F/", + "vendor": "Freescale" }, "frdm_kl05z": { "build": { @@ -47,13 +53,15 @@ "cpu": "cortex-m0plus", "mcu": "mkl05z32vfm4" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Freescale Kinetis FRDM-KL05Z", "platform": "freescalekinetis", "upload": { "maximum_ram_size": 4096, "maximum_size": 32768 - } + }, + "url": "https://developer.mbed.org/platforms/FRDM-KL05Z/", + "vendor": "Freescale" }, "frdm_k20d50m": { "build": { @@ -61,13 +69,15 @@ "cpu": "cortex-m4", "mcu": "mk20dx128vlh5" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Freescale Kinetis FRDM-K20D50M", "platform": "freescalekinetis", "upload": { "maximum_ram_size": 16384, "maximum_size": 131072 - } + }, + "url": "https://developer.mbed.org/platforms/FRDM-K20D50M/", + "vendor": "Freescale" } , "frdm_k22f": { @@ -76,12 +86,14 @@ "cpu": "cortex-m4", "mcu": "mk22fn512vlh12" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Freescale Kinetis FRDM-K22F", "platform": "freescalekinetis", "upload": { "maximum_ram_size": 131072, "maximum_size": 524288 - } + }, + "url": "https://developer.mbed.org/platforms/FRDM-K22F/", + "vendor": "Freescale" } } \ No newline at end of file diff --git a/platformio/boards/nordicnrf51.json b/platformio/boards/nordicnrf51.json index f7202b31..d88d4ebf 100644 --- a/platformio/boards/nordicnrf51.json +++ b/platformio/boards/nordicnrf51.json @@ -5,13 +5,15 @@ "cpu": "cortex-m0", "mcu": "nrf51822" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Nordic nRF51822-mKIT", "platform": "nordicnrf51", "upload": { "maximum_ram_size": 16384, "maximum_size": 131072 - } + }, + "url": "http://developer.mbed.org/platforms/Nordic-nRF51822/", + "vendor": "Nordic" }, "hrm1017": { "build": { @@ -19,13 +21,15 @@ "cpu": "cortex-m0", "mcu": "nrf51822" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Switch Science mbed HRM1017", "platform": "nordicnrf51", "upload": { "maximum_ram_size": 16384, "maximum_size": 262144 - } + }, + "url": "https://developer.mbed.org/platforms/mbed-HRM1017/", + "vendor": "Switch Science" }, "redBearLab": { "build": { @@ -33,13 +37,15 @@ "cpu": "cortex-m0", "mcu": "nrf51822" }, - "framework": "mbed", + "frameworks": "mbed", "name": "RedBearLab nRF51822", "platform": "nordicnrf51", "upload": { "maximum_ram_size": 16384, "maximum_size": 262144 - } + }, + "url": "https://developer.mbed.org/platforms/RedBearLab-nRF51822/", + "vendor": "RedBearLab" }, "nrf51_dk": { "build": { @@ -47,13 +53,15 @@ "cpu": "cortex-m0", "mcu": "nrf51822" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Nordic nRF51-DK", "platform": "nordicnrf51", "upload": { - "maximum_ram_size": 32384, + "maximum_ram_size": 32768, "maximum_size": 262144 - } + }, + "url": "https://developer.mbed.org/platforms/Nordic-nRF51-DK/", + "vendor": "Nordic" }, "redBearLabBLENano": { "build": { @@ -61,13 +69,15 @@ "cpu": "cortex-m0", "mcu": "nrf51822" }, - "framework": "mbed", + "frameworks": "mbed", "name": "RedBearLab BLE Nano", "platform": "nordicnrf51", "upload": { "maximum_ram_size": 16384, "maximum_size": 262144 - } + }, + "url": "https://developer.mbed.org/platforms/RedBearLab-BLE-Nano/", + "vendor": "RedBearLab" }, "nrf51_dongle": { "build": { @@ -75,13 +85,15 @@ "cpu": "cortex-m0", "mcu": "nrf51822" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Nordic nRF51-Dongle", "platform": "nordicnrf51", "upload": { - "maximum_ram_size": 32384, + "maximum_ram_size": 32768, "maximum_size": 262144 - } + }, + "url": "https://developer.mbed.org/platforms/Nordic-nRF51-Dongle/", + "vendor": "Nordic" } , "wallBotBLE": { @@ -90,13 +102,15 @@ "cpu": "cortex-m0", "mcu": "nrf51822" }, - "framework": "mbed", + "frameworks": "mbed", "name": "JKSoft Wallbot BLE", "platform": "nordicnrf51", "upload": { "maximum_ram_size": 16384, "maximum_size": 131072 - } + }, + "url": "https://developer.mbed.org/platforms/JKSoft-Wallbot-BLE/", + "vendor": "JKSoft" } } \ No newline at end of file diff --git a/platformio/boards/nxplpc.json b/platformio/boards/nxplpc.json index de012c48..57cfdfc8 100644 --- a/platformio/boards/nxplpc.json +++ b/platformio/boards/nxplpc.json @@ -5,13 +5,15 @@ "cpu": "cortex-m3", "mcu": "lpc1768" }, - "framework": "mbed", + "frameworks": "mbed", "name": "mbed LPC1768", "platform": "nxplpc", "upload": { "maximum_ram_size": 32768, "maximum_size": 524288 - } + }, + "url": "http://developer.mbed.org/platforms/mbed-LPC1768/", + "vendor": "NXP" }, "lpc11u24": { "build": { @@ -19,13 +21,15 @@ "cpu": "cortex-m0", "mcu": "lpc11u24" }, - "framework": "mbed", + "frameworks": "mbed", "name": "mbed LPC11U24", "platform": "nxplpc", "upload": { "maximum_ram_size": 8192, "maximum_size": 32768 - } + }, + "url": "https://developer.mbed.org/platforms/mbed-LPC11U24/", + "vendor": "NXP" }, "lpc4088": { "build": { @@ -33,13 +37,15 @@ "cpu": "cortex-m4", "mcu": "lpc4088" }, - "framework": "mbed", + "frameworks": "mbed", "name": "EA LPC4088 QuickStart Board", "platform": "nxplpc", "upload": { "maximum_ram_size": 98304, "maximum_size": 524288 - } + }, + "url": "https://developer.mbed.org/platforms/EA-LPC4088/", + "vendor": "Embedded Artists" }, "dipcortexm0": { "build": { @@ -47,13 +53,15 @@ "cpu": "cortex-m0", "mcu": "lpc11u24" }, - "framework": "mbed", + "frameworks": "mbed", "name": "DipCortex M0", "platform": "nxplpc", "upload": { "maximum_ram_size": 8192, "maximum_size": 32768 - } + }, + "url": "https://developer.mbed.org/platforms/DipCortex-M0/", + "vendor": "Solder Splash Labs" }, "blueboard_lpc11u24": { "build": { @@ -61,13 +69,15 @@ "cpu": "cortex-m0", "mcu": "lpc11u24" }, - "framework": "mbed", + "frameworks": "mbed", "name": "BlueBoard-LPC11U24", "platform": "nxplpc", "upload": { "maximum_ram_size": 8192, "maximum_size": 32768 - } + }, + "url": "https://developer.mbed.org/platforms/BlueBoard-LPC11U24/", + "vendor": "NGX Technologies" }, "seeeduinoArchPro": { "build": { @@ -75,13 +85,15 @@ "cpu": "cortex-m3", "mcu": "lpc1768" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Seeeduino-Arch-Pro", "platform": "nxplpc", "upload": { "maximum_ram_size": 32768, "maximum_size": 524288 - } + }, + "url": "https://developer.mbed.org/platforms/Seeeduino-Arch-Pro/", + "vendor": "SeeedStudio" }, "ubloxc027": { "build": { @@ -89,13 +101,15 @@ "cpu": "cortex-m3", "mcu": "lpc1768" }, - "framework": "mbed", + "frameworks": "mbed", "name": "u-blox C027", "platform": "nxplpc", "upload": { "maximum_ram_size": 32768, "maximum_size": 524288 - } + }, + "url": "https://developer.mbed.org/platforms/u-blox-C027/", + "vendor": "u-blox" }, "lpc1114fn28": { "build": { @@ -103,13 +117,15 @@ "cpu": "cortex-m0", "mcu": "lpc1114fn28" }, - "framework": "mbed", + "frameworks": "mbed", "name": "mbed LPC1114FN28", "platform": "nxplpc", "upload": { "maximum_ram_size": 4096, "maximum_size": 32768 - } + }, + "url": "https://developer.mbed.org/platforms/LPC1114FN28/", + "vendor": "Switch Science" }, "lpc11u35": { "build": { @@ -117,13 +133,15 @@ "cpu": "cortex-m0", "mcu": "lpc11u35" }, - "framework": "mbed", + "frameworks": "mbed", "name": "EA LPC11U35 QuickStart Board", "platform": "nxplpc", "upload": { "maximum_ram_size": 10240, "maximum_size": 65536 - } + }, + "url": "https://developer.mbed.org/platforms/EA-LPC11U35/", + "vendor": "Embedded Artists" }, "lpc11u35_501": { "build": { @@ -131,13 +149,15 @@ "cpu": "cortex-m0", "mcu": "lpc11u35" }, - "framework": "mbed", + "frameworks": "mbed", "name": "TG-LPC11U35-501", "platform": "nxplpc", "upload": { "maximum_ram_size": 10240, "maximum_size": 65536 - } + }, + "url": "https://developer.mbed.org/platforms/TG-LPC11U35-501/", + "vendor": "CQ Publishing" }, "lpc1549": { "build": { @@ -145,13 +165,15 @@ "cpu": "cortex-m3", "mcu": "lpc1549" }, - "framework": "mbed", + "frameworks": "mbed", "name": "LPCXpresso1549", "platform": "nxplpc", "upload": { "maximum_ram_size": 36864, "maximum_size": 262144 - } + }, + "url": "https://developer.mbed.org/platforms/LPCXpresso1549/", + "vendor": "NXP" }, "mbuino": { "build": { @@ -159,13 +181,15 @@ "cpu": "cortex-m0", "mcu": "lpc11u24" }, - "framework": "mbed", + "frameworks": "mbed", "name": "Outrageous Circuits mBuino", "platform": "nxplpc", "upload": { "maximum_ram_size": 8192, "maximum_size": 32768 - } + }, + "url": "https://developer.mbed.org/platforms/Outrageous-Circuits-mBuino/", + "vendor": "Outrageous Circuits" }, "lpc4088_dm": { "build": { @@ -173,12 +197,14 @@ "cpu": "cortex-m4", "mcu": "lpc4088" }, - "framework": "mbed", + "frameworks": "mbed", "name": "EA LPC4088 Display Module", "platform": "nxplpc", "upload": { "maximum_ram_size": 98304, "maximum_size": 524288 - } + }, + "url": "https://developer.mbed.org/platforms/EA-LPC4088-Display-Module/", + "vendor": "Embedded Artists" } } \ No newline at end of file diff --git a/platformio/boards/ststm32.json b/platformio/boards/ststm32.json index 0f5f673d..7ab6a260 100644 --- a/platformio/boards/ststm32.json +++ b/platformio/boards/ststm32.json @@ -9,13 +9,15 @@ "mcu": "stm32f407vgt6", "variant": "stm32f4" }, - "framework": "cmsis", + "frameworks": "cmsis,spl,opencm3,mbed", "name": "STM32F4DISCOVERY", "platform": "ststm32", "upload": { "maximum_ram_size": 131072, "maximum_size": 1048576 - } + }, + "url": "http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF252419", + "vendor": "ST" }, "disco_l152rb": { "build": { @@ -27,13 +29,15 @@ "mcu": "stm32l152rbt6", "variant": "stm32l1" }, - "framework": "cmsis", + "frameworks": "cmsis,spl,opencm3", "name": "STM32LDISCOVERY", "platform": "ststm32", "upload": { "maximum_ram_size": 16384, "maximum_size": 131072 - } + }, + "url": "http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF258515", + "vendor": "ST" }, "disco_f303vc": { "build": { @@ -45,13 +49,15 @@ "mcu": "stm32f303vct6", "variant": "stm32f3" }, - "framework": "cmsis", + "frameworks": "cmsis,spl,opencm3,mbed", "name": "STM32F3DISCOVERY", "platform": "ststm32", "upload": { "maximum_ram_size": 49152, "maximum_size": 262144 - } + }, + "url": "http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF254044", + "vendor": "ST" }, "disco_f100rb": { "build": { @@ -59,13 +65,15 @@ "cpu": "cortex-m3", "mcu": "stm32f100rbt6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "STM32VLDISCOVERY", "platform": "ststm32", "upload": { "maximum_ram_size": 8192, "maximum_size": 131072 - } + }, + "url": "http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF250863", + "vendor": "ST" }, "disco_f051r8": { "build": { @@ -73,13 +81,15 @@ "cpu": "cortex-m0", "mcu": "stm32f051r8t6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "STM32F0DISCOVERY", "platform": "ststm32", "upload": { "maximum_ram_size": 8192, "maximum_size": 65536 - } + }, + "url": "http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF253215", + "vendor": "ST" }, "disco_f334c8": { "build": { @@ -87,13 +97,15 @@ "cpu": "cortex-m4", "mcu": "stm32f334c8t6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "32F3348DISCOVERY", "platform": "ststm32", "upload": { "maximum_ram_size": 16384, "maximum_size": 65536 - } + }, + "url": "http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF260318", + "vendor": "ST" }, "disco_f401vc": { "build": { @@ -101,13 +113,15 @@ "cpu": "cortex-m4", "mcu": "stm32f401vct6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "32F401CDISCOVERY", "platform": "ststm32", "upload": { "maximum_ram_size": 65536, "maximum_size": 262144 - } + }, + "url": "http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259098", + "vendor": "ST" }, "disco_f429zi": { "build": { @@ -115,13 +129,15 @@ "cpu": "cortex-m4", "mcu": "stm32f429zit6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "32F429IDISCOVERY", "platform": "ststm32", "upload": { "maximum_ram_size": 262144, "maximum_size": 2097152 - } + }, + "url": "http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/LN1848/PF259090", + "vendor": "ST" }, "nucleo_f030r8": { "build": { @@ -129,13 +145,15 @@ "cpu": "cortex-m0", "mcu": "stm32f030r8t6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo F030R8", "platform": "ststm32", "upload": { "maximum_ram_size": 8192, "maximum_size": 65536 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-F030R8/", + "vendor": "ST" }, "nucleo_f070rb": { "build": { @@ -143,13 +161,15 @@ "cpu": "cortex-m0", "mcu": "stm32f070rbt6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo F070RB", "platform": "ststm32", "upload": { "maximum_ram_size": 16384, "maximum_size": 131072 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-F070RB/", + "vendor": "ST" }, "nucleo_f072rb": { "build": { @@ -157,13 +177,15 @@ "cpu": "cortex-m0", "mcu": "stm32f072rbt6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo F072RB", "platform": "ststm32", "upload": { "maximum_ram_size": 16384, "maximum_size": 131072 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-F072RB/", + "vendor": "ST" }, "nucleo_f091rc": { "build": { @@ -171,13 +193,15 @@ "cpu": "cortex-m0", "mcu": "stm32f091rct6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo F091RC", "platform": "ststm32", "upload": { "maximum_ram_size": 32768, "maximum_size": 262144 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-F091RC/", + "vendor": "ST" }, "nucleo_f103rb": { "build": { @@ -185,13 +209,15 @@ "cpu": "cortex-m3", "mcu": "stm32f103rbt6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo F103RB", "platform": "ststm32", "upload": { "maximum_ram_size": 20480, "maximum_size": 131072 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-F103RB/", + "vendor": "ST" }, "nucleo_f302r8": { "build": { @@ -199,13 +225,15 @@ "cpu": "cortex-m4", "mcu": "stm32f302r8t6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo F302R8", "platform": "ststm32", "upload": { "maximum_ram_size": 16384, "maximum_size": 65536 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-F302R8/", + "vendor": "ST" }, "nucleo_f334r8": { "build": { @@ -213,13 +241,15 @@ "cpu": "cortex-m4", "mcu": "stm32f334r8t6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo F334R8", "platform": "ststm32", "upload": { "maximum_ram_size": 16384, "maximum_size": 65536 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-F334R8/", + "vendor": "ST" }, "nucleo_f401re": { "build": { @@ -227,13 +257,15 @@ "cpu": "cortex-m4", "mcu": "stm32f401ret6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo F401RE", "platform": "ststm32", "upload": { "maximum_ram_size": 98304, "maximum_size": 524288 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-F401RE/", + "vendor": "ST" }, "nucleo_f411re": { "build": { @@ -241,13 +273,15 @@ "cpu": "cortex-m4", "mcu": "stm32f411ret6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo F411RE", "platform": "ststm32", "upload": { "maximum_ram_size": 131072, "maximum_size": 524288 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-F411RE/", + "vendor": "ST" }, "nucleo_l053r8": { "build": { @@ -255,13 +289,15 @@ "cpu": "cortex-m0", "mcu": "stm32l053r8t6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo L053R8", "platform": "ststm32", "upload": { "maximum_ram_size": 8192, "maximum_size": 65536 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-L053R8/", + "vendor": "ST" }, "nucleo_l152re": { "build": { @@ -269,12 +305,14 @@ "cpu": "cortex-m3", "mcu": "stm32l152ret6" }, - "framework": "mbed", + "frameworks": "mbed", "name": "ST Nucleo L152RE", "platform": "ststm32", "upload": { "maximum_ram_size": 81920, "maximum_size": 524288 - } + }, + "url": "https://developer.mbed.org/platforms/ST-Nucleo-L152RE/", + "vendor": "ST" } } \ No newline at end of file From 898a9c56019c6eab340ec52d3ea5e1876e2bdf9c Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 18:08:52 +0200 Subject: [PATCH 14/58] Add "get_frameworks" function --- platformio/util.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/platformio/util.py b/platformio/util.py index 9c1007b8..2965e020 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -257,3 +257,40 @@ def get_boards(type_=None): if type_ not in boards: raise exception.UnknownBoard(type_) return boards[type_] + + +def get_frameworks(type_=None): + frameworks = {} + + try: + frameworks = get_frameworks._cache # pylint: disable=W0212 + except AttributeError: + frameworks_path = join( + get_source_dir(), "builder", "scripts", "frameworks") + + frameworks_list = [f[:-3] for f in os.listdir(frameworks_path) + if not f.startswith("__") and f.endswith(".py")] + for _type in frameworks_list: + script_path = join(frameworks_path, "%s.py" % _type) + with open(script_path) as f: + fcontent = f.read() + assert '"""' in fcontent + _doc_start = fcontent.index('"""') + 3 + fdoc = fcontent[ + _doc_start:fcontent.index('"""', _doc_start)].strip() + description = " ".join(fdoc.split("\n")[:-2]) + frameworks[_type] = { + "description": description, + "url": fdoc.split("\n")[-1].strip(), + "script": script_path + } + get_frameworks._cache = frameworks # pylint: disable=W0212 + + if type_ is None: + return frameworks + else: + if type_ not in frameworks: + raise exception.UnknownFramework(type_) + return frameworks[type_] + + return frameworks From 7b4680ef6ae7cd42ef8bcd89a96688d7c554beee Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 18:12:58 +0200 Subject: [PATCH 15/58] Add script for dynamically generating RST documents. Update platforms and frameworks documentation // Resolve 114 --- .../builder/scripts/frameworks/arduino.py | 7 +- .../builder/scripts/frameworks/cmsis.py | 10 +- .../builder/scripts/frameworks/energia.py | 8 +- platformio/builder/scripts/frameworks/mbed.py | 16 +- .../builder/scripts/frameworks/opencm3.py | 7 +- platformio/builder/scripts/frameworks/spl.py | 7 +- platformio/builder/scripts/nxplpc.py | 2 +- platformio/exception.py | 5 + platformio/platforms/atmelavr.py | 9 +- platformio/platforms/atmelsam.py | 7 +- platformio/platforms/base.py | 80 ++++++++ platformio/platforms/freescalekinetis.py | 7 +- platformio/platforms/nordicnrf51.py | 9 +- platformio/platforms/nxplpc.py | 9 +- platformio/platforms/ststm32.py | 9 +- platformio/platforms/teensy.py | 9 +- platformio/platforms/timsp430.py | 9 +- platformio/platforms/titiva.py | 8 +- scripts/docspregen.py | 194 ++++++++++++++++++ 19 files changed, 387 insertions(+), 25 deletions(-) create mode 100644 scripts/docspregen.py diff --git a/platformio/builder/scripts/frameworks/arduino.py b/platformio/builder/scripts/frameworks/arduino.py index f154d5c9..ba3871bc 100644 --- a/platformio/builder/scripts/frameworks/arduino.py +++ b/platformio/builder/scripts/frameworks/arduino.py @@ -2,7 +2,11 @@ # See LICENSE for details. """ - Build script for Arduino Framework (based on Wiring). +Arduino Framework allows writing cross-platform software to control +devices attached to a wide range of Arduino boards to create all +kinds of creative coding, interactive objects, spaces or physical experiences. + +http://arduino.cc/en/Reference/HomePage """ from os import listdir, walk @@ -146,7 +150,6 @@ if BOARD_BUILDOPTS.get("core", None) == "teensy": # Target: Build Core Library # - libs = [] if "variant" in BOARD_BUILDOPTS: diff --git a/platformio/builder/scripts/frameworks/cmsis.py b/platformio/builder/scripts/frameworks/cmsis.py index 66bc005c..1b9c0236 100644 --- a/platformio/builder/scripts/frameworks/cmsis.py +++ b/platformio/builder/scripts/frameworks/cmsis.py @@ -2,7 +2,15 @@ # See LICENSE for details. """ - Build script for CMSIS Framework. +The ARM Cortex Microcontroller Software Interface Standard (CMSIS) is a +vendor-independent hardware abstraction layer for the Cortex-M processor +series and specifies debugger interfaces. The CMSIS enables consistent and +simple software interfaces to the processor for interface peripherals, +real-time operating systems, and middleware. It simplifies software +re-use, reducing the learning curve for new microcontroller developers +and cutting the time-to-market for devices. + +http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php """ from os.path import join diff --git a/platformio/builder/scripts/frameworks/energia.py b/platformio/builder/scripts/frameworks/energia.py index 8e1e4901..d240aa6a 100644 --- a/platformio/builder/scripts/frameworks/energia.py +++ b/platformio/builder/scripts/frameworks/energia.py @@ -2,7 +2,13 @@ # See LICENSE for details. """ - Build script for Energia Framework (based on Wiring). +Energia framework enables pretty much anyone to start easily creating +microcontroller-based projects and applications. Its easy-to-use libraries +and functions provide developers of all experience levels to start +blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever +before. + +http://energia.nu/reference/ """ from os.path import join diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 03f54616..fcf263be 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -2,7 +2,15 @@ # See LICENSE for details. """ - Build script for Mbed Framework +The mbed framework The mbed SDK has been designed to provide enough +hardware abstraction to be intuitive and concise, yet powerful enough to +build complex projects. It is built on the low-level ARM CMSIS APIs, +allowing you to code down to the metal if needed. In addition to RTOS, +USB and Networking libraries, a cookbook of hundreds of reusable +peripheral and module libraries have been built on top of the SDK by +the mbed Developer Community. + +http://mbed.org/ """ import xml.etree.ElementTree as ElementTree @@ -123,17 +131,17 @@ for lib_path in eixdata.get("CPPPATH"): # -# Target: Build MBED Library +# Target: Build mbed Library # libs = [l for l in eixdata.get("STDLIBS", []) if l not in env.get("LIBS")] env.VariantDir( - join("$BUILD_DIR", "FrameworkMBED"), + join("$BUILD_DIR", "FrameworkMbed"), join("$PLATFORMFW_DIR", "core") ) libs.append(env.Library( - join("$BUILD_DIR", "FrameworkMBED"), + join("$BUILD_DIR", "FrameworkMbed"), get_source_files(eixdata.get("FILES", [])) )) diff --git a/platformio/builder/scripts/frameworks/opencm3.py b/platformio/builder/scripts/frameworks/opencm3.py index 330fcd07..d89fe44c 100644 --- a/platformio/builder/scripts/frameworks/opencm3.py +++ b/platformio/builder/scripts/frameworks/opencm3.py @@ -2,7 +2,12 @@ # See LICENSE for details. """ - Build script for OpenCM3 Framework. +The libopencm3 framework aims to create a free/libre/open-source +firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, +including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, +17xx parts, Atmel SAM3, Energy Micro EFM32 and others. + +http://www.libopencm3.org/wiki/Main_Page """ import re diff --git a/platformio/builder/scripts/frameworks/spl.py b/platformio/builder/scripts/frameworks/spl.py index b4644678..21394b82 100644 --- a/platformio/builder/scripts/frameworks/spl.py +++ b/platformio/builder/scripts/frameworks/spl.py @@ -2,7 +2,12 @@ # See LICENSE for details. """ - Build script for SPL Framework +The ST Standard Peripheral Library provides a set of functions for +handling the peripherals on the STM32 Cortex-M3 family. +The idea is to save the user (the new user, in particular) having to deal +directly with the registers. + +http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1743?sc=stm32embeddedsoftware """ from os.path import join diff --git a/platformio/builder/scripts/nxplpc.py b/platformio/builder/scripts/nxplpc.py index 4782c81e..39b9dfd9 100644 --- a/platformio/builder/scripts/nxplpc.py +++ b/platformio/builder/scripts/nxplpc.py @@ -16,7 +16,7 @@ def UploadToDisk(target, source, env): # pylint: disable=W0613,W0621 env.AutodetectUploadPort() copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), join(env.subst("$UPLOAD_PORT"), "firmware.bin")) - print ("Firmware has been successfully uploaded.\n" + + print ("Firmware has been successfully uploaded.\n" "Please restart your board.") env = DefaultEnvironment() diff --git a/platformio/exception.py b/platformio/exception.py index 5646befe..451e7761 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -44,6 +44,11 @@ class UnknownBoard(PlatformioException): MESSAGE = "Unknown board type '%s'" +class UnknownFramework(PlatformioException): + + MESSAGE = "Unknown framework '%s'" + + class UnknownPackage(PlatformioException): MESSAGE = "Detected unknown package '%s'" diff --git a/platformio/platforms/atmelavr.py b/platformio/platforms/atmelavr.py index f8b34bb9..6ca3e0f4 100644 --- a/platformio/platforms/atmelavr.py +++ b/platformio/platforms/atmelavr.py @@ -8,8 +8,13 @@ from platformio.util import get_boards class AtmelavrPlatform(BasePlatform): """ - An embedded platform for Atmel AVR microcontrollers - (with Arduino Framework) + 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 """ PACKAGES = { diff --git a/platformio/platforms/atmelsam.py b/platformio/platforms/atmelsam.py index f5913ce9..aacb03a1 100644 --- a/platformio/platforms/atmelsam.py +++ b/platformio/platforms/atmelsam.py @@ -7,8 +7,11 @@ from platformio.platforms.base import BasePlatform class AtmelsamPlatform(BasePlatform): """ - An embedded platform for Atmel SAM microcontrollers - (with Arduino Framework) + 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 """ PACKAGES = { diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index dcfef9d9..869f0e15 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -12,6 +12,86 @@ from platformio import exception, util from platformio.app import get_state_item, set_state_item from platformio.pkgmanager import PackageManager +PLATFORM_PACKAGES = { + + "framework-arduinoavr": [ + ("Arduino Wiring-based Framework (AVR Core, 1.6)", + "http://arduino.cc/en/Reference/HomePage") + ], + "framework-arduinosam": [ + ("Arduino Wiring-based Framework (SAM Core, 1.6)", + "http://arduino.cc/en/Reference/HomePage") + ], + "framework-arduinoteensy": [ + ("Arduino Wiring-based Framework", + "http://arduino.cc/en/Reference/HomePage") + ], + "framework-energiamsp430": [ + ("Energia Wiring-based Framework (MSP430 Core)", + "http://energia.nu/reference/") + ], + "framework-energiativa": [ + ("Energia Wiring-based Framework (LM4F Core)", + "http://energia.nu/reference/") + ], + "framework-cmsis": [ + ("Vendor-independent hardware abstraction layer for the Cortex-M " + "processor series", + "http://www.arm.com/products/processors/" + "cortex-m/cortex-microcontroller-software-interface-standard.php") + ], + "framework-spl": [ + ("Standard Peripheral Library for STM32 MCUs", + "http://www.st.com" + "/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257890") + ], + "framework-opencm3": [ + ("libOpenCM3 Framework", "http://www.libopencm3.org/") + ], + "framework-mbed": [ + ("mbed Framework", "http://mbed.org") + ], + "ldscripts": [ + ("Linker Scripts", + "https://sourceware.org/binutils/docs/ld/Scripts.html") + ], + "toolchain-atmelavr": [ + ("avr-gcc", "https://gcc.gnu.org/wiki/avr-gcc"), + ("GDB", "http://www.gnu.org/software/gdb/"), + ("AVaRICE", "http://avarice.sourceforge.net/"), + ("SimulAVR", "http://www.nongnu.org/simulavr/") + ], + "toolchain-gccarmnoneeabi": [ + ("gcc-arm-embedded", "https://launchpad.net/gcc-arm-embedded"), + ("GDB", "http://www.gnu.org/software/gdb/") + ], + "toolchain-timsp430": [ + ("msp-gcc", "http://sourceforge.net/projects/mspgcc/"), + ("GDB", "http://www.gnu.org/software/gdb/") + ], + "tool-avrdude": [ + ("AVRDUDE", "http://www.nongnu.org/avrdude/") + ], + "tool-micronucleus": [ + ("Micronucleus", "https://github.com/micronucleus/micronucleus") + ], + "tool-bossac": [ + ("BOSSA CLI", "https://sourceforge.net/projects/b-o-s-s-a/") + ], + "tool-stlink": [ + ("ST-Link", "https://github.com/texane/stlink") + ], + "tool-teensy": [ + ("Teensy Loader", "https://www.pjrc.com/teensy/loader.html") + ], + "tool-lm4flash": [ + ("Flash Programmer", "http://www.ti.com/tool/lmflashprogrammer") + ], + "tool-mspdebug": [ + ("MSPDebug", "http://mspdebug.sourceforge.net/") + ] +} + class PlatformFactory(object): diff --git a/platformio/platforms/freescalekinetis.py b/platformio/platforms/freescalekinetis.py index 09243ec8..61106fea 100644 --- a/platformio/platforms/freescalekinetis.py +++ b/platformio/platforms/freescalekinetis.py @@ -7,7 +7,12 @@ from platformio.platforms.base import BasePlatform class FreescalekinetisPlatform(BasePlatform): """ - An embedded platform for Freescale Kinetis series ARM microcontrollers + 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 """ PACKAGES = { diff --git a/platformio/platforms/nordicnrf51.py b/platformio/platforms/nordicnrf51.py index 17126aac..975b4ce4 100644 --- a/platformio/platforms/nordicnrf51.py +++ b/platformio/platforms/nordicnrf51.py @@ -7,7 +7,14 @@ from platformio.platforms.base import BasePlatform class Nordicnrf51Platform(BasePlatform): """ - An embedded platform for Nordic nRF51 series ARM microcontrollers + 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 """ PACKAGES = { diff --git a/platformio/platforms/nxplpc.py b/platformio/platforms/nxplpc.py index 9c9e3152..4da1334f 100644 --- a/platformio/platforms/nxplpc.py +++ b/platformio/platforms/nxplpc.py @@ -7,7 +7,14 @@ from platformio.platforms.base import BasePlatform class NxplpcPlatform(BasePlatform): """ - An embedded platform for NXP LPC series ARM microcontrollers + 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/ """ PACKAGES = { diff --git a/platformio/platforms/ststm32.py b/platformio/platforms/ststm32.py index bf1e99bf..a33947f1 100644 --- a/platformio/platforms/ststm32.py +++ b/platformio/platforms/ststm32.py @@ -7,7 +7,14 @@ from platformio.platforms.base import BasePlatform class Ststm32Platform(BasePlatform): """ - An embedded platform for ST STM32 ARM microcontrollers + 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 """ PACKAGES = { diff --git a/platformio/platforms/teensy.py b/platformio/platforms/teensy.py index 8e0f2179..648c1c3f 100644 --- a/platformio/platforms/teensy.py +++ b/platformio/platforms/teensy.py @@ -8,8 +8,13 @@ from platformio.util import get_boards class TeensyPlatform(BasePlatform): """ - An embedded platform for Teensy boards - (with Arduino Framework) + 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 """ PACKAGES = { diff --git a/platformio/platforms/timsp430.py b/platformio/platforms/timsp430.py index ae17a121..a15b5fd1 100644 --- a/platformio/platforms/timsp430.py +++ b/platformio/platforms/timsp430.py @@ -5,9 +5,14 @@ from platformio.platforms.base import BasePlatform class Timsp430Platform(BasePlatform): + """ - An embedded platform for TI MSP430 microcontrollers - (with Energia Framework) + 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 """ PACKAGES = { diff --git a/platformio/platforms/titiva.py b/platformio/platforms/titiva.py index 657cffa9..ed14d2da 100644 --- a/platformio/platforms/titiva.py +++ b/platformio/platforms/titiva.py @@ -7,8 +7,12 @@ from platformio.platforms.base import BasePlatform class TitivaPlatform(BasePlatform): """ - An embedded platform for TI TIVA C ARM microcontrollers - (with Energia and OpenCM3 Frameworks) + 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 """ PACKAGES = { diff --git a/scripts/docspregen.py b/scripts/docspregen.py new file mode 100644 index 00000000..0b6b5a50 --- /dev/null +++ b/scripts/docspregen.py @@ -0,0 +1,194 @@ +# Copyright (C) Ivan Kravets +# See LICENSE for details. + +from os.path import dirname, join, realpath +from sys import path +from sys import exit as sys_exit +from math import ceil +path.append("..") +from platformio import util +from platformio.platforms.base import PLATFORM_PACKAGES, PlatformFactory + + +def generate_boards(boards): + + def _round_memory_size(size): + size = ceil(size) + for b in (64, 32, 16, 8, 4, 2, 1): + if b < size: + return int(ceil(size / b) * b) + assert NotImplemented() + + lines = [] + + lines.append(""" +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM""") + + for board in sorted(boards): + for type_, data in board.iteritems(): + assert type_ in util.get_boards() + board_ram = float(data['upload']['maximum_ram_size']) / 1024 + lines.append( + """ + * - ``{type}`` + - `{name} <{url}>`_ + - {mcu} + - {f_cpu:d} MHz + - {rom} Kb + - {ram} Kb + """.format( + type=type_, + name=data['name'], + url=data['url'], + mcu=data['build']['mcu'].upper(), + f_cpu=int((data['build']['f_cpu'][:-1])) / 1000000, + ram=int(board_ram) if board_ram % 1 == 0 else board_ram, + rom=_round_memory_size( + data['upload']['maximum_size'] / 1024) + ) + ) + + return "\n".join(lines) + + +def generate_packages(packages): + lines = [] + lines.append(""".. list-table:: + :header-rows: 1 + + * - Name + - Contents""") + for type_, data in packages.iteritems(): + assert type_ in PLATFORM_PACKAGES + contitems = [ + "`%s <%s>`_" % (name, url) + for name, url in PLATFORM_PACKAGES[type_] + ] + lines.append(""" + * - ``{type_}`` + - {contents}""".format( + type_=type_, + contents=", ".join(contitems))) + + lines.append(""" +.. warning:: + **Linux Users:** Don't forget to install "udev" rules file + `99-platformio-udev.rules `_ (an instruction is located in the file). + +""") + return "\n".join(lines) + + +def generate_platform(name): + print "Processing platform: %s" % name + lines = [] + + lines.append(".. _platform_%s:" % name) + lines.append("") + + _title = "Platform ``%s``" % name + lines.append(_title) + lines.append("=" * len(_title)) + + p = PlatformFactory.newPlatform(name) + lines.extend([l.strip() for l in p.__doc__.split("\n")]) + + lines.append(""".. contents::""") + lines.append(""" +Packages +-------- +""") + lines.append(generate_packages(p.get_packages())) + lines.append(""" +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by + horizontal. +""") + + vendors = {} + for board, data in util.get_boards().items(): + platform = data['platform'] + vendor = data['vendor'] + if name in platform: + if vendor in vendors: + vendors[vendor].append({board: data}) + else: + vendors[vendor] = [{board: data}] + for vendor, boards in sorted(vendors.iteritems()): + lines.append(str(vendor)) + lines.append("~" * len(vendor)) + lines.append(generate_boards(boards)) + return "\n".join(lines) + + +def update_platform_docs(): + for name in PlatformFactory.get_platforms().keys(): + rst_path = join( + dirname(realpath(__file__)), "..", "docs", "platforms", "%s.rst" % name) + with open(rst_path, "w") as f: + f.write(generate_platform(name)) + + +def generate_framework(name, data): + print "Processing framework: %s" % name + lines = [] + + lines.append(".. _framework_%s:" % name) + lines.append("") + + _title = "Framework ``%s``" % name + lines.append(_title) + lines.append("=" * len(_title)) + lines.append(data['description']) + lines.append("""\n.. contents::""") + lines.append(""" +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by horizontal. +""") + + vendors = {} + for board, data in util.get_boards().items(): + frameworks = data['frameworks'] + vendor = data['vendor'] + if name in frameworks: + if vendor in vendors: + vendors[vendor].append({board: data}) + else: + vendors[vendor] = [{board: data}] + for vendor, boards in sorted(vendors.iteritems()): + lines.append(str(vendor)) + lines.append("~" * len(vendor)) + lines.append(generate_boards(boards)) + return "\n".join(lines) + + +def update_framework_docs(): + for name, data in util.get_frameworks().items(): + rst_path = join(util.get_source_dir(), "..", "docs", "frameworks", + "%s.rst" % name) + with open(rst_path, "w") as f: + f.write(generate_framework(name, data)) + + +def main(): + update_platform_docs() + update_framework_docs() + +if __name__ == "__main__": + sys_exit(main()) From fe797a326531abf6b6b0dc20377194cafb0d8a6d Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 18:13:53 +0200 Subject: [PATCH 16/58] Add "Frameworks" documentation // Resolve #115 --- docs/frameworks/arduino.rst | 607 ++++++++++++++++++++++++++++++++++++ docs/frameworks/cmsis.rst | 51 +++ docs/frameworks/energia.rst | 107 +++++++ docs/frameworks/index.rst | 14 + docs/frameworks/mbed.rst | 535 +++++++++++++++++++++++++++++++ docs/frameworks/opencm3.rst | 87 ++++++ docs/frameworks/spl.rst | 51 +++ docs/index.rst | 3 +- 8 files changed, 1454 insertions(+), 1 deletion(-) create mode 100644 docs/frameworks/arduino.rst create mode 100644 docs/frameworks/cmsis.rst create mode 100644 docs/frameworks/energia.rst create mode 100644 docs/frameworks/index.rst create mode 100644 docs/frameworks/mbed.rst create mode 100644 docs/frameworks/opencm3.rst create mode 100644 docs/frameworks/spl.rst diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst new file mode 100644 index 00000000..a45abf34 --- /dev/null +++ b/docs/frameworks/arduino.rst @@ -0,0 +1,607 @@ +.. _framework_arduino: + +Framework ``arduino`` +===================== +Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. + +.. contents:: + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by horizontal. + +Adafruit +~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``flora8`` + - `Adafruit Flora `_ + - ATMEGA32U4 + - 8 MHz + - 32 Kb + - 2.5 Kb + + + * - ``protrinket3`` + - `Pro Trinket 3V/12MHz (USB) `_ + - ATMEGA328P + - 12 MHz + - 32 Kb + - 2 Kb + + + * - ``protrinket3ftdi`` + - `Pro Trinket 3V/12MHz (FTDI) `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``protrinket5`` + - `Pro Trinket 5V/16MHz (USB) `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``protrinket5ftdi`` + - `Pro Trinket 5V/16MHz (USB) `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``trinket3`` + - `Adafruit Trinket 3V/8MHz `_ + - ATTINY85 + - 8 MHz + - 8 Kb + - 0.5 Kb + + + * - ``trinket5`` + - `Adafruit Trinket 5V/16MHz `_ + - ATTINY85 + - 16 MHz + - 8 Kb + - 0.5 Kb + +Arduino +~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``LilyPadUSB`` + - `LilyPad Arduino USB `_ + - ATMEGA32U4 + - 8 MHz + - 32 Kb + - 2.5 Kb + + + * - ``atmegangatmega168`` + - `Arduino NG or older ATmega168 `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``atmegangatmega8`` + - `Arduino NG or older ATmega8 `_ + - ATMEGA8 + - 16 MHz + - 8 Kb + - 1 Kb + + + * - ``btatmega168`` + - `Arduino BT ATmega168 `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``btatmega328`` + - `Arduino BT ATmega328 `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``diecimilaatmega168`` + - `Arduino Duemilanove or Diecimila ATmega168 `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``diecimilaatmega328`` + - `Arduino Duemilanove or Diecimila ATmega328 `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``due`` + - `Arduino Due (Programming Port) `_ + - AT91SAM3X8E + - 84 MHz + - 512 Kb + - 32 Kb + + + * - ``dueUSB`` + - `Arduino Due (USB Native Port) `_ + - AT91SAM3X8E + - 84 MHz + - 512 Kb + - 32 Kb + + + * - ``esplora`` + - `Arduino Esplora `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``ethernet`` + - `Arduino Ethernet `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``fio`` + - `Arduino Fio `_ + - ATMEGA328P + - 8 MHz + - 32 Kb + - 2 Kb + + + * - ``leonardo`` + - `Arduino Leonardo `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``lilypadatmega168`` + - `LilyPad Arduino ATmega168 `_ + - ATMEGA168 + - 8 MHz + - 16 Kb + - 1 Kb + + + * - ``lilypadatmega328`` + - `LilyPad Arduino ATmega328 `_ + - ATMEGA328P + - 8 MHz + - 32 Kb + - 2 Kb + + + * - ``megaADK`` + - `Arduino Mega ADK `_ + - ATMEGA2560 + - 16 MHz + - 256 Kb + - 8 Kb + + + * - ``megaatmega1280`` + - `Arduino Mega or Mega 2560 ATmega1280 `_ + - ATMEGA1280 + - 16 MHz + - 128 Kb + - 8 Kb + + + * - ``megaatmega2560`` + - `Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) `_ + - ATMEGA2560 + - 16 MHz + - 256 Kb + - 8 Kb + + + * - ``micro`` + - `Arduino Micro `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``miniatmega168`` + - `Arduino Mini ATmega168 `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``miniatmega328`` + - `Arduino Mini ATmega328 `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``nanoatmega168`` + - `Arduino Nano ATmega168 `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``nanoatmega328`` + - `Arduino Nano ATmega328 `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``pro16MHzatmega168`` + - `Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz) `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``pro16MHzatmega328`` + - `Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz) `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``pro8MHzatmega168`` + - `Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz) `_ + - ATMEGA168 + - 8 MHz + - 16 Kb + - 1 Kb + + + * - ``pro8MHzatmega328`` + - `Arduino Pro or Pro Mini ATmega328 (3.3V, 8 MHz) `_ + - ATMEGA328P + - 8 MHz + - 32 Kb + - 2 Kb + + + * - ``robotControl`` + - `Arduino Robot Control `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``robotMotor`` + - `Arduino Robot Motor `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``uno`` + - `Arduino Uno `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``yun`` + - `Arduino Yun `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + +BitWizard +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``raspduino`` + - `Raspduino `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + +Digistump +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``digispark-pro`` + - `Digispark Pro (Default 16 MHz) `_ + - ATTINY167 + - 16 MHz + - 16 Kb + - 0.5 Kb + + + * - ``digispark-pro32`` + - `Digispark Pro (16 MHz) (32 byte buffer) `_ + - ATTINY167 + - 16 MHz + - 16 Kb + - 0.5 Kb + + + * - ``digispark-pro64`` + - `Digispark Pro (16 MHz) (64 byte buffer) `_ + - ATTINY167 + - 16 MHz + - 16 Kb + - 0.5 Kb + + + * - ``digispark-tiny`` + - `Digispark (Default - 16 MHz) `_ + - ATTINY85 + - 16 MHz + - 8 Kb + - 0.5 Kb + + + * - ``digix`` + - `Digistump DigiX `_ + - AT91SAM3X8E + - 84 MHz + - 512 Kb + - 28 Kb + +Engduino +~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``engduinov1`` + - `Engduino 1 `_ + - ATMEGA32U4 + - 8 MHz + - 32 Kb + - 2.5 Kb + + + * - ``engduinov2`` + - `Engduino 2 `_ + - ATMEGA32U4 + - 8 MHz + - 32 Kb + - 2.5 Kb + + + * - ``engduinov3`` + - `Engduino 3 `_ + - ATMEGA32U4 + - 8 MHz + - 32 Kb + - 2.5 Kb + +Microduino +~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``1284p16m`` + - `Microduino Core+ (ATmega1284P@16M,5V) `_ + - ATMEGA1284P + - 16 MHz + - 128 Kb + - 16 Kb + + + * - ``1284p8m`` + - `Microduino Core+ (ATmega1284P@8M,3.3V) `_ + - ATMEGA1284P + - 8 MHz + - 128 Kb + - 16 Kb + + + * - ``168pa16m`` + - `Microduino Core (Atmega168PA@16M,5V) `_ + - ATMEGA168P + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``168pa8m`` + - `Microduino Core (Atmega168PA@8M,3.3V) `_ + - ATMEGA168P + - 8 MHz + - 16 Kb + - 1 Kb + + + * - ``328p16m`` + - `Microduino Core (Atmega328P@16M,5V) `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``328p8m`` + - `Microduino Core (Atmega328P@8M,3.3V) `_ + - ATMEGA328P + - 8 MHz + - 32 Kb + - 2 Kb + + + * - ``32u416m`` + - `Microduino Core USB (ATmega32U4@16M,5V) `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``644pa16m`` + - `Microduino Core+ (Atmega644PA@16M,5V) `_ + - ATMEGA644P + - 16 MHz + - 64 Kb + - 4 Kb + + + * - ``644pa8m`` + - `Microduino Core+ (Atmega644PA@8M,3.3V) `_ + - ATMEGA644P + - 8 MHz + - 64 Kb + - 4 Kb + +SainSmart +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``sainSmartDue`` + - `SainSmart Due (Programming Port) `_ + - AT91SAM3X8E + - 84 MHz + - 512 Kb + - 32 Kb + + + * - ``sainSmartDueUSB`` + - `SainSmart Due (USB Native Port) `_ + - AT91SAM3X8E + - 84 MHz + - 512 Kb + - 32 Kb + +Teensy +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``teensy20`` + - `Teensy 2.0 `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``teensy20pp`` + - `Teensy++ 2.0 `_ + - AT90USB1286 + - 16 MHz + - 128 Kb + - 8 Kb + + + * - ``teensy30`` + - `Teensy 3.0 `_ + - MK20DX128 + - 48 MHz + - 128 Kb + - 16 Kb + + + * - ``teensy31`` + - `Teensy 3.1 `_ + - MK20DX256 + - 72 MHz + - 256 Kb + - 64 Kb + \ No newline at end of file diff --git a/docs/frameworks/cmsis.rst b/docs/frameworks/cmsis.rst new file mode 100644 index 00000000..55e5fd1f --- /dev/null +++ b/docs/frameworks/cmsis.rst @@ -0,0 +1,51 @@ +.. _framework_cmsis: + +Framework ``cmsis`` +=================== +The ARM Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Cortex-M processor series and specifies debugger interfaces. The CMSIS enables consistent and simple software interfaces to the processor for interface peripherals, real-time operating systems, and middleware. It simplifies software re-use, reducing the learning curve for new microcontroller developers and cutting the time-to-market for devices. + +.. contents:: + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by horizontal. + +ST +~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``disco_f303vc`` + - `STM32F3DISCOVERY `_ + - STM32F303VCT6 + - 72 MHz + - 256 Kb + - 48 Kb + + + * - ``disco_f407vg`` + - `STM32F4DISCOVERY `_ + - STM32F407VGT6 + - 168 MHz + - 1024 Kb + - 128 Kb + + + * - ``disco_l152rb`` + - `STM32LDISCOVERY `_ + - STM32L152RBT6 + - 32 MHz + - 128 Kb + - 16 Kb + \ No newline at end of file diff --git a/docs/frameworks/energia.rst b/docs/frameworks/energia.rst new file mode 100644 index 00000000..f25533bd --- /dev/null +++ b/docs/frameworks/energia.rst @@ -0,0 +1,107 @@ +.. _framework_energia: + +Framework ``energia`` +===================== +Energia framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before. + +.. contents:: + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by horizontal. + +TI +~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lplm4f120h5qr`` + - `LaunchPad (Stellaris) w/ lm4f120 (80MHz) `_ + - LPLM4F120H5QR + - 80 MHz + - 256 Kb + - 32 Kb + + + * - ``lpmsp430f5529`` + - `LaunchPad w/ msp430f5529 (16MHz) `_ + - MSP430F5529 + - 16 MHz + - 128 Kb + - 1 Kb + + + * - ``lpmsp430f5529_25`` + - `LaunchPad w/ msp430f5529 (25MHz) `_ + - MSP430F5529 + - 25 MHz + - 128 Kb + - 1 Kb + + + * - ``lpmsp430fr5739`` + - `FraunchPad w/ msp430fr5739 `_ + - MSP430FR5739 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``lpmsp430fr5969`` + - `LaunchPad w/ msp430fr5969 `_ + - MSP430FR5969 + - 8 MHz + - 64 Kb + - 1 Kb + + + * - ``lpmsp430g2231`` + - `LaunchPad w/ msp430g2231 (1 MHz) `_ + - MSP430G2231 + - 1 MHz + - 2 Kb + - 0.125 Kb + + + * - ``lpmsp430g2452`` + - `LaunchPad w/ msp430g2452 (16MHz) `_ + - MSP430G2452 + - 16 MHz + - 8 Kb + - 0.25 Kb + + + * - ``lpmsp430g2553`` + - `LaunchPad w/ msp430g2553 (16MHz) `_ + - MSP430G2553 + - 16 MHz + - 16 Kb + - 0.5 Kb + + + * - ``lptm4c1230c3pm`` + - `LaunchPad (Tiva C) w/ tm4c123 (80MHz) `_ + - LPTM4C1230C3PM + - 80 MHz + - 256 Kb + - 32 Kb + + + * - ``lptm4c1294ncpdt`` + - `LaunchPad (Tiva C) w/ tm4c129 (120MHz) `_ + - LPTM4C1294NCPDT + - 120 MHz + - 1024 Kb + - 256 Kb + \ No newline at end of file diff --git a/docs/frameworks/index.rst b/docs/frameworks/index.rst new file mode 100644 index 00000000..43952bef --- /dev/null +++ b/docs/frameworks/index.rst @@ -0,0 +1,14 @@ +.. _frameworks: + +Frameworks +========== + +.. toctree:: + :maxdepth: 2 + + arduino + cmsis + energia + mbed + opencm3 + spl diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst new file mode 100644 index 00000000..d3d0287c --- /dev/null +++ b/docs/frameworks/mbed.rst @@ -0,0 +1,535 @@ +.. _framework_mbed: + +Framework ``mbed`` +================== +The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community. + +.. contents:: + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by horizontal. + +CQ Publishing +~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc11u35_501`` + - `TG-LPC11U35-501 `_ + - LPC11U35 + - 48 MHz + - 64 Kb + - 10 Kb + +Embedded Artists +~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc11u35`` + - `EA LPC11U35 QuickStart Board `_ + - LPC11U35 + - 48 MHz + - 64 Kb + - 10 Kb + + + * - ``lpc4088`` + - `EA LPC4088 QuickStart Board `_ + - LPC4088 + - 120 MHz + - 512 Kb + - 96 Kb + + + * - ``lpc4088_dm`` + - `EA LPC4088 Display Module `_ + - LPC4088 + - 120 MHz + - 512 Kb + - 96 Kb + +Freescale +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``frdm_k20d50m`` + - `Freescale Kinetis FRDM-K20D50M `_ + - MK20DX128VLH5 + - 48 MHz + - 128 Kb + - 16 Kb + + + * - ``frdm_k22f`` + - `Freescale Kinetis FRDM-K22F `_ + - MK22FN512VLH12 + - 120 MHz + - 512 Kb + - 128 Kb + + + * - ``frdm_k64f`` + - `Freescale Kinetis FRDM-K64F `_ + - MK64FN1M0VLL12 + - 120 MHz + - 1024 Kb + - 256 Kb + + + * - ``frdm_kl05z`` + - `Freescale Kinetis FRDM-KL05Z `_ + - MKL05Z32VFM4 + - 48 MHz + - 32 Kb + - 4 Kb + + + * - ``frdm_kl25z`` + - `Freescale Kinetis FRDM-KL25Z `_ + - MKL25Z128VLK4 + - 48 MHz + - 128 Kb + - 16 Kb + + + * - ``frdm_kl46z`` + - `Freescale Kinetis FRDM-KL46Z `_ + - MKL46Z256VLL4 + - 48 MHz + - 256 Kb + - 32 Kb + +JKSoft +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``wallBotBLE`` + - `JKSoft Wallbot BLE `_ + - NRF51822 + - 16 MHz + - 128 Kb + - 16 Kb + +NGX Technologies +~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``blueboard_lpc11u24`` + - `BlueBoard-LPC11U24 `_ + - LPC11U24 + - 48 MHz + - 32 Kb + - 8 Kb + +NXP +~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc11u24`` + - `mbed LPC11U24 `_ + - LPC11U24 + - 48 MHz + - 32 Kb + - 8 Kb + + + * - ``lpc1549`` + - `LPCXpresso1549 `_ + - LPC1549 + - 72 MHz + - 256 Kb + - 36 Kb + + + * - ``lpc1768`` + - `mbed LPC1768 `_ + - LPC1768 + - 96 MHz + - 512 Kb + - 32 Kb + +Nordic +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``nrf51_dk`` + - `Nordic nRF51-DK `_ + - NRF51822 + - 32 MHz + - 256 Kb + - 32 Kb + + + * - ``nrf51_dongle`` + - `Nordic nRF51-Dongle `_ + - NRF51822 + - 32 MHz + - 256 Kb + - 32 Kb + + + * - ``nrf51_mkit`` + - `Nordic nRF51822-mKIT `_ + - NRF51822 + - 16 MHz + - 128 Kb + - 16 Kb + +Outrageous Circuits +~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``mbuino`` + - `Outrageous Circuits mBuino `_ + - LPC11U24 + - 48 MHz + - 32 Kb + - 8 Kb + +RedBearLab +~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``redBearLab`` + - `RedBearLab nRF51822 `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + + + * - ``redBearLabBLENano`` + - `RedBearLab BLE Nano `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + +ST +~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``disco_f051r8`` + - `STM32F0DISCOVERY `_ + - STM32F051R8T6 + - 48 MHz + - 64 Kb + - 8 Kb + + + * - ``disco_f100rb`` + - `STM32VLDISCOVERY `_ + - STM32F100RBT6 + - 24 MHz + - 128 Kb + - 8 Kb + + + * - ``disco_f303vc`` + - `STM32F3DISCOVERY `_ + - STM32F303VCT6 + - 72 MHz + - 256 Kb + - 48 Kb + + + * - ``disco_f334c8`` + - `32F3348DISCOVERY `_ + - STM32F334C8T6 + - 72 MHz + - 64 Kb + - 16 Kb + + + * - ``disco_f401vc`` + - `32F401CDISCOVERY `_ + - STM32F401VCT6 + - 84 MHz + - 256 Kb + - 64 Kb + + + * - ``disco_f407vg`` + - `STM32F4DISCOVERY `_ + - STM32F407VGT6 + - 168 MHz + - 1024 Kb + - 128 Kb + + + * - ``disco_f429zi`` + - `32F429IDISCOVERY `_ + - STM32F429ZIT6 + - 180 MHz + - 2048 Kb + - 256 Kb + + + * - ``nucleo_f030r8`` + - `ST Nucleo F030R8 `_ + - STM32F030R8T6 + - 48 MHz + - 64 Kb + - 8 Kb + + + * - ``nucleo_f070rb`` + - `ST Nucleo F070RB `_ + - STM32F070RBT6 + - 48 MHz + - 128 Kb + - 16 Kb + + + * - ``nucleo_f072rb`` + - `ST Nucleo F072RB `_ + - STM32F072RBT6 + - 48 MHz + - 128 Kb + - 16 Kb + + + * - ``nucleo_f091rc`` + - `ST Nucleo F091RC `_ + - STM32F091RCT6 + - 48 MHz + - 256 Kb + - 32 Kb + + + * - ``nucleo_f103rb`` + - `ST Nucleo F103RB `_ + - STM32F103RBT6 + - 72 MHz + - 128 Kb + - 20 Kb + + + * - ``nucleo_f302r8`` + - `ST Nucleo F302R8 `_ + - STM32F302R8T6 + - 72 MHz + - 64 Kb + - 16 Kb + + + * - ``nucleo_f334r8`` + - `ST Nucleo F334R8 `_ + - STM32F334R8T6 + - 72 MHz + - 64 Kb + - 16 Kb + + + * - ``nucleo_f401re`` + - `ST Nucleo F401RE `_ + - STM32F401RET6 + - 84 MHz + - 512 Kb + - 96 Kb + + + * - ``nucleo_f411re`` + - `ST Nucleo F411RE `_ + - STM32F411RET6 + - 100 MHz + - 512 Kb + - 128 Kb + + + * - ``nucleo_l053r8`` + - `ST Nucleo L053R8 `_ + - STM32L053R8T6 + - 48 MHz + - 64 Kb + - 8 Kb + + + * - ``nucleo_l152re`` + - `ST Nucleo L152RE `_ + - STM32L152RET6 + - 32 MHz + - 512 Kb + - 80 Kb + +SeeedStudio +~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``seeeduinoArchPro`` + - `Seeeduino-Arch-Pro `_ + - LPC1768 + - 96 MHz + - 512 Kb + - 32 Kb + +Solder Splash Labs +~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``dipcortexm0`` + - `DipCortex M0 `_ + - LPC11U24 + - 50 MHz + - 32 Kb + - 8 Kb + +Switch Science +~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``hrm1017`` + - `Switch Science mbed HRM1017 `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + + + * - ``lpc1114fn28`` + - `mbed LPC1114FN28 `_ + - LPC1114FN28 + - 48 MHz + - 32 Kb + - 4 Kb + +u-blox +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``ubloxc027`` + - `u-blox C027 `_ + - LPC1768 + - 96 MHz + - 512 Kb + - 32 Kb + \ No newline at end of file diff --git a/docs/frameworks/opencm3.rst b/docs/frameworks/opencm3.rst new file mode 100644 index 00000000..5c722ca2 --- /dev/null +++ b/docs/frameworks/opencm3.rst @@ -0,0 +1,87 @@ +.. _framework_opencm3: + +Framework ``opencm3`` +===================== +The libopencm3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. + +.. contents:: + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by horizontal. + +ST +~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``disco_f303vc`` + - `STM32F3DISCOVERY `_ + - STM32F303VCT6 + - 72 MHz + - 256 Kb + - 48 Kb + + + * - ``disco_f407vg`` + - `STM32F4DISCOVERY `_ + - STM32F407VGT6 + - 168 MHz + - 1024 Kb + - 128 Kb + + + * - ``disco_l152rb`` + - `STM32LDISCOVERY `_ + - STM32L152RBT6 + - 32 MHz + - 128 Kb + - 16 Kb + +TI +~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lplm4f120h5qr`` + - `LaunchPad (Stellaris) w/ lm4f120 (80MHz) `_ + - LPLM4F120H5QR + - 80 MHz + - 256 Kb + - 32 Kb + + + * - ``lptm4c1230c3pm`` + - `LaunchPad (Tiva C) w/ tm4c123 (80MHz) `_ + - LPTM4C1230C3PM + - 80 MHz + - 256 Kb + - 32 Kb + + + * - ``lptm4c1294ncpdt`` + - `LaunchPad (Tiva C) w/ tm4c129 (120MHz) `_ + - LPTM4C1294NCPDT + - 120 MHz + - 1024 Kb + - 256 Kb + \ No newline at end of file diff --git a/docs/frameworks/spl.rst b/docs/frameworks/spl.rst new file mode 100644 index 00000000..ae08977d --- /dev/null +++ b/docs/frameworks/spl.rst @@ -0,0 +1,51 @@ +.. _framework_spl: + +Framework ``spl`` +================= +The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers. + +.. contents:: + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by horizontal. + +ST +~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``disco_f303vc`` + - `STM32F3DISCOVERY `_ + - STM32F303VCT6 + - 72 MHz + - 256 Kb + - 48 Kb + + + * - ``disco_f407vg`` + - `STM32F4DISCOVERY `_ + - STM32F407VGT6 + - 168 MHz + - 1024 Kb + - 128 Kb + + + * - ``disco_l152rb`` + - `STM32LDISCOVERY `_ + - STM32L152RBT6 + - 32 MHz + - 128 Kb + - 16 Kb + \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 3f7bd777..8f734c06 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -28,7 +28,7 @@ Embedded Development. *Easier Than Ever.* * Built-in :ref:`Serial Port Monitor ` * Configurable build :ref:`-flags/-options ` * Integration with :ref:`development environments (IDE) ` -* Pre-built tool chains, frameworks for the popular Hardware Platforms +* Pre-built tool chains, :ref:`frameworks` for the popular Hardware Platforms Smart Code Builder. *Fast and Reliable.* ---------------------------------------- @@ -59,6 +59,7 @@ Contents projectconf envvars platforms/index + frameworks/index librarymanager/index userguide/index ide From b511df0bd4ba8e0d73140631f9256638bcc8f334 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 18:19:36 +0200 Subject: [PATCH 17/58] Update "Platforms" documentation --- docs/platforms/atmelavr.rst | 840 ++++++++++++++-------------- docs/platforms/atmelsam.rst | 114 ++-- docs/platforms/freescalekinetis.rst | 117 ++-- docs/platforms/nordicnrf51.rst | 167 +++--- docs/platforms/nxplpc.rst | 297 +++++++--- docs/platforms/ststm32.rst | 272 ++++----- docs/platforms/teensy.rst | 92 ++- docs/platforms/timsp430.rst | 134 +++-- docs/platforms/titiva.rst | 98 ++-- 9 files changed, 1150 insertions(+), 981 deletions(-) diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index cba4eae4..5fc07043 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -3,11 +3,13 @@ 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 industry's 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 .. contents:: @@ -18,45 +20,25 @@ Packages :header-rows: 1 * - Name - - Alias - Contents - * - ``toolchain-atmelavr`` - - toolchain - - `avr-gcc `_, - `GDB `_, - `AVaRICE `_, - `SimulAVR `_ - * - ``tool-avrdude`` - - uploader - - `AVRDUDE `_ - * - ``tool-micronucleus`` - - uploader - - `Micronucleus `_ - * - ``framework-arduinoavr`` - - - - See below in :ref:`atmelavr_frameworks` + * - ``toolchain-atmelavr`` + - `avr-gcc `_, `GDB `_, `AVaRICE `_, `SimulAVR `_ + + * - ``tool-avrdude`` + - `AVRDUDE `_ + + * - ``framework-arduinoavr`` + - `Arduino Wiring-based Framework (AVR Core, 1.6) `_ + + * - ``tool-micronucleus`` + - `Micronucleus `_ .. warning:: **Linux Users:** Don't forget to install "udev" rules file `99-platformio-udev.rules `_ (an instruction is located in the file). -.. _atmelavr_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``arduino`` - - Arduino Wiring-based Framework (AVR Core, 1.6) - - `Documentation `_ - Boards ------ @@ -66,224 +48,6 @@ Boards * For more detailed ``board`` information please scroll tables below by horizontal. -Arduino -~~~~~~~ - -.. list-table:: - :header-rows: 1 - - * - Type ``board`` - - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` - - Flash - - RAM - * - ``atmegangatmega168`` - - `Arduino NG or older (ATmega168) - `_ - - ATmega168 ``atmega168`` - - 16 MHz ``16000000L`` - - 16 Kb - - 1 Kb - * - ``atmegangatmega8`` - - `Arduino Arduino NG or older (ATmega8) - `_ - - ATmega8 ``atmega8`` - - 16 MHz ``16000000L`` - - 8 Kb - - 1 Kb - * - ``btatmega168`` - - `Arduino BT (ATmega168) - `_ - - ATmega168 ``atmega168`` - - 16 MHz ``16000000L`` - - 16 Kb - - 1 Kb - * - ``btatmega328`` - - `Arduino BT (ATmega328) - `_ - - ATmega328 ``atmega328`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2 Kb - * - ``diecimilaatmega168`` - - `Arduino Diecimila or Duemilanove (ATmega168) - `_ - - ATmega168 ``atmega168`` - - 16 MHz ``16000000L`` - - 16 Kb - - 1 Kb - * - ``diecimilaatmega328`` - - `Arduino Diecimila or Duemilanove (ATmega328) - `_ - - ATmega328 ``atmega328`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2 Kb - * - ``esplora`` - - `Arduino Esplora `_ - - ATmega32u4 ``atmega32u4`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2.5 Kb - * - ``ethernet`` - - `Arduino Ethernet - `_ - - ATmega328P ``atmega328p`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2 Kb - * - ``fio`` - - `Arduino Fio - `_ - - ATmega328P ``atmega328p`` - - 8 MHz ``8000000L`` - - 32 Kb - - 2 Kb - * - ``leonardo`` - - `Arduino Leonardo `_ - - ATmega32u4 ``atmega32u4`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2.5 Kb - * - ``LilyPadUSB`` - - `Arduino LilyPad USB - `_ - - ATmega32u4 ``atmega32u4`` - - 8 MHz ``8000000L`` - - 32 Kb - - 2.5 Kb - * - ``lilypadatmega168`` - - `Arduino LilyPad (ATmega168) - `_ - - ATmega168 ``atmega168`` - - 8 MHz ``8000000L`` - - 16 Kb - - 1 Kb - * - ``lilypadatmega328`` - - `Arduino LilyPad (ATmega328) - `_ - - ATmega328P ``atmega328p`` - - 8 MHz ``8000000L`` - - 32 Kb - - 2 Kb - * - ``megaADK`` - - `Arduino Mega ADK - `_ - - ATmega2560 ``atmega2560`` - - 16 MHz ``16000000L`` - - 256 Kb - - 8 Kb - * - ``megaatmega1280`` - - `Arduino Mega (ATmega1280) - `_ - - ATmega1280 ``atmega1280`` - - 16 MHz ``16000000L`` - - 128 Kb - - 8 Kb - * - ``megaatmega2560`` - - `Arduino Mega (ATmega2560) - `_ - - ATmega2560 ``atmega2560`` - - 16 MHz ``16000000L`` - - 256 Kb - - 8 Kb - * - ``micro`` - - `Arduino Micro - `_ - - ATmega32u4 ``atmega32u4`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2.5 Kb - * - ``miniatmega168`` - - `Arduino Mini (ATmega168) - `_ - - ATmega168 ``atmega168`` - - 16 MHz ``16000000L`` - - 16 Kb - - 1 Kb - * - ``miniatmega328`` - - `Arduino Mini (ATmega328P) - `_ - - ATmega328P ``atmega328p`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2 Kb - * - ``nanoatmega168`` - - `Arduino Nano (ATmega168) - `_ - - ATmega168 ``atmega168`` - - 16 MHz ``16000000L`` - - 16 Kb - - 1 Kb - * - ``nanoatmega328`` - - `Arduino Nano (ATmega328P) - `_ - - ATmega328P ``atmega328p`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2 Kb - * - ``pro8MHzatmega168`` - - `Arduino Pro or Pro Mini (ATmega168, 3.3V) - `_ - - ATmega168 ``atmega168`` - - 8 MHz ``8000000L`` - - 16 Kb - - 1 Kb - * - ``pro16MHzatmega168`` - - `Arduino Pro or Pro Mini (ATmega168, 5V) - `_ - - ATmega168 ``atmega168`` - - 16 MHz ``16000000L`` - - 16 Kb - - 1 Kb - * - ``pro8MHzatmega328`` - - `Arduino Pro or Pro Mini (ATmega328P, 3.3V) - `_ - - ATmega328P ``atmega328p`` - - 8 MHz ``8000000L`` - - 32 Kb - - 2 Kb - * - ``pro16MHzatmega328`` - - `Arduino Pro or Pro Mini (ATmega328P, 5V) - `_ - - ATmega328P ``atmega328p`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2 Kb - * - ``robotControl`` - - `Arduino Robot Control - `_ - - ATmega32u4 ``atmega32u4`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2.5 Kb - * - ``robotMotor`` - - `Arduino Robot Motor - `_ - - ATmega32u4 ``atmega32u4`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2.5 Kb - * - ``uno`` - - `Arduino Uno - `_ - - ATmega328P ``atmega328p`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2 Kb - * - ``yun`` - - `Arduino Yun - `_ - - ATmega32u4 ``atmega32u4`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2.5 Kb - -More detailed information you can find here -`Arduino boards `_. - - Adafruit ~~~~~~~~ @@ -292,65 +56,311 @@ Adafruit * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM + * - ``flora8`` - - `Adafruit Flora - `_ - - ATmega32u4 ``atmega32u4`` - - 8 MHz ``8000000L`` + - `Adafruit Flora `_ + - ATMEGA32U4 + - 8 MHz - 32 Kb - 2.5 Kb - * - ``trinket3`` - - `Adafruit Trinket 8MHz 3.3V LOGIC - `_ - - ATtiny85 ``attiny85`` - - 8 MHz ``8000000L`` - - 8 Kb - - 0.5 Kb - * - ``trinket5`` - - `Adafruit Trinket 16MHz 5V LOGIC - `_ - - ATtiny85 ``ATtiny85`` - - 16 MHz ``16000000L`` - - 8 Kb - - 0.5 Kb + + * - ``protrinket3`` - - `Adafruit Pro Trinket 3V/12MHz (USB) - `_ - - ATmega328P ``atmega328p`` - - 12 MHz ``12000000L`` + - `Pro Trinket 3V/12MHz (USB) `_ + - ATMEGA328P + - 12 MHz - 32 Kb - 2 Kb + + * - ``protrinket3ftdi`` - - `Adafruit Pro Trinket 3V/12MHz (FTDI) - `_ - - ATmega328P ``atmega328p`` - - 12 MHz ``12000000L`` + - `Pro Trinket 3V/12MHz (FTDI) `_ + - ATMEGA328P + - 16 MHz - 32 Kb - 2 Kb + + * - ``protrinket5`` - - `Adafruit Pro Trinket 5V/16MHz (USB) - `_ - - ATmega328P ``atmega328p`` - - 16 MHz ``16000000L`` + - `Pro Trinket 5V/16MHz (USB) `_ + - ATMEGA328P + - 16 MHz - 32 Kb - 2 Kb + + * - ``protrinket5ftdi`` - - `Adafruit Pro Trinket 5V/16MHz (FTDI) - `_ - - ATmega328P ``atmega328p`` - - 16 MHz ``16000000L`` + - `Pro Trinket 5V/16MHz (USB) `_ + - ATMEGA328P + - 16 MHz - 32 Kb - 2 Kb + -More detailed information you can find here -`Adafruits boards `_. + * - ``trinket3`` + - `Adafruit Trinket 3V/8MHz `_ + - ATTINY85 + - 8 MHz + - 8 Kb + - 0.5 Kb + + * - ``trinket5`` + - `Adafruit Trinket 5V/16MHz `_ + - ATTINY85 + - 16 MHz + - 8 Kb + - 0.5 Kb + +Arduino +~~~~~~~ -Digispark +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``LilyPadUSB`` + - `LilyPad Arduino USB `_ + - ATMEGA32U4 + - 8 MHz + - 32 Kb + - 2.5 Kb + + + * - ``atmegangatmega168`` + - `Arduino NG or older ATmega168 `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``atmegangatmega8`` + - `Arduino NG or older ATmega8 `_ + - ATMEGA8 + - 16 MHz + - 8 Kb + - 1 Kb + + + * - ``btatmega168`` + - `Arduino BT ATmega168 `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``btatmega328`` + - `Arduino BT ATmega328 `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``diecimilaatmega168`` + - `Arduino Duemilanove or Diecimila ATmega168 `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``diecimilaatmega328`` + - `Arduino Duemilanove or Diecimila ATmega328 `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``esplora`` + - `Arduino Esplora `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``ethernet`` + - `Arduino Ethernet `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``fio`` + - `Arduino Fio `_ + - ATMEGA328P + - 8 MHz + - 32 Kb + - 2 Kb + + + * - ``leonardo`` + - `Arduino Leonardo `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``lilypadatmega168`` + - `LilyPad Arduino ATmega168 `_ + - ATMEGA168 + - 8 MHz + - 16 Kb + - 1 Kb + + + * - ``lilypadatmega328`` + - `LilyPad Arduino ATmega328 `_ + - ATMEGA328P + - 8 MHz + - 32 Kb + - 2 Kb + + + * - ``megaADK`` + - `Arduino Mega ADK `_ + - ATMEGA2560 + - 16 MHz + - 256 Kb + - 8 Kb + + + * - ``megaatmega1280`` + - `Arduino Mega or Mega 2560 ATmega1280 `_ + - ATMEGA1280 + - 16 MHz + - 128 Kb + - 8 Kb + + + * - ``megaatmega2560`` + - `Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) `_ + - ATMEGA2560 + - 16 MHz + - 256 Kb + - 8 Kb + + + * - ``micro`` + - `Arduino Micro `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``miniatmega168`` + - `Arduino Mini ATmega168 `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``miniatmega328`` + - `Arduino Mini ATmega328 `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``nanoatmega168`` + - `Arduino Nano ATmega168 `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``nanoatmega328`` + - `Arduino Nano ATmega328 `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``pro16MHzatmega168`` + - `Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz) `_ + - ATMEGA168 + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``pro16MHzatmega328`` + - `Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz) `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``pro8MHzatmega168`` + - `Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz) `_ + - ATMEGA168 + - 8 MHz + - 16 Kb + - 1 Kb + + + * - ``pro8MHzatmega328`` + - `Arduino Pro or Pro Mini ATmega328 (3.3V, 8 MHz) `_ + - ATMEGA328P + - 8 MHz + - 32 Kb + - 2 Kb + + + * - ``robotControl`` + - `Arduino Robot Control `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``robotMotor`` + - `Arduino Robot Motor `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + + + * - ``uno`` + - `Arduino Uno `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``yun`` + - `Arduino Yun `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + +BitWizard ~~~~~~~~~ .. list-table:: @@ -358,32 +368,62 @@ Digispark * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM - * - ``digispark-tiny`` - - `Digispark USB Development Board `_ - - ATtiny85 ``attiny85`` - - 16 MHz ``16000000L`` - - 8 Kb - - 0.5 Kb + + * - ``raspduino`` + - `Raspduino `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + +Digistump +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + * - ``digispark-pro`` - - `Digispark Pro (Default 16 Mhz) `_ - - ATtiny167 ``attiny167`` - - 16 MHz ``16000000L`` + - `Digispark Pro (Default 16 MHz) `_ + - ATTINY167 + - 16 MHz - 16 Kb - 0.5 Kb + + * - ``digispark-pro32`` - - `Digispark Pro (16 Mhz) (32 byte buffer) `_ - - ATtiny167 ``attiny167`` - - 16 Mhz ``16000000L`` - - 16 kb - - 0.5 Kb + - `Digispark Pro (16 MHz) (32 byte buffer) `_ + - ATTINY167 + - 16 MHz + - 16 Kb + - 0.5 Kb + -More detailed information you can find here -`Digistump Development Boards `_. + * - ``digispark-pro64`` + - `Digispark Pro (16 MHz) (64 byte buffer) `_ + - ATTINY167 + - 16 MHz + - 16 Kb + - 0.5 Kb + + * - ``digispark-tiny`` + - `Digispark (Default - 16 MHz) `_ + - ATTINY85 + - 16 MHz + - 8 Kb + - 0.5 Kb + Engduino ~~~~~~~~ @@ -392,33 +432,34 @@ Engduino * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM + * - ``engduinov1`` - `Engduino 1 `_ - - ATmega32u4 ``atmega32u4`` - - 8 MHz ``8000000L`` + - ATMEGA32U4 + - 8 MHz - 32 Kb - 2.5 Kb + + * - ``engduinov2`` - `Engduino 2 `_ - - ATmega32u4 ``atmega32u4`` - - 8 MHz ``8000000L`` + - ATMEGA32U4 + - 8 MHz - 32 Kb - 2.5 Kb + + * - ``engduinov3`` - `Engduino 3 `_ - - ATmega32u4 ``atmega32u4`` - - 8 MHz ``8000000L`` + - ATMEGA32U4 + - 8 MHz - 32 Kb - 2.5 Kb - -More detailed information you can find here -`Engduino Site `_. - - + Microduino ~~~~~~~~~~ @@ -427,98 +468,79 @@ Microduino * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM - * - ``168pa8m`` - - `Microduino Core (ATmega168P, 3.3V) - `_ - - ATmega168P ``atmega168p`` - - 8 MHz ``8000000L`` - - 16 Kb - - 1 Kb - * - ``168pa16m`` - - `Microduino Core (ATmega168P, 5V) - `_ - - ATmega168P ``atmega168p`` - - 16 MHz ``16000000L`` - - 16 Kb - - 1 Kb - * - ``328p8m`` - - `Microduino Core (ATmega328P, 3.3V) - `_ - - ATmega328P ``atmega328p`` - - 8 MHz ``8000000L`` - - 32 Kb - - 2 Kb - * - ``328p16m`` - - `Microduino Core (ATmega328P, 5V) - `_ - - ATmega328P ``atmega328p`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2 Kb - * - ``644pa8m`` - - `Microduino Core+ (ATmega644PA, 3.3V) - `_ - - ATmega644PA ``atmega644p`` - - 8 MHz ``8000000L`` - - 64 Kb - - 4 Kb - * - ``644pa16m`` - - `Microduino Core+ (ATmega644PA, 5V) - `_ - - ATmega644PA ``atmega644p`` - - 16 MHz ``16000000L`` - - 64 Kb - - 4 Kb - * - ``1284p8m`` - - `Microduino Core+ (Atmega1284P, 3.3V) - `_ - - Atmega1284P ``atmega1284p`` - - 8 MHz ``8000000L`` - - 128 Kb - - 16 Kb + * - ``1284p16m`` - - `Microduino Core+ (Atmega1284P, 5V) - `_ - - Atmega1284P ``atmega1284p`` - - 16 MHz ``16000000L`` + - `Microduino Core+ (ATmega1284P@16M,5V) `_ + - ATMEGA1284P + - 16 MHz - 128 Kb - 16 Kb + + + * - ``1284p8m`` + - `Microduino Core+ (ATmega1284P@8M,3.3V) `_ + - ATMEGA1284P + - 8 MHz + - 128 Kb + - 16 Kb + + + * - ``168pa16m`` + - `Microduino Core (Atmega168PA@16M,5V) `_ + - ATMEGA168P + - 16 MHz + - 16 Kb + - 1 Kb + + + * - ``168pa8m`` + - `Microduino Core (Atmega168PA@8M,3.3V) `_ + - ATMEGA168P + - 8 MHz + - 16 Kb + - 1 Kb + + + * - ``328p16m`` + - `Microduino Core (Atmega328P@16M,5V) `_ + - ATMEGA328P + - 16 MHz + - 32 Kb + - 2 Kb + + + * - ``328p8m`` + - `Microduino Core (Atmega328P@8M,3.3V) `_ + - ATMEGA328P + - 8 MHz + - 32 Kb + - 2 Kb + + * - ``32u416m`` - - `Microduino-Core USB - `_ - - ATmega32u4 ``atmega32u4`` - - 16 MHz ``16000000L`` + - `Microduino Core USB (ATmega32U4@16M,5V) `_ + - ATMEGA32U4 + - 16 MHz - 32 Kb - 2.5 Kb + + * - ``644pa16m`` + - `Microduino Core+ (Atmega644PA@16M,5V) `_ + - ATMEGA644P + - 16 MHz + - 64 Kb + - 4 Kb + -More detailed information you can find here -`Microduino boards `_. - - -Raspduino -~~~~~~~~~ - -.. list-table:: - :header-rows: 1 - - * - Type ``board`` - - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` - - Flash - - RAM - * - ``raspduino`` - - `Raspduino - `_ - - ATmega328P ``atmega328p`` - - 16 MHz ``16000000L`` - - 32 Kb - - 2 Kb - -More detailed information you can find here -`Wiki `_. + * - ``644pa8m`` + - `Microduino Core+ (Atmega644PA@8M,3.3V) `_ + - ATMEGA644P + - 8 MHz + - 64 Kb + - 4 Kb + \ No newline at end of file diff --git a/docs/platforms/atmelsam.rst b/docs/platforms/atmelsam.rst index 14363615..a5b70073 100644 --- a/docs/platforms/atmelsam.rst +++ b/docs/platforms/atmelsam.rst @@ -3,10 +3,11 @@ 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 .. contents:: @@ -17,40 +18,25 @@ Packages :header-rows: 1 * - Name - - Alias - Contents - * - ``toolchain-gccarmnoneeabi`` - - toolchain - - `gcc-arm-embedded `_, - `GDB `_ - * - ``tool-bossac`` - - uploader - - `BOSSA CLI `_ - * - ``framework-arduino`` - - - - See below in :ref:`atmelsam_frameworks` + * - ``framework-arduinosam`` + - `Arduino Wiring-based Framework (SAM Core, 1.6) `_ + + * - ``ldscripts`` + - `Linker Scripts `_ + + * - ``toolchain-gccarmnoneeabi`` + - `gcc-arm-embedded `_, `GDB `_ + + * - ``tool-bossac`` + - `BOSSA CLI `_ .. warning:: **Linux Users:** Don't forget to install "udev" rules file `99-platformio-udev.rules `_ (an instruction is located in the file). -.. _atmelsam_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``arduino`` - - Arduino Wiring-based Framework (SAM Core, 1.6) - - `Documentation `_ - Boards ------ @@ -60,45 +46,79 @@ Boards * For more detailed ``board`` information please scroll tables below by horizontal. +Arduino +~~~~~~~ + .. list-table:: :header-rows: 1 * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM + * - ``due`` - `Arduino Due (Programming Port) `_ - - at91sam3x8e ``cortex-m3`` - - 84 MHz ``84000000L`` + - AT91SAM3X8E + - 84 MHz - 512 Kb - 32 Kb + + * - ``dueUSB`` - `Arduino Due (USB Native Port) `_ - - at91sam3x8e ``cortex-m3`` - - 84 MHz ``84000000L`` + - AT91SAM3X8E + - 84 MHz - 512 Kb - 32 Kb + +Digistump +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + * - ``digix`` - `Digistump DigiX `_ - - at91sam3x8e ``cortex-m3`` - - 84 MHz ``84000000L`` - - 512 kb - - 32 Kb + - AT91SAM3X8E + - 84 MHz + - 512 Kb + - 28 Kb + +SainSmart +~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + * - ``sainSmartDue`` - `SainSmart Due (Programming Port) `_ - - at91sam3x8e ``cortex-m3`` - - 84 MHz ``84000000L`` + - AT91SAM3X8E + - 84 MHz - 512 Kb - 32 Kb + + * - ``sainSmartDueUSB`` - `SainSmart Due (USB Native Port) `_ - - at91sam3x8e ``cortex-m3`` - - 84 MHz ``84000000L`` + - AT91SAM3X8E + - 84 MHz - 512 Kb - 32 Kb - -More detailed information you can find here -`Atmel SMART ARM-based MCUs `_. + \ No newline at end of file diff --git a/docs/platforms/freescalekinetis.rst b/docs/platforms/freescalekinetis.rst index de5f7aa4..86d39276 100644 --- a/docs/platforms/freescalekinetis.rst +++ b/docs/platforms/freescalekinetis.rst @@ -3,7 +3,12 @@ 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 .. contents:: @@ -14,36 +19,19 @@ Packages :header-rows: 1 * - Name - - Alias - Contents - * - ``toolchain-gccarmnoneeabi`` - - toolchain - - `gcc-arm-embedded `_, - `GDB `_ + * - ``framework-mbed`` - - - - See below in :ref:`freescalekinetis_frameworks` + - `mbed Framework `_ + + * - ``toolchain-gccarmnoneeabi`` + - `gcc-arm-embedded `_, `GDB `_ .. warning:: **Linux Users:** Don't forget to install "udev" rules file `99-platformio-udev.rules `_ (an instruction is located in the file). -.. _freescalekinetis_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``mbed`` - - MBED Framework - - `Documentation `__ - Boards ------ @@ -53,52 +41,63 @@ Boards * For more detailed ``board`` information please scroll tables below by horizontal. +Freescale +~~~~~~~~~ + .. list-table:: :header-rows: 1 * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM - * - ``frdm_kl05z`` - - `Freescale Kinetis FRDM-KL05Z `_ - - MKL05Z32VFM4 ``cortex-m0plus`` - - 48 MHz ``48000000L`` - - 32 Kb - - 4 Kb - * - ``frdm_kl25z`` - - `Freescale Kinetis FRDM-KL25Z `_ - - MKL25Z128VLK4 ``cortex-m0plus`` - - 48 MHz ``48000000L`` - - 128 Kb - - 16 Kb - * - ``frdm_kl46z`` - - `Freescale Kinetis FRDM-KL46Z `_ - - MKL46Z256Vll4 ``cortex-m0plus`` - - 48 MHz ``48000000L`` - - 256 Kb - - 32 Kb - * - ``frdm_k22f`` - - `Freescale Kinetis FRDM-K22F `_ - - MK22FN512VLH12 ``cortex-m4`` - - 120 MHz ``120000000L`` - - 512 Kb - - 128 Kb - * - ``frdm_k64f`` - - `Freescale Kinetis FRDM-K64F `_ - - MK64fN1M0VLL12 ``cortex-m4`` - - 120 MHz ``120000000L`` - - 1 Mb - - 256 Kb + * - ``frdm_k20d50m`` - `Freescale Kinetis FRDM-K20D50M `_ - - MK20DX128VLH5 ``cortex-m4`` - - 48 MHz ``48000000L`` + - MK20DX128VLH5 + - 48 MHz - 128 Kb - 16 Kb + + * - ``frdm_k22f`` + - `Freescale Kinetis FRDM-K22F `_ + - MK22FN512VLH12 + - 120 MHz + - 512 Kb + - 128 Kb + -More detailed information you can find here -`Freescale Kinetis platforms with support MBED framework `_. + * - ``frdm_k64f`` + - `Freescale Kinetis FRDM-K64F `_ + - MK64FN1M0VLL12 + - 120 MHz + - 1024 Kb + - 256 Kb + + + * - ``frdm_kl05z`` + - `Freescale Kinetis FRDM-KL05Z `_ + - MKL05Z32VFM4 + - 48 MHz + - 32 Kb + - 4 Kb + + + * - ``frdm_kl25z`` + - `Freescale Kinetis FRDM-KL25Z `_ + - MKL25Z128VLK4 + - 48 MHz + - 128 Kb + - 16 Kb + + + * - ``frdm_kl46z`` + - `Freescale Kinetis FRDM-KL46Z `_ + - MKL46Z256VLL4 + - 48 MHz + - 256 Kb + - 32 Kb + \ No newline at end of file diff --git a/docs/platforms/nordicnrf51.rst b/docs/platforms/nordicnrf51.rst index 6241ee64..ff58ddd2 100644 --- a/docs/platforms/nordicnrf51.rst +++ b/docs/platforms/nordicnrf51.rst @@ -3,7 +3,14 @@ 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 .. contents:: @@ -14,36 +21,19 @@ Packages :header-rows: 1 * - Name - - Alias - Contents - * - ``toolchain-gccarmnoneeabi`` - - toolchain - - `gcc-arm-embedded `_, - `GDB `_ + * - ``framework-mbed`` - - - - See below in :ref:`nordicnrf51_frameworks` + - `mbed Framework `_ + + * - ``toolchain-gccarmnoneeabi`` + - `gcc-arm-embedded `_, `GDB `_ .. warning:: **Linux Users:** Don't forget to install "udev" rules file `99-platformio-udev.rules `_ (an instruction is located in the file). -.. _nordicnrf51_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``mbed`` - - MBED Framework - - `Documentation `__ - Boards ------ @@ -53,58 +43,107 @@ Boards * For more detailed ``board`` information please scroll tables below by horizontal. +JKSoft +~~~~~~ + .. list-table:: :header-rows: 1 * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM - * - ``nrf51_mkit`` - - `Nordic nRF51822-mKIT `_ - - nrf51822 ``cortex-m0`` - - 16 MHz ``16000000L`` - - 128 Kb - - 16 Kb - * - ``nrf51_dongle`` - - `Nordic nRF51-Dongle `_ - - nrf51822/nrf51422 ``cortex-m0`` - - 32 MHz ``32000000L`` - - 256 Kb - - 16 Kb - * - ``nrf51_dk`` - - `Nordic nRF51-DK `_ - - nrf51822/nrf51422 ``cortex-m0`` - - 32 MHz ``32000000L`` - - 256 Kb - - 16 Kb - * - ``redBearLab`` - - `RedBearLab nRF51822 `_ - - nrf51822 ``cortex-m0`` - - 16 MHz ``16000000L`` - - 256 Kb - - 16 Kb - * - ``redBearLabBLENano`` - - `RedBearLab BLE Nano `_ - - nrf51822 ``cortex-m0`` - - 16 MHz ``16000000L`` - - 256 Kb - - 16 Kb + * - ``wallBotBLE`` - `JKSoft Wallbot BLE `_ - - nrf51822 ``cortex-m0`` - - 16 MHz ``16000000L`` + - NRF51822 + - 16 MHz - 128 Kb - 16 Kb + +Nordic +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``nrf51_dk`` + - `Nordic nRF51-DK `_ + - NRF51822 + - 32 MHz + - 256 Kb + - 32 Kb + + + * - ``nrf51_dongle`` + - `Nordic nRF51-Dongle `_ + - NRF51822 + - 32 MHz + - 256 Kb + - 32 Kb + + + * - ``nrf51_mkit`` + - `Nordic nRF51822-mKIT `_ + - NRF51822 + - 16 MHz + - 128 Kb + - 16 Kb + +RedBearLab +~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``redBearLab`` + - `RedBearLab nRF51822 `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + + + * - ``redBearLabBLENano`` + - `RedBearLab BLE Nano `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + +Switch Science +~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + * - ``hrm1017`` - `Switch Science mbed HRM1017 `_ - - nrf51822 ``cortex-m0`` - - 16 MHz ``16000000L`` - - 128 Kb + - NRF51822 + - 16 MHz + - 256 Kb - 16 Kb - - -More detailed information you can find here -`nRF51 platforms with support MBED framework `_. + \ No newline at end of file diff --git a/docs/platforms/nxplpc.rst b/docs/platforms/nxplpc.rst index d8dcff37..9ddaf80e 100644 --- a/docs/platforms/nxplpc.rst +++ b/docs/platforms/nxplpc.rst @@ -3,7 +3,14 @@ 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/ .. contents:: @@ -14,36 +21,19 @@ Packages :header-rows: 1 * - Name - - Alias - Contents - * - ``toolchain-gccarmnoneeabi`` - - toolchain - - `gcc-arm-embedded `_, - `GDB `_ + * - ``framework-mbed`` - - - - See below in :ref:`nxplpc_frameworks` + - `mbed Framework `_ + + * - ``toolchain-gccarmnoneeabi`` + - `gcc-arm-embedded `_, `GDB `_ .. warning:: **Linux Users:** Don't forget to install "udev" rules file `99-platformio-udev.rules `_ (an instruction is located in the file). -.. _nxplpc_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``mbed`` - - MBED Framework - - `Documentation `__ - Boards ------ @@ -53,94 +43,215 @@ Boards * For more detailed ``board`` information please scroll tables below by horizontal. +CQ Publishing +~~~~~~~~~~~~~ + .. list-table:: :header-rows: 1 * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM - * - ``lpc1549`` - - `LPCXpresso1549 `_ - - LPC1549 ``cortex-m3`` - - 72 MHz ``72000000L`` - - 256 Kb - - 36 Kb - * - ``lpc1768`` - - `mbed LPC1768 `_ - - LPC1768 ``cortex-m3`` - - 96 MHz ``96000000L`` - - 512 Kb - - 32 Kb - * - ``seeeduinoArchPro`` - - `Seeeduino-Arch-Pro `_ - - LPC1768 ``cortex-m3`` - - 96 MHz ``96000000L`` - - 512 Kb - - 32 Kb - * - ``ubloxc027`` - - `U-blox C027 `_ - - LPC1768 ``cortex-m3`` - - 96 MHz ``96000000L`` - - 512 Kb - - 32 Kb - * - ``lpc1114fn28`` - - `mbed LPC1114FN28 `_ - - LPC1114FN28 ``cortex-m0`` - - 48 MHz ``48000000L`` - - 32 Kb - - 4 Kb - * - ``lpc11u24`` - - `mbed LPC11U24 `_ - - LPC11U24 ``cortex-m0`` - - 48 MHz ``48000000L`` - - 32 Kb - - 8 Kb - * - ``dipcortexm0`` - - `DipCortex M0 `_ - - LPC11U24 ``cortex-m0`` - - 50 MHz ``50000000L`` - - 32 Kb - - 8 Kb - * - ``blueboard_lpc11u24`` - - `BlueBoard-LPC11U24 `_ - - LPC11U24 ``cortex-m0`` - - 48 MHz ``48000000L`` - - 32 Kb - - 8 Kb - * - ``mbuino`` - - `Outrageous Circuits mBuino `_ - - LPC11U24 ``cortex-m0`` - - 50 MHz ``50000000L`` - - 32 Kb - - 8 Kb + + * - ``lpc11u35_501`` + - `TG-LPC11U35-501 `_ + - LPC11U35 + - 48 MHz + - 64 Kb + - 10 Kb + +Embedded Artists +~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + * - ``lpc11u35`` - `EA LPC11U35 QuickStart Board `_ - - LPC11U35 ``cortex-m0`` - - 48 MHz ``48000000L`` - - 64 Kb - - 10 Kb - * - ``lpc11u35_501`` - - `TG-LPC11U35-501 QuickStart Board `_ - - LPC11U35 ``cortex-m0`` - - 48 MHz ``48000000L`` + - LPC11U35 + - 48 MHz - 64 Kb - 10 Kb + + * - ``lpc4088`` - `EA LPC4088 QuickStart Board `_ - - LPC4088 ``cortex-m4`` - - 120 MHz ``120000000L`` + - LPC4088 + - 120 MHz - 512 Kb - 96 Kb + + * - ``lpc4088_dm`` - `EA LPC4088 Display Module `_ - - LPC4088 ``cortex-m4`` - - 120 MHz ``120000000L`` + - LPC4088 + - 120 MHz - 512 Kb - 96 Kb + +NGX Technologies +~~~~~~~~~~~~~~~~ +.. list-table:: + :header-rows: 1 -More detailed information you can find here -`NXP platforms with support MBED framework `_. + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``blueboard_lpc11u24`` + - `BlueBoard-LPC11U24 `_ + - LPC11U24 + - 48 MHz + - 32 Kb + - 8 Kb + +NXP +~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc11u24`` + - `mbed LPC11U24 `_ + - LPC11U24 + - 48 MHz + - 32 Kb + - 8 Kb + + + * - ``lpc1549`` + - `LPCXpresso1549 `_ + - LPC1549 + - 72 MHz + - 256 Kb + - 36 Kb + + + * - ``lpc1768`` + - `mbed LPC1768 `_ + - LPC1768 + - 96 MHz + - 512 Kb + - 32 Kb + +Outrageous Circuits +~~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``mbuino`` + - `Outrageous Circuits mBuino `_ + - LPC11U24 + - 48 MHz + - 32 Kb + - 8 Kb + +SeeedStudio +~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``seeeduinoArchPro`` + - `Seeeduino-Arch-Pro `_ + - LPC1768 + - 96 MHz + - 512 Kb + - 32 Kb + +Solder Splash Labs +~~~~~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``dipcortexm0`` + - `DipCortex M0 `_ + - LPC11U24 + - 50 MHz + - 32 Kb + - 8 Kb + +Switch Science +~~~~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``lpc1114fn28`` + - `mbed LPC1114FN28 `_ + - LPC1114FN28 + - 48 MHz + - 32 Kb + - 4 Kb + +u-blox +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``ubloxc027`` + - `u-blox C027 `_ + - LPC1768 + - 96 MHz + - 512 Kb + - 32 Kb + \ No newline at end of file diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index 4f024041..20717388 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -3,9 +3,14 @@ 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. -The unparalleled and large range of STM32 devices, based on an industry-standard core and accompanied by a vast choice of tools and software, makes this family of products the ideal choice, both for small projects and for entire platform decisions. +http://www.st.com/web/en/catalog/mmc/FM141/SC1169?sc=stm32 .. contents:: @@ -16,57 +21,34 @@ Packages :header-rows: 1 * - Name - - Alias - Contents + * - ``toolchain-gccarmnoneeabi`` - - toolchain - - `gcc-arm-embedded `_, - `GDB `_ + - `gcc-arm-embedded `_, `GDB `_ + * - ``tool-stlink`` - - uploader - - `STLink `_ - * - ``framework-cmsis`` - - - - See below in :ref:`ststm32_frameworks` + - `ST-Link `_ + * - ``framework-spl`` - - - - See below in :ref:`ststm32_frameworks` - * - ``framework-opencm3`` - - - - See below in :ref:`ststm32_frameworks` + - `Standard Peripheral Library for STM32 MCUs `_ + + * - ``framework-cmsis`` + - `Vendor-independent hardware abstraction layer for the Cortex-M processor series `_ + * - ``framework-mbed`` - - - - See below in :ref:`ststm32_frameworks` + - `mbed Framework `_ + + * - ``framework-opencm3`` + - `libOpenCM3 Framework `_ + + * - ``ldscripts`` + - `Linker Scripts `_ .. warning:: **Linux Users:** Don't forget to install "udev" rules file `99-platformio-udev.rules `_ (an instruction is located in the file). -.. _ststm32_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``cmsis`` - - Vendor-independent hardware abstraction layer for the Cortex-M processor series - - `Documentation `__ - * - ``spl`` - - Standard Peripheral Library for ST STM32 MCUs - - `Documentation `__ - * - ``opencm3`` - - libOpenCM3 Framework - - `Documentation `__ - * - ``mbed`` - - MBED Framework - - `Documentation `__ - Boards ------ @@ -76,149 +58,167 @@ Boards * For more detailed ``board`` information please scroll tables below by horizontal. +ST +~~ + .. list-table:: :header-rows: 1 * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM - * - ``disco_l152rb`` - - `STM32LDISCOVERY - `_ - - STM32L152rbt6 ``cortex-m3`` - - 32 MHz ``32000000L`` + + * - ``disco_f051r8`` + - `STM32F0DISCOVERY `_ + - STM32F051R8T6 + - 48 MHz + - 64 Kb + - 8 Kb + + + * - ``disco_f100rb`` + - `STM32VLDISCOVERY `_ + - STM32F100RBT6 + - 24 MHz - 128 Kb - - 16 Kb + - 8 Kb + + * - ``disco_f303vc`` - - `STM32F3DISCOVERY - `_ - - STM32F303vct6 ``cortex-m4`` - - 72 MHz ``72000000L`` + - `STM32F3DISCOVERY `_ + - STM32F303VCT6 + - 72 MHz - 256 Kb - 48 Kb - * - ``disco_f407vg`` - - `STM32F4DISCOVERY - `_ - - STM32F407vgt6 ``cortex-m4`` - - 168 Mhz ``168000000L`` - - 1 Mb - - 192 Kb - * - ``disco_f100rb`` - - `STM32VLDISCOVERY - `_ - - STM32F100rbt6 ``cortex-m3`` - - 24 Mhz ``24000000L`` - - 128 Kb - - 8 Kb - * - ``disco_f051r8`` - - `STM32F0DISCOVERY - `_ - - STM32F051r8t6 ``cortex-m0`` - - 48 Mhz ``48000000L`` - - 64 Kb - - 8 Kb + + * - ``disco_f334c8`` - - `32F3348DISCOVERY - `_ - - STM32F334c8t6 ``cortex-m4`` - - 72 Mhz ``72000000L`` + - `32F3348DISCOVERY `_ + - STM32F334C8T6 + - 72 MHz - 64 Kb - 16 Kb + + * - ``disco_f401vc`` - - `32F401CDISCOVERY - `_ - - STM32F401vct6 ``cortex-m4`` - - 84 Mhz ``84000000L`` + - `32F401CDISCOVERY `_ + - STM32F401VCT6 + - 84 MHz - 256 Kb - 64 Kb + + + * - ``disco_f407vg`` + - `STM32F4DISCOVERY `_ + - STM32F407VGT6 + - 168 MHz + - 1024 Kb + - 128 Kb + + * - ``disco_f429zi`` - - `32F429IDISCOVERY - `_ - - STM32F429zit6 ``cortex-m4`` - - 180 Mhz ``180000000L`` - - 2 Mb + - `32F429IDISCOVERY `_ + - STM32F429ZIT6 + - 180 MHz + - 2048 Kb - 256 Kb + + + * - ``disco_l152rb`` + - `STM32LDISCOVERY `_ + - STM32L152RBT6 + - 32 MHz + - 128 Kb + - 16 Kb + + * - ``nucleo_f030r8`` - - `ST Nucleo F030R8 - `_ - - STM32F030r8t6 ``cortex-m0`` - - 48 Mhz ``48000000L`` + - `ST Nucleo F030R8 `_ + - STM32F030R8T6 + - 48 MHz - 64 Kb - 8 Kb + + * - ``nucleo_f070rb`` - - `ST Nucleo F070RB - `_ - - STM32F070rbt6 ``cortex-m0`` - - 48 Mhz ``48000000L`` + - `ST Nucleo F070RB `_ + - STM32F070RBT6 + - 48 MHz - 128 Kb - 16 Kb + + * - ``nucleo_f072rb`` - - `ST Nucleo F072RB - `_ - - STM32F072rbt6 ``cortex-m0`` - - 48 Mhz ``48000000L`` + - `ST Nucleo F072RB `_ + - STM32F072RBT6 + - 48 MHz - 128 Kb - 16 Kb + + * - ``nucleo_f091rc`` - - `ST Nucleo F091RC - `_ - - STM32F091rct6 ``cortex-m0`` - - 48 Mhz ``48000000L`` + - `ST Nucleo F091RC `_ + - STM32F091RCT6 + - 48 MHz - 256 Kb - 32 Kb + + * - ``nucleo_f103rb`` - - `ST Nucleo F103RB - `_ - - STM32F103rbt6 ``cortex-m3`` - - 72 Mhz ``72000000L`` + - `ST Nucleo F103RB `_ + - STM32F103RBT6 + - 72 MHz - 128 Kb - 20 Kb + + * - ``nucleo_f302r8`` - - `ST Nucleo F302R8 - `_ - - STM32F302r8t6 ``cortex-m4`` - - 72 Mhz ``72000000L`` + - `ST Nucleo F302R8 `_ + - STM32F302R8T6 + - 72 MHz - 64 Kb - 16 Kb + + * - ``nucleo_f334r8`` - - `ST Nucleo F334R8 - `_ - - STM32F334r8t6 ``cortex-m4`` - - 72 Mhz ``72000000L`` + - `ST Nucleo F334R8 `_ + - STM32F334R8T6 + - 72 MHz - 64 Kb - 16 Kb + + * - ``nucleo_f401re`` - - `ST Nucleo F401RE - `_ - - STM32F401ret6 ``cortex-m4`` - - 84 Mhz ``84000000L`` + - `ST Nucleo F401RE `_ + - STM32F401RET6 + - 84 MHz - 512 Kb - 96 Kb + + * - ``nucleo_f411re`` - - `ST Nucleo F411RE - `_ - - STM32F411ret6 ``cortex-m4`` - - 100 Mhz ``100000000L`` + - `ST Nucleo F411RE `_ + - STM32F411RET6 + - 100 MHz - 512 Kb - 128 Kb + + * - ``nucleo_l053r8`` - - `ST Nucleo L053R8 - `_ - - STM32L053r8t6 ``cortex-m0`` - - 48 Mhz ``48000000L`` + - `ST Nucleo L053R8 `_ + - STM32L053R8T6 + - 48 MHz - 64 Kb - 8 Kb + + * - ``nucleo_l152re`` - - `ST Nucleo L152RE - `_ - - STM32L152ret6 ``cortex-m3`` - - 32 Mhz ``32000000L`` + - `ST Nucleo L152RE `_ + - STM32L152RET6 + - 32 MHz - 512 Kb - 80 Kb - -More detailed information you can find here -`STM32 Discovery kits `_ and here -`ST Nucleo boards with MBED support `_. + \ No newline at end of file diff --git a/docs/platforms/teensy.rst b/docs/platforms/teensy.rst index 37f172c6..21ff5fc5 100644 --- a/docs/platforms/teensy.rst +++ b/docs/platforms/teensy.rst @@ -3,7 +3,13 @@ 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 .. contents:: @@ -14,46 +20,28 @@ Packages :header-rows: 1 * - Name - - Alias - Contents - * - ``toolchain-gccarmnoneeabi`` - - toolchain - - `gcc-arm-embedded `_, - `GDB `_ - * - ``toolchain-atmelavr`` - - toolchain - - `avr-gcc `_, - `GDB `_, - `AVaRICE `_, - `SimulAVR `_ - * - ``tool-teensy`` - - uploader - - `Teensy Loader `_ - * - ``framework-arduinoteensy`` - - - - See below in :ref:`teensy_frameworks` + * - ``toolchain-atmelavr`` + - `avr-gcc `_, `GDB `_, `AVaRICE `_, `SimulAVR `_ + + * - ``ldscripts`` + - `Linker Scripts `_ + + * - ``framework-arduinoteensy`` + - `Arduino Wiring-based Framework `_ + + * - ``toolchain-gccarmnoneeabi`` + - `gcc-arm-embedded `_, `GDB `_ + + * - ``tool-teensy`` + - `Teensy Loader `_ .. warning:: **Linux Users:** Don't forget to install "udev" rules file `99-platformio-udev.rules `_ (an instruction is located in the file). -.. _teensy_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``arduino`` - - Arduino Wiring-based Framework - - `Documentation `_ - Boards ------ @@ -63,39 +51,47 @@ Boards * For more detailed ``board`` information please scroll tables below by horizontal. +Teensy +~~~~~~ + .. list-table:: :header-rows: 1 * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM + * - ``teensy20`` - `Teensy 2.0 `_ - - ATmega32u4 ``atmega32u4`` - - 16 MHz ``16000000L`` + - ATMEGA32U4 + - 16 MHz - 32 Kb - 2.5 Kb + + * - ``teensy20pp`` - `Teensy++ 2.0 `_ - - AT90USB1289 ``at90usb1286`` - - 16 MHz ``16000000L`` + - AT90USB1286 + - 16 MHz - 128 Kb - 8 Kb + + * - ``teensy30`` - `Teensy 3.0 `_ - - MK20DX128 ``cortex-m4`` - - 48 Mhz ``48000000L`` - - 128 kb + - MK20DX128 + - 48 MHz + - 128 Kb - 16 Kb + + * - ``teensy31`` - `Teensy 3.1 `_ - - MK20DX256 ``cortex-m4`` - - 72 Mhz ``72000000L`` - - 256 kb + - MK20DX256 + - 72 MHz + - 256 Kb - 64 Kb - -More detailed information you can find here -`Teensy USB Development Boards `_. + \ No newline at end of file diff --git a/docs/platforms/timsp430.rst b/docs/platforms/timsp430.rst index 256f9f36..3b733f87 100644 --- a/docs/platforms/timsp430.rst +++ b/docs/platforms/timsp430.rst @@ -3,10 +3,12 @@ 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 .. contents:: @@ -17,40 +19,22 @@ Packages :header-rows: 1 * - Name - - Alias - Contents - * - ``toolchain-timsp430`` - - toolchain - - `msp-gcc `_, - `GDB `_ - * - ``tool-mspdebug`` - - uploader - - `MSPDebug `_ - * - ``framework-energiamsp430`` - - - - See below in :ref:`timsp430_frameworks` + * - ``toolchain-timsp430`` + - `msp-gcc `_, `GDB `_ + + * - ``tool-mspdebug`` + - `MSPDebug `_ + + * - ``framework-energiamsp430`` + - `Energia Wiring-based Framework (MSP430 Core) `_ .. warning:: **Linux Users:** Don't forget to install "udev" rules file `99-platformio-udev.rules `_ (an instruction is located in the file). -.. _timsp430_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``energia`` - - Energia Wiring-based Framework (MSP430 Core) - - `Documentation `_ - Boards ------ @@ -60,61 +44,71 @@ Boards * For more detailed ``board`` information please scroll tables below by horizontal. +TI +~~ + .. list-table:: :header-rows: 1 * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM - * - ``lpmsp430g2231`` - - `MSP430G2231 LaunchPad `_ - - MSP430G2231 ``msp430g2231`` - - 16 MHz ``16000000L`` - - 2 Kb - - 128 B - * - ``lpmsp430g2452`` - - `MSP430G2452 LaunchPad `_ - - MSP430G2452 ``msp430g2452`` - - 16 MHz ``16000000L`` - - 8 Kb - - 256 B - * - ``lpmsp430g2553`` - - `MSP430G2553 LaunchPad `_ - - MSP430G2553 ``msp430g2553`` - - 16 MHz ``16000000L`` - - 16 Kb - - 512 B + * - ``lpmsp430f5529`` - - `MSP430F5529 LaunchPad (16 Mhz) `_ - - MSP430F5529 ``msp430f5529`` - - 16 MHz ``16000000L`` + - `LaunchPad w/ msp430f5529 (16MHz) `_ + - MSP430F5529 + - 16 MHz - 128 Kb - - 8 KB + - 1 Kb + + * - ``lpmsp430f5529_25`` - - `MSP430F5529 LaunchPad (25 Mhz) `_ - - MSP430F5529 ``msp430f5529`` - - 25 MHz ``25000000L`` + - `LaunchPad w/ msp430f5529 (25MHz) `_ + - MSP430F5529 + - 25 MHz - 128 Kb - - 8 KB + - 1 Kb + + * - ``lpmsp430fr5739`` - - `MSP430FR5739 Experimenter Board `_ - - MSP430FR5739 ``msp430fr5739`` - - 16 MHz ``16000000L`` + - `FraunchPad w/ msp430fr5739 `_ + - MSP430FR5739 + - 16 MHz - 16 Kb - - 1 KB + - 1 Kb + + * - ``lpmsp430fr5969`` - - `MSP430FR5969 LaunchPad `_ - - MSP430FR5969 ``msp430fr5969`` - - 16 MHz ``16000000L`` + - `LaunchPad w/ msp430fr5969 `_ + - MSP430FR5969 + - 8 MHz - 64 Kb - - 2 KB - - -More detailed information you can find here -`MSP430 LaunchPads `_. + - 1 Kb + + * - ``lpmsp430g2231`` + - `LaunchPad w/ msp430g2231 (1 MHz) `_ + - MSP430G2231 + - 1 MHz + - 2 Kb + - 0.125 Kb + + * - ``lpmsp430g2452`` + - `LaunchPad w/ msp430g2452 (16MHz) `_ + - MSP430G2452 + - 16 MHz + - 8 Kb + - 0.25 Kb + + * - ``lpmsp430g2553`` + - `LaunchPad w/ msp430g2553 (16MHz) `_ + - MSP430G2553 + - 16 MHz + - 16 Kb + - 0.5 Kb + \ No newline at end of file diff --git a/docs/platforms/titiva.rst b/docs/platforms/titiva.rst index 208742d9..ce8078c3 100644 --- a/docs/platforms/titiva.rst +++ b/docs/platforms/titiva.rst @@ -3,12 +3,13 @@ Platform ``titiva`` =================== -`Texas Instruments TM4C12x MCUs `_ -offer the industry’s most popular ARM® -Cortex®-M4 core with scalable memory and package options, unparalleled +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 + .. contents:: Packages @@ -18,45 +19,28 @@ Packages :header-rows: 1 * - Name - - Alias - Contents + + * - ``ldscripts`` + - `Linker Scripts `_ + * - ``toolchain-gccarmnoneeabi`` - - toolchain - - `gcc-arm-embedded `_, - `GDB `_ + - `gcc-arm-embedded `_, `GDB `_ + * - ``tool-lm4flash`` - - uploader - `Flash Programmer `_ - * - ``framework-energiativa`` - - - - See below in :ref:`titiva_frameworks` + * - ``framework-opencm3`` - - - - See below in :ref:`titiva_frameworks` + - `libOpenCM3 Framework `_ + + * - ``framework-energiativa`` + - `Energia Wiring-based Framework (LM4F Core) `_ .. warning:: **Linux Users:** Don't forget to install "udev" rules file `99-platformio-udev.rules `_ (an instruction is located in the file). -.. _titiva_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``energia`` - - Energia Wiring-based Framework (LM4F Core) - - `Documentation `__ - * - ``opencm3`` - - libOpenCM3 Framework - - `Documentation `__ - Boards ------ @@ -66,35 +50,39 @@ Boards * For more detailed ``board`` information please scroll tables below by horizontal. +TI +~~ + .. list-table:: :header-rows: 1 * - Type ``board`` - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` + - Microcontroller + - Frequency - Flash - RAM - * - ``lplm4f120h5qr`` - - `Stellaris LM4F120 LaunchPad `_ - - LM4F120H5QR ``cortex-m4`` - - 80 MHz ``80000000L`` - - 256 Kb - - 32 Kb - * - ``lptm4c1230c3pm`` - - `Tiva C Series TM4C123G LaunchPad - `_ - - TM4C123GH6PM ``cortex-m4`` - - 80 MHz ``80000000L`` - - 256 Kb - - 32 Kb - * - ``lptm4c1294ncpdt`` - - `Tiva C Series TM4C1294 Connected LaunchPad - `_ - - TM4C1294NCPDT ``cortex-m4`` - - 120 Mhz ``120000000L`` - - 1 Mb - - 256 Kb -More detailed information you can find here -`TIVA C Series LaunchPads `_. + * - ``lplm4f120h5qr`` + - `LaunchPad (Stellaris) w/ lm4f120 (80MHz) `_ + - LPLM4F120H5QR + - 80 MHz + - 256 Kb + - 32 Kb + + + * - ``lptm4c1230c3pm`` + - `LaunchPad (Tiva C) w/ tm4c123 (80MHz) `_ + - LPTM4C1230C3PM + - 80 MHz + - 256 Kb + - 32 Kb + + + * - ``lptm4c1294ncpdt`` + - `LaunchPad (Tiva C) w/ tm4c129 (120MHz) `_ + - LPTM4C1294NCPDT + - 120 MHz + - 1024 Kb + - 256 Kb + \ No newline at end of file From ce923b6b589ed4bb0155952ce9da24930025bf5a Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 19:32:53 +0200 Subject: [PATCH 18/58] Avoid multiple white spaces --- docs/frameworks/arduino.rst | 69 +++-------------------------- docs/frameworks/cmsis.rst | 3 -- docs/frameworks/energia.rst | 10 ----- docs/frameworks/mbed.rst | 57 ++++++------------------ docs/frameworks/opencm3.rst | 7 +-- docs/frameworks/spl.rst | 3 -- docs/platforms/atmelavr.rst | 58 +++--------------------- docs/platforms/atmelsam.rst | 7 +-- docs/platforms/freescalekinetis.rst | 6 --- docs/platforms/nordicnrf51.rst | 10 ++--- docs/platforms/nxplpc.rst | 21 ++++----- docs/platforms/ststm32.rst | 19 -------- docs/platforms/teensy.rst | 4 -- docs/platforms/timsp430.rst | 7 --- docs/platforms/titiva.rst | 3 -- platformio/boards/arduino.json | 4 +- platformio/boards/ststm32.json | 6 +-- scripts/docspregen.py | 27 +++++------ 18 files changed, 56 insertions(+), 265 deletions(-) diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index a45abf34..705f6bf0 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -32,7 +32,6 @@ Adafruit - 8 MHz - 32 Kb - 2.5 Kb - * - ``protrinket3`` - `Pro Trinket 3V/12MHz (USB) `_ @@ -40,7 +39,6 @@ Adafruit - 12 MHz - 32 Kb - 2 Kb - * - ``protrinket3ftdi`` - `Pro Trinket 3V/12MHz (FTDI) `_ @@ -48,7 +46,6 @@ Adafruit - 16 MHz - 32 Kb - 2 Kb - * - ``protrinket5`` - `Pro Trinket 5V/16MHz (USB) `_ @@ -56,7 +53,6 @@ Adafruit - 16 MHz - 32 Kb - 2 Kb - * - ``protrinket5ftdi`` - `Pro Trinket 5V/16MHz (USB) `_ @@ -64,7 +60,6 @@ Adafruit - 16 MHz - 32 Kb - 2 Kb - * - ``trinket3`` - `Adafruit Trinket 3V/8MHz `_ @@ -72,7 +67,6 @@ Adafruit - 8 MHz - 8 Kb - 0.5 Kb - * - ``trinket5`` - `Adafruit Trinket 5V/16MHz `_ @@ -80,7 +74,7 @@ Adafruit - 16 MHz - 8 Kb - 0.5 Kb - + Arduino ~~~~~~~ @@ -100,7 +94,6 @@ Arduino - 8 MHz - 32 Kb - 2.5 Kb - * - ``atmegangatmega168`` - `Arduino NG or older ATmega168 `_ @@ -108,7 +101,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``atmegangatmega8`` - `Arduino NG or older ATmega8 `_ @@ -116,7 +108,6 @@ Arduino - 16 MHz - 8 Kb - 1 Kb - * - ``btatmega168`` - `Arduino BT ATmega168 `_ @@ -124,7 +115,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``btatmega328`` - `Arduino BT ATmega328 `_ @@ -132,7 +122,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``diecimilaatmega168`` - `Arduino Duemilanove or Diecimila ATmega168 `_ @@ -140,7 +129,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``diecimilaatmega328`` - `Arduino Duemilanove or Diecimila ATmega328 `_ @@ -148,7 +136,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``due`` - `Arduino Due (Programming Port) `_ @@ -156,7 +143,6 @@ Arduino - 84 MHz - 512 Kb - 32 Kb - * - ``dueUSB`` - `Arduino Due (USB Native Port) `_ @@ -164,7 +150,6 @@ Arduino - 84 MHz - 512 Kb - 32 Kb - * - ``esplora`` - `Arduino Esplora `_ @@ -172,7 +157,6 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``ethernet`` - `Arduino Ethernet `_ @@ -180,7 +164,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``fio`` - `Arduino Fio `_ @@ -188,7 +171,6 @@ Arduino - 8 MHz - 32 Kb - 2 Kb - * - ``leonardo`` - `Arduino Leonardo `_ @@ -196,7 +178,6 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``lilypadatmega168`` - `LilyPad Arduino ATmega168 `_ @@ -204,7 +185,6 @@ Arduino - 8 MHz - 16 Kb - 1 Kb - * - ``lilypadatmega328`` - `LilyPad Arduino ATmega328 `_ @@ -212,7 +192,6 @@ Arduino - 8 MHz - 32 Kb - 2 Kb - * - ``megaADK`` - `Arduino Mega ADK `_ @@ -220,7 +199,6 @@ Arduino - 16 MHz - 256 Kb - 8 Kb - * - ``megaatmega1280`` - `Arduino Mega or Mega 2560 ATmega1280 `_ @@ -228,7 +206,6 @@ Arduino - 16 MHz - 128 Kb - 8 Kb - * - ``megaatmega2560`` - `Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) `_ @@ -236,7 +213,6 @@ Arduino - 16 MHz - 256 Kb - 8 Kb - * - ``micro`` - `Arduino Micro `_ @@ -244,7 +220,6 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``miniatmega168`` - `Arduino Mini ATmega168 `_ @@ -252,7 +227,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``miniatmega328`` - `Arduino Mini ATmega328 `_ @@ -260,7 +234,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``nanoatmega168`` - `Arduino Nano ATmega168 `_ @@ -268,7 +241,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``nanoatmega328`` - `Arduino Nano ATmega328 `_ @@ -276,7 +248,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``pro16MHzatmega168`` - `Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz) `_ @@ -284,7 +255,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``pro16MHzatmega328`` - `Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz) `_ @@ -292,7 +262,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``pro8MHzatmega168`` - `Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz) `_ @@ -300,7 +269,6 @@ Arduino - 8 MHz - 16 Kb - 1 Kb - * - ``pro8MHzatmega328`` - `Arduino Pro or Pro Mini ATmega328 (3.3V, 8 MHz) `_ @@ -308,7 +276,6 @@ Arduino - 8 MHz - 32 Kb - 2 Kb - * - ``robotControl`` - `Arduino Robot Control `_ @@ -316,7 +283,6 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``robotMotor`` - `Arduino Robot Motor `_ @@ -324,7 +290,6 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``uno`` - `Arduino Uno `_ @@ -332,7 +297,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``yun`` - `Arduino Yun `_ @@ -340,7 +304,7 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - + BitWizard ~~~~~~~~~ @@ -360,7 +324,7 @@ BitWizard - 16 MHz - 32 Kb - 2 Kb - + Digistump ~~~~~~~~~ @@ -380,7 +344,6 @@ Digistump - 16 MHz - 16 Kb - 0.5 Kb - * - ``digispark-pro32`` - `Digispark Pro (16 MHz) (32 byte buffer) `_ @@ -388,7 +351,6 @@ Digistump - 16 MHz - 16 Kb - 0.5 Kb - * - ``digispark-pro64`` - `Digispark Pro (16 MHz) (64 byte buffer) `_ @@ -396,7 +358,6 @@ Digistump - 16 MHz - 16 Kb - 0.5 Kb - * - ``digispark-tiny`` - `Digispark (Default - 16 MHz) `_ @@ -404,7 +365,6 @@ Digistump - 16 MHz - 8 Kb - 0.5 Kb - * - ``digix`` - `Digistump DigiX `_ @@ -412,7 +372,7 @@ Digistump - 84 MHz - 512 Kb - 28 Kb - + Engduino ~~~~~~~~ @@ -432,7 +392,6 @@ Engduino - 8 MHz - 32 Kb - 2.5 Kb - * - ``engduinov2`` - `Engduino 2 `_ @@ -440,7 +399,6 @@ Engduino - 8 MHz - 32 Kb - 2.5 Kb - * - ``engduinov3`` - `Engduino 3 `_ @@ -448,7 +406,7 @@ Engduino - 8 MHz - 32 Kb - 2.5 Kb - + Microduino ~~~~~~~~~~ @@ -468,7 +426,6 @@ Microduino - 16 MHz - 128 Kb - 16 Kb - * - ``1284p8m`` - `Microduino Core+ (ATmega1284P@8M,3.3V) `_ @@ -476,7 +433,6 @@ Microduino - 8 MHz - 128 Kb - 16 Kb - * - ``168pa16m`` - `Microduino Core (Atmega168PA@16M,5V) `_ @@ -484,7 +440,6 @@ Microduino - 16 MHz - 16 Kb - 1 Kb - * - ``168pa8m`` - `Microduino Core (Atmega168PA@8M,3.3V) `_ @@ -492,7 +447,6 @@ Microduino - 8 MHz - 16 Kb - 1 Kb - * - ``328p16m`` - `Microduino Core (Atmega328P@16M,5V) `_ @@ -500,7 +454,6 @@ Microduino - 16 MHz - 32 Kb - 2 Kb - * - ``328p8m`` - `Microduino Core (Atmega328P@8M,3.3V) `_ @@ -508,7 +461,6 @@ Microduino - 8 MHz - 32 Kb - 2 Kb - * - ``32u416m`` - `Microduino Core USB (ATmega32U4@16M,5V) `_ @@ -516,7 +468,6 @@ Microduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``644pa16m`` - `Microduino Core+ (Atmega644PA@16M,5V) `_ @@ -524,7 +475,6 @@ Microduino - 16 MHz - 64 Kb - 4 Kb - * - ``644pa8m`` - `Microduino Core+ (Atmega644PA@8M,3.3V) `_ @@ -532,7 +482,7 @@ Microduino - 8 MHz - 64 Kb - 4 Kb - + SainSmart ~~~~~~~~~ @@ -552,7 +502,6 @@ SainSmart - 84 MHz - 512 Kb - 32 Kb - * - ``sainSmartDueUSB`` - `SainSmart Due (USB Native Port) `_ @@ -560,7 +509,7 @@ SainSmart - 84 MHz - 512 Kb - 32 Kb - + Teensy ~~~~~~ @@ -580,7 +529,6 @@ Teensy - 16 MHz - 32 Kb - 2.5 Kb - * - ``teensy20pp`` - `Teensy++ 2.0 `_ @@ -588,7 +536,6 @@ Teensy - 16 MHz - 128 Kb - 8 Kb - * - ``teensy30`` - `Teensy 3.0 `_ @@ -596,7 +543,6 @@ Teensy - 48 MHz - 128 Kb - 16 Kb - * - ``teensy31`` - `Teensy 3.1 `_ @@ -604,4 +550,3 @@ Teensy - 72 MHz - 256 Kb - 64 Kb - \ No newline at end of file diff --git a/docs/frameworks/cmsis.rst b/docs/frameworks/cmsis.rst index 55e5fd1f..95deecb8 100644 --- a/docs/frameworks/cmsis.rst +++ b/docs/frameworks/cmsis.rst @@ -32,7 +32,6 @@ ST - 72 MHz - 256 Kb - 48 Kb - * - ``disco_f407vg`` - `STM32F4DISCOVERY `_ @@ -40,7 +39,6 @@ ST - 168 MHz - 1024 Kb - 128 Kb - * - ``disco_l152rb`` - `STM32LDISCOVERY `_ @@ -48,4 +46,3 @@ ST - 32 MHz - 128 Kb - 16 Kb - \ No newline at end of file diff --git a/docs/frameworks/energia.rst b/docs/frameworks/energia.rst index f25533bd..2a4c0524 100644 --- a/docs/frameworks/energia.rst +++ b/docs/frameworks/energia.rst @@ -32,7 +32,6 @@ TI - 80 MHz - 256 Kb - 32 Kb - * - ``lpmsp430f5529`` - `LaunchPad w/ msp430f5529 (16MHz) `_ @@ -40,7 +39,6 @@ TI - 16 MHz - 128 Kb - 1 Kb - * - ``lpmsp430f5529_25`` - `LaunchPad w/ msp430f5529 (25MHz) `_ @@ -48,7 +46,6 @@ TI - 25 MHz - 128 Kb - 1 Kb - * - ``lpmsp430fr5739`` - `FraunchPad w/ msp430fr5739 `_ @@ -56,7 +53,6 @@ TI - 16 MHz - 16 Kb - 1 Kb - * - ``lpmsp430fr5969`` - `LaunchPad w/ msp430fr5969 `_ @@ -64,7 +60,6 @@ TI - 8 MHz - 64 Kb - 1 Kb - * - ``lpmsp430g2231`` - `LaunchPad w/ msp430g2231 (1 MHz) `_ @@ -72,7 +67,6 @@ TI - 1 MHz - 2 Kb - 0.125 Kb - * - ``lpmsp430g2452`` - `LaunchPad w/ msp430g2452 (16MHz) `_ @@ -80,7 +74,6 @@ TI - 16 MHz - 8 Kb - 0.25 Kb - * - ``lpmsp430g2553`` - `LaunchPad w/ msp430g2553 (16MHz) `_ @@ -88,7 +81,6 @@ TI - 16 MHz - 16 Kb - 0.5 Kb - * - ``lptm4c1230c3pm`` - `LaunchPad (Tiva C) w/ tm4c123 (80MHz) `_ @@ -96,7 +88,6 @@ TI - 80 MHz - 256 Kb - 32 Kb - * - ``lptm4c1294ncpdt`` - `LaunchPad (Tiva C) w/ tm4c129 (120MHz) `_ @@ -104,4 +95,3 @@ TI - 120 MHz - 1024 Kb - 256 Kb - \ No newline at end of file diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index d3d0287c..7051cd81 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -32,7 +32,7 @@ CQ Publishing - 48 MHz - 64 Kb - 10 Kb - + Embedded Artists ~~~~~~~~~~~~~~~~ @@ -52,7 +52,6 @@ Embedded Artists - 48 MHz - 64 Kb - 10 Kb - * - ``lpc4088`` - `EA LPC4088 QuickStart Board `_ @@ -60,7 +59,6 @@ Embedded Artists - 120 MHz - 512 Kb - 96 Kb - * - ``lpc4088_dm`` - `EA LPC4088 Display Module `_ @@ -68,7 +66,7 @@ Embedded Artists - 120 MHz - 512 Kb - 96 Kb - + Freescale ~~~~~~~~~ @@ -88,7 +86,6 @@ Freescale - 48 MHz - 128 Kb - 16 Kb - * - ``frdm_k22f`` - `Freescale Kinetis FRDM-K22F `_ @@ -96,7 +93,6 @@ Freescale - 120 MHz - 512 Kb - 128 Kb - * - ``frdm_k64f`` - `Freescale Kinetis FRDM-K64F `_ @@ -104,7 +100,6 @@ Freescale - 120 MHz - 1024 Kb - 256 Kb - * - ``frdm_kl05z`` - `Freescale Kinetis FRDM-KL05Z `_ @@ -112,7 +107,6 @@ Freescale - 48 MHz - 32 Kb - 4 Kb - * - ``frdm_kl25z`` - `Freescale Kinetis FRDM-KL25Z `_ @@ -120,7 +114,6 @@ Freescale - 48 MHz - 128 Kb - 16 Kb - * - ``frdm_kl46z`` - `Freescale Kinetis FRDM-KL46Z `_ @@ -128,7 +121,7 @@ Freescale - 48 MHz - 256 Kb - 32 Kb - + JKSoft ~~~~~~ @@ -148,7 +141,7 @@ JKSoft - 16 MHz - 128 Kb - 16 Kb - + NGX Technologies ~~~~~~~~~~~~~~~~ @@ -168,7 +161,7 @@ NGX Technologies - 48 MHz - 32 Kb - 8 Kb - + NXP ~~~ @@ -188,7 +181,6 @@ NXP - 48 MHz - 32 Kb - 8 Kb - * - ``lpc1549`` - `LPCXpresso1549 `_ @@ -196,7 +188,6 @@ NXP - 72 MHz - 256 Kb - 36 Kb - * - ``lpc1768`` - `mbed LPC1768 `_ @@ -204,7 +195,7 @@ NXP - 96 MHz - 512 Kb - 32 Kb - + Nordic ~~~~~~ @@ -224,7 +215,6 @@ Nordic - 32 MHz - 256 Kb - 32 Kb - * - ``nrf51_dongle`` - `Nordic nRF51-Dongle `_ @@ -232,7 +222,6 @@ Nordic - 32 MHz - 256 Kb - 32 Kb - * - ``nrf51_mkit`` - `Nordic nRF51822-mKIT `_ @@ -240,7 +229,7 @@ Nordic - 16 MHz - 128 Kb - 16 Kb - + Outrageous Circuits ~~~~~~~~~~~~~~~~~~~ @@ -260,7 +249,7 @@ Outrageous Circuits - 48 MHz - 32 Kb - 8 Kb - + RedBearLab ~~~~~~~~~~ @@ -280,7 +269,6 @@ RedBearLab - 16 MHz - 256 Kb - 16 Kb - * - ``redBearLabBLENano`` - `RedBearLab BLE Nano `_ @@ -288,7 +276,7 @@ RedBearLab - 16 MHz - 256 Kb - 16 Kb - + ST ~~ @@ -308,7 +296,6 @@ ST - 48 MHz - 64 Kb - 8 Kb - * - ``disco_f100rb`` - `STM32VLDISCOVERY `_ @@ -316,7 +303,6 @@ ST - 24 MHz - 128 Kb - 8 Kb - * - ``disco_f303vc`` - `STM32F3DISCOVERY `_ @@ -324,7 +310,6 @@ ST - 72 MHz - 256 Kb - 48 Kb - * - ``disco_f334c8`` - `32F3348DISCOVERY `_ @@ -332,7 +317,6 @@ ST - 72 MHz - 64 Kb - 16 Kb - * - ``disco_f401vc`` - `32F401CDISCOVERY `_ @@ -340,7 +324,6 @@ ST - 84 MHz - 256 Kb - 64 Kb - * - ``disco_f407vg`` - `STM32F4DISCOVERY `_ @@ -348,7 +331,6 @@ ST - 168 MHz - 1024 Kb - 128 Kb - * - ``disco_f429zi`` - `32F429IDISCOVERY `_ @@ -356,7 +338,6 @@ ST - 180 MHz - 2048 Kb - 256 Kb - * - ``nucleo_f030r8`` - `ST Nucleo F030R8 `_ @@ -364,7 +345,6 @@ ST - 48 MHz - 64 Kb - 8 Kb - * - ``nucleo_f070rb`` - `ST Nucleo F070RB `_ @@ -372,7 +352,6 @@ ST - 48 MHz - 128 Kb - 16 Kb - * - ``nucleo_f072rb`` - `ST Nucleo F072RB `_ @@ -380,7 +359,6 @@ ST - 48 MHz - 128 Kb - 16 Kb - * - ``nucleo_f091rc`` - `ST Nucleo F091RC `_ @@ -388,7 +366,6 @@ ST - 48 MHz - 256 Kb - 32 Kb - * - ``nucleo_f103rb`` - `ST Nucleo F103RB `_ @@ -396,7 +373,6 @@ ST - 72 MHz - 128 Kb - 20 Kb - * - ``nucleo_f302r8`` - `ST Nucleo F302R8 `_ @@ -404,7 +380,6 @@ ST - 72 MHz - 64 Kb - 16 Kb - * - ``nucleo_f334r8`` - `ST Nucleo F334R8 `_ @@ -412,7 +387,6 @@ ST - 72 MHz - 64 Kb - 16 Kb - * - ``nucleo_f401re`` - `ST Nucleo F401RE `_ @@ -420,7 +394,6 @@ ST - 84 MHz - 512 Kb - 96 Kb - * - ``nucleo_f411re`` - `ST Nucleo F411RE `_ @@ -428,7 +401,6 @@ ST - 100 MHz - 512 Kb - 128 Kb - * - ``nucleo_l053r8`` - `ST Nucleo L053R8 `_ @@ -436,7 +408,6 @@ ST - 48 MHz - 64 Kb - 8 Kb - * - ``nucleo_l152re`` - `ST Nucleo L152RE `_ @@ -444,7 +415,7 @@ ST - 32 MHz - 512 Kb - 80 Kb - + SeeedStudio ~~~~~~~~~~~ @@ -464,7 +435,7 @@ SeeedStudio - 96 MHz - 512 Kb - 32 Kb - + Solder Splash Labs ~~~~~~~~~~~~~~~~~~ @@ -484,7 +455,7 @@ Solder Splash Labs - 50 MHz - 32 Kb - 8 Kb - + Switch Science ~~~~~~~~~~~~~~ @@ -504,7 +475,6 @@ Switch Science - 16 MHz - 256 Kb - 16 Kb - * - ``lpc1114fn28`` - `mbed LPC1114FN28 `_ @@ -512,7 +482,7 @@ Switch Science - 48 MHz - 32 Kb - 4 Kb - + u-blox ~~~~~~ @@ -532,4 +502,3 @@ u-blox - 96 MHz - 512 Kb - 32 Kb - \ No newline at end of file diff --git a/docs/frameworks/opencm3.rst b/docs/frameworks/opencm3.rst index 5c722ca2..81dbc3aa 100644 --- a/docs/frameworks/opencm3.rst +++ b/docs/frameworks/opencm3.rst @@ -32,7 +32,6 @@ ST - 72 MHz - 256 Kb - 48 Kb - * - ``disco_f407vg`` - `STM32F4DISCOVERY `_ @@ -40,7 +39,6 @@ ST - 168 MHz - 1024 Kb - 128 Kb - * - ``disco_l152rb`` - `STM32LDISCOVERY `_ @@ -48,7 +46,7 @@ ST - 32 MHz - 128 Kb - 16 Kb - + TI ~~ @@ -68,7 +66,6 @@ TI - 80 MHz - 256 Kb - 32 Kb - * - ``lptm4c1230c3pm`` - `LaunchPad (Tiva C) w/ tm4c123 (80MHz) `_ @@ -76,7 +73,6 @@ TI - 80 MHz - 256 Kb - 32 Kb - * - ``lptm4c1294ncpdt`` - `LaunchPad (Tiva C) w/ tm4c129 (120MHz) `_ @@ -84,4 +80,3 @@ TI - 120 MHz - 1024 Kb - 256 Kb - \ No newline at end of file diff --git a/docs/frameworks/spl.rst b/docs/frameworks/spl.rst index ae08977d..16e4e4af 100644 --- a/docs/frameworks/spl.rst +++ b/docs/frameworks/spl.rst @@ -32,7 +32,6 @@ ST - 72 MHz - 256 Kb - 48 Kb - * - ``disco_f407vg`` - `STM32F4DISCOVERY `_ @@ -40,7 +39,6 @@ ST - 168 MHz - 1024 Kb - 128 Kb - * - ``disco_l152rb`` - `STM32LDISCOVERY `_ @@ -48,4 +46,3 @@ ST - 32 MHz - 128 Kb - 16 Kb - \ No newline at end of file diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index 5fc07043..8204ec29 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -67,7 +67,6 @@ Adafruit - 8 MHz - 32 Kb - 2.5 Kb - * - ``protrinket3`` - `Pro Trinket 3V/12MHz (USB) `_ @@ -75,7 +74,6 @@ Adafruit - 12 MHz - 32 Kb - 2 Kb - * - ``protrinket3ftdi`` - `Pro Trinket 3V/12MHz (FTDI) `_ @@ -83,7 +81,6 @@ Adafruit - 16 MHz - 32 Kb - 2 Kb - * - ``protrinket5`` - `Pro Trinket 5V/16MHz (USB) `_ @@ -91,7 +88,6 @@ Adafruit - 16 MHz - 32 Kb - 2 Kb - * - ``protrinket5ftdi`` - `Pro Trinket 5V/16MHz (USB) `_ @@ -99,7 +95,6 @@ Adafruit - 16 MHz - 32 Kb - 2 Kb - * - ``trinket3`` - `Adafruit Trinket 3V/8MHz `_ @@ -107,7 +102,6 @@ Adafruit - 8 MHz - 8 Kb - 0.5 Kb - * - ``trinket5`` - `Adafruit Trinket 5V/16MHz `_ @@ -115,7 +109,7 @@ Adafruit - 16 MHz - 8 Kb - 0.5 Kb - + Arduino ~~~~~~~ @@ -135,7 +129,6 @@ Arduino - 8 MHz - 32 Kb - 2.5 Kb - * - ``atmegangatmega168`` - `Arduino NG or older ATmega168 `_ @@ -143,7 +136,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``atmegangatmega8`` - `Arduino NG or older ATmega8 `_ @@ -151,7 +143,6 @@ Arduino - 16 MHz - 8 Kb - 1 Kb - * - ``btatmega168`` - `Arduino BT ATmega168 `_ @@ -159,7 +150,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``btatmega328`` - `Arduino BT ATmega328 `_ @@ -167,7 +157,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``diecimilaatmega168`` - `Arduino Duemilanove or Diecimila ATmega168 `_ @@ -175,7 +164,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``diecimilaatmega328`` - `Arduino Duemilanove or Diecimila ATmega328 `_ @@ -183,7 +171,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``esplora`` - `Arduino Esplora `_ @@ -191,7 +178,6 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``ethernet`` - `Arduino Ethernet `_ @@ -199,7 +185,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``fio`` - `Arduino Fio `_ @@ -207,7 +192,6 @@ Arduino - 8 MHz - 32 Kb - 2 Kb - * - ``leonardo`` - `Arduino Leonardo `_ @@ -215,7 +199,6 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``lilypadatmega168`` - `LilyPad Arduino ATmega168 `_ @@ -223,7 +206,6 @@ Arduino - 8 MHz - 16 Kb - 1 Kb - * - ``lilypadatmega328`` - `LilyPad Arduino ATmega328 `_ @@ -231,7 +213,6 @@ Arduino - 8 MHz - 32 Kb - 2 Kb - * - ``megaADK`` - `Arduino Mega ADK `_ @@ -239,7 +220,6 @@ Arduino - 16 MHz - 256 Kb - 8 Kb - * - ``megaatmega1280`` - `Arduino Mega or Mega 2560 ATmega1280 `_ @@ -247,7 +227,6 @@ Arduino - 16 MHz - 128 Kb - 8 Kb - * - ``megaatmega2560`` - `Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) `_ @@ -255,7 +234,6 @@ Arduino - 16 MHz - 256 Kb - 8 Kb - * - ``micro`` - `Arduino Micro `_ @@ -263,7 +241,6 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``miniatmega168`` - `Arduino Mini ATmega168 `_ @@ -271,7 +248,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``miniatmega328`` - `Arduino Mini ATmega328 `_ @@ -279,7 +255,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``nanoatmega168`` - `Arduino Nano ATmega168 `_ @@ -287,7 +262,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``nanoatmega328`` - `Arduino Nano ATmega328 `_ @@ -295,7 +269,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``pro16MHzatmega168`` - `Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz) `_ @@ -303,7 +276,6 @@ Arduino - 16 MHz - 16 Kb - 1 Kb - * - ``pro16MHzatmega328`` - `Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz) `_ @@ -311,7 +283,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``pro8MHzatmega168`` - `Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz) `_ @@ -319,7 +290,6 @@ Arduino - 8 MHz - 16 Kb - 1 Kb - * - ``pro8MHzatmega328`` - `Arduino Pro or Pro Mini ATmega328 (3.3V, 8 MHz) `_ @@ -327,7 +297,6 @@ Arduino - 8 MHz - 32 Kb - 2 Kb - * - ``robotControl`` - `Arduino Robot Control `_ @@ -335,7 +304,6 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``robotMotor`` - `Arduino Robot Motor `_ @@ -343,7 +311,6 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``uno`` - `Arduino Uno `_ @@ -351,7 +318,6 @@ Arduino - 16 MHz - 32 Kb - 2 Kb - * - ``yun`` - `Arduino Yun `_ @@ -359,7 +325,7 @@ Arduino - 16 MHz - 32 Kb - 2.5 Kb - + BitWizard ~~~~~~~~~ @@ -379,7 +345,7 @@ BitWizard - 16 MHz - 32 Kb - 2 Kb - + Digistump ~~~~~~~~~ @@ -399,7 +365,6 @@ Digistump - 16 MHz - 16 Kb - 0.5 Kb - * - ``digispark-pro32`` - `Digispark Pro (16 MHz) (32 byte buffer) `_ @@ -407,7 +372,6 @@ Digistump - 16 MHz - 16 Kb - 0.5 Kb - * - ``digispark-pro64`` - `Digispark Pro (16 MHz) (64 byte buffer) `_ @@ -415,7 +379,6 @@ Digistump - 16 MHz - 16 Kb - 0.5 Kb - * - ``digispark-tiny`` - `Digispark (Default - 16 MHz) `_ @@ -423,7 +386,7 @@ Digistump - 16 MHz - 8 Kb - 0.5 Kb - + Engduino ~~~~~~~~ @@ -443,7 +406,6 @@ Engduino - 8 MHz - 32 Kb - 2.5 Kb - * - ``engduinov2`` - `Engduino 2 `_ @@ -451,7 +413,6 @@ Engduino - 8 MHz - 32 Kb - 2.5 Kb - * - ``engduinov3`` - `Engduino 3 `_ @@ -459,7 +420,7 @@ Engduino - 8 MHz - 32 Kb - 2.5 Kb - + Microduino ~~~~~~~~~~ @@ -479,7 +440,6 @@ Microduino - 16 MHz - 128 Kb - 16 Kb - * - ``1284p8m`` - `Microduino Core+ (ATmega1284P@8M,3.3V) `_ @@ -487,7 +447,6 @@ Microduino - 8 MHz - 128 Kb - 16 Kb - * - ``168pa16m`` - `Microduino Core (Atmega168PA@16M,5V) `_ @@ -495,7 +454,6 @@ Microduino - 16 MHz - 16 Kb - 1 Kb - * - ``168pa8m`` - `Microduino Core (Atmega168PA@8M,3.3V) `_ @@ -503,7 +461,6 @@ Microduino - 8 MHz - 16 Kb - 1 Kb - * - ``328p16m`` - `Microduino Core (Atmega328P@16M,5V) `_ @@ -511,7 +468,6 @@ Microduino - 16 MHz - 32 Kb - 2 Kb - * - ``328p8m`` - `Microduino Core (Atmega328P@8M,3.3V) `_ @@ -519,7 +475,6 @@ Microduino - 8 MHz - 32 Kb - 2 Kb - * - ``32u416m`` - `Microduino Core USB (ATmega32U4@16M,5V) `_ @@ -527,7 +482,6 @@ Microduino - 16 MHz - 32 Kb - 2.5 Kb - * - ``644pa16m`` - `Microduino Core+ (Atmega644PA@16M,5V) `_ @@ -535,7 +489,6 @@ Microduino - 16 MHz - 64 Kb - 4 Kb - * - ``644pa8m`` - `Microduino Core+ (Atmega644PA@8M,3.3V) `_ @@ -543,4 +496,3 @@ Microduino - 8 MHz - 64 Kb - 4 Kb - \ No newline at end of file diff --git a/docs/platforms/atmelsam.rst b/docs/platforms/atmelsam.rst index a5b70073..128f9812 100644 --- a/docs/platforms/atmelsam.rst +++ b/docs/platforms/atmelsam.rst @@ -65,7 +65,6 @@ Arduino - 84 MHz - 512 Kb - 32 Kb - * - ``dueUSB`` - `Arduino Due (USB Native Port) `_ @@ -73,7 +72,7 @@ Arduino - 84 MHz - 512 Kb - 32 Kb - + Digistump ~~~~~~~~~ @@ -93,7 +92,7 @@ Digistump - 84 MHz - 512 Kb - 28 Kb - + SainSmart ~~~~~~~~~ @@ -113,7 +112,6 @@ SainSmart - 84 MHz - 512 Kb - 32 Kb - * - ``sainSmartDueUSB`` - `SainSmart Due (USB Native Port) `_ @@ -121,4 +119,3 @@ SainSmart - 84 MHz - 512 Kb - 32 Kb - \ No newline at end of file diff --git a/docs/platforms/freescalekinetis.rst b/docs/platforms/freescalekinetis.rst index 86d39276..b190bc95 100644 --- a/docs/platforms/freescalekinetis.rst +++ b/docs/platforms/freescalekinetis.rst @@ -60,7 +60,6 @@ Freescale - 48 MHz - 128 Kb - 16 Kb - * - ``frdm_k22f`` - `Freescale Kinetis FRDM-K22F `_ @@ -68,7 +67,6 @@ Freescale - 120 MHz - 512 Kb - 128 Kb - * - ``frdm_k64f`` - `Freescale Kinetis FRDM-K64F `_ @@ -76,7 +74,6 @@ Freescale - 120 MHz - 1024 Kb - 256 Kb - * - ``frdm_kl05z`` - `Freescale Kinetis FRDM-KL05Z `_ @@ -84,7 +81,6 @@ Freescale - 48 MHz - 32 Kb - 4 Kb - * - ``frdm_kl25z`` - `Freescale Kinetis FRDM-KL25Z `_ @@ -92,7 +88,6 @@ Freescale - 48 MHz - 128 Kb - 16 Kb - * - ``frdm_kl46z`` - `Freescale Kinetis FRDM-KL46Z `_ @@ -100,4 +95,3 @@ Freescale - 48 MHz - 256 Kb - 32 Kb - \ No newline at end of file diff --git a/docs/platforms/nordicnrf51.rst b/docs/platforms/nordicnrf51.rst index ff58ddd2..43970701 100644 --- a/docs/platforms/nordicnrf51.rst +++ b/docs/platforms/nordicnrf51.rst @@ -62,7 +62,7 @@ JKSoft - 16 MHz - 128 Kb - 16 Kb - + Nordic ~~~~~~ @@ -82,7 +82,6 @@ Nordic - 32 MHz - 256 Kb - 32 Kb - * - ``nrf51_dongle`` - `Nordic nRF51-Dongle `_ @@ -90,7 +89,6 @@ Nordic - 32 MHz - 256 Kb - 32 Kb - * - ``nrf51_mkit`` - `Nordic nRF51822-mKIT `_ @@ -98,7 +96,7 @@ Nordic - 16 MHz - 128 Kb - 16 Kb - + RedBearLab ~~~~~~~~~~ @@ -118,7 +116,6 @@ RedBearLab - 16 MHz - 256 Kb - 16 Kb - * - ``redBearLabBLENano`` - `RedBearLab BLE Nano `_ @@ -126,7 +123,7 @@ RedBearLab - 16 MHz - 256 Kb - 16 Kb - + Switch Science ~~~~~~~~~~~~~~ @@ -146,4 +143,3 @@ Switch Science - 16 MHz - 256 Kb - 16 Kb - \ No newline at end of file diff --git a/docs/platforms/nxplpc.rst b/docs/platforms/nxplpc.rst index 9ddaf80e..0ea25a4f 100644 --- a/docs/platforms/nxplpc.rst +++ b/docs/platforms/nxplpc.rst @@ -62,7 +62,7 @@ CQ Publishing - 48 MHz - 64 Kb - 10 Kb - + Embedded Artists ~~~~~~~~~~~~~~~~ @@ -82,7 +82,6 @@ Embedded Artists - 48 MHz - 64 Kb - 10 Kb - * - ``lpc4088`` - `EA LPC4088 QuickStart Board `_ @@ -90,7 +89,6 @@ Embedded Artists - 120 MHz - 512 Kb - 96 Kb - * - ``lpc4088_dm`` - `EA LPC4088 Display Module `_ @@ -98,7 +96,7 @@ Embedded Artists - 120 MHz - 512 Kb - 96 Kb - + NGX Technologies ~~~~~~~~~~~~~~~~ @@ -118,7 +116,7 @@ NGX Technologies - 48 MHz - 32 Kb - 8 Kb - + NXP ~~~ @@ -138,7 +136,6 @@ NXP - 48 MHz - 32 Kb - 8 Kb - * - ``lpc1549`` - `LPCXpresso1549 `_ @@ -146,7 +143,6 @@ NXP - 72 MHz - 256 Kb - 36 Kb - * - ``lpc1768`` - `mbed LPC1768 `_ @@ -154,7 +150,7 @@ NXP - 96 MHz - 512 Kb - 32 Kb - + Outrageous Circuits ~~~~~~~~~~~~~~~~~~~ @@ -174,7 +170,7 @@ Outrageous Circuits - 48 MHz - 32 Kb - 8 Kb - + SeeedStudio ~~~~~~~~~~~ @@ -194,7 +190,7 @@ SeeedStudio - 96 MHz - 512 Kb - 32 Kb - + Solder Splash Labs ~~~~~~~~~~~~~~~~~~ @@ -214,7 +210,7 @@ Solder Splash Labs - 50 MHz - 32 Kb - 8 Kb - + Switch Science ~~~~~~~~~~~~~~ @@ -234,7 +230,7 @@ Switch Science - 48 MHz - 32 Kb - 4 Kb - + u-blox ~~~~~~ @@ -254,4 +250,3 @@ u-blox - 96 MHz - 512 Kb - 32 Kb - \ No newline at end of file diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index 20717388..c1a53f4d 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -77,7 +77,6 @@ ST - 48 MHz - 64 Kb - 8 Kb - * - ``disco_f100rb`` - `STM32VLDISCOVERY `_ @@ -85,7 +84,6 @@ ST - 24 MHz - 128 Kb - 8 Kb - * - ``disco_f303vc`` - `STM32F3DISCOVERY `_ @@ -93,7 +91,6 @@ ST - 72 MHz - 256 Kb - 48 Kb - * - ``disco_f334c8`` - `32F3348DISCOVERY `_ @@ -101,7 +98,6 @@ ST - 72 MHz - 64 Kb - 16 Kb - * - ``disco_f401vc`` - `32F401CDISCOVERY `_ @@ -109,7 +105,6 @@ ST - 84 MHz - 256 Kb - 64 Kb - * - ``disco_f407vg`` - `STM32F4DISCOVERY `_ @@ -117,7 +112,6 @@ ST - 168 MHz - 1024 Kb - 128 Kb - * - ``disco_f429zi`` - `32F429IDISCOVERY `_ @@ -125,7 +119,6 @@ ST - 180 MHz - 2048 Kb - 256 Kb - * - ``disco_l152rb`` - `STM32LDISCOVERY `_ @@ -133,7 +126,6 @@ ST - 32 MHz - 128 Kb - 16 Kb - * - ``nucleo_f030r8`` - `ST Nucleo F030R8 `_ @@ -141,7 +133,6 @@ ST - 48 MHz - 64 Kb - 8 Kb - * - ``nucleo_f070rb`` - `ST Nucleo F070RB `_ @@ -149,7 +140,6 @@ ST - 48 MHz - 128 Kb - 16 Kb - * - ``nucleo_f072rb`` - `ST Nucleo F072RB `_ @@ -157,7 +147,6 @@ ST - 48 MHz - 128 Kb - 16 Kb - * - ``nucleo_f091rc`` - `ST Nucleo F091RC `_ @@ -165,7 +154,6 @@ ST - 48 MHz - 256 Kb - 32 Kb - * - ``nucleo_f103rb`` - `ST Nucleo F103RB `_ @@ -173,7 +161,6 @@ ST - 72 MHz - 128 Kb - 20 Kb - * - ``nucleo_f302r8`` - `ST Nucleo F302R8 `_ @@ -181,7 +168,6 @@ ST - 72 MHz - 64 Kb - 16 Kb - * - ``nucleo_f334r8`` - `ST Nucleo F334R8 `_ @@ -189,7 +175,6 @@ ST - 72 MHz - 64 Kb - 16 Kb - * - ``nucleo_f401re`` - `ST Nucleo F401RE `_ @@ -197,7 +182,6 @@ ST - 84 MHz - 512 Kb - 96 Kb - * - ``nucleo_f411re`` - `ST Nucleo F411RE `_ @@ -205,7 +189,6 @@ ST - 100 MHz - 512 Kb - 128 Kb - * - ``nucleo_l053r8`` - `ST Nucleo L053R8 `_ @@ -213,7 +196,6 @@ ST - 48 MHz - 64 Kb - 8 Kb - * - ``nucleo_l152re`` - `ST Nucleo L152RE `_ @@ -221,4 +203,3 @@ ST - 32 MHz - 512 Kb - 80 Kb - \ No newline at end of file diff --git a/docs/platforms/teensy.rst b/docs/platforms/teensy.rst index 21ff5fc5..c653694d 100644 --- a/docs/platforms/teensy.rst +++ b/docs/platforms/teensy.rst @@ -70,7 +70,6 @@ Teensy - 16 MHz - 32 Kb - 2.5 Kb - * - ``teensy20pp`` - `Teensy++ 2.0 `_ @@ -78,7 +77,6 @@ Teensy - 16 MHz - 128 Kb - 8 Kb - * - ``teensy30`` - `Teensy 3.0 `_ @@ -86,7 +84,6 @@ Teensy - 48 MHz - 128 Kb - 16 Kb - * - ``teensy31`` - `Teensy 3.1 `_ @@ -94,4 +91,3 @@ Teensy - 72 MHz - 256 Kb - 64 Kb - \ No newline at end of file diff --git a/docs/platforms/timsp430.rst b/docs/platforms/timsp430.rst index 3b733f87..26c838f4 100644 --- a/docs/platforms/timsp430.rst +++ b/docs/platforms/timsp430.rst @@ -63,7 +63,6 @@ TI - 16 MHz - 128 Kb - 1 Kb - * - ``lpmsp430f5529_25`` - `LaunchPad w/ msp430f5529 (25MHz) `_ @@ -71,7 +70,6 @@ TI - 25 MHz - 128 Kb - 1 Kb - * - ``lpmsp430fr5739`` - `FraunchPad w/ msp430fr5739 `_ @@ -79,7 +77,6 @@ TI - 16 MHz - 16 Kb - 1 Kb - * - ``lpmsp430fr5969`` - `LaunchPad w/ msp430fr5969 `_ @@ -87,7 +84,6 @@ TI - 8 MHz - 64 Kb - 1 Kb - * - ``lpmsp430g2231`` - `LaunchPad w/ msp430g2231 (1 MHz) `_ @@ -95,7 +91,6 @@ TI - 1 MHz - 2 Kb - 0.125 Kb - * - ``lpmsp430g2452`` - `LaunchPad w/ msp430g2452 (16MHz) `_ @@ -103,7 +98,6 @@ TI - 16 MHz - 8 Kb - 0.25 Kb - * - ``lpmsp430g2553`` - `LaunchPad w/ msp430g2553 (16MHz) `_ @@ -111,4 +105,3 @@ TI - 16 MHz - 16 Kb - 0.5 Kb - \ No newline at end of file diff --git a/docs/platforms/titiva.rst b/docs/platforms/titiva.rst index ce8078c3..731bab2a 100644 --- a/docs/platforms/titiva.rst +++ b/docs/platforms/titiva.rst @@ -69,7 +69,6 @@ TI - 80 MHz - 256 Kb - 32 Kb - * - ``lptm4c1230c3pm`` - `LaunchPad (Tiva C) w/ tm4c123 (80MHz) `_ @@ -77,7 +76,6 @@ TI - 80 MHz - 256 Kb - 32 Kb - * - ``lptm4c1294ncpdt`` - `LaunchPad (Tiva C) w/ tm4c129 (120MHz) `_ @@ -85,4 +83,3 @@ TI - 120 MHz - 1024 Kb - 256 Kb - \ No newline at end of file diff --git a/platformio/boards/arduino.json b/platformio/boards/arduino.json index 76f90725..12cadb1c 100644 --- a/platformio/boards/arduino.json +++ b/platformio/boards/arduino.json @@ -674,7 +674,7 @@ "maximum_ram_size": 32768, "maximum_size": 524288, "protocol": "sam-ba", - "require_upload_port" : true, + "require_upload_port" : true, "use_1200bps_touch": true, "wait_for_upload_port": true }, @@ -702,7 +702,7 @@ "maximum_ram_size": 32768, "maximum_size": 524288, "protocol": "sam-ba", - "require_upload_port" : true, + "require_upload_port" : true, "use_1200bps_touch": true, "wait_for_upload_port": true }, diff --git a/platformio/boards/ststm32.json b/platformio/boards/ststm32.json index 7ab6a260..c917d2f6 100644 --- a/platformio/boards/ststm32.json +++ b/platformio/boards/ststm32.json @@ -7,7 +7,7 @@ "ldscript": "stm32f405x6.ld", "cpu": "cortex-m4", "mcu": "stm32f407vgt6", - "variant": "stm32f4" + "variant": "stm32f4" }, "frameworks": "cmsis,spl,opencm3,mbed", "name": "STM32F4DISCOVERY", @@ -27,7 +27,7 @@ "ldscript": "stm32l15xx6.ld", "cpu": "cortex-m3", "mcu": "stm32l152rbt6", - "variant": "stm32l1" + "variant": "stm32l1" }, "frameworks": "cmsis,spl,opencm3", "name": "STM32LDISCOVERY", @@ -49,7 +49,7 @@ "mcu": "stm32f303vct6", "variant": "stm32f3" }, - "frameworks": "cmsis,spl,opencm3,mbed", + "frameworks": ["cmsis", "spl", "opencm3", "mbed"], "name": "STM32F3DISCOVERY", "platform": "ststm32", "upload": { diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 0b6b5a50..36e48579 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -36,27 +36,24 @@ def generate_boards(boards): for type_, data in board.iteritems(): assert type_ in util.get_boards() board_ram = float(data['upload']['maximum_ram_size']) / 1024 - lines.append( - """ + lines.append(""" * - ``{type}`` - `{name} <{url}>`_ - {mcu} - {f_cpu:d} MHz - {rom} Kb - - {ram} Kb - """.format( - type=type_, - name=data['name'], - url=data['url'], - mcu=data['build']['mcu'].upper(), - f_cpu=int((data['build']['f_cpu'][:-1])) / 1000000, - ram=int(board_ram) if board_ram % 1 == 0 else board_ram, - rom=_round_memory_size( - data['upload']['maximum_size'] / 1024) - ) - ) + - {ram} Kb""".format( + type=type_, + name=data['name'], + url=data['url'], + mcu=data['build']['mcu'].upper(), + f_cpu=int((data['build']['f_cpu'][:-1])) / 1000000, + ram=int(board_ram) if board_ram % 1 == 0 else board_ram, + rom=_round_memory_size( + data['upload']['maximum_size'] / 1024) + )) - return "\n".join(lines) + return "\n".join(lines + [""]) def generate_packages(packages): From 08808be62b384028fc9ad253e1e72e68cb078e31 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 20:45:11 +0200 Subject: [PATCH 19/58] Fix "frameworks" field to JSON array --- platformio/boards/arduino.json | 62 ++++++++++++------------- platformio/boards/digistump.json | 10 ++-- platformio/boards/engduino.json | 6 +-- platformio/boards/freescalekinetis.json | 24 +++++----- platformio/boards/microduino.json | 18 +++---- platformio/boards/misc.json | 10 ++-- platformio/boards/nordicnrf51.json | 28 +++++------ platformio/boards/nxplpc.json | 52 ++++++++++----------- platformio/boards/ststm32.json | 36 +++++++------- platformio/boards/teensy.json | 8 ++-- platformio/boards/timsp430.json | 14 +++--- platformio/boards/titiva.json | 6 +-- platformio/commands/init.py | 6 +-- tests/commands/test_init.py | 2 +- 14 files changed, 141 insertions(+), 141 deletions(-) diff --git a/platformio/boards/arduino.json b/platformio/boards/arduino.json index 12cadb1c..2736d067 100644 --- a/platformio/boards/arduino.json +++ b/platformio/boards/arduino.json @@ -10,7 +10,7 @@ "variant": "leonardo", "vid": "0x1B4F" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "LilyPad Arduino USB", "platform": "atmelavr", "upload": { @@ -34,7 +34,7 @@ "mcu": "atmega168", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino NG or older ATmega168", "platform": "atmelavr", "upload": { @@ -55,7 +55,7 @@ "mcu": "atmega8", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino NG or older ATmega8", "platform": "atmelavr", "upload": { @@ -76,7 +76,7 @@ "mcu": "atmega168", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino BT ATmega168", "platform": "atmelavr", "upload": { @@ -98,7 +98,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino BT ATmega328", "platform": "atmelavr", "upload": { @@ -120,7 +120,7 @@ "mcu": "atmega168", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Duemilanove or Diecimila ATmega168", "platform": "atmelavr", "upload": { @@ -141,7 +141,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Duemilanove or Diecimila ATmega328", "platform": "atmelavr", "upload": { @@ -165,7 +165,7 @@ "variant": "leonardo", "vid": "0x2341" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Esplora", "platform": "atmelavr", "upload": { @@ -189,7 +189,7 @@ "mcu": "atmega328p", "variant": "ethernet" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Ethernet", "platform": "atmelavr", "upload": { @@ -210,7 +210,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Fio", "platform": "atmelavr", "upload": { @@ -234,7 +234,7 @@ "variant": "leonardo", "vid": "0x2341" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Leonardo", "platform": "atmelavr", "upload": { @@ -258,7 +258,7 @@ "mcu": "atmega168", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "LilyPad Arduino ATmega168", "platform": "atmelavr", "upload": { @@ -279,7 +279,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "LilyPad Arduino ATmega328", "platform": "atmelavr", "upload": { @@ -300,7 +300,7 @@ "mcu": "atmega2560", "variant": "mega" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Mega ADK", "platform": "atmelavr", "upload": { @@ -321,7 +321,7 @@ "mcu": "atmega1280", "variant": "mega" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Mega or Mega 2560 ATmega1280", "platform": "atmelavr", "upload": { @@ -342,7 +342,7 @@ "mcu": "atmega2560", "variant": "mega" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Mega or Mega 2560 ATmega2560 (Mega 2560)", "platform": "atmelavr", "upload": { @@ -366,7 +366,7 @@ "variant": "micro", "vid": "0x2341" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Micro", "platform": "atmelavr", "upload": { @@ -390,7 +390,7 @@ "mcu": "atmega168", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Mini ATmega168", "platform": "atmelavr", "upload": { @@ -411,7 +411,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Mini ATmega328", "platform": "atmelavr", "upload": { @@ -432,7 +432,7 @@ "mcu": "atmega168", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Nano ATmega168", "platform": "atmelavr", "upload": { @@ -453,7 +453,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Nano ATmega328", "platform": "atmelavr", "upload": { @@ -474,7 +474,7 @@ "mcu": "atmega168", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz)", "platform": "atmelavr", "upload": { @@ -495,7 +495,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz)", "platform": "atmelavr", "upload": { @@ -516,7 +516,7 @@ "mcu": "atmega168", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz)", "platform": "atmelavr", "upload": { @@ -537,7 +537,7 @@ "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Pro or Pro Mini ATmega328 (3.3V, 8 MHz)", "platform": "atmelavr", "upload": { @@ -561,7 +561,7 @@ "variant": "robot_control", "vid": "0x2341" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Robot Control", "platform": "atmelavr", "upload": { @@ -588,7 +588,7 @@ "variant": "robot_motor", "vid": "0x2341" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Robot Motor", "platform": "atmelavr", "upload": { @@ -612,7 +612,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Uno", "platform": "atmelavr", "upload": { @@ -636,7 +636,7 @@ "variant": "yun", "vid": "0x2341" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Yun", "platform": "atmelavr", "upload": { @@ -666,7 +666,7 @@ "vid": "0x2341", "ldscript": "sam3x8e.ld" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Due (Programming Port)", "platform": "atmelsam", "upload": { @@ -694,7 +694,7 @@ "vid": "0x2341", "ldscript": "sam3x8e.ld" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Arduino Due (USB Native Port)", "platform": "atmelsam", "upload": { diff --git a/platformio/boards/digistump.json b/platformio/boards/digistump.json index 0f0f135e..c03d3680 100644 --- a/platformio/boards/digistump.json +++ b/platformio/boards/digistump.json @@ -7,7 +7,7 @@ "mcu": "attiny85", "variant": "digispark_tiny" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Digispark (Default - 16 MHz)", "platform": "atmelavr", "upload": { @@ -26,7 +26,7 @@ "mcu": "attiny167", "variant": "digispark_pro" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Digispark Pro (Default 16 MHz)", "platform": "atmelavr", "upload": { @@ -45,7 +45,7 @@ "mcu": "attiny167", "variant": "digispark_pro32" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Digispark Pro (16 MHz) (32 byte buffer)", "platform": "atmelavr", "upload": { @@ -64,7 +64,7 @@ "mcu": "attiny167", "variant": "digispark_pro64" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Digispark Pro (16 MHz) (64 byte buffer)", "platform": "atmelavr", "upload": { @@ -88,7 +88,7 @@ "variant": "digispark_digix", "vid": "0x16D0" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Digistump DigiX", "platform": "atmelsam", "upload": { diff --git a/platformio/boards/engduino.json b/platformio/boards/engduino.json index 159887a1..a08639cf 100644 --- a/platformio/boards/engduino.json +++ b/platformio/boards/engduino.json @@ -10,7 +10,7 @@ "variant": "engduinov1", "vid": "0x1B4F" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Engduino 1", "platform": "atmelavr", "upload": { @@ -37,7 +37,7 @@ "variant": "engduinov2", "vid": "0x1B4F" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Engduino 2", "platform": "atmelavr", "upload": { @@ -64,7 +64,7 @@ "variant": "engduinov3", "vid": "0x1B4F" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Engduino 3", "platform": "atmelavr", "upload": { diff --git a/platformio/boards/freescalekinetis.json b/platformio/boards/freescalekinetis.json index b33cbd84..88be3603 100644 --- a/platformio/boards/freescalekinetis.json +++ b/platformio/boards/freescalekinetis.json @@ -3,9 +3,9 @@ "build": { "f_cpu": "48000000L", "cpu": "cortex-m0plus", - "mcu": "mkl25z128vlk4" + "mcu": "mkl25z128vlk4" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Freescale Kinetis FRDM-KL25Z", "platform": "freescalekinetis", "upload": { @@ -19,9 +19,9 @@ "build": { "f_cpu": "48000000L", "cpu": "cortex-m0plus", - "mcu": "mkl46z256vll4" + "mcu": "mkl46z256vll4" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Freescale Kinetis FRDM-KL46Z", "platform": "freescalekinetis", "upload": { @@ -35,9 +35,9 @@ "build": { "f_cpu": "120000000L", "cpu": "cortex-m4", - "mcu": "mk64fn1m0vll12" + "mcu": "mk64fn1m0vll12" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Freescale Kinetis FRDM-K64F", "platform": "freescalekinetis", "upload": { @@ -51,9 +51,9 @@ "build": { "f_cpu": "48000000L", "cpu": "cortex-m0plus", - "mcu": "mkl05z32vfm4" + "mcu": "mkl05z32vfm4" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Freescale Kinetis FRDM-KL05Z", "platform": "freescalekinetis", "upload": { @@ -67,9 +67,9 @@ "build": { "f_cpu": "48000000L", "cpu": "cortex-m4", - "mcu": "mk20dx128vlh5" + "mcu": "mk20dx128vlh5" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Freescale Kinetis FRDM-K20D50M", "platform": "freescalekinetis", "upload": { @@ -84,9 +84,9 @@ "build": { "f_cpu": "120000000L", "cpu": "cortex-m4", - "mcu": "mk22fn512vlh12" + "mcu": "mk22fn512vlh12" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Freescale Kinetis FRDM-K22F", "platform": "freescalekinetis", "upload": { diff --git a/platformio/boards/microduino.json b/platformio/boards/microduino.json index 42b3411f..3336fc2e 100644 --- a/platformio/boards/microduino.json +++ b/platformio/boards/microduino.json @@ -7,7 +7,7 @@ "mcu": "atmega1284p", "variant": "plus" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Microduino Core+ (ATmega1284P@16M,5V)", "platform": "atmelavr", "upload": { @@ -28,7 +28,7 @@ "mcu": "atmega1284p", "variant": "plus" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Microduino Core+ (ATmega1284P@8M,3.3V)", "platform": "atmelavr", "upload": { @@ -49,7 +49,7 @@ "mcu": "atmega168p", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Microduino Core (Atmega168PA@16M,5V)", "platform": "atmelavr", "upload": { @@ -70,7 +70,7 @@ "mcu": "atmega168p", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Microduino Core (Atmega168PA@8M,3.3V)", "platform": "atmelavr", "upload": { @@ -91,7 +91,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Microduino Core (Atmega328P@16M,5V)", "platform": "atmelavr", "upload": { @@ -112,7 +112,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Microduino Core (Atmega328P@8M,3.3V)", "platform": "atmelavr", "upload": { @@ -135,7 +135,7 @@ "variant": "32u4", "vid": "0x2341" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Microduino Core USB (ATmega32U4@16M,5V)", "platform": "atmelavr", "upload": { @@ -159,7 +159,7 @@ "mcu": "atmega644p", "variant": "plus" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Microduino Core+ (Atmega644PA@16M,5V)", "platform": "atmelavr", "upload": { @@ -180,7 +180,7 @@ "mcu": "atmega644p", "variant": "plus" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Microduino Core+ (Atmega644PA@8M,3.3V)", "platform": "atmelavr", "upload": { diff --git a/platformio/boards/misc.json b/platformio/boards/misc.json index 2b24d002..abb6d9a1 100644 --- a/platformio/boards/misc.json +++ b/platformio/boards/misc.json @@ -7,7 +7,7 @@ "mcu": "atmega328p", "variant": "standard" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Raspduino", "platform": "atmelavr", "upload": { @@ -33,7 +33,7 @@ "vid": "0x2341", "ldscript": "sam3x8e.ld" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "SainSmart Due (Programming Port)", "platform": "atmelsam", "upload": { @@ -41,7 +41,7 @@ "maximum_ram_size": 32768, "maximum_size": 524288, "protocol": "sam-ba", - "require_upload_port" : true, + "require_upload_port" : true, "use_1200bps_touch": true, "wait_for_upload_port": true }, @@ -61,7 +61,7 @@ "vid": "0x2341", "ldscript": "sam3x8e.ld" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "SainSmart Due (USB Native Port)", "platform": "atmelsam", "upload": { @@ -69,7 +69,7 @@ "maximum_ram_size": 32768, "maximum_size": 524288, "protocol": "sam-ba", - "require_upload_port" : true, + "require_upload_port" : true, "use_1200bps_touch": true, "wait_for_upload_port": true }, diff --git a/platformio/boards/nordicnrf51.json b/platformio/boards/nordicnrf51.json index d88d4ebf..acdabaee 100644 --- a/platformio/boards/nordicnrf51.json +++ b/platformio/boards/nordicnrf51.json @@ -3,9 +3,9 @@ "build": { "f_cpu": "16000000L", "cpu": "cortex-m0", - "mcu": "nrf51822" + "mcu": "nrf51822" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Nordic nRF51822-mKIT", "platform": "nordicnrf51", "upload": { @@ -19,9 +19,9 @@ "build": { "f_cpu": "16000000L", "cpu": "cortex-m0", - "mcu": "nrf51822" + "mcu": "nrf51822" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Switch Science mbed HRM1017", "platform": "nordicnrf51", "upload": { @@ -35,9 +35,9 @@ "build": { "f_cpu": "16000000L", "cpu": "cortex-m0", - "mcu": "nrf51822" + "mcu": "nrf51822" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "RedBearLab nRF51822", "platform": "nordicnrf51", "upload": { @@ -51,9 +51,9 @@ "build": { "f_cpu": "32000000L", "cpu": "cortex-m0", - "mcu": "nrf51822" + "mcu": "nrf51822" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Nordic nRF51-DK", "platform": "nordicnrf51", "upload": { @@ -67,9 +67,9 @@ "build": { "f_cpu": "16000000L", "cpu": "cortex-m0", - "mcu": "nrf51822" + "mcu": "nrf51822" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "RedBearLab BLE Nano", "platform": "nordicnrf51", "upload": { @@ -83,9 +83,9 @@ "build": { "f_cpu": "32000000L", "cpu": "cortex-m0", - "mcu": "nrf51822" + "mcu": "nrf51822" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Nordic nRF51-Dongle", "platform": "nordicnrf51", "upload": { @@ -100,9 +100,9 @@ "build": { "f_cpu": "16000000L", "cpu": "cortex-m0", - "mcu": "nrf51822" + "mcu": "nrf51822" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "JKSoft Wallbot BLE", "platform": "nordicnrf51", "upload": { diff --git a/platformio/boards/nxplpc.json b/platformio/boards/nxplpc.json index 57cfdfc8..67392e27 100644 --- a/platformio/boards/nxplpc.json +++ b/platformio/boards/nxplpc.json @@ -3,9 +3,9 @@ "build": { "f_cpu": "96000000L", "cpu": "cortex-m3", - "mcu": "lpc1768" + "mcu": "lpc1768" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "mbed LPC1768", "platform": "nxplpc", "upload": { @@ -19,9 +19,9 @@ "build": { "f_cpu": "48000000L", "cpu": "cortex-m0", - "mcu": "lpc11u24" + "mcu": "lpc11u24" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "mbed LPC11U24", "platform": "nxplpc", "upload": { @@ -35,9 +35,9 @@ "build": { "f_cpu": "120000000L", "cpu": "cortex-m4", - "mcu": "lpc4088" + "mcu": "lpc4088" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "EA LPC4088 QuickStart Board", "platform": "nxplpc", "upload": { @@ -51,9 +51,9 @@ "build": { "f_cpu": "50000000L", "cpu": "cortex-m0", - "mcu": "lpc11u24" + "mcu": "lpc11u24" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "DipCortex M0", "platform": "nxplpc", "upload": { @@ -67,9 +67,9 @@ "build": { "f_cpu": "48000000L", "cpu": "cortex-m0", - "mcu": "lpc11u24" + "mcu": "lpc11u24" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "BlueBoard-LPC11U24", "platform": "nxplpc", "upload": { @@ -83,9 +83,9 @@ "build": { "f_cpu": "96000000L", "cpu": "cortex-m3", - "mcu": "lpc1768" + "mcu": "lpc1768" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Seeeduino-Arch-Pro", "platform": "nxplpc", "upload": { @@ -99,9 +99,9 @@ "build": { "f_cpu": "96000000L", "cpu": "cortex-m3", - "mcu": "lpc1768" + "mcu": "lpc1768" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "u-blox C027", "platform": "nxplpc", "upload": { @@ -115,9 +115,9 @@ "build": { "f_cpu": "48000000L", "cpu": "cortex-m0", - "mcu": "lpc1114fn28" + "mcu": "lpc1114fn28" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "mbed LPC1114FN28", "platform": "nxplpc", "upload": { @@ -131,9 +131,9 @@ "build": { "f_cpu": "48000000L", "cpu": "cortex-m0", - "mcu": "lpc11u35" + "mcu": "lpc11u35" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "EA LPC11U35 QuickStart Board", "platform": "nxplpc", "upload": { @@ -147,9 +147,9 @@ "build": { "f_cpu": "48000000L", "cpu": "cortex-m0", - "mcu": "lpc11u35" + "mcu": "lpc11u35" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "TG-LPC11U35-501", "platform": "nxplpc", "upload": { @@ -163,9 +163,9 @@ "build": { "f_cpu": "72000000L", "cpu": "cortex-m3", - "mcu": "lpc1549" + "mcu": "lpc1549" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "LPCXpresso1549", "platform": "nxplpc", "upload": { @@ -179,9 +179,9 @@ "build": { "f_cpu": "48000000L", "cpu": "cortex-m0", - "mcu": "lpc11u24" + "mcu": "lpc11u24" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "Outrageous Circuits mBuino", "platform": "nxplpc", "upload": { @@ -195,9 +195,9 @@ "build": { "f_cpu": "120000000L", "cpu": "cortex-m4", - "mcu": "lpc4088" + "mcu": "lpc4088" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "EA LPC4088 Display Module", "platform": "nxplpc", "upload": { diff --git a/platformio/boards/ststm32.json b/platformio/boards/ststm32.json index c917d2f6..b1e29c7d 100644 --- a/platformio/boards/ststm32.json +++ b/platformio/boards/ststm32.json @@ -9,7 +9,7 @@ "mcu": "stm32f407vgt6", "variant": "stm32f4" }, - "frameworks": "cmsis,spl,opencm3,mbed", + "frameworks": ["cmsis", "spl", "opencm3", "mbed"], "name": "STM32F4DISCOVERY", "platform": "ststm32", "upload": { @@ -29,7 +29,7 @@ "mcu": "stm32l152rbt6", "variant": "stm32l1" }, - "frameworks": "cmsis,spl,opencm3", + "frameworks": ["cmsis","spl","opencm3"], "name": "STM32LDISCOVERY", "platform": "ststm32", "upload": { @@ -65,7 +65,7 @@ "cpu": "cortex-m3", "mcu": "stm32f100rbt6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "STM32VLDISCOVERY", "platform": "ststm32", "upload": { @@ -81,7 +81,7 @@ "cpu": "cortex-m0", "mcu": "stm32f051r8t6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "STM32F0DISCOVERY", "platform": "ststm32", "upload": { @@ -97,7 +97,7 @@ "cpu": "cortex-m4", "mcu": "stm32f334c8t6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "32F3348DISCOVERY", "platform": "ststm32", "upload": { @@ -113,7 +113,7 @@ "cpu": "cortex-m4", "mcu": "stm32f401vct6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "32F401CDISCOVERY", "platform": "ststm32", "upload": { @@ -129,7 +129,7 @@ "cpu": "cortex-m4", "mcu": "stm32f429zit6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "32F429IDISCOVERY", "platform": "ststm32", "upload": { @@ -145,7 +145,7 @@ "cpu": "cortex-m0", "mcu": "stm32f030r8t6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo F030R8", "platform": "ststm32", "upload": { @@ -161,7 +161,7 @@ "cpu": "cortex-m0", "mcu": "stm32f070rbt6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo F070RB", "platform": "ststm32", "upload": { @@ -177,7 +177,7 @@ "cpu": "cortex-m0", "mcu": "stm32f072rbt6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo F072RB", "platform": "ststm32", "upload": { @@ -193,7 +193,7 @@ "cpu": "cortex-m0", "mcu": "stm32f091rct6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo F091RC", "platform": "ststm32", "upload": { @@ -209,7 +209,7 @@ "cpu": "cortex-m3", "mcu": "stm32f103rbt6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo F103RB", "platform": "ststm32", "upload": { @@ -225,7 +225,7 @@ "cpu": "cortex-m4", "mcu": "stm32f302r8t6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo F302R8", "platform": "ststm32", "upload": { @@ -241,7 +241,7 @@ "cpu": "cortex-m4", "mcu": "stm32f334r8t6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo F334R8", "platform": "ststm32", "upload": { @@ -257,7 +257,7 @@ "cpu": "cortex-m4", "mcu": "stm32f401ret6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo F401RE", "platform": "ststm32", "upload": { @@ -273,7 +273,7 @@ "cpu": "cortex-m4", "mcu": "stm32f411ret6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo F411RE", "platform": "ststm32", "upload": { @@ -289,7 +289,7 @@ "cpu": "cortex-m0", "mcu": "stm32l053r8t6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo L053R8", "platform": "ststm32", "upload": { @@ -305,7 +305,7 @@ "cpu": "cortex-m3", "mcu": "stm32l152ret6" }, - "frameworks": "mbed", + "frameworks": ["mbed"], "name": "ST Nucleo L152RE", "platform": "ststm32", "upload": { diff --git a/platformio/boards/teensy.json b/platformio/boards/teensy.json index 6914b37a..bb3b4a88 100644 --- a/platformio/boards/teensy.json +++ b/platformio/boards/teensy.json @@ -5,7 +5,7 @@ "f_cpu": "16000000L", "mcu": "atmega32u4" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Teensy 2.0", "platform": "teensy", "upload": { @@ -22,7 +22,7 @@ "f_cpu": "16000000L", "mcu": "at90usb1286" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Teensy++ 2.0", "platform": "teensy", "upload": { @@ -42,7 +42,7 @@ "mcu": "mk20dx128", "cpu": "cortex-m4" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Teensy 3.0", "platform": "teensy", "upload": { @@ -62,7 +62,7 @@ "mcu": "mk20dx256", "cpu": "cortex-m4" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Teensy 3.1", "platform": "teensy", "upload": { diff --git a/platformio/boards/timsp430.json b/platformio/boards/timsp430.json index b93e9fab..88731614 100644 --- a/platformio/boards/timsp430.json +++ b/platformio/boards/timsp430.json @@ -6,7 +6,7 @@ "mcu": "msp430f5529", "variant": "launchpad_f5529" }, - "frameworks": "energia", + "frameworks": ["energia"], "name": "LaunchPad w/ msp430f5529 (16MHz)", "platform": "timsp430", "upload": { @@ -24,7 +24,7 @@ "mcu": "msp430f5529", "variant": "launchpad_f5529" }, - "frameworks": "energia", + "frameworks": ["energia"], "name": "LaunchPad w/ msp430f5529 (25MHz)", "platform": "timsp430", "upload": { @@ -42,7 +42,7 @@ "mcu": "msp430fr5739", "variant": "fraunchpad" }, - "frameworks": "energia", + "frameworks": ["energia"], "name": "FraunchPad w/ msp430fr5739", "platform": "timsp430", "upload": { @@ -60,7 +60,7 @@ "mcu": "msp430fr5969", "variant": "launchpad_fr5969" }, - "frameworks": "energia", + "frameworks": ["energia"], "name": "LaunchPad w/ msp430fr5969", "platform": "timsp430", "upload": { @@ -78,7 +78,7 @@ "mcu": "msp430g2231", "variant": "launchpad" }, - "frameworks": "energia", + "frameworks": ["energia"], "name": "LaunchPad w/ msp430g2231 (1 MHz)", "platform": "timsp430", "upload": { @@ -96,7 +96,7 @@ "mcu": "msp430g2452", "variant": "launchpad" }, - "frameworks": "energia", + "frameworks": ["energia"], "name": "LaunchPad w/ msp430g2452 (16MHz)", "platform": "timsp430", "upload": { @@ -114,7 +114,7 @@ "mcu": "msp430g2553", "variant": "launchpad" }, - "frameworks": "energia", + "frameworks": ["energia"], "name": "LaunchPad w/ msp430g2553 (16MHz)", "platform": "timsp430", "upload": { diff --git a/platformio/boards/titiva.json b/platformio/boards/titiva.json index 0fcbc576..6b90b012 100644 --- a/platformio/boards/titiva.json +++ b/platformio/boards/titiva.json @@ -8,7 +8,7 @@ "mcu": "lplm4f120h5qr", "variant": "stellarpad" }, - "frameworks": "energia,opencm3", + "frameworks": ["energia", "opencm3"], "name": "LaunchPad (Stellaris) w/ lm4f120 (80MHz)", "platform": "titiva", "upload": { @@ -27,7 +27,7 @@ "mcu": "lptm4c1230c3pm", "variant": "stellarpad" }, - "frameworks": "energia,opencm3", + "frameworks": ["energia", "opencm3"], "name": "LaunchPad (Tiva C) w/ tm4c123 (80MHz)", "platform": "titiva", "upload": { @@ -46,7 +46,7 @@ "mcu": "lptm4c1294ncpdt", "variant": "launchpad_129" }, - "frameworks": "energia,opencm3", + "frameworks": ["energia", "opencm3"], "name": "LaunchPad (Tiva C) w/ tm4c129 (120MHz)", "platform": "titiva", "upload": { diff --git a/platformio/commands/init.py b/platformio/commands/init.py index 355597e4..1c32ecca 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -94,11 +94,11 @@ def fill_project_envs(project_file, board_types, disable_auto_uploading): data = builtin_boards[type_] # find default framework for board - framework = data.get("frameworks", None).split(",")[0] + frameworks = data.get("frameworks") content.append("[env:autogen_%s]" % type_) content.append("platform = %s" % data['platform']) - if framework: - content.append("framework = %s" % framework) + if frameworks: + content.append("framework = %s" % frameworks[0]) content.append("board = %s" % type_) content.append("%stargets = upload" % ("# " if disable_auto_uploading diff --git a/tests/commands/test_init.py b/tests/commands/test_init.py index 3dd9e318..0d816ff2 100644 --- a/tests/commands/test_init.py +++ b/tests/commands/test_init.py @@ -41,7 +41,7 @@ def test_init_special_board(platformio_setup, clirunner, validate_cliresult): config = util.get_project_config() expected_result = [ ("platform", str(uno['platform'])), - ("framework", str(uno['framework'])), + ("framework", str(uno['frameworks'][0])), ("board", "uno"), ("targets", "upload") ] From c00700b7cb9e91899df3e705c9823cb545cb7ceb Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 20:45:31 +0200 Subject: [PATCH 20/58] Search over platform packages --- platformio/commands/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/commands/search.py b/platformio/commands/search.py index 3af2aa5b..821c10c4 100644 --- a/platformio/commands/search.py +++ b/platformio/commands/search.py @@ -24,7 +24,7 @@ def cli(query, json_output): if query == "all": query = "" - search_data = "%s %s" % (name, info) + search_data = "%s %s %s" % (name, info, p.get_installed_packages()) if query and query.lower() not in search_data.lower(): continue From a0c3c2572186062176a70b0d5677e500dda7d849 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Wed, 11 Mar 2015 20:45:50 +0200 Subject: [PATCH 21/58] Fix mbed case for UNIX OS --- platformio/builder/scripts/frameworks/mbed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index fcf263be..7e4918ab 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -84,7 +84,7 @@ def get_source_files(flist): for f in flist: if f['type'] == "h" or not f['name'].startswith("mbed"): continue - files.append(join("$BUILD_DIR", "FrameworkMBED", f['name'][5:])) + files.append(join("$BUILD_DIR", "FrameworkMbed", f['name'][5:])) return files From cd06f3ed4323887d0c363801bae2dd0e7e61a6f4 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 12 Mar 2015 23:32:28 +0200 Subject: [PATCH 22/58] Add links to credit-card sized computers --- HISTORY.rst | 2 +- README.rst | 4 +++- docs/installation.rst | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 57d5783a..57080ffb 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -25,7 +25,7 @@ Release History **PlatformIO 1.0 - recommended for production** * Changed development status from ``beta`` to ``Production/Stable`` -* Added support for *ARM*-based credit-card computers: +* Added support for *ARM*-based credit-card sized computers: `Raspberry Pi `_, `BeagleBone `_ and `CubieBoard `_ * Added `atmelsam `_ diff --git a/README.rst b/README.rst index 71e5c345..ea631d32 100644 --- a/README.rst +++ b/README.rst @@ -47,7 +47,9 @@ Use whenever. *Run everywhere.* *PlatformIO* is written in pure *Python* and **doesn't depend** on any additional libraries/tools from an operation system. It allows you to use *PlatformIO* beginning from *PC (Mac, Linux, Win)* and ending with credit-card -sized computers (like *Raspberry Pi*). +sized computers (`Raspberry Pi `_, +`BeagleBone `_, +`CubieBoard `_). Embedded Development. *Easier Than Ever.* ----------------------------------------- diff --git a/docs/installation.rst b/docs/installation.rst index d4a4b61a..88d0edd3 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -3,10 +3,10 @@ Installation ============ -**PlatformIO** is written in `Python `_ and works -on Mac OS X, Linux, Windows OS and *ARM*-based credit-card +**PlatformIO** is written in `Python `_ and +works on Mac OS X, Linux, Windows OS and *ARM*-based credit-card sized computers (`Raspberry Pi `_, -`BeagleBoard `_, +`BeagleBone `_, `CubieBoard `_). .. contents:: From f4c21be95385302544eaf924e595dcbd37e22561 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 13 Mar 2015 00:02:31 +0200 Subject: [PATCH 23/58] Improve uploading firmware to mbed-enabled mass storages --- HISTORY.rst | 24 ++++++++++++++++++- docs/index.rst | 2 +- examples/mbed/mbed-blink/platformio.ini | 6 ++--- platformio/__init__.py | 2 +- .../builder/scripts/freescalekinetis.py | 11 +-------- platformio/builder/scripts/nordicnrf51.py | 11 +-------- platformio/builder/scripts/ststm32.py | 12 ++-------- platformio/builder/tools/pioupload.py | 17 +++++++++++-- 8 files changed, 47 insertions(+), 38 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 57080ffb..54f6cf8c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,28 @@ Release History =============== +1.2.0 (2015-03-??) +------------------ + +* Initial support of `mbed `__ + framework (only core SDK) +* Added `freescalekinetis `_ + development platform with Freescale Kinetis Freedom boards +* Added `nordicnrf51 `_ + development platform with supported boards from *JKSoft, Nordic, RedBearLab, + Switch Science* +* Added `nxplpc `_ + development platform with supported boards from *CQ Publishing, Embedded + Artists, NGX Technologies, NXP, Outrageous Circuits, SeeedStudio, + Solder Splash Labs, Switch Science, u-blox* +* Added support for *ST Nucleo* boards to + `ststm32 `__ + development platform +* Created new `Frameworks `__ + page in documentation +* Renamed ``stm32`` development platform to + `ststm32 `__ + 1.1.0 (2015-03-05) ------------------ @@ -31,7 +53,7 @@ Release History * Added `atmelsam `_ development platform with supported boards: *Arduino Due and Digistump DigiX* (`issue #71 `_) -* Added `stm32 `_ +* Added `ststm32 `__ development platform with supported boards: *Discovery kit for STM32L151/152, STM32F303xx, STM32F407/417 lines* and `libOpenCM3 Framework `_ (`issue #73 `_) diff --git a/docs/index.rst b/docs/index.rst index 8f734c06..5cadf2bc 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -58,7 +58,7 @@ Contents installation projectconf envvars - platforms/index + Platforms & Boards frameworks/index librarymanager/index userguide/index diff --git a/examples/mbed/mbed-blink/platformio.ini b/examples/mbed/mbed-blink/platformio.ini index bbef0cbe..f1f25ccb 100644 --- a/examples/mbed/mbed-blink/platformio.ini +++ b/examples/mbed/mbed-blink/platformio.ini @@ -31,13 +31,13 @@ framework = mbed board = nrf51_mkit # Freescale FRDM Platform -[env:frdm_k64f] +[env:frdm_kl25z] platform = freescalekinetis framework = mbed -board = frdm_k64f +board = frdm_kl25z # ST STM32 Platform [env:nucleo_f401re] platform = ststm32 framework = mbed -board = nucleo_f401re \ No newline at end of file +board = nucleo_f401re diff --git a/platformio/__init__.py b/platformio/__init__.py index cd24c147..96f3e969 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,7 +1,7 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -VERSION = (1, 2, "0.dev0") +VERSION = (1, 2, "0.dev1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/builder/scripts/freescalekinetis.py b/platformio/builder/scripts/freescalekinetis.py index bb5f7048..c80d7134 100644 --- a/platformio/builder/scripts/freescalekinetis.py +++ b/platformio/builder/scripts/freescalekinetis.py @@ -6,19 +6,10 @@ """ from os.path import join -from shutil import copyfile from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, DefaultEnvironment, SConscript) - -def UploadToDisk(target, source, env): # pylint: disable=W0613,W0621 - env.AutodetectUploadPort() - copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), - join(env.subst("$UPLOAD_PORT"), "firmware.bin")) - print ("Firmware has been successfully uploaded.\n" - "Please restart your board.") - env = DefaultEnvironment() SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) @@ -49,7 +40,7 @@ AlwaysBuild(target_size) # Target: Upload by default .bin file # -upload = env.Alias(["upload", "uploadlazy"], target_firm, UploadToDisk) +upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk) AlwaysBuild(upload) # diff --git a/platformio/builder/scripts/nordicnrf51.py b/platformio/builder/scripts/nordicnrf51.py index 1460b81d..15e67cc2 100644 --- a/platformio/builder/scripts/nordicnrf51.py +++ b/platformio/builder/scripts/nordicnrf51.py @@ -6,19 +6,10 @@ """ from os.path import join -from shutil import copyfile from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, DefaultEnvironment, SConscript) - -def UploadToDisk(target, source, env): # pylint: disable=W0613,W0621 - env.AutodetectUploadPort() - copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), - join(env.subst("$UPLOAD_PORT"), "firmware.bin")) - print ("Firmware has been successfully uploaded.\n" - "Please restart your board.") - env = DefaultEnvironment() SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) @@ -49,7 +40,7 @@ AlwaysBuild(target_size) # Target: Upload by default .bin file # -upload = env.Alias(["upload", "uploadlazy"], target_firm, UploadToDisk) +upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk) AlwaysBuild(upload) # diff --git a/platformio/builder/scripts/ststm32.py b/platformio/builder/scripts/ststm32.py index 9bc2f4c8..f10e4255 100644 --- a/platformio/builder/scripts/ststm32.py +++ b/platformio/builder/scripts/ststm32.py @@ -6,19 +6,10 @@ """ from os.path import join -from shutil import copyfile from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, DefaultEnvironment, SConscript) - -def UploadToDisk(target, source, env): # pylint: disable=W0613,W0621 - env.AutodetectUploadPort() - copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), - join(env.subst("$UPLOAD_PORT"), "firmware.bin")) - print ("Firmware has been successfully uploaded.\n" - "Please restart your board.") - env = DefaultEnvironment() SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) @@ -73,7 +64,8 @@ AlwaysBuild(target_size) # if "mbed" in env.subst("$FRAMEWORK"): - upload = env.Alias(["upload", "uploadlazy"], target_firm, UploadToDisk) + upload = env.Alias(["upload", "uploadlazy"], + target_firm, env.UploadToDisk) else: upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD") AlwaysBuild(upload) diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index 512615b6..975a7c76 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -2,6 +2,8 @@ # See LICENSE for details. import platform +from os.path import join +from shutil import copyfile from time import sleep from SCons.Script import Exit @@ -56,10 +58,12 @@ def AutodetectUploadPort(env): return if env.subst("$FRAMEWORK") == "mbed": + msdlabels = ("mbed", "nucleo", "frdm") for item in get_logicaldisks(): - if not item['name'] or "mbed" != item['name'].lower(): + if (not item['name'] or + not any([l in item['name'].lower() for l in msdlabels])): continue - print "Auto-detected UPLOAD_PORT: %s" % item['disk'] + print "Auto-detected UPLOAD_PORT/DISK: %s" % item['disk'] env.Replace(UPLOAD_PORT=item['disk']) break else: @@ -76,6 +80,14 @@ def AutodetectUploadPort(env): "For the some development platforms it can be USB flash drive\n") +def UploadToDisk(_, target, source, env): # pylint: disable=W0613,W0621 + env.AutodetectUploadPort() + copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), + join(env.subst("$UPLOAD_PORT"), "firmware.bin")) + print ("Firmware has been successfully uploaded.\n" + "Please restart your board.") + + def exists(_): return True @@ -85,4 +97,5 @@ def generate(env): env.AddMethod(TouchSerialPort) env.AddMethod(WaitForNewSerialPort) env.AddMethod(AutodetectUploadPort) + env.AddMethod(UploadToDisk) return env From 52e1345c4a5451c64224c077985325ce46068454 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 13 Mar 2015 00:19:06 +0200 Subject: [PATCH 24/58] Improve project description and keywords --- platformio/__init__.py | 6 ++++-- setup.py | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 96f3e969..0b4f11ed 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -5,8 +5,10 @@ VERSION = (1, 2, "0.dev1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" -__description__ = ("A cross-platform code builder and " - "the missing library manager") +__description__ = ("A cross-platform code builder and the missing library " + "manager (Atmel AVR & SAM, Freescale Kinetis, " + "Nordic nRF51, NXP LPC, ST STM32, TI MSP430 & Tiva, " + "Teensy, Arduino, mbed, libOpenCM3, etc.)") __url__ = "http://platformio.org" __author__ = "Ivan Kravets" diff --git a/setup.py b/setup.py index 6d5fb2ce..299e25e0 100644 --- a/setup.py +++ b/setup.py @@ -42,6 +42,7 @@ setup( "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Compilers" ], - keywords=("builder library manager atmel avr sam teensy stm32 " - "ti msp430 tiva mbed arduino opencm3") + keywords=("builder library manager atmel avr sam freescale kinetis nordic" + "nrf51 nxp lpc st stm32 ti msp430 tiva teensy arduino mbed" + "libopencm3") ) From d89e55e5d7d2fbe072481107021206791ecf2d52 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 13 Mar 2015 13:19:00 +0200 Subject: [PATCH 25/58] Disable uploading using mass storage disk for Mac OS X 10.10 (issue with FAT12) --- platformio/builder/scripts/ststm32.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platformio/builder/scripts/ststm32.py b/platformio/builder/scripts/ststm32.py index f10e4255..7b4d80e3 100644 --- a/platformio/builder/scripts/ststm32.py +++ b/platformio/builder/scripts/ststm32.py @@ -5,6 +5,7 @@ Builder for ST STM32 Series ARM microcontrollers. """ +import platform from os.path import join from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, @@ -63,7 +64,9 @@ AlwaysBuild(target_size) # Target: Upload by default .bin file # -if "mbed" in env.subst("$FRAMEWORK"): +disable_msd = (platform.system() == "Darwin" and + platform.release().startswith("14.")) +if "mbed" in env.subst("$FRAMEWORK") and not disable_msd: upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk) else: From 042816616e8b235a56552599ea40e60c1c136d87 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 13 Mar 2015 17:21:07 +0200 Subject: [PATCH 26/58] Automatically append -DPLATFORMIO to builder // Resolve #105 --- HISTORY.rst | 2 ++ platformio/builder/tools/platformio.py | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 54f6cf8c..93a4ce27 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -20,6 +20,8 @@ Release History development platform * Created new `Frameworks `__ page in documentation +* Automatically append define ``-DPLATFORMIO=%version%`` to builder + (`issue #105 `_) * Renamed ``stm32`` development platform to `ststm32 `__ diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index ca464b25..8bd92913 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -9,8 +9,19 @@ from os.path import basename, dirname, isdir, isfile, join, normpath from SCons.Script import Exit, SConscript, SConscriptChdir from SCons.Util import case_sensitive_suffixes +from platformio import __version__ + def BuildFirmware(env): + + def _append_pioversion(): + vermatch = re.match(r"^([\d\.]+)", __version__) + assert vermatch + intparts = [int(i) for i in vermatch.group(1).split(".")[:3]] + firmenv.Append( + CPPDEFINES=["PLATFORMIO={:02d}{:02d}{:02d}".format(*intparts)] + ) + # fix ASM handling under non-casitive OS if not case_sensitive_suffixes('.s', '.S'): env.Replace( @@ -52,6 +63,8 @@ def BuildFirmware(env): if _srcbuild_flags: firmenv.MergeFlags(_srcbuild_flags) + _append_pioversion() + return firmenv.Program( join("$BUILD_DIR", "firmware"), [firmenv.GlobCXXFiles(vdir) for vdir in vdirs], From 4c525e17049bf0e11a95b0f2371b6cea80c05e50 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 13 Mar 2015 17:54:24 +0200 Subject: [PATCH 27/58] Fix pioversion_to_instr for Py2.6 --- platformio/builder/tools/platformio.py | 15 +++++---------- platformio/util.py | 6 ++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 8bd92913..bb9b5786 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -9,19 +9,11 @@ from os.path import basename, dirname, isdir, isfile, join, normpath from SCons.Script import Exit, SConscript, SConscriptChdir from SCons.Util import case_sensitive_suffixes -from platformio import __version__ +from platformio.util import pioversion_to_intstr def BuildFirmware(env): - def _append_pioversion(): - vermatch = re.match(r"^([\d\.]+)", __version__) - assert vermatch - intparts = [int(i) for i in vermatch.group(1).split(".")[:3]] - firmenv.Append( - CPPDEFINES=["PLATFORMIO={:02d}{:02d}{:02d}".format(*intparts)] - ) - # fix ASM handling under non-casitive OS if not case_sensitive_suffixes('.s', '.S'): env.Replace( @@ -63,7 +55,10 @@ def BuildFirmware(env): if _srcbuild_flags: firmenv.MergeFlags(_srcbuild_flags) - _append_pioversion() + firmenv.Append( + CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format( + *pioversion_to_intstr())] + ) return firmenv.Program( join("$BUILD_DIR", "firmware"), diff --git a/platformio/util.py b/platformio/util.py index 2965e020..95e7a623 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -58,6 +58,12 @@ def get_systype(): return ("%s_%s" % (data[0], data[4])).lower() +def pioversion_to_intstr(): + vermatch = re.match(r"^([\d\.]+)", __version__) + assert vermatch + return [int(i) for i in vermatch.group(1).split(".")[:3]] + + def _get_projconf_option_dir(name, default=None): _env_name = "PLATFORMIO_%s" % name.upper() if _env_name in os.environ: From 519ed04e7059bba92e6e9e2b2518827b6f22c364 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 13 Mar 2015 17:58:45 +0200 Subject: [PATCH 28/58] Sort installed libs by ID --- platformio/commands/lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/commands/lib.py b/platformio/commands/lib.py index cb6e89a1..91c8dced 100644 --- a/platformio/commands/lib.py +++ b/platformio/commands/lib.py @@ -169,7 +169,7 @@ def lib_list(json_output): return echo_liblist_header() - for item in items: + for item in sorted(items, key=lambda i: i['id']): item['authornames'] = [i['name'] for i in item['authors']] echo_liblist_item(item) From 91b6ef0504f9331fb1b8872c1c3401494be41885 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 13 Mar 2015 17:59:15 +0200 Subject: [PATCH 29/58] Add example with mbed-enabled boards --- docs/userguide/cmd_boards.rst | 43 +++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/docs/userguide/cmd_boards.rst b/docs/userguide/cmd_boards.rst index d8188832..d5735999 100644 --- a/docs/userguide/cmd_boards.rst +++ b/docs/userguide/cmd_boards.rst @@ -45,7 +45,46 @@ Examples ... -2. Show boards which are based on ``ATmega168`` MCU +2. Show mbed-enabled boards + +.. code-block:: bash + + $ platformio boards mbed + + Platform: freescalekinetis + --------------------------------------------------------------------------- + Type MCU Frequency Flash RAM Name + --------------------------------------------------------------------------- + frdm_k20d50m mk20dx128vlh5 48Mhz 128Kb 16Kb Freescale Kinetis FRDM-K20D50M + frdm_k22f mk22fn512vlh12 120Mhz 512Kb 128Kb Freescale Kinetis FRDM-K22F + ... + + Platform: nordicnrf51 + --------------------------------------------------------------------------- + Type MCU Frequency Flash RAM Name + --------------------------------------------------------------------------- + wallBotBLE nrf51822 16Mhz 128Kb 16Kb JKSoft Wallbot BLE + nrf51_dk nrf51822 32Mhz 256Kb 32Kb Nordic nRF51-DK + ... + + Platform: nxplpc + --------------------------------------------------------------------------- + Type MCU Frequency Flash RAM Name + --------------------------------------------------------------------------- + blueboard_lpc11u24 lpc11u24 48Mhz 32Kb 8Kb BlueBoard-LPC11U24 + dipcortexm0 lpc11u24 50Mhz 32Kb 8Kb DipCortex M0 + lpc11u35 lpc11u35 48Mhz 64Kb 10Kb EA LPC11U35 QuickStart Board + ... + + Platform: ststm32 + --------------------------------------------------------------------------- + Type MCU Frequency Flash RAM Name + --------------------------------------------------------------------------- + disco_f401vc stm32f401vct6 84Mhz 256Kb 64Kb 32F401CDISCOVERY + nucleo_f030r8 stm32f030r8t6 48Mhz 64Kb 8Kb ST Nucleo F030R8 + ... + +3. Show boards which are based on ``ATmega168`` MCU .. code-block:: bash @@ -66,7 +105,7 @@ Examples 168pa16m atmega168p 16Mhz 15Kb 1Kb Microduino Core (Atmega168PA@16M,5V) 168pa8m atmega168p 8Mhz 15Kb 1Kb Microduino Core (Atmega168PA@8M,3.3V) -3. Show boards by :ref:`platform_timsp430` +4. Show boards by :ref:`platform_timsp430` .. code-block:: bash From 4e1e7ed4b5bcfbacf0b8990c5e6af9b157842c0b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 13 Mar 2015 18:50:04 +0200 Subject: [PATCH 30/58] Enhance "platformio search" command --- docs/userguide/cmd_search.rst | 73 ++++++++++++++++++++++++++++------- platformio/commands/search.py | 13 +++++-- 2 files changed, 68 insertions(+), 18 deletions(-) diff --git a/docs/userguide/cmd_search.rst b/docs/userguide/cmd_search.rst index c6b9e743..304c7fc6 100644 --- a/docs/userguide/cmd_search.rst +++ b/docs/userguide/cmd_search.rst @@ -35,27 +35,72 @@ Examples .. code-block:: bash $ platformio search - atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework) - atmelsam - An embedded platform for Atmel SAM microcontrollers (with Arduino Framework) - stm32 - An embedded platform for STMicroelectronics ARM microcontrollers - teensy - An embedded platform for Teensy boards (with Arduino Framework) - timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework) - titiva - An embedded platform for TI TIVA C ARM microcontrollers (with Energia and OpenCM3 Frameworks) - ... + atmelavr (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + -------- + Atmel AVR 8- and 32-bit MCUs deliver a unique combination of performance... + + atmelsam (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + -------- + Atmel | SMART offers Flash- based ARM products based on the ... + + freescalekinetis (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ---------------- + Freescale Kinetis Microcontrollers is family of multiple hardware- and ... + + nordicnrf51 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ----------- + The Nordic nRF51 Series is a family of highly flexible, multi-protocol ... + + nxplpc (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ------ + The NXP LPC is a family of 32-bit microcontroller integrated circuits ... + + ststm32 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ------- + The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M ... + + teensy (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ------ + Teensy is a complete USB-based microcontroller development syste ... + + timsp430 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + -------- + MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are ... + + titiva (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ------ + Texas Instruments TM4C12x MCUs offer the industrys most popular ... 2. Search for TI development platforms .. code-block:: bash $ platformio search ti - timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework) - titiva - An embedded platform for TI TIVA C ARM microcontrollers (with Energia Framework) + timsp430 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + -------- + MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are ... -3. Search for development platforms which support "Arduino Framework" + titiva (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ------ + Texas Instruments TM4C12x MCUs offer the industrys most popular ... + +3. Search for development platforms which support "mbed Framework" .. code-block:: bash - $ platformio search arduino - atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework) - atmelsam - An embedded platform for Atmel SAM microcontrollers (with Arduino Framework) - teensy - An embedded platform for Teensy boards (with Arduino Framework) + $ platformio search mbed + freescalekinetis (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ---------------- + Freescale Kinetis Microcontrollers is family of multiple hardware- and ... + + nordicnrf51 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ----------- + The Nordic nRF51 Series is a family of highly flexible, multi-protocol ... + + nxplpc (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ------ + The NXP LPC is a family of 32-bit microcontroller integrated circuits ... + + ststm32 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa) + ------- + The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M ... diff --git a/platformio/commands/search.py b/platformio/commands/search.py index 821c10c4..210829aa 100644 --- a/platformio/commands/search.py +++ b/platformio/commands/search.py @@ -24,18 +24,23 @@ def cli(query, json_output): if query == "all": query = "" - search_data = "%s %s %s" % (name, info, p.get_installed_packages()) + search_data = "%s %s %s" % (name, info, p.get_packages()) if query and query.lower() not in search_data.lower(): continue data.append({ "name": name, - "info": info + "info": info, + "packages": p.get_packages() }) if json_output: click.echo(json.dumps(data)) else: for item in data: - click.echo("{name:<20} - {info}".format( - name=click.style(item['name'], fg="cyan"), info=item['info'])) + click.secho(item['name'], fg="cyan", nl=False) + click.echo(" (available packages: %s)" % ", ".join( + p.get_packages().keys())) + click.secho("-" * len(item['name']), fg="cyan") + click.echo(item['info']) + click.echo() From 01f65ac4b02c675df8766f70a0fbdc805ad1c032 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 13 Mar 2015 19:06:35 +0200 Subject: [PATCH 31/58] Add information about PlatformIO Web 2.0 --- docs/frameworks/arduino.rst | 3 ++- docs/frameworks/cmsis.rst | 3 ++- docs/frameworks/energia.rst | 3 ++- docs/frameworks/mbed.rst | 3 ++- docs/frameworks/opencm3.rst | 3 ++- docs/frameworks/spl.rst | 3 ++- docs/platforms/atmelavr.rst | 3 ++- docs/platforms/atmelsam.rst | 3 ++- docs/platforms/freescalekinetis.rst | 3 ++- docs/platforms/nordicnrf51.rst | 3 ++- docs/platforms/nxplpc.rst | 3 ++- docs/platforms/ststm32.rst | 3 ++- docs/platforms/teensy.rst | 3 ++- docs/platforms/timsp430.rst | 3 ++- docs/platforms/titiva.rst | 3 ++- scripts/docspregen.py | 14 +++++++++----- 16 files changed, 39 insertions(+), 20 deletions(-) diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 705f6bf0..b5784935 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -10,7 +10,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. Adafruit diff --git a/docs/frameworks/cmsis.rst b/docs/frameworks/cmsis.rst index 95deecb8..2af8b34c 100644 --- a/docs/frameworks/cmsis.rst +++ b/docs/frameworks/cmsis.rst @@ -10,7 +10,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. ST diff --git a/docs/frameworks/energia.rst b/docs/frameworks/energia.rst index 2a4c0524..a864e7a9 100644 --- a/docs/frameworks/energia.rst +++ b/docs/frameworks/energia.rst @@ -10,7 +10,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. TI diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index 7051cd81..1bf010c6 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -10,7 +10,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. CQ Publishing diff --git a/docs/frameworks/opencm3.rst b/docs/frameworks/opencm3.rst index 81dbc3aa..e8b54fb1 100644 --- a/docs/frameworks/opencm3.rst +++ b/docs/frameworks/opencm3.rst @@ -10,7 +10,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. ST diff --git a/docs/frameworks/spl.rst b/docs/frameworks/spl.rst index 16e4e4af..47946970 100644 --- a/docs/frameworks/spl.rst +++ b/docs/frameworks/spl.rst @@ -10,7 +10,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. ST diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index 8204ec29..9e5d3825 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -44,7 +44,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/atmelsam.rst b/docs/platforms/atmelsam.rst index 128f9812..a420f7c2 100644 --- a/docs/platforms/atmelsam.rst +++ b/docs/platforms/atmelsam.rst @@ -42,7 +42,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/freescalekinetis.rst b/docs/platforms/freescalekinetis.rst index b190bc95..f86aba8f 100644 --- a/docs/platforms/freescalekinetis.rst +++ b/docs/platforms/freescalekinetis.rst @@ -37,7 +37,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/nordicnrf51.rst b/docs/platforms/nordicnrf51.rst index 43970701..c270dd4b 100644 --- a/docs/platforms/nordicnrf51.rst +++ b/docs/platforms/nordicnrf51.rst @@ -39,7 +39,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/nxplpc.rst b/docs/platforms/nxplpc.rst index 0ea25a4f..3e3fac3a 100644 --- a/docs/platforms/nxplpc.rst +++ b/docs/platforms/nxplpc.rst @@ -39,7 +39,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index c1a53f4d..eeb9179e 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -54,7 +54,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/teensy.rst b/docs/platforms/teensy.rst index c653694d..6f1bd642 100644 --- a/docs/platforms/teensy.rst +++ b/docs/platforms/teensy.rst @@ -47,7 +47,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/timsp430.rst b/docs/platforms/timsp430.rst index 26c838f4..c6d2f7c5 100644 --- a/docs/platforms/timsp430.rst +++ b/docs/platforms/timsp430.rst @@ -40,7 +40,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/titiva.rst b/docs/platforms/titiva.rst index 731bab2a..53cbeb43 100644 --- a/docs/platforms/titiva.rst +++ b/docs/platforms/titiva.rst @@ -46,7 +46,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 36e48579..c63d840f 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -1,11 +1,13 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -from os.path import dirname, join, realpath -from sys import path -from sys import exit as sys_exit from math import ceil +from os.path import dirname, join, realpath +from sys import exit as sys_exit +from sys import path + path.append("..") + from platformio import util from platformio.platforms.base import PLATFORM_PACKAGES, PlatformFactory @@ -109,7 +111,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. """) @@ -155,7 +158,8 @@ Boards ------ .. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command + * You can list pre-configured boards by :ref:`cmd_boards` command or + `PlatformIO Web 2.0 `_ site * For more detailed ``board`` information please scroll tables below by horizontal. """) From 8359408e540adacef484e6d2b0781359d12a8fee Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 13 Mar 2015 19:13:36 +0200 Subject: [PATCH 32/58] Allow multiple frameworks in Project Configuration File --- docs/projectconf.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/projectconf.rst b/docs/projectconf.rst index bf741fe4..de21b0a6 100644 --- a/docs/projectconf.rst +++ b/docs/projectconf.rst @@ -122,7 +122,7 @@ Options ``platform`` ^^^^^^^^^^^^ -:ref:`Platform ` type +:ref:`Platform ` type. .. _projectconf_env_framework: @@ -130,7 +130,9 @@ Options ``framework`` ^^^^^^^^^^^^^ -See ``framework`` type in *Frameworks* section of :ref:`platforms` +:ref:`Framework ` type. + +The multiple frameworks are allowed, split them with comma ``,`` separator. .. _projectconf_env_board: From 0282c741653563dadd351e62037b15fb8a7c3927 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Fri, 13 Mar 2015 20:27:46 +0200 Subject: [PATCH 33/58] Improve support for mbed framework --- platformio/builder/scripts/frameworks/mbed.py | 36 ++++----- platformio/builder/tools/platformio.py | 4 +- scripts/mbed_to_package.py | 75 ++++++++++--------- 3 files changed, 57 insertions(+), 58 deletions(-) diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 7e4918ab..045107d6 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -60,6 +60,8 @@ def parse_eix_file(filename): ("CPPDEFINES", "./Target/Source/Symbols/Symbol"), ("FILES", "./Target/Files/File"), ("LINKFLAGS", "./Target/Source/LD/Switch"), + ("OBJFILES", "./Target/Source/Addobjects/Addobject"), + ("LIBPATH", "./Target/Linker/Librarypaths/Librarypath"), ("STDLIBS", "./Target/Source/Syslibs/Library"), ("LDSCRIPT_PATH", "./Target/Source/Scriptfile"), ("CPPPATH", "./Target/Compiler/Includepaths/Includepath") @@ -79,15 +81,6 @@ def parse_eix_file(filename): return result -def get_source_files(flist): - files = [] - for f in flist: - if f['type'] == "h" or not f['name'].startswith("mbed"): - continue - files.append(join("$BUILD_DIR", "FrameworkMbed", f['name'][5:])) - return files - - def get_build_flags(data): flags = {} cflags = set(data.get("CFLAGS", [])) @@ -105,14 +98,16 @@ eixdata = parse_eix_file( join(env.subst("$PLATFORMFW_DIR"), "variant", variant, "%s.eix" % variant)) build_flags = get_build_flags(eixdata) +variant_dir = join("$PLATFORMFW_DIR", "variant", variant) + env.Replace( CPPFLAGS=build_flags.get("CPPFLAGS", []), CFLAGS=build_flags.get("CFLAGS", []), CXXFLAGS=build_flags.get("CXXFLAGS", []), LINKFLAGS=eixdata.get("LINKFLAGS", []), CPPDEFINES=[define for define in eixdata.get("CPPDEFINES", [])], - LDSCRIPT_PATH=normpath(join( - "$PLATFORMFW_DIR", "core", eixdata.get("LDSCRIPT_PATH")[0][5:])) + LDSCRIPT_PATH=normpath( + join(variant_dir, eixdata.get("LDSCRIPT_PATH")[0])) ) # Hook for K64F and K22F @@ -123,26 +118,27 @@ if board_type in ("frdm_k22f", "frdm_k64f"): for lib_path in eixdata.get("CPPPATH"): _vdir = join("$BUILD_DIR", "FrameworkMbedInc%d" % crc32(lib_path)) - env.VariantDir( - _vdir, - join("$PLATFORMFW_DIR", "core", lib_path[5:]) - ) + env.VariantDir(_vdir, join(variant_dir, lib_path)) env.Append(CPPPATH=[_vdir]) +env.Append( + LIBPATH=[join(variant_dir, path) + for path in eixdata.get("LIBPATH", []) + if path.startswith("mbed")], + LIBS=["mbed"] +) + # # Target: Build mbed Library # libs = [l for l in eixdata.get("STDLIBS", []) if l not in env.get("LIBS")] -env.VariantDir( - join("$BUILD_DIR", "FrameworkMbed"), - join("$PLATFORMFW_DIR", "core") -) libs.append(env.Library( join("$BUILD_DIR", "FrameworkMbed"), - get_source_files(eixdata.get("FILES", [])) + [join(variant_dir, f) + for f in eixdata.get("OBJFILES", [])] )) env.Append(LIBS=libs) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index bb9b5786..0b283fb2 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -63,8 +63,8 @@ def BuildFirmware(env): return firmenv.Program( join("$BUILD_DIR", "firmware"), [firmenv.GlobCXXFiles(vdir) for vdir in vdirs], - LIBS=env.get("LIBS") + deplibs, - LIBPATH="$BUILD_DIR", + LIBS=env.get("LIBS", []) + deplibs, + LIBPATH=env.get("LIBPATH", []) + ["$BUILD_DIR"], PROGSUFFIX=".elf" ) diff --git a/scripts/mbed_to_package.py b/scripts/mbed_to_package.py index e56d0f05..877c3473 100644 --- a/scripts/mbed_to_package.py +++ b/scripts/mbed_to_package.py @@ -1,64 +1,67 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -from os import getcwd, mkdir, makedirs, listdir -from os.path import isfile, isdir, join -from shutil import copy2, rmtree, copytree +import argparse +import zipfile +from os import getcwd, listdir, makedirs, mkdir, rename +from os.path import isdir, isfile, join +from shutil import move, rmtree from sys import exit as sys_exit from sys import path -import zipfile - - -MBED_DIR = "/home/valeros/mbed-master" -OUTPUT_DIR = "/home/valeros/mbed-framework" -CORE_DIR = join(OUTPUT_DIR, "core") -VARIANT_DIR = join(OUTPUT_DIR, "variant") path.append("..") -path.append(MBED_DIR) -from workspace_tools.export import gccarm + from platformio.util import exec_command -def _unzip_generated_file(mcu): +def _unzip_generated_file(mbed_dir, output_dir, mcu): filename = join( - MBED_DIR, "build", "export", "MBED_A1_emblocks_%s.zip" % mcu) - variant_dir = join(VARIANT_DIR, mcu) + mbed_dir, "build", "export", "MBED_A1_emblocks_%s.zip" % mcu) + variant_dir = join(output_dir, "variant", mcu) if isfile(filename): print "Processing board: %s" % mcu with zipfile.ZipFile(filename) as zfile: mkdir(variant_dir) - file_data = zfile.read("MBED_A1/MBED_A1.eix") - with open(join(variant_dir, "%s.eix" % mcu), "w") as f: - f.write(file_data) + zfile.extractall(variant_dir) + for f in listdir(join(variant_dir, "MBED_A1")): + if not f.lower().startswith("mbed"): + continue + move(join(variant_dir, "MBED_A1", f), variant_dir) + rename(join(variant_dir, "MBED_A1.eix"), + join(variant_dir, "%s.eix" % mcu)) + rmtree(join(variant_dir, "MBED_A1")) else: print "Warning! Skipped board: %s" % mcu -def main(): +def main(mbed_dir, output_dir): print "Starting..." - if isdir(OUTPUT_DIR): - rmtree(OUTPUT_DIR) - print "Delete previous framework dir" - makedirs(VARIANT_DIR) - # copy MBED library - mbedlib_dir = join(MBED_DIR, "libraries", "mbed") - for item in listdir(mbedlib_dir): - src = join(mbedlib_dir, item) - dst = join(CORE_DIR, item) - if isdir(src): - copytree(src, dst) - else: - copy2(src, dst) + + path.append(mbed_dir) + from workspace_tools.export import gccarm + + if isdir(output_dir): + print "Deleting previous framework dir..." + rmtree(output_dir) + + makedirs(join(output_dir, "variant")) # make .eix files for mcu in set(gccarm.GccArm.TARGETS): exec_command( - ["python", join(MBED_DIR, "workspace_tools", "project.py"), - "--mcu", mcu, "-i", "emblocks", "-p", "0"], cwd=getcwd() + ["python", join(mbed_dir, "workspace_tools", "build.py"), + "--mcu", mcu, "-t", "GCC_ARM"], cwd=getcwd() ) - _unzip_generated_file(mcu) + exec_command( + ["python", join(mbed_dir, "workspace_tools", "project.py"), + "--mcu", mcu, "-i", "emblocks", "-p", "0", "-b"], cwd=getcwd() + ) + _unzip_generated_file(mbed_dir, output_dir, mcu) print "Complete!" if __name__ == "__main__": - sys_exit(main()) + parser = argparse.ArgumentParser() + parser.add_argument('--mbed', help="The path to mbed framework") + parser.add_argument('--output', help="The path to output directory") + args = vars(parser.parse_args()) + sys_exit(main(args["mbed"], args["output"])) From e19f92879499cffa710ff87c6d2f9d5a588dd01b Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Fri, 13 Mar 2015 20:54:22 +0200 Subject: [PATCH 34/58] Fix PyLint warnings --- platformio/builder/scripts/frameworks/mbed.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 045107d6..742ff859 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -123,9 +123,9 @@ for lib_path in eixdata.get("CPPPATH"): env.Append( - LIBPATH=[join(variant_dir, path) - for path in eixdata.get("LIBPATH", []) - if path.startswith("mbed")], + LIBPATH=[join(variant_dir, lib_path) + for lib_path in eixdata.get("LIBPATH", []) + if lib_path.startswith("mbed")], LIBS=["mbed"] ) From bd9ee0c27a1a4ba6d0f9e075fc9c9f41b28bfce3 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 14 Mar 2015 00:01:32 +0200 Subject: [PATCH 35/58] Introduce /packages and /packages/manifest API --- platformio/__init__.py | 2 +- platformio/pkgmanager.py | 2 +- tests/test_pkgmanifest.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 0b4f11ed..960b6672 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,7 +1,7 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -VERSION = (1, 2, "0.dev1") +VERSION = (1, 2, "0.dev2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/pkgmanager.py b/platformio/pkgmanager.py index 757031e3..bd0e816f 100644 --- a/platformio/pkgmanager.py +++ b/platformio/pkgmanager.py @@ -28,7 +28,7 @@ class PackageManager(object): try: return cls._cached_manifest except AttributeError: - cls._cached_manifest = get_api_result("/packages") + cls._cached_manifest = get_api_result("/packages/manifest") return cls._cached_manifest @staticmethod diff --git a/tests/test_pkgmanifest.py b/tests/test_pkgmanifest.py index 25bddfd2..1493813a 100644 --- a/tests/test_pkgmanifest.py +++ b/tests/test_pkgmanifest.py @@ -29,7 +29,7 @@ def sfpkglist(): def pytest_generate_tests(metafunc): if "package_data" not in metafunc.fixturenames: return - pkgs_manifest = get_api_result("/packages") + pkgs_manifest = get_api_result("/packages/manifest") assert isinstance(pkgs_manifest, dict) packages = [] for _, variants in pkgs_manifest.iteritems(): From c00fecf992b694f0dea7c5058d52f04f77da483c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 14 Mar 2015 00:02:09 +0200 Subject: [PATCH 36/58] Avoid direct access to platform packages --- platformio/platforms/base.py | 4 ++++ scripts/docspregen.py | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index 869f0e15..e9dfd914 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -93,6 +93,10 @@ PLATFORM_PACKAGES = { } +def get_packages(): + return PLATFORM_PACKAGES + + class PlatformFactory(object): @staticmethod diff --git a/scripts/docspregen.py b/scripts/docspregen.py index c63d840f..316c61f6 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -9,7 +9,7 @@ from sys import path path.append("..") from platformio import util -from platformio.platforms.base import PLATFORM_PACKAGES, PlatformFactory +from platformio.platforms.base import PlatformFactory, get_packages def generate_boards(boards): @@ -59,6 +59,7 @@ def generate_boards(boards): def generate_packages(packages): + allpackages = get_packages() lines = [] lines.append(""".. list-table:: :header-rows: 1 @@ -66,10 +67,10 @@ def generate_packages(packages): * - Name - Contents""") for type_, data in packages.iteritems(): - assert type_ in PLATFORM_PACKAGES + assert type_ in allpackages contitems = [ "`%s <%s>`_" % (name, url) - for name, url in PLATFORM_PACKAGES[type_] + for name, url in allpackages[type_] ] lines.append(""" * - ``{type_}`` From 0ab6b08ff34c231cd4511cc5c07da30e959b7c63 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 15 Mar 2015 17:59:20 +0200 Subject: [PATCH 37/58] Update requests to 2.6.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e663d162..6a5ccae6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ click==3.3 colorama==0.3.3 pyserial==2.7 -requests==2.5.3 +requests==2.6.0 scons==2.3.0 From cbd67364f6384433210e4499b517c6621bdca712 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 15 Mar 2015 21:47:19 +0200 Subject: [PATCH 38/58] Convert "frameworks" to array --- platformio/boards/adafruit.json | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/platformio/boards/adafruit.json b/platformio/boards/adafruit.json index 9618e995..aa2e4dfa 100644 --- a/platformio/boards/adafruit.json +++ b/platformio/boards/adafruit.json @@ -1,7 +1,7 @@ { "flora8": { "build": { - "core": "arduino", + "core": ["arduino"], "extra_flags": "-DARDUINO_ARCH_AVR", "f_cpu": "8000000L", "mcu": "atmega32u4", @@ -10,7 +10,7 @@ "variant": "flora", "vid": "0x239A" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Adafruit Flora", "platform": "atmelavr", "upload": { @@ -29,13 +29,13 @@ "trinket3": { "build": { - "core": "arduino", + "core": ["arduino"], "extra_flags": "-DARDUINO_ARCH_AVR", "f_cpu": "8000000L", "mcu": "attiny85", "variant": "tiny8" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Adafruit Trinket 3V/8MHz", "platform": "atmelavr", "upload": { @@ -49,19 +49,19 @@ "trinket5": { "build": { - "core": "arduino", + "core": ["arduino"], "extra_flags": "-DARDUINO_ARCH_AVR", "f_cpu": "16000000L", "mcu": "attiny85", "variant": "tiny8" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Adafruit Trinket 5V/16MHz", "platform": "atmelavr", "upload": { "maximum_ram_size": 512, "maximum_size": 8192, - "protocol": "usbtiny" + "protocol": "usbtiny" }, "url": "http://www.adafruit.com/products/1501", "vendor": "Adafruit" @@ -69,13 +69,13 @@ "protrinket3": { "build": { - "core": "arduino", + "core": ["arduino"], "extra_flags": "-DARDUINO_ARCH_AVR", "f_cpu": "12000000L", "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Pro Trinket 3V/12MHz (USB)", "platform": "atmelavr", "upload": { @@ -89,13 +89,13 @@ "protrinket5": { "build": { - "core": "arduino", + "core": ["arduino"], "extra_flags": "-DARDUINO_ARCH_AVR", "f_cpu": "16000000L", "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Pro Trinket 5V/16MHz (USB)", "platform": "atmelavr", "upload": { @@ -108,19 +108,19 @@ }, "protrinket3ftdi": { "build": { - "core": "arduino", + "core": ["arduino"], "extra_flags": "-DARDUINO_ARCH_AVR", "f_cpu": "16000000L", "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Pro Trinket 3V/12MHz (FTDI)", "platform": "atmelavr", "upload": { "maximum_ram_size": 2048, "maximum_size": 28672, - "protocol": "arduino", + "protocol": ["arduino"], "require_upload_port" : true, "speed": 115200 }, @@ -129,23 +129,23 @@ }, "protrinket5ftdi": { "build": { - "core": "arduino", + "core": ["arduino"], "extra_flags": "-DARDUINO_ARCH_AVR", "f_cpu": "16000000L", "mcu": "atmega328p", "variant": "eightanaloginputs" }, - "frameworks": "arduino", + "frameworks": ["arduino"], "name": "Pro Trinket 5V/16MHz (USB)", "platform": "atmelavr", "upload": { "maximum_ram_size": 2048, "maximum_size": 28672, - "protocol": "arduino", + "protocol": ["arduino"], "require_upload_port" : true, "speed": 115200 }, "url": "http://www.adafruit.com/products/2000", "vendor": "Adafruit" } -} \ No newline at end of file +} From 57b84789c05bd69f14f3b9babe785d77042daa13 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Mon, 16 Mar 2015 12:10:15 +0200 Subject: [PATCH 39/58] Fix "mbed" framework // Resolve #122 --- platformio/builder/scripts/frameworks/mbed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index 742ff859..fec239f4 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -125,8 +125,7 @@ for lib_path in eixdata.get("CPPPATH"): env.Append( LIBPATH=[join(variant_dir, lib_path) for lib_path in eixdata.get("LIBPATH", []) - if lib_path.startswith("mbed")], - LIBS=["mbed"] + if lib_path.startswith("mbed")] ) # @@ -134,6 +133,7 @@ env.Append( # libs = [l for l in eixdata.get("STDLIBS", []) if l not in env.get("LIBS")] +libs.append("mbed") libs.append(env.Library( join("$BUILD_DIR", "FrameworkMbed"), From c536aca9611c0877c071e5f198ac17f9a36a96c3 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Mon, 16 Mar 2015 12:12:13 +0200 Subject: [PATCH 40/58] Add serial port example with mbed framework --- examples/mbed/mbed-serial/README.rst | 21 ++++++++++++ examples/mbed/mbed-serial/platformio.ini | 43 ++++++++++++++++++++++++ examples/mbed/mbed-serial/src/main.cpp | 10 ++++++ 3 files changed, 74 insertions(+) create mode 100644 examples/mbed/mbed-serial/README.rst create mode 100644 examples/mbed/mbed-serial/platformio.ini create mode 100644 examples/mbed/mbed-serial/src/main.cpp diff --git a/examples/mbed/mbed-serial/README.rst b/examples/mbed/mbed-serial/README.rst new file mode 100644 index 00000000..5ea1282a --- /dev/null +++ b/examples/mbed/mbed-serial/README.rst @@ -0,0 +1,21 @@ +How to buid PlatformIO based project +==================================== + +1. `Install PlatformIO `_ +2. Download `source code with examples `_ +3. Extract ZIP archive +4. Run these commands: + +.. code-block:: bash + + # Change directory to example + > cd platformio-develop/examples/mbed/mbed-serial + + # Process example project + > platformio run + + # Upload firmware + > platformio run --target upload + + # Clean build files + > platformio run --target clean diff --git a/examples/mbed/mbed-serial/platformio.ini b/examples/mbed/mbed-serial/platformio.ini new file mode 100644 index 00000000..f1f25ccb --- /dev/null +++ b/examples/mbed/mbed-serial/platformio.ini @@ -0,0 +1,43 @@ +# +# Project Configuration File +# +# A detailed documentation with the EXAMPLES is located here: +# http://docs.platformio.org/en/latest/projectconf.html +# + +# A sign `#` at the beginning of the line indicates a comment +# Comment lines are ignored. + +# Simple and base environment +# [env:mybaseenv] +# platform = %INSTALLED_PLATFORM_NAME_HERE% +# framework = +# board = +# +# Automatic targets - enable auto-uploading +# targets = upload + + +# NXP LPC Platform +[env:lpc1768] +platform = nxplpc +framework = mbed +board = lpc1768 + +# Nordic nRF51 Platform +[env:nrf51_mkit] +platform = nordicnrf51 +framework = mbed +board = nrf51_mkit + +# Freescale FRDM Platform +[env:frdm_kl25z] +platform = freescalekinetis +framework = mbed +board = frdm_kl25z + +# ST STM32 Platform +[env:nucleo_f401re] +platform = ststm32 +framework = mbed +board = nucleo_f401re diff --git a/examples/mbed/mbed-serial/src/main.cpp b/examples/mbed/mbed-serial/src/main.cpp new file mode 100644 index 00000000..132ba174 --- /dev/null +++ b/examples/mbed/mbed-serial/src/main.cpp @@ -0,0 +1,10 @@ +#include "mbed.h" + +Serial pc(USBTX, USBRX); // tx, rx + +int main() { + pc.printf("Hello World!\n\r"); + while(1) { + pc.putc(pc.getc() + 1); // echo input back to terminal + } +} \ No newline at end of file From 0bfc6dfe3e8099f3cc205115736b67f608699904 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 16 Mar 2015 12:47:43 +0200 Subject: [PATCH 41/58] Split platform __doc__ to description and vedor url --- docs/platforms/atmelavr.rst | 9 ++------- docs/platforms/atmelsam.rst | 7 ++----- docs/platforms/freescalekinetis.rst | 8 ++------ docs/platforms/nordicnrf51.rst | 10 ++-------- docs/platforms/nxplpc.rst | 10 ++-------- docs/platforms/ststm32.rst | 10 ++-------- docs/platforms/teensy.rst | 9 ++------- docs/platforms/timsp430.rst | 8 ++------ docs/platforms/titiva.rst | 8 ++------ platformio/commands/search.py | 8 ++++---- platformio/commands/show.py | 7 ++++--- platformio/platforms/base.py | 13 ++++++++++--- scripts/docspregen.py | 11 ++++++++--- 13 files changed, 44 insertions(+), 74 deletions(-) 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 ------ From 19822ff08fa73b1d781e8cf08e15f30736a5cc4d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 16 Mar 2015 14:15:57 +0200 Subject: [PATCH 42/58] Introduce platform names --- platformio/commands/search.py | 10 ++--- platformio/commands/show.py | 2 +- platformio/platforms/atmelavr.py | 3 ++ platformio/platforms/atmelsam.py | 3 ++ platformio/platforms/base.py | 51 +++++++++++++----------- platformio/platforms/freescalekinetis.py | 3 ++ platformio/platforms/nordicnrf51.py | 3 ++ platformio/platforms/nxplpc.py | 3 ++ platformio/platforms/ststm32.py | 3 ++ platformio/platforms/teensy.py | 3 ++ platformio/platforms/timsp430.py | 3 ++ platformio/platforms/titiva.py | 3 ++ tests/commands/test_boards.py | 4 +- tests/commands/test_search.py | 2 +- 14 files changed, 63 insertions(+), 33 deletions(-) diff --git a/platformio/commands/search.py b/platformio/commands/search.py index e46e0bb0..d3b7d69a 100644 --- a/platformio/commands/search.py +++ b/platformio/commands/search.py @@ -18,18 +18,18 @@ def cli(query, json_output): platforms.sort() for platform in platforms: p = PlatformFactory.newPlatform(platform) - name = p.get_name() + type_ = p.get_type() description = p.get_description() if query == "all": query = "" - search_data = "%s %s %s" % (name, description, p.get_packages()) + search_data = "%s %s %s" % (type_, description, p.get_packages()) if query and query.lower() not in search_data.lower(): continue data.append({ - "name": name, + "type": type_, "description": description, "packages": p.get_packages() }) @@ -38,9 +38,9 @@ def cli(query, json_output): click.echo(json.dumps(data)) else: for item in data: - click.secho(item['name'], fg="cyan", nl=False) + click.secho(item['type'], fg="cyan", nl=False) click.echo(" (available packages: %s)" % ", ".join( p.get_packages().keys())) - click.secho("-" * len(item['name']), fg="cyan") + click.secho("-" * len(item['type']), fg="cyan") click.echo(item['description']) click.echo() diff --git a/platformio/commands/show.py b/platformio/commands/show.py index ae9106f2..f0913ff9 100644 --- a/platformio/commands/show.py +++ b/platformio/commands/show.py @@ -30,7 +30,7 @@ def cli(ctx, platform): p = PlatformFactory.newPlatform(platform) click.echo("{name:<20} - {description} [ {url} ]".format( - name=click.style(p.get_name(), fg="cyan"), + name=click.style(p.get_type(), fg="cyan"), description=p.get_description(), url=p.get_vendor_url())) installed_packages = PackageManager.get_installed() diff --git a/platformio/platforms/atmelavr.py b/platformio/platforms/atmelavr.py index 6ca3e0f4..9c7bc243 100644 --- a/platformio/platforms/atmelavr.py +++ b/platformio/platforms/atmelavr.py @@ -37,6 +37,9 @@ class AtmelavrPlatform(BasePlatform): } } + def get_name(self): + return "Atmel AVR" + def on_run_err(self, line): # pylint: disable=R0201 # fix STDERR "flash written" for avrdude if "avrdude" in line: diff --git a/platformio/platforms/atmelsam.py b/platformio/platforms/atmelsam.py index aacb03a1..e11d98a4 100644 --- a/platformio/platforms/atmelsam.py +++ b/platformio/platforms/atmelsam.py @@ -34,3 +34,6 @@ class AtmelsamPlatform(BasePlatform): "default": True } } + + def get_name(self): + return "Atmel SAM" diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index eadad863..0a5c4da6 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -100,17 +100,17 @@ def get_packages(): class PlatformFactory(object): @staticmethod - def get_clsname(name): - return "%sPlatform" % name.title() + def get_clsname(type_): + return "%sPlatform" % type_.title() @staticmethod - def load_module(name, path): + def load_module(type_, path): module = None try: module = load_source( - "platformio.platforms.%s" % name, path) + "platformio.platforms.%s" % type_, path) except ImportError: - raise exception.UnknownPlatform(name) + raise exception.UnknownPlatform(type_) return module @classmethod @@ -123,15 +123,15 @@ class PlatformFactory(object): for p in listdir(pdir): if p in ("__init__.py", "base.py") or not p.endswith(".py"): continue - name = p[:-3] + type_ = p[:-3] path = join(pdir, p) try: isplatform = hasattr( - cls.load_module(name, path), - cls.get_clsname(name) + cls.load_module(type_, path), + cls.get_clsname(type_) ) if isplatform: - platforms[name] = path + platforms[type_] = path except exception.UnknownPlatform: pass @@ -139,20 +139,20 @@ class PlatformFactory(object): return platforms installed_platforms = {} - for name in get_state_item("installed_platforms", []): - if name in platforms: - installed_platforms[name] = platforms[name] + for type_ in get_state_item("installed_platforms", []): + if type_ in platforms: + installed_platforms[type_] = platforms[type_] return installed_platforms @classmethod - def newPlatform(cls, name): + def newPlatform(cls, type_): platforms = cls.get_platforms() - if name not in platforms: - raise exception.UnknownPlatform(name) + if type_ not in platforms: + raise exception.UnknownPlatform(type_) _instance = getattr( - cls.load_module(name, platforms[name]), - cls.get_clsname(name) + cls.load_module(type_, platforms[type_]), + cls.get_clsname(type_) )() assert isinstance(_instance, BasePlatform) return _instance @@ -166,12 +166,15 @@ class BasePlatform(object): def __init__(self): self._found_error = False - def get_name(self): + def get_type(self): return self.__class__.__name__[:-8].lower() + def get_name(self): + return self.get_type().title() + def get_build_script(self): builtin = join(util.get_source_dir(), "builder", "scripts", "%s.py" % - self.get_name()) + self.get_type()) if isfile(builtin): return builtin raise NotImplementedError() @@ -235,14 +238,14 @@ class BasePlatform(object): # register installed platform data = get_state_item("installed_platforms", []) - if self.get_name() not in data: - data.append(self.get_name()) + if self.get_type() not in data: + data.append(self.get_type()) set_state_item("installed_platforms", data) return len(requirements) def uninstall(self): - platform = self.get_name() + platform = self.get_type() installed_platforms = PlatformFactory.get_platforms( installed=True).keys() @@ -286,8 +289,8 @@ class BasePlatform(object): installed=True).keys() installed_packages = PackageManager.get_installed() - if self.get_name() not in installed_platforms: - raise exception.PlatformNotInstalledYet(self.get_name()) + if self.get_type() not in installed_platforms: + raise exception.PlatformNotInstalledYet(self.get_type()) if "clean" in targets: targets.remove("clean") diff --git a/platformio/platforms/freescalekinetis.py b/platformio/platforms/freescalekinetis.py index 61106fea..56239f17 100644 --- a/platformio/platforms/freescalekinetis.py +++ b/platformio/platforms/freescalekinetis.py @@ -26,3 +26,6 @@ class FreescalekinetisPlatform(BasePlatform): "default": True } } + + def get_name(self): + return "Freescale Kinetis" diff --git a/platformio/platforms/nordicnrf51.py b/platformio/platforms/nordicnrf51.py index 975b4ce4..e3a09a0d 100644 --- a/platformio/platforms/nordicnrf51.py +++ b/platformio/platforms/nordicnrf51.py @@ -28,3 +28,6 @@ class Nordicnrf51Platform(BasePlatform): "default": True } } + + def get_name(self): + return "Nordic nRF51" diff --git a/platformio/platforms/nxplpc.py b/platformio/platforms/nxplpc.py index 4da1334f..b165731f 100644 --- a/platformio/platforms/nxplpc.py +++ b/platformio/platforms/nxplpc.py @@ -28,3 +28,6 @@ class NxplpcPlatform(BasePlatform): "default": True } } + + def get_name(self): + return "NXP LPC" diff --git a/platformio/platforms/ststm32.py b/platformio/platforms/ststm32.py index a33947f1..2f09fb21 100644 --- a/platformio/platforms/ststm32.py +++ b/platformio/platforms/ststm32.py @@ -49,3 +49,6 @@ class Ststm32Platform(BasePlatform): "default": True } } + + def get_name(self): + return "ST STM32" diff --git a/platformio/platforms/teensy.py b/platformio/platforms/teensy.py index 648c1c3f..cc79c3ee 100644 --- a/platformio/platforms/teensy.py +++ b/platformio/platforms/teensy.py @@ -41,6 +41,9 @@ class TeensyPlatform(BasePlatform): } } + def get_name(self): + return "Teensy" + def run(self, variables, targets): for v in variables: if "BOARD=" not in v: diff --git a/platformio/platforms/timsp430.py b/platformio/platforms/timsp430.py index a15b5fd1..48fe652e 100644 --- a/platformio/platforms/timsp430.py +++ b/platformio/platforms/timsp430.py @@ -31,3 +31,6 @@ class Timsp430Platform(BasePlatform): "default": True } } + + def get_name(self): + return "TI MSP430" diff --git a/platformio/platforms/titiva.py b/platformio/platforms/titiva.py index ed14d2da..defd6709 100644 --- a/platformio/platforms/titiva.py +++ b/platformio/platforms/titiva.py @@ -39,3 +39,6 @@ class TitivaPlatform(BasePlatform): "default": True } } + + def get_name(self): + return "TI TIVA" diff --git a/tests/commands/test_boards.py b/tests/commands/test_boards.py index dfeef591..4a96d2e5 100644 --- a/tests/commands/test_boards.py +++ b/tests/commands/test_boards.py @@ -34,9 +34,9 @@ def test_board_options(platformio_setup, clirunner, validate_cliresult): search_result = json.loads(result.output) assert isinstance(search_result, list) assert len(search_result) - platforms = [item['name'] for item in search_result] + platforms = [item['type'] for item in search_result] - for name, opts in util.get_boards().iteritems(): + for _, opts in util.get_boards().iteritems(): assert required_opts.issubset(set(opts)) assert opts['platform'] in platforms diff --git a/tests/commands/test_search.py b/tests/commands/test_search.py index 8864d7b9..4179f1b2 100644 --- a/tests/commands/test_search.py +++ b/tests/commands/test_search.py @@ -12,7 +12,7 @@ def test_search_json_output(clirunner, validate_cliresult): search_result = json.loads(result.output) assert isinstance(search_result, list) assert len(search_result) - platforms = [item['name'] for item in search_result] + platforms = [item['type'] for item in search_result] assert "atmelsam" in platforms From 49ab5e718e8b1648b39df86327f1ae1ea4a00886 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 16 Mar 2015 17:30:23 +0200 Subject: [PATCH 43/58] Add "name" and vendor links to frameworks --- docs/frameworks/arduino.rst | 2 ++ docs/frameworks/cmsis.rst | 2 ++ docs/frameworks/energia.rst | 2 ++ docs/frameworks/mbed.rst | 2 ++ docs/frameworks/opencm3.rst | 4 +++- docs/frameworks/spl.rst | 2 ++ platformio/builder/scripts/frameworks/arduino.py | 2 ++ platformio/builder/scripts/frameworks/cmsis.py | 2 ++ platformio/builder/scripts/frameworks/energia.py | 2 ++ platformio/builder/scripts/frameworks/mbed.py | 2 ++ platformio/builder/scripts/frameworks/opencm3.py | 4 +++- platformio/builder/scripts/frameworks/spl.py | 2 ++ platformio/util.py | 7 ++++--- scripts/docspregen.py | 14 ++++++++------ 14 files changed, 38 insertions(+), 11 deletions(-) diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index b5784935..024431da 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -4,6 +4,8 @@ Framework ``arduino`` ===================== Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. +For more detailed information please visit `vendor site `_. + .. contents:: Boards diff --git a/docs/frameworks/cmsis.rst b/docs/frameworks/cmsis.rst index 2af8b34c..1fda61fc 100644 --- a/docs/frameworks/cmsis.rst +++ b/docs/frameworks/cmsis.rst @@ -4,6 +4,8 @@ Framework ``cmsis`` =================== The ARM Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Cortex-M processor series and specifies debugger interfaces. The CMSIS enables consistent and simple software interfaces to the processor for interface peripherals, real-time operating systems, and middleware. It simplifies software re-use, reducing the learning curve for new microcontroller developers and cutting the time-to-market for devices. +For more detailed information please visit `vendor site `_. + .. contents:: Boards diff --git a/docs/frameworks/energia.rst b/docs/frameworks/energia.rst index a864e7a9..0284ab8c 100644 --- a/docs/frameworks/energia.rst +++ b/docs/frameworks/energia.rst @@ -4,6 +4,8 @@ Framework ``energia`` ===================== Energia framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before. +For more detailed information please visit `vendor site `_. + .. contents:: Boards diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index 1bf010c6..c70b5ee5 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -4,6 +4,8 @@ Framework ``mbed`` ================== The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community. +For more detailed information please visit `vendor site `_. + .. contents:: Boards diff --git a/docs/frameworks/opencm3.rst b/docs/frameworks/opencm3.rst index e8b54fb1..a38e646c 100644 --- a/docs/frameworks/opencm3.rst +++ b/docs/frameworks/opencm3.rst @@ -2,7 +2,9 @@ Framework ``opencm3`` ===================== -The libopencm3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. +The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. + +For more detailed information please visit `vendor site `_. .. contents:: diff --git a/docs/frameworks/spl.rst b/docs/frameworks/spl.rst index 47946970..1bcf0576 100644 --- a/docs/frameworks/spl.rst +++ b/docs/frameworks/spl.rst @@ -4,6 +4,8 @@ Framework ``spl`` ================= The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers. +For more detailed information please visit `vendor site `_. + .. contents:: Boards diff --git a/platformio/builder/scripts/frameworks/arduino.py b/platformio/builder/scripts/frameworks/arduino.py index ba3871bc..f9e5e741 100644 --- a/platformio/builder/scripts/frameworks/arduino.py +++ b/platformio/builder/scripts/frameworks/arduino.py @@ -2,6 +2,8 @@ # See LICENSE for details. """ +Arduino + Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. diff --git a/platformio/builder/scripts/frameworks/cmsis.py b/platformio/builder/scripts/frameworks/cmsis.py index 1b9c0236..6410c10f 100644 --- a/platformio/builder/scripts/frameworks/cmsis.py +++ b/platformio/builder/scripts/frameworks/cmsis.py @@ -2,6 +2,8 @@ # See LICENSE for details. """ +CMSIS + The ARM Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Cortex-M processor series and specifies debugger interfaces. The CMSIS enables consistent and diff --git a/platformio/builder/scripts/frameworks/energia.py b/platformio/builder/scripts/frameworks/energia.py index d240aa6a..67b4cc10 100644 --- a/platformio/builder/scripts/frameworks/energia.py +++ b/platformio/builder/scripts/frameworks/energia.py @@ -2,6 +2,8 @@ # See LICENSE for details. """ +Energia + Energia framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index fec239f4..a53eeb0e 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -2,6 +2,8 @@ # See LICENSE for details. """ +mbed + The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, diff --git a/platformio/builder/scripts/frameworks/opencm3.py b/platformio/builder/scripts/frameworks/opencm3.py index d89fe44c..ebc23c4d 100644 --- a/platformio/builder/scripts/frameworks/opencm3.py +++ b/platformio/builder/scripts/frameworks/opencm3.py @@ -2,7 +2,9 @@ # See LICENSE for details. """ -The libopencm3 framework aims to create a free/libre/open-source +libOpenCM3 + +The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. diff --git a/platformio/builder/scripts/frameworks/spl.py b/platformio/builder/scripts/frameworks/spl.py index 21394b82..fb7abbbb 100644 --- a/platformio/builder/scripts/frameworks/spl.py +++ b/platformio/builder/scripts/frameworks/spl.py @@ -2,6 +2,8 @@ # See LICENSE for details. """ +SPL + The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal diff --git a/platformio/util.py b/platformio/util.py index 95e7a623..f536bf24 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -284,10 +284,11 @@ def get_frameworks(type_=None): _doc_start = fcontent.index('"""') + 3 fdoc = fcontent[ _doc_start:fcontent.index('"""', _doc_start)].strip() - description = " ".join(fdoc.split("\n")[:-2]) + doclines = [l.strip() for l in fdoc.splitlines() if l.strip()] frameworks[_type] = { - "description": description, - "url": fdoc.split("\n")[-1].strip(), + "name": doclines[0], + "description": " ".join(doclines[1:-1]), + "url": doclines[-1], "script": script_path } get_frameworks._cache = frameworks # pylint: disable=W0212 diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 71e1009a..9b223b8b 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -103,7 +103,6 @@ def generate_platform(name): lines.append(""" For more detailed information please visit `vendor site <%s>`_.""" % p.get_vendor_url()) - lines.append(""" .. contents::""") lines.append(""" @@ -146,18 +145,21 @@ def update_platform_docs(): f.write(generate_platform(name)) -def generate_framework(name, data): - print "Processing framework: %s" % name +def generate_framework(type_, data): + print "Processing framework: %s" % type_ lines = [] - lines.append(".. _framework_%s:" % name) + lines.append(".. _framework_%s:" % type_) lines.append("") - _title = "Framework ``%s``" % name + _title = "Framework ``%s``" % type_ lines.append(_title) lines.append("=" * len(_title)) lines.append(data['description']) lines.append(""" +For more detailed information please visit `vendor site <%s>`_.""" % + data['url']) + lines.append(""" .. contents:: Boards @@ -173,7 +175,7 @@ Boards for board, data in util.get_boards().items(): frameworks = data['frameworks'] vendor = data['vendor'] - if name in frameworks: + if type_ in frameworks: if vendor in vendors: vendors[vendor].append({board: data}) else: From f3f16b56b2f9a6aa89905a0b5d8a1945fee1d971 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Mon, 16 Mar 2015 17:34:52 +0200 Subject: [PATCH 44/58] Rename "opencm3" framework to "libopencm3" // Resolve #120 --- .../stm32/stm32-opencm3-blink/platformio.ini | 6 +++--- .../titiva/titiva-opencm3-blink/platformio.ini | 6 +++--- platformio/boards/ststm32.json | 6 +++--- platformio/boards/titiva.json | 6 +++--- .../frameworks/{opencm3.py => libopencm3.py} | 16 ++++++++-------- platformio/platforms/base.py | 2 +- platformio/platforms/ststm32.py | 2 +- platformio/platforms/titiva.py | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) rename platformio/builder/scripts/frameworks/{opencm3.py => libopencm3.py} (91%) diff --git a/examples/stm32/stm32-opencm3-blink/platformio.ini b/examples/stm32/stm32-opencm3-blink/platformio.ini index 4055d71f..2c04a6da 100644 --- a/examples/stm32/stm32-opencm3-blink/platformio.ini +++ b/examples/stm32/stm32-opencm3-blink/platformio.ini @@ -19,15 +19,15 @@ [env:disco_f407vg] platform = ststm32 -framework = opencm3 +framework = libopencm3 board = disco_f407vg [env:disco_l152rb] platform = ststm32 -framework = opencm3 +framework = libopencm3 board = disco_l152rb [env:disco_f303vc] platform = ststm32 -framework = opencm3 +framework = libopencm3 board = disco_f303vc diff --git a/examples/titiva/titiva-opencm3-blink/platformio.ini b/examples/titiva/titiva-opencm3-blink/platformio.ini index 67df2d05..0e46c4a8 100644 --- a/examples/titiva/titiva-opencm3-blink/platformio.ini +++ b/examples/titiva/titiva-opencm3-blink/platformio.ini @@ -19,15 +19,15 @@ [env:LaunchPad_lm4f120h5qr] platform = titiva -framework = opencm3 +framework = libopencm3 board = lplm4f120h5qr [env:LaunchPad_tm4c1230c3pm] platform = titiva -framework = opencm3 +framework = libopencm3 board = lptm4c1230c3pm [env:LaunchPad_tm4c1294ncpdt] platform = titiva -framework = opencm3 +framework = libopencm3 board = lptm4c1294ncpdt diff --git a/platformio/boards/ststm32.json b/platformio/boards/ststm32.json index b1e29c7d..20b77108 100644 --- a/platformio/boards/ststm32.json +++ b/platformio/boards/ststm32.json @@ -9,7 +9,7 @@ "mcu": "stm32f407vgt6", "variant": "stm32f4" }, - "frameworks": ["cmsis", "spl", "opencm3", "mbed"], + "frameworks": ["cmsis", "spl", "libopencm3", "mbed"], "name": "STM32F4DISCOVERY", "platform": "ststm32", "upload": { @@ -29,7 +29,7 @@ "mcu": "stm32l152rbt6", "variant": "stm32l1" }, - "frameworks": ["cmsis","spl","opencm3"], + "frameworks": ["cmsis","spl","libopencm3"], "name": "STM32LDISCOVERY", "platform": "ststm32", "upload": { @@ -49,7 +49,7 @@ "mcu": "stm32f303vct6", "variant": "stm32f3" }, - "frameworks": ["cmsis", "spl", "opencm3", "mbed"], + "frameworks": ["cmsis", "spl", "libopencm3", "mbed"], "name": "STM32F3DISCOVERY", "platform": "ststm32", "upload": { diff --git a/platformio/boards/titiva.json b/platformio/boards/titiva.json index 6b90b012..69a8d9be 100644 --- a/platformio/boards/titiva.json +++ b/platformio/boards/titiva.json @@ -8,7 +8,7 @@ "mcu": "lplm4f120h5qr", "variant": "stellarpad" }, - "frameworks": ["energia", "opencm3"], + "frameworks": ["energia", "libopencm3"], "name": "LaunchPad (Stellaris) w/ lm4f120 (80MHz)", "platform": "titiva", "upload": { @@ -27,7 +27,7 @@ "mcu": "lptm4c1230c3pm", "variant": "stellarpad" }, - "frameworks": ["energia", "opencm3"], + "frameworks": ["energia", "libopencm3"], "name": "LaunchPad (Tiva C) w/ tm4c123 (80MHz)", "platform": "titiva", "upload": { @@ -46,7 +46,7 @@ "mcu": "lptm4c1294ncpdt", "variant": "launchpad_129" }, - "frameworks": ["energia", "opencm3"], + "frameworks": ["energia", "libopencm3"], "name": "LaunchPad (Tiva C) w/ tm4c129 (120MHz)", "platform": "titiva", "upload": { diff --git a/platformio/builder/scripts/frameworks/opencm3.py b/platformio/builder/scripts/frameworks/libopencm3.py similarity index 91% rename from platformio/builder/scripts/frameworks/opencm3.py rename to platformio/builder/scripts/frameworks/libopencm3.py index d89fe44c..b28be5cf 100644 --- a/platformio/builder/scripts/frameworks/opencm3.py +++ b/platformio/builder/scripts/frameworks/libopencm3.py @@ -21,7 +21,7 @@ from platformio.util import exec_command env = DefaultEnvironment() env.Replace( - PLATFORMFW_DIR=join("$PIOPACKAGES_DIR", "framework-opencm3") + PLATFORMFW_DIR=join("$PIOPACKAGES_DIR", "framework-libopencm3") ) BOARD_BUILDOPTS = env.get("BOARD_OPTIONS", {}).get("build", {}) @@ -101,7 +101,7 @@ def get_source_files(src_dir): for search_path in mkdata['vpath']: src_path = normpath(join(src_dir, search_path, src_file)) if isfile(src_path): - sources.append(join("$BUILD_DIR", "FrameworkOpenCM3", + sources.append(join("$BUILD_DIR", "FrameworkLibOpenCM3", src_path.replace(lib_root + sep, ""))) break return sources @@ -137,14 +137,14 @@ if BOARD_BUILDOPTS.get("core") == "lm4f": ) env.VariantDir( - join("$BUILD_DIR", "FrameworkOpenCM3Variant"), + join("$BUILD_DIR", "FrameworkLibOpenCM3Variant"), join("$PLATFORMFW_DIR", "include") ) env.Append( CPPPATH=[ - join("$BUILD_DIR", "FrameworkOpenCM3"), - join("$BUILD_DIR", "FrameworkOpenCM3Variant") + join("$BUILD_DIR", "FrameworkLibOpenCM3"), + join("$BUILD_DIR", "FrameworkLibOpenCM3Variant") ] ) @@ -157,7 +157,7 @@ ldscript_path = find_ldscript(root_dir) merge_ld_scripts(ldscript_path) generate_nvic_files() -# override ldscript by opencm3 +# override ldscript by libopencm3 assert "LDSCRIPT_PATH" in env env.Replace( LDSCRIPT_PATH=ldscript_path @@ -165,11 +165,11 @@ env.Replace( libs = [] env.VariantDir( - join("$BUILD_DIR", "FrameworkOpenCM3"), + join("$BUILD_DIR", "FrameworkLibOpenCM3"), "$PLATFORMFW_DIR" ) libs.append(env.Library( - join("$BUILD_DIR", "FrameworkOpenCM3"), + join("$BUILD_DIR", "FrameworkLibOpenCM3"), get_source_files(root_dir) )) diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index eadad863..b09301fb 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -45,7 +45,7 @@ PLATFORM_PACKAGES = { "http://www.st.com" "/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257890") ], - "framework-opencm3": [ + "framework-libopencm3": [ ("libOpenCM3 Framework", "http://www.libopencm3.org/") ], "framework-mbed": [ diff --git a/platformio/platforms/ststm32.py b/platformio/platforms/ststm32.py index a33947f1..f2a998e2 100644 --- a/platformio/platforms/ststm32.py +++ b/platformio/platforms/ststm32.py @@ -41,7 +41,7 @@ class Ststm32Platform(BasePlatform): "default": True }, - "framework-opencm3": { + "framework-libopencm3": { "default": True }, diff --git a/platformio/platforms/titiva.py b/platformio/platforms/titiva.py index ed14d2da..143a4249 100644 --- a/platformio/platforms/titiva.py +++ b/platformio/platforms/titiva.py @@ -35,7 +35,7 @@ class TitivaPlatform(BasePlatform): "default": True }, - "framework-opencm3": { + "framework-libopencm3": { "default": True } } From ccc411fb4736fff801fc0422846099e53cff6ecd Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Mon, 16 Mar 2015 19:24:51 +0200 Subject: [PATCH 45/58] Add support for "panStamp" boards // Resolve #117 --- .../panstamp-blink/README.rst | 21 ++++++++++ .../panstamp-blink/platformio.ini | 23 +++++++++++ .../panstamp-blink/src/Blink.ino | 29 ++++++++++++++ examples/timsp430/panstamp-blink/README.rst | 21 ++++++++++ .../timsp430/panstamp-blink/platformio.ini | 23 +++++++++++ .../timsp430/panstamp-blink/src/Blink.ino | 29 ++++++++++++++ platformio/boards/misc.json | 39 +++++++++++++++++++ .../builder/scripts/frameworks/arduino.py | 7 +++- platformio/platforms/base.py | 4 ++ platformio/platforms/timsp430.py | 4 ++ 10 files changed, 199 insertions(+), 1 deletion(-) create mode 100644 examples/atmelavr-and-arduino/panstamp-blink/README.rst create mode 100644 examples/atmelavr-and-arduino/panstamp-blink/platformio.ini create mode 100644 examples/atmelavr-and-arduino/panstamp-blink/src/Blink.ino create mode 100644 examples/timsp430/panstamp-blink/README.rst create mode 100644 examples/timsp430/panstamp-blink/platformio.ini create mode 100644 examples/timsp430/panstamp-blink/src/Blink.ino diff --git a/examples/atmelavr-and-arduino/panstamp-blink/README.rst b/examples/atmelavr-and-arduino/panstamp-blink/README.rst new file mode 100644 index 00000000..e0a3e32a --- /dev/null +++ b/examples/atmelavr-and-arduino/panstamp-blink/README.rst @@ -0,0 +1,21 @@ +How to buid PlatformIO based project +==================================== + +1. `Install PlatformIO `_ +2. Download `source code with examples `_ +3. Extract ZIP archive +4. Run these commands: + +.. code-block:: bash + + # Change directory to example + > cd platformio-develop/examples/atmelavr-and-arduino/panstamp-blink + + # Process example project + > platformio run + + # Upload firmware + > platformio run --target upload + + # Clean build files + > platformio run --target clean diff --git a/examples/atmelavr-and-arduino/panstamp-blink/platformio.ini b/examples/atmelavr-and-arduino/panstamp-blink/platformio.ini new file mode 100644 index 00000000..fa51205f --- /dev/null +++ b/examples/atmelavr-and-arduino/panstamp-blink/platformio.ini @@ -0,0 +1,23 @@ +# +# Project Configuration File +# +# A detailed documentation with the EXAMPLES is located here: +# http://docs.platformio.org/en/latest/projectconf.html +# + +# A sign `#` at the beginning of the line indicates a comment +# Comment lines are ignored. + +# Simple and base environment +# [env:mybaseenv] +# platform = %INSTALLED_PLATFORM_NAME_HERE% +# framework = +# board = +# +# Automatic targets - enable auto-uploading +# targets = upload + +[env:panStampAVR] +platform = atmelavr +framework = arduino +board = panStampAVR diff --git a/examples/atmelavr-and-arduino/panstamp-blink/src/Blink.ino b/examples/atmelavr-and-arduino/panstamp-blink/src/Blink.ino new file mode 100644 index 00000000..b0db92b8 --- /dev/null +++ b/examples/atmelavr-and-arduino/panstamp-blink/src/Blink.ino @@ -0,0 +1,29 @@ +/* + Blink + Turns on an LED on for one second, then off for one second, repeatedly. + + Most Arduinos have an on-board LED you can control. On the Uno and + Leonardo, it is attached to digital pin 13. If you're unsure what + pin the on-board LED is connected to on your Arduino model, check + the documentation at http://arduino.cc + + This example code is in the public domain. + + modified 8 May 2014 + by Scott Fitzgerald + */ + + +// the setup function runs once when you press reset or power the board +void setup() { + // initialize digital pin 13 as an output. + pinMode(13, OUTPUT); +} + +// the loop function runs over and over again forever +void loop() { + digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) + delay(1000); // wait for a second + digitalWrite(13, LOW); // turn the LED off by making the voltage LOW + delay(1000); // wait for a second +} diff --git a/examples/timsp430/panstamp-blink/README.rst b/examples/timsp430/panstamp-blink/README.rst new file mode 100644 index 00000000..f812cba1 --- /dev/null +++ b/examples/timsp430/panstamp-blink/README.rst @@ -0,0 +1,21 @@ +How to buid PlatformIO based project +==================================== + +1. `Install PlatformIO `_ +2. Download `source code with examples `_ +3. Extract ZIP archive +4. Run these commands: + +.. code-block:: bash + + # Change directory to example + > cd platformio-develop/examples/timsp430/panstamp-blink + + # Process example project + > platformio run + + # Upload firmware + > platformio run --target upload + + # Clean build files + > platformio run --target clean diff --git a/examples/timsp430/panstamp-blink/platformio.ini b/examples/timsp430/panstamp-blink/platformio.ini new file mode 100644 index 00000000..c273de4a --- /dev/null +++ b/examples/timsp430/panstamp-blink/platformio.ini @@ -0,0 +1,23 @@ +# +# Project Configuration File +# +# A detailed documentation with the EXAMPLES is located here: +# http://docs.platformio.org/en/latest/projectconf.html +# + +# A sign `#` at the beginning of the line indicates a comment +# Comment lines are ignored. + +# Simple and base environment +# [env:mybaseenv] +# platform = %INSTALLED_PLATFORM_NAME_HERE% +# framework = +# board = +# +# Automatic targets - enable auto-uploading +# targets = upload + +[env:panStampNRG] +platform = timsp430 +framework = arduino +board = panStampNRG diff --git a/examples/timsp430/panstamp-blink/src/Blink.ino b/examples/timsp430/panstamp-blink/src/Blink.ino new file mode 100644 index 00000000..b0db92b8 --- /dev/null +++ b/examples/timsp430/panstamp-blink/src/Blink.ino @@ -0,0 +1,29 @@ +/* + Blink + Turns on an LED on for one second, then off for one second, repeatedly. + + Most Arduinos have an on-board LED you can control. On the Uno and + Leonardo, it is attached to digital pin 13. If you're unsure what + pin the on-board LED is connected to on your Arduino model, check + the documentation at http://arduino.cc + + This example code is in the public domain. + + modified 8 May 2014 + by Scott Fitzgerald + */ + + +// the setup function runs once when you press reset or power the board +void setup() { + // initialize digital pin 13 as an output. + pinMode(13, OUTPUT); +} + +// the loop function runs over and over again forever +void loop() { + digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) + delay(1000); // wait for a second + digitalWrite(13, LOW); // turn the LED off by making the voltage LOW + delay(1000); // wait for a second +} diff --git a/platformio/boards/misc.json b/platformio/boards/misc.json index abb6d9a1..ad932077 100644 --- a/platformio/boards/misc.json +++ b/platformio/boards/misc.json @@ -75,5 +75,44 @@ }, "url": "http://www.sainsmart.com/arduino/control-boards/sainsmart-due-atmel-sam3x8e-arm-cortex-m3-board-black.html", "vendor": "SainSmart" + }, + "panStampAVR": { + "build": { + "core": "panstamp", + "extra_flags": "-DPANSTAMP_AVR", + "f_cpu": "8000000L", + "mcu": "atmega328p", + "variant": "panstamp" + }, + "frameworks": ["arduino"], + "name": "PanStamp AVR", + "platform": "atmelavr", + "upload": { + "maximum_ram_size": 2048, + "maximum_size": 32256, + "protocol": "arduino", + "require_upload_port" : true, + "speed": 57600 + }, + "url": "http://www.panstamp.com/product/panstamp-avr/", + "vendor": "PanStamp" + }, + "panStampNRG": { + "build": { + "core": "panstamp", + "f_cpu": "12000000L", + "mcu": "cc430f5137", + "variant": "panstamp_nrg_1.1" + }, + "frameworks": ["arduino"], + "name": "PanStamp NRG 1.1", + "platform": "timsp430", + "upload": { + "maximum_ram_size": 4096, + "maximum_size": 32640, + "protocol": "flash-bsl" + }, + "url": "http://www.panstamp.com/product/197/", + "vendor": "PanStamp" } } \ No newline at end of file diff --git a/platformio/builder/scripts/frameworks/arduino.py b/platformio/builder/scripts/frameworks/arduino.py index f9e5e741..f20846c8 100644 --- a/platformio/builder/scripts/frameworks/arduino.py +++ b/platformio/builder/scripts/frameworks/arduino.py @@ -29,12 +29,17 @@ BOARD_BUILDOPTS = BOARD_OPTS.get("build", {}) PLATFORMFW_DIR = join("$PIOPACKAGES_DIR", "framework-arduino${PLATFORM.replace('atmel', '')}") -if env.get("PLATFORM") == "digistump": +if "digispark" in BOARD_BUILDOPTS.get("core"): PLATFORMFW_DIR = join( "$PIOPACKAGES_DIR", "framework-arduino%s" % ( "sam" if BOARD_BUILDOPTS.get("cpu") == "cortex-m3" else "avr") ) +elif env.get("PLATFORM") == "timsp430": + PLATFORMFW_DIR = join( + "$PIOPACKAGES_DIR", + "framework-arduinomsp430" + ) env.Replace(PLATFORMFW_DIR=PLATFORMFW_DIR) diff --git a/platformio/platforms/base.py b/platformio/platforms/base.py index 02e0ebb6..72f7c77d 100644 --- a/platformio/platforms/base.py +++ b/platformio/platforms/base.py @@ -26,6 +26,10 @@ PLATFORM_PACKAGES = { ("Arduino Wiring-based Framework", "http://arduino.cc/en/Reference/HomePage") ], + "framework-arduinomsp430": [ + ("Arduino Wiring-based Framework (MSP430 Core)", + "http://arduino.cc/en/Reference/HomePage") + ], "framework-energiamsp430": [ ("Energia Wiring-based Framework (MSP430 Core)", "http://energia.nu/reference/") diff --git a/platformio/platforms/timsp430.py b/platformio/platforms/timsp430.py index 48fe652e..8973cded 100644 --- a/platformio/platforms/timsp430.py +++ b/platformio/platforms/timsp430.py @@ -29,6 +29,10 @@ class Timsp430Platform(BasePlatform): "framework-energiamsp430": { "default": True + }, + + "framework-arduinomsp430": { + "default": True } } From 575048faa74243812b463985dfe2004849741f79 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 16 Mar 2015 23:08:59 +0200 Subject: [PATCH 46/58] Add link to PlatformIO Boards Explorer --- docs/frameworks/arduino.rst | 2 +- docs/frameworks/cmsis.rst | 2 +- docs/frameworks/energia.rst | 2 +- docs/frameworks/mbed.rst | 2 +- docs/frameworks/opencm3.rst | 2 +- docs/frameworks/spl.rst | 2 +- docs/platforms/atmelavr.rst | 2 +- docs/platforms/atmelsam.rst | 2 +- docs/platforms/freescalekinetis.rst | 2 +- docs/platforms/nordicnrf51.rst | 2 +- docs/platforms/nxplpc.rst | 2 +- docs/platforms/ststm32.rst | 2 +- docs/platforms/teensy.rst | 2 +- docs/platforms/timsp430.rst | 2 +- docs/platforms/titiva.rst | 2 +- scripts/docspregen.py | 4 ++-- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 024431da..168636fb 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -13,7 +13,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. Adafruit diff --git a/docs/frameworks/cmsis.rst b/docs/frameworks/cmsis.rst index 1fda61fc..a2b403e9 100644 --- a/docs/frameworks/cmsis.rst +++ b/docs/frameworks/cmsis.rst @@ -13,7 +13,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. ST diff --git a/docs/frameworks/energia.rst b/docs/frameworks/energia.rst index 0284ab8c..86ffc2fd 100644 --- a/docs/frameworks/energia.rst +++ b/docs/frameworks/energia.rst @@ -13,7 +13,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. TI diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index c70b5ee5..6bb0f699 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -13,7 +13,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. CQ Publishing diff --git a/docs/frameworks/opencm3.rst b/docs/frameworks/opencm3.rst index a38e646c..5836d166 100644 --- a/docs/frameworks/opencm3.rst +++ b/docs/frameworks/opencm3.rst @@ -13,7 +13,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. ST diff --git a/docs/frameworks/spl.rst b/docs/frameworks/spl.rst index 1bcf0576..40299c7a 100644 --- a/docs/frameworks/spl.rst +++ b/docs/frameworks/spl.rst @@ -13,7 +13,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. ST diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index 1f5f37b8..fd4530e8 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -40,7 +40,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/atmelsam.rst b/docs/platforms/atmelsam.rst index 891a79cd..62c0cedf 100644 --- a/docs/platforms/atmelsam.rst +++ b/docs/platforms/atmelsam.rst @@ -40,7 +40,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/freescalekinetis.rst b/docs/platforms/freescalekinetis.rst index 3f18e84b..9238e586 100644 --- a/docs/platforms/freescalekinetis.rst +++ b/docs/platforms/freescalekinetis.rst @@ -34,7 +34,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/nordicnrf51.rst b/docs/platforms/nordicnrf51.rst index 69bbb131..3c54c270 100644 --- a/docs/platforms/nordicnrf51.rst +++ b/docs/platforms/nordicnrf51.rst @@ -34,7 +34,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/nxplpc.rst b/docs/platforms/nxplpc.rst index 8b40bf1a..9220b8e2 100644 --- a/docs/platforms/nxplpc.rst +++ b/docs/platforms/nxplpc.rst @@ -34,7 +34,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index 9b6d41d9..ba7246f9 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -49,7 +49,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/teensy.rst b/docs/platforms/teensy.rst index 8db6cc08..3eaed4da 100644 --- a/docs/platforms/teensy.rst +++ b/docs/platforms/teensy.rst @@ -43,7 +43,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/timsp430.rst b/docs/platforms/timsp430.rst index e53198cb..20a7ba52 100644 --- a/docs/platforms/timsp430.rst +++ b/docs/platforms/timsp430.rst @@ -37,7 +37,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/docs/platforms/titiva.rst b/docs/platforms/titiva.rst index 9b85cc7f..7d14fae7 100644 --- a/docs/platforms/titiva.rst +++ b/docs/platforms/titiva.rst @@ -43,7 +43,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 9b223b8b..6462b189 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -116,7 +116,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. """) @@ -167,7 +167,7 @@ Boards .. note:: * You can list pre-configured boards by :ref:`cmd_boards` command or - `PlatformIO Web 2.0 `_ site + `PlatformIO Boards Explorer `_ * For more detailed ``board`` information please scroll tables below by horizontal. """) From 2e7e7c4e74b6fb2ab5b50d12e89de29c625bafa0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 17 Mar 2015 00:54:42 +0200 Subject: [PATCH 47/58] Add "Frameworks" page to docs and web-site // Resolve #115 --- HISTORY.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 93a4ce27..e2e758f6 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -19,7 +19,9 @@ Release History `ststm32 `__ development platform * Created new `Frameworks `__ - page in documentation + page in documentation and added to `PlatformIO Web Site `_ + (`issue #115 `_) +* Introduced online `Embedded Boards Explorer `_ * Automatically append define ``-DPLATFORMIO=%version%`` to builder (`issue #105 `_) * Renamed ``stm32`` development platform to From 347dbb656900f36e70b2d1d3b3195d470fc0ff19 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 18 Mar 2015 15:57:49 +0200 Subject: [PATCH 48/58] Fix SSL InsecureRequestWarning --- platformio/maintenance.py | 5 +++++ platformio/util.py | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 1a430a15..214f836c 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -9,6 +9,7 @@ from shutil import rmtree from time import time import click +import requests from platformio import __version__, app, telemetry from platformio.commands.install import cli as cmd_install @@ -22,6 +23,10 @@ from platformio.util import get_home_dir, get_lib_dir def on_platformio_start(ctx): + # https://urllib3.readthedocs.org + # /en/latest/security.html#insecureplatformwarning + requests.packages.urllib3.disable_warnings() + telemetry.on_command(ctx) after_upgrade(ctx) check_platformio_upgrade() diff --git a/platformio/util.py b/platformio/util.py index f536bf24..82582573 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -212,7 +212,6 @@ def get_api_result(path, params=None, data=None): r = None try: - requests.packages.urllib3.disable_warnings() headers = {"User-Agent": "PlatformIO/%s %s" % ( __version__, requests.utils.default_user_agent())} From 3fabd01e1bbe42f1efcfe27e0bf1714b515e75c9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 18 Mar 2015 23:02:04 +0200 Subject: [PATCH 49/58] Fix SSL InsecureRequestWarning (avoid for invalid commands) --- platformio/__main__.py | 5 +++++ platformio/maintenance.py | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platformio/__main__.py b/platformio/__main__.py index d0685188..fbd34974 100644 --- a/platformio/__main__.py +++ b/platformio/__main__.py @@ -7,6 +7,7 @@ from sys import exit as sys_exit from traceback import format_exc import click +import requests from platformio import __version__, exception, maintenance from platformio.util import get_source_dir @@ -49,6 +50,10 @@ def process_result(ctx, result): def main(): try: + # https://urllib3.readthedocs.org + # /en/latest/security.html#insecureplatformwarning + requests.packages.urllib3.disable_warnings() + cli(None) except Exception as e: # pylint: disable=W0703 if not isinstance(e, exception.ReturnErrorCode): diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 214f836c..1a430a15 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -9,7 +9,6 @@ from shutil import rmtree from time import time import click -import requests from platformio import __version__, app, telemetry from platformio.commands.install import cli as cmd_install @@ -23,10 +22,6 @@ from platformio.util import get_home_dir, get_lib_dir def on_platformio_start(ctx): - # https://urllib3.readthedocs.org - # /en/latest/security.html#insecureplatformwarning - requests.packages.urllib3.disable_warnings() - telemetry.on_command(ctx) after_upgrade(ctx) check_platformio_upgrade() From a70ecdb1bead591f75a8b1dcaf2f63daab4483ee Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 18 Mar 2015 23:17:39 +0200 Subject: [PATCH 50/58] Fix uploading for atmelsam development platform --- HISTORY.rst | 8 +++++--- platformio/boards/arduino.json | 2 +- platformio/boards/misc.json | 4 ++-- platformio/builder/scripts/atmelsam.py | 15 ++++++++++----- platformio/builder/scripts/frameworks/arduino.py | 15 ++++++++++----- platformio/builder/tools/pioupload.py | 5 ++--- 6 files changed, 30 insertions(+), 19 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index e2e758f6..7029819e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -22,10 +22,12 @@ Release History page in documentation and added to `PlatformIO Web Site `_ (`issue #115 `_) * Introduced online `Embedded Boards Explorer `_ -* Automatically append define ``-DPLATFORMIO=%version%`` to builder - (`issue #105 `_) +* Automatically append define ``-DPLATFORMIO=%version%`` to + builder (`issue #105 `_) * Renamed ``stm32`` development platform to `ststm32 `__ +* Fixed uploading for `atmelsam `__ + development platform 1.1.0 (2015-03-05) ------------------ @@ -54,7 +56,7 @@ Release History * Added support for *ARM*-based credit-card sized computers: `Raspberry Pi `_, `BeagleBone `_ and `CubieBoard `_ -* Added `atmelsam `_ +* Added `atmelsam `__ development platform with supported boards: *Arduino Due and Digistump DigiX* (`issue #71 `_) * Added `ststm32 `__ diff --git a/platformio/boards/arduino.json b/platformio/boards/arduino.json index 2736d067..8d84f93e 100644 --- a/platformio/boards/arduino.json +++ b/platformio/boards/arduino.json @@ -676,7 +676,7 @@ "protocol": "sam-ba", "require_upload_port" : true, "use_1200bps_touch": true, - "wait_for_upload_port": true + "wait_for_upload_port": false }, "url": "http://arduino.cc/en/Main/arduinoBoardDue", "vendor": "Arduino" diff --git a/platformio/boards/misc.json b/platformio/boards/misc.json index ad932077..ac796695 100644 --- a/platformio/boards/misc.json +++ b/platformio/boards/misc.json @@ -43,7 +43,7 @@ "protocol": "sam-ba", "require_upload_port" : true, "use_1200bps_touch": true, - "wait_for_upload_port": true + "wait_for_upload_port": false }, "url": "http://www.sainsmart.com/arduino/control-boards/sainsmart-due-atmel-sam3x8e-arm-cortex-m3-board-black.html", "vendor": "SainSmart" @@ -115,4 +115,4 @@ "url": "http://www.panstamp.com/product/197/", "vendor": "PanStamp" } -} \ No newline at end of file +} diff --git a/platformio/builder/scripts/atmelsam.py b/platformio/builder/scripts/atmelsam.py index 596872c8..083f4136 100644 --- a/platformio/builder/scripts/atmelsam.py +++ b/platformio/builder/scripts/atmelsam.py @@ -5,7 +5,7 @@ Builder for Atmel SAM series of microcontrollers """ -from os.path import join +from os.path import basename, join from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, DefaultEnvironment, SConscript) @@ -20,8 +20,8 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 env.Append( UPLOADERFLAGS=[ "-U", - "true" if "usb" in board_type.lower( - ) or board_type == "digix" else "false" + "true" if ("usb" in board_type.lower( + ) or board_type == "digix") else "false" ]) upload_options = env.get("BOARD_OPTIONS", {}).get("upload", {}) @@ -37,6 +37,10 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 if upload_options.get("wait_for_upload_port", False): env.Replace(UPLOAD_PORT=env.WaitForNewSerialPort(before_ports)) + # use only port name for BOSSA + if "/" in env.subst("$UPLOAD_PORT"): + env.Replace(UPLOAD_PORT=basename(env.subst("$UPLOAD_PORT"))) + env = DefaultEnvironment() @@ -46,7 +50,6 @@ env.Replace( UPLOADER=join("$PIOPACKAGES_DIR", "$PIOPACKAGE_UPLOADER", "bossac"), UPLOADERFLAGS=[ "--info", - "--debug", "--port", "$UPLOAD_PORT", "--erase", "--write", @@ -59,7 +62,9 @@ env.Replace( env.Append( CPPDEFINES=[ - "printf=iprintf" + "printf=iprintf", + "USBCON", + 'USB_MANUFACTURER="PlatformIO"' ], LINKFLAGS=[ diff --git a/platformio/builder/scripts/frameworks/arduino.py b/platformio/builder/scripts/frameworks/arduino.py index f20846c8..0821fe75 100644 --- a/platformio/builder/scripts/frameworks/arduino.py +++ b/platformio/builder/scripts/frameworks/arduino.py @@ -97,7 +97,7 @@ if env.subst("${PLATFORMFW_DIR}")[-3:] == "sam": env.VariantDir( join("$BUILD_DIR", "FrameworkArduinoInc"), - join("$PLATFORMFW_DIR", "cores", "digix") + join("$PLATFORMFW_DIR", "cores", "${BOARD_OPTIONS['build']['core']}") ) env.Append( CPPPATH=[ @@ -178,14 +178,19 @@ libs.append(envsafe.BuildLibrary( )) if env.subst("${PLATFORMFW_DIR}")[-3:] == "sam": + + env.Append( + LIBPATH=[ + join("$PLATFORMFW_DIR", "variants", + "${BOARD_OPTIONS['build']['variant']}") + ] + ) + envsafe.Append( CFLAGS=[ "-std=gnu99" ] ) - libs.append(envsafe.BuildLibrary( - join("$BUILD_DIR", "SamLib"), - join("$PLATFORMFW_DIR", "system", "libsam", "source") - )) + libs.append("sam_sam3x8e_gcc_rel") env.Append(LIBS=libs) diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index 975a7c76..84e72f01 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -1,7 +1,6 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -import platform from os.path import join from shutil import copyfile from time import sleep @@ -25,9 +24,9 @@ def FlushSerialBuffer(env, port): def TouchSerialPort(env, port, baudrate): s = Serial(port=env.subst(port), baudrate=baudrate) + s.setDTR(False) s.close() - if platform.system() != "Darwin": - sleep(0.3) + sleep(0.4) def WaitForNewSerialPort(_, before): From 4958e24ffcf71857efc42b47185cdf7f2362d94a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 18 Mar 2015 23:26:53 +0200 Subject: [PATCH 51/58] Add information about platforms and frameworks --- README.rst | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/README.rst b/README.rst index ea631d32..cde9bb2e 100644 --- a/README.rst +++ b/README.rst @@ -32,6 +32,7 @@ and the missing library manager. * `Get Started `_ * `Web 2.0 Library Search `_ * `Development Platforms `_ +* `Frameworks `_ * `Embedded Boards `_ * `Library Manager `_ * `User Guide `_ @@ -114,18 +115,24 @@ more). It has support for the most popular embedded platforms: -* ``atmelavr`` `Atmel AVR `_ - (including *Arduino*-based boards, *Microduino, Raspduino, Teensy*) -* ``atmelsam`` `Atmel SAM `_ - (including *Arduino*-based boards, *Digistump DigiX*) -* ``stm32`` `STM32 `_ - (including *STM32 Discovery* Kits, CMSIS, SPL, libOpenCM3) -* ``teensy`` `Teensy `_ - (including *Teensy 2 and 3* USB boards) -* ``timsp430`` `TI MSP430 `_ - (including *MSP430* LaunchPads) -* ``titiva`` `TI TIVA C `_ - (including *TIVA C* Series LaunchPads) +* `Atmel AVR `_ +* `Atmel SAM `_ +* `Freescale Kinetis `_ +* `Nordic nRF51 `_ +* `NXP LPC. `_ +* `ST STM32 `_ +* `Teensy `_ +* `TI MSP430 `_ +* `TI TIVA C `_ + +Frameworks: + +* `Arduino `_ +* `CMSIS `_ +* `libOpenCM3 `_ +* `Energia `_ +* `SPL `_ +* `mbed `_ Licence From 642e1ef7bc263aa09b0d42f2b46b3c5a85790394 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Fri, 20 Mar 2015 17:22:59 +0200 Subject: [PATCH 52/58] Typo fix --- examples/atmelavr-and-arduino/adafruit-blink/README.rst | 4 ++-- .../atmelavr-and-arduino/arduino-external-libs/README.rst | 4 ++-- .../atmelavr-and-arduino/arduino-internal-libs/README.rst | 4 ++-- examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst | 4 ++-- .../atmelavr-and-arduino/atmelavr-native-blink/README.rst | 4 ++-- examples/atmelavr-and-arduino/digitstump-mouse/README.rst | 4 ++-- .../atmelavr-and-arduino/engduino-magnetometer/README.rst | 4 ++-- examples/atmelavr-and-arduino/panstamp-blink/README.rst | 4 ++-- examples/mbed/mbed-serial/README.rst | 4 ++-- examples/stm32/stm32-cmsis-blink/README.rst | 4 ++-- examples/stm32/stm32-opencm3-blink/README.rst | 4 ++-- examples/stm32/stm32-spl-blink/README.rst | 4 ++-- examples/teensy/teensy-internal-libs/README.rst | 4 ++-- examples/timsp430/panstamp-blink/README.rst | 4 ++-- examples/timsp430/timsp430-energia-blink/README.rst | 4 ++-- examples/timsp430/timsp430-native-blink/README.rst | 4 ++-- examples/titiva/titiva-energia-blink/README.rst | 4 ++-- examples/titiva/titiva-native-blink/README.rst | 4 ++-- examples/titiva/titiva-opencm3-blink/README.rst | 4 ++-- examples/wiring-blink/README.rst | 4 ++-- 20 files changed, 40 insertions(+), 40 deletions(-) diff --git a/examples/atmelavr-and-arduino/adafruit-blink/README.rst b/examples/atmelavr-and-arduino/adafruit-blink/README.rst index 290761d5..ffccc76e 100644 --- a/examples/atmelavr-and-arduino/adafruit-blink/README.rst +++ b/examples/atmelavr-and-arduino/adafruit-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/atmelavr-and-arduino/arduino-external-libs/README.rst b/examples/atmelavr-and-arduino/arduino-external-libs/README.rst index 675b2129..634386f8 100644 --- a/examples/atmelavr-and-arduino/arduino-external-libs/README.rst +++ b/examples/atmelavr-and-arduino/arduino-external-libs/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst b/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst index cb17077d..f510bf29 100644 --- a/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst +++ b/examples/atmelavr-and-arduino/arduino-internal-libs/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst b/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst index 02a88a40..8c5469cf 100644 --- a/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst +++ b/examples/atmelavr-and-arduino/arduino-own-src_dir/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst b/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst index 14bfc2de..4edae991 100644 --- a/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst +++ b/examples/atmelavr-and-arduino/atmelavr-native-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/atmelavr-and-arduino/digitstump-mouse/README.rst b/examples/atmelavr-and-arduino/digitstump-mouse/README.rst index f01bea45..0a7076bc 100644 --- a/examples/atmelavr-and-arduino/digitstump-mouse/README.rst +++ b/examples/atmelavr-and-arduino/digitstump-mouse/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst b/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst index 4aed8102..71ef0514 100644 --- a/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst +++ b/examples/atmelavr-and-arduino/engduino-magnetometer/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/atmelavr-and-arduino/panstamp-blink/README.rst b/examples/atmelavr-and-arduino/panstamp-blink/README.rst index e0a3e32a..eb66f295 100644 --- a/examples/atmelavr-and-arduino/panstamp-blink/README.rst +++ b/examples/atmelavr-and-arduino/panstamp-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/mbed/mbed-serial/README.rst b/examples/mbed/mbed-serial/README.rst index 5ea1282a..7f1feb4a 100644 --- a/examples/mbed/mbed-serial/README.rst +++ b/examples/mbed/mbed-serial/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/stm32/stm32-cmsis-blink/README.rst b/examples/stm32/stm32-cmsis-blink/README.rst index e6cac2a7..0c1b987b 100644 --- a/examples/stm32/stm32-cmsis-blink/README.rst +++ b/examples/stm32/stm32-cmsis-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/stm32/stm32-opencm3-blink/README.rst b/examples/stm32/stm32-opencm3-blink/README.rst index 579fdcab..b2df8478 100644 --- a/examples/stm32/stm32-opencm3-blink/README.rst +++ b/examples/stm32/stm32-opencm3-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/stm32/stm32-spl-blink/README.rst b/examples/stm32/stm32-spl-blink/README.rst index 72a568be..8ed58571 100644 --- a/examples/stm32/stm32-spl-blink/README.rst +++ b/examples/stm32/stm32-spl-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/teensy/teensy-internal-libs/README.rst b/examples/teensy/teensy-internal-libs/README.rst index 5cea44c9..e1a1cc9a 100644 --- a/examples/teensy/teensy-internal-libs/README.rst +++ b/examples/teensy/teensy-internal-libs/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/timsp430/panstamp-blink/README.rst b/examples/timsp430/panstamp-blink/README.rst index f812cba1..6e7c06b7 100644 --- a/examples/timsp430/panstamp-blink/README.rst +++ b/examples/timsp430/panstamp-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/timsp430/timsp430-energia-blink/README.rst b/examples/timsp430/timsp430-energia-blink/README.rst index 67c8f443..7ad63a62 100644 --- a/examples/timsp430/timsp430-energia-blink/README.rst +++ b/examples/timsp430/timsp430-energia-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/timsp430/timsp430-native-blink/README.rst b/examples/timsp430/timsp430-native-blink/README.rst index 341ecf7e..5014d0ce 100644 --- a/examples/timsp430/timsp430-native-blink/README.rst +++ b/examples/timsp430/timsp430-native-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/titiva/titiva-energia-blink/README.rst b/examples/titiva/titiva-energia-blink/README.rst index e8b4caaf..3f182624 100644 --- a/examples/titiva/titiva-energia-blink/README.rst +++ b/examples/titiva/titiva-energia-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/titiva/titiva-native-blink/README.rst b/examples/titiva/titiva-native-blink/README.rst index 52e59f63..109f2ebb 100644 --- a/examples/titiva/titiva-native-blink/README.rst +++ b/examples/titiva/titiva-native-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/titiva/titiva-opencm3-blink/README.rst b/examples/titiva/titiva-opencm3-blink/README.rst index d98ff383..d3a83202 100644 --- a/examples/titiva/titiva-opencm3-blink/README.rst +++ b/examples/titiva/titiva-opencm3-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ diff --git a/examples/wiring-blink/README.rst b/examples/wiring-blink/README.rst index 551f4d73..8dbda11e 100644 --- a/examples/wiring-blink/README.rst +++ b/examples/wiring-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ From 7cfb9db046215911221cd0292c91f3d681f26f7b Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Fri, 20 Mar 2015 17:23:46 +0200 Subject: [PATCH 53/58] Typo fix --- examples/mbed/mbed-blink/README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/mbed/mbed-blink/README.rst b/examples/mbed/mbed-blink/README.rst index b36ea0e3..cc6c6377 100644 --- a/examples/mbed/mbed-blink/README.rst +++ b/examples/mbed/mbed-blink/README.rst @@ -1,5 +1,5 @@ -How to buid PlatformIO based project -==================================== +How to build PlatformIO based project +===================================== 1. `Install PlatformIO `_ 2. Download `source code with examples `_ From 726887732f6c651ace6308745f0e7cde04c30fde Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Fri, 20 Mar 2015 19:46:13 +0200 Subject: [PATCH 54/58] Add full support for MBED libraries: rtos, eth, dsp, fat, usb --- examples/mbed/mbed-dsp/README.rst | 21 + examples/mbed/mbed-dsp/platformio.ini | 43 + examples/mbed/mbed-dsp/src/data.cpp | 94 +++ examples/mbed/mbed-dsp/src/main.cpp | 65 ++ examples/mbed/mbed-http-client/README.rst | 21 + .../lib/HTTPClient/HTTPClient.cpp | 739 ++++++++++++++++++ .../lib/HTTPClient/HTTPClient.h | 159 ++++ .../lib/HTTPClient/IHTTPData.h | 105 +++ .../lib/HTTPClient/data/HTTPMap.cpp | 200 +++++ .../lib/HTTPClient/data/HTTPMap.h | 71 ++ .../lib/HTTPClient/data/HTTPText.cpp | 104 +++ .../lib/HTTPClient/data/HTTPText.h | 72 ++ examples/mbed/mbed-http-client/platformio.ini | 25 + examples/mbed/mbed-http-client/src/main.cpp | 79 ++ examples/mbed/mbed-rtos/README.rst | 21 + examples/mbed/mbed-rtos/platformio.ini | 37 + examples/mbed/mbed-rtos/src/main.cpp | 38 + platformio/boards/freescalekinetis.json | 19 +- platformio/boards/nordicnrf51.json | 20 +- platformio/boards/ststm32.json | 16 + platformio/builder/scripts/frameworks/mbed.py | 104 ++- scripts/mbed_to_package.py | 58 +- 22 files changed, 2092 insertions(+), 19 deletions(-) create mode 100644 examples/mbed/mbed-dsp/README.rst create mode 100644 examples/mbed/mbed-dsp/platformio.ini create mode 100644 examples/mbed/mbed-dsp/src/data.cpp create mode 100644 examples/mbed/mbed-dsp/src/main.cpp create mode 100644 examples/mbed/mbed-http-client/README.rst create mode 100644 examples/mbed/mbed-http-client/lib/HTTPClient/HTTPClient.cpp create mode 100644 examples/mbed/mbed-http-client/lib/HTTPClient/HTTPClient.h create mode 100644 examples/mbed/mbed-http-client/lib/HTTPClient/IHTTPData.h create mode 100644 examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPMap.cpp create mode 100644 examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPMap.h create mode 100644 examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPText.cpp create mode 100644 examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPText.h create mode 100644 examples/mbed/mbed-http-client/platformio.ini create mode 100644 examples/mbed/mbed-http-client/src/main.cpp create mode 100644 examples/mbed/mbed-rtos/README.rst create mode 100644 examples/mbed/mbed-rtos/platformio.ini create mode 100644 examples/mbed/mbed-rtos/src/main.cpp diff --git a/examples/mbed/mbed-dsp/README.rst b/examples/mbed/mbed-dsp/README.rst new file mode 100644 index 00000000..557272de --- /dev/null +++ b/examples/mbed/mbed-dsp/README.rst @@ -0,0 +1,21 @@ +How to build PlatformIO based project +===================================== + +1. `Install PlatformIO `_ +2. Download `source code with examples `_ +3. Extract ZIP archive +4. Run these commands: + +.. code-block:: bash + + # Change directory to example + > cd platformio-develop/examples/mbed/mbed-dsp + + # Process example project + > platformio run + + # Upload firmware + > platformio run --target upload + + # Clean build files + > platformio run --target clean diff --git a/examples/mbed/mbed-dsp/platformio.ini b/examples/mbed/mbed-dsp/platformio.ini new file mode 100644 index 00000000..f1f25ccb --- /dev/null +++ b/examples/mbed/mbed-dsp/platformio.ini @@ -0,0 +1,43 @@ +# +# Project Configuration File +# +# A detailed documentation with the EXAMPLES is located here: +# http://docs.platformio.org/en/latest/projectconf.html +# + +# A sign `#` at the beginning of the line indicates a comment +# Comment lines are ignored. + +# Simple and base environment +# [env:mybaseenv] +# platform = %INSTALLED_PLATFORM_NAME_HERE% +# framework = +# board = +# +# Automatic targets - enable auto-uploading +# targets = upload + + +# NXP LPC Platform +[env:lpc1768] +platform = nxplpc +framework = mbed +board = lpc1768 + +# Nordic nRF51 Platform +[env:nrf51_mkit] +platform = nordicnrf51 +framework = mbed +board = nrf51_mkit + +# Freescale FRDM Platform +[env:frdm_kl25z] +platform = freescalekinetis +framework = mbed +board = frdm_kl25z + +# ST STM32 Platform +[env:nucleo_f401re] +platform = ststm32 +framework = mbed +board = nucleo_f401re diff --git a/examples/mbed/mbed-dsp/src/data.cpp b/examples/mbed/mbed-dsp/src/data.cpp new file mode 100644 index 00000000..d946b36b --- /dev/null +++ b/examples/mbed/mbed-dsp/src/data.cpp @@ -0,0 +1,94 @@ +#include "arm_math.h" + +/* ---------------------------------------------------------------------- +** Test input signal contains 1000Hz + 15000 Hz +** ------------------------------------------------------------------- */ + +float32_t testInput_f32_1kHz_15kHz[320] = +{ ++0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, ++0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, ++0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, +-0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, +-0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, +-0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, ++0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, ++0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, ++0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, ++0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, +-0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, +-0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, ++0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, ++0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, ++0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, ++0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, +-0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, +-0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, +-0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, ++0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, ++0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, +-0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, +-0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, +-0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, ++0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, ++0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, ++0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, ++0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, +-0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, +-0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, +-0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, ++0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, ++0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, ++0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, +-0.8660254038f, -0.4619397663f, -1.3194792169f, -1.1827865776f, -0.5000000000f, -1.1827865776f, -1.3194792169f, -0.4619397663f, +-0.8660254038f, -1.2552931065f, -0.3535533906f, -0.4174197128f, -1.0000000000f, -0.1913417162f, +0.0947343455f, -0.5924659585f, +-0.0000000000f, +0.5924659585f, -0.0947343455f, +0.1913417162f, +1.0000000000f, +0.4174197128f, +0.3535533906f, +1.2552931065f, ++0.8660254038f, +0.4619397663f, +1.3194792169f, +1.1827865776f, +0.5000000000f, +1.1827865776f, +1.3194792169f, +0.4619397663f, ++0.8660254038f, +1.2552931065f, +0.3535533906f, +0.4174197128f, +1.0000000000f, +0.1913417162f, -0.0947343455f, +0.5924659585f, ++0.0000000000f, -0.5924659585f, +0.0947343455f, -0.1913417162f, -1.0000000000f, -0.4174197128f, -0.3535533906f, -1.2552931065f, +}; + +float32_t refOutput[320] = +{ ++0.0000000000f, -0.0010797829f, -0.0007681386f, -0.0001982932f, +0.0000644313f, +0.0020854271f, +0.0036891871f, +0.0015855941f, +-0.0026280805f, -0.0075907658f, -0.0119390538f, -0.0086665968f, +0.0088981202f, +0.0430539279f, +0.0974468742f, +0.1740405600f, ++0.2681416601f, +0.3747720089f, +0.4893362230f, +0.6024154672f, +0.7058740791f, +0.7968348987f, +0.8715901940f, +0.9277881093f, ++0.9682182661f, +0.9934674267f, +1.0012052245f, +0.9925859371f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, ++0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, -0.0000000000f, -0.1309866321f, +-0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, +-0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, +-0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, ++0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, ++0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, ++0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, -0.0000000000f, -0.1309866321f, +-0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, +-0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, +-0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, ++0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, ++0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, ++0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, -0.0000000000f, -0.1309866321f, +-0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, +-0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, +-0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, ++0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, ++0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, ++0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, +0.0000000000f, -0.1309866321f, +-0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, +-0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, +-0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, ++0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, ++0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, ++0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, +0.0000000000f, -0.1309866321f, +-0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, +-0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, +-0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, -0.0000000000f, +0.1309866321f, ++0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, ++0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f, ++0.7085021596f, +0.6100062330f, +0.5012752767f, +0.3834386057f, +0.2592435399f, +0.1309866321f, +0.0000000000f, -0.1309866321f, +-0.2592435399f, -0.3834386057f, -0.5012752767f, -0.6100062330f, -0.7085021596f, -0.7952493046f, -0.8679010068f, -0.9257026822f, +-0.9681538347f, -0.9936657199f, -1.0019733630f, -0.9936657199f, -0.9681538347f, -0.9257026822f, -0.8679010068f, -0.7952493046f, +-0.7085021596f, -0.6100062330f, -0.5012752767f, -0.3834386057f, -0.2592435399f, -0.1309866321f, +0.0000000000f, +0.1309866321f, ++0.2592435399f, +0.3834386057f, +0.5012752767f, +0.6100062330f, +0.7085021596f, +0.7952493046f, +0.8679010068f, +0.9257026822f, ++0.9681538347f, +0.9936657199f, +1.0019733630f, +0.9936657199f, +0.9681538347f, +0.9257026822f, +0.8679010068f, +0.7952493046f +}; + diff --git a/examples/mbed/mbed-dsp/src/main.cpp b/examples/mbed/mbed-dsp/src/main.cpp new file mode 100644 index 00000000..f6bdb4b7 --- /dev/null +++ b/examples/mbed/mbed-dsp/src/main.cpp @@ -0,0 +1,65 @@ +#include "arm_math.h" +#include "math_helper.h" +#include + +#define BLOCK_SIZE 32 +#define NUM_BLOCKS 10 + +#define TEST_LENGTH_SAMPLES (BLOCK_SIZE * NUM_BLOCKS) + +#define SNR_THRESHOLD_F32 140.0f +#define NUM_TAPS 29 + +/* ------------------------------------------------------------------- + * The input signal and reference output (computed with MATLAB) + * are defined externally in arm_fir_lpf_data.c. + * ------------------------------------------------------------------- */ +extern float32_t testInput_f32_1kHz_15kHz[TEST_LENGTH_SAMPLES]; +extern float32_t refOutput[TEST_LENGTH_SAMPLES]; + +/* ------------------------------------------------------------------- + * Declare State buffer of size (numTaps + blockSize - 1) + * ------------------------------------------------------------------- */ +static float32_t firStateF32[BLOCK_SIZE + NUM_TAPS - 1]; + +/* ---------------------------------------------------------------------- + * FIR Coefficients buffer generated using fir1() MATLAB function. + * fir1(28, 6/24) + * ------------------------------------------------------------------- */ +const float32_t firCoeffs32[NUM_TAPS] = { + -0.0018225230f, -0.0015879294f, +0.0000000000f, +0.0036977508f, +0.0080754303f, + +0.0085302217f, -0.0000000000f, -0.0173976984f, -0.0341458607f, -0.0333591565f, + +0.0000000000f, +0.0676308395f, +0.1522061835f, +0.2229246956f, +0.2504960933f, + +0.2229246956f, +0.1522061835f, +0.0676308395f, +0.0000000000f, -0.0333591565f, + -0.0341458607f, -0.0173976984f, -0.0000000000f, +0.0085302217f, +0.0080754303f, + +0.0036977508f, +0.0000000000f, -0.0015879294f, -0.0018225230f +}; + +/* ---------------------------------------------------------------------- + * FIR LPF Example + * ------------------------------------------------------------------- */ +int main(void) { + /* Call FIR init function to initialize the instance structure. */ + arm_fir_instance_f32 S; + arm_fir_init_f32(&S, NUM_TAPS, (float32_t *)&firCoeffs32[0], &firStateF32[0], BLOCK_SIZE); + + /* ---------------------------------------------------------------------- + * Call the FIR process function for every blockSize samples + * ------------------------------------------------------------------- */ + for (uint32_t i=0; i < NUM_BLOCKS; i++) { + float32_t* signal = testInput_f32_1kHz_15kHz + (i * BLOCK_SIZE); + arm_fir_f32(&S, signal, signal, BLOCK_SIZE); + } + + /* ---------------------------------------------------------------------- + * Compare the generated output against the reference output computed + * in MATLAB. + * ------------------------------------------------------------------- */ + float32_t snr = arm_snr_f32(refOutput, testInput_f32_1kHz_15kHz, TEST_LENGTH_SAMPLES); + printf("snr: %f\n\r", snr); + if (snr < SNR_THRESHOLD_F32) { + printf("Failed\n\r"); + } else { + printf("Success\n\r"); + } +} diff --git a/examples/mbed/mbed-http-client/README.rst b/examples/mbed/mbed-http-client/README.rst new file mode 100644 index 00000000..c7f23685 --- /dev/null +++ b/examples/mbed/mbed-http-client/README.rst @@ -0,0 +1,21 @@ +How to build PlatformIO based project +===================================== + +1. `Install PlatformIO `_ +2. Download `source code with examples `_ +3. Extract ZIP archive +4. Run these commands: + +.. code-block:: bash + + # Change directory to example + > cd platformio-develop/examples/mbed/mbed-http-client + + # Process example project + > platformio run + + # Upload firmware + > platformio run --target upload + + # Clean build files + > platformio run --target clean diff --git a/examples/mbed/mbed-http-client/lib/HTTPClient/HTTPClient.cpp b/examples/mbed/mbed-http-client/lib/HTTPClient/HTTPClient.cpp new file mode 100644 index 00000000..0a6abd31 --- /dev/null +++ b/examples/mbed/mbed-http-client/lib/HTTPClient/HTTPClient.cpp @@ -0,0 +1,739 @@ +/* HTTPClient.cpp */ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +//Debug is disabled by default +#if 0 +//Enable debug +#include +#define DBG(x, ...) std::printf("[HTTPClient : DBG]"x"\r\n", ##__VA_ARGS__); +#define WARN(x, ...) std::printf("[HTTPClient : WARN]"x"\r\n", ##__VA_ARGS__); +#define ERR(x, ...) std::printf("[HTTPClient : ERR]"x"\r\n", ##__VA_ARGS__); + +#else +//Disable debug +#define DBG(x, ...) +#define WARN(x, ...) +#define ERR(x, ...) + +#endif + +#define HTTP_PORT 80 + +#define OK 0 + +#define MIN(x,y) (((x)<(y))?(x):(y)) +#define MAX(x,y) (((x)>(y))?(x):(y)) + +#define CHUNK_SIZE 256 + +#include + +#include "HTTPClient.h" + +HTTPClient::HTTPClient() : +m_sock(), m_basicAuthUser(NULL), m_basicAuthPassword(NULL), m_httpResponseCode(0) +{ + +} + +HTTPClient::~HTTPClient() +{ + +} + +#if 0 +void HTTPClient::basicAuth(const char* user, const char* password) //Basic Authentification +{ + m_basicAuthUser = user; + m_basicAuthPassword = password; +} +#endif + +HTTPResult HTTPClient::get(const char* url, IHTTPDataIn* pDataIn, int timeout /*= HTTP_CLIENT_DEFAULT_TIMEOUT*/) //Blocking +{ + return connect(url, HTTP_GET, NULL, pDataIn, timeout); +} + +HTTPResult HTTPClient::get(const char* url, char* result, size_t maxResultLen, int timeout /*= HTTP_CLIENT_DEFAULT_TIMEOUT*/) //Blocking +{ + HTTPText str(result, maxResultLen); + return get(url, &str, timeout); +} + +HTTPResult HTTPClient::post(const char* url, const IHTTPDataOut& dataOut, IHTTPDataIn* pDataIn, int timeout /*= HTTP_CLIENT_DEFAULT_TIMEOUT*/) //Blocking +{ + return connect(url, HTTP_POST, (IHTTPDataOut*)&dataOut, pDataIn, timeout); +} + +HTTPResult HTTPClient::put(const char* url, const IHTTPDataOut& dataOut, IHTTPDataIn* pDataIn, int timeout /*= HTTP_CLIENT_DEFAULT_TIMEOUT*/) //Blocking +{ + return connect(url, HTTP_PUT, (IHTTPDataOut*)&dataOut, pDataIn, timeout); +} + +HTTPResult HTTPClient::del(const char* url, IHTTPDataIn* pDataIn, int timeout /*= HTTP_CLIENT_DEFAULT_TIMEOUT*/) //Blocking +{ + return connect(url, HTTP_DELETE, NULL, pDataIn, timeout); +} + + +int HTTPClient::getHTTPResponseCode() +{ + return m_httpResponseCode; +} + +#define CHECK_CONN_ERR(ret) \ + do{ \ + if(ret) { \ + m_sock.close(); \ + ERR("Connection error (%d)", ret); \ + return HTTP_CONN; \ + } \ + } while(0) + +#define PRTCL_ERR() \ + do{ \ + m_sock.close(); \ + ERR("Protocol error"); \ + return HTTP_PRTCL; \ + } while(0) + +HTTPResult HTTPClient::connect(const char* url, HTTP_METH method, IHTTPDataOut* pDataOut, IHTTPDataIn* pDataIn, int timeout) //Execute request +{ + m_httpResponseCode = 0; //Invalidate code + m_timeout = timeout; + + pDataIn->writeReset(); + if( pDataOut ) + { + pDataOut->readReset(); + } + + char scheme[8]; + uint16_t port; + char host[32]; + char path[64]; + //First we need to parse the url (http[s]://host[:port][/[path]]) -- HTTPS not supported (yet?) + HTTPResult res = parseURL(url, scheme, sizeof(scheme), host, sizeof(host), &port, path, sizeof(path)); + if(res != HTTP_OK) + { + ERR("parseURL returned %d", res); + return res; + } + + if(port == 0) //TODO do handle HTTPS->443 + { + port = 80; + } + + DBG("Scheme: %s", scheme); + DBG("Host: %s", host); + DBG("Port: %d", port); + DBG("Path: %s", path); + + //Connect + DBG("Connecting socket to server"); + int ret = m_sock.connect(host, port); + if (ret < 0) + { + m_sock.close(); + ERR("Could not connect"); + return HTTP_CONN; + } + + //Send request + DBG("Sending request"); + char buf[CHUNK_SIZE]; + const char* meth = (method==HTTP_GET)?"GET":(method==HTTP_POST)?"POST":(method==HTTP_PUT)?"PUT":(method==HTTP_DELETE)?"DELETE":""; + snprintf(buf, sizeof(buf), "%s %s HTTP/1.1\r\nHost: %s\r\n", meth, path, host); //Write request + ret = send(buf); + if(ret) + { + m_sock.close(); + ERR("Could not write request"); + return HTTP_CONN; + } + + //Send all headers + + //Send default headers + DBG("Sending headers"); + if( pDataOut != NULL ) + { + if( pDataOut->getIsChunked() ) + { + ret = send("Transfer-Encoding: chunked\r\n"); + CHECK_CONN_ERR(ret); + } + else + { + snprintf(buf, sizeof(buf), "Content-Length: %d\r\n", pDataOut->getDataLen()); + ret = send(buf); + CHECK_CONN_ERR(ret); + } + char type[48]; + if( pDataOut->getDataType(type, 48) == HTTP_OK ) + { + snprintf(buf, sizeof(buf), "Content-Type: %s\r\n", type); + ret = send(buf); + CHECK_CONN_ERR(ret); + } + + //Send specific headers + while( pDataOut->getHeader(buf, sizeof(buf) - 3) ) //must have space left for CRLF + 0 terminating char + { + size_t headerlen = strlen(buf); + snprintf(buf + headerlen, sizeof(buf) - headerlen, "\r\n"); + ret = send(buf); + CHECK_CONN_ERR(ret); + } + } + + //Send specific headers + while( pDataIn->getHeader(buf, sizeof(buf) - 3) ) + { + size_t headerlen = strlen(buf); + snprintf(buf + headerlen, sizeof(buf) - headerlen, "\r\n"); + ret = send(buf); + CHECK_CONN_ERR(ret); + } + + //Close headers + DBG("Headers sent"); + ret = send("\r\n"); + CHECK_CONN_ERR(ret); + + size_t trfLen; + + //Send data (if available) + if( pDataOut != NULL ) + { + DBG("Sending data"); + while(true) + { + size_t writtenLen = 0; + pDataOut->read(buf, CHUNK_SIZE, &trfLen); + if( pDataOut->getIsChunked() ) + { + //Write chunk header + char chunkHeader[16]; + snprintf(chunkHeader, sizeof(chunkHeader), "%X\r\n", trfLen); //In hex encoding + ret = send(chunkHeader); + CHECK_CONN_ERR(ret); + } + else if( trfLen == 0 ) + { + break; + } + if( trfLen != 0 ) + { + ret = send(buf, trfLen); + CHECK_CONN_ERR(ret); + } + + if( pDataOut->getIsChunked() ) + { + ret = send("\r\n"); //Chunk-terminating CRLF + CHECK_CONN_ERR(ret); + } + else + { + writtenLen += trfLen; + if( writtenLen >= pDataOut->getDataLen() ) + { + break; + } + } + + if( trfLen == 0 ) + { + break; + } + } + } + + //Receive response + DBG("Receiving response"); + ret = recv(buf, 1, CHUNK_SIZE - 1, &trfLen); //Read n bytes + CHECK_CONN_ERR(ret); + + buf[trfLen] = '\0'; + + //Make sure we got the first response line + char* crlfPtr = NULL; + while( true ) + { + crlfPtr = strstr(buf, "\r\n"); + if(crlfPtr == NULL) + { + if( trfLen < CHUNK_SIZE - 1 ) + { + size_t newTrfLen; + ret = recv(buf + trfLen, 1, CHUNK_SIZE - trfLen - 1, &newTrfLen); + trfLen += newTrfLen; + buf[trfLen] = '\0'; + DBG("Read %d chars; In buf: [%s]", newTrfLen, buf); + CHECK_CONN_ERR(ret); + continue; + } + else + { + PRTCL_ERR(); + } + } + break; + } + + int crlfPos = crlfPtr - buf; + buf[crlfPos] = '\0'; + + //Parse HTTP response + //if( sscanf(buf, "HTTP/%*d.%*d %d %*[^\r\n]", &m_httpResponseCode) != 1 ) + if(crlfPos > 13) + { + buf[13] = '\0'; + } + if( sscanf(buf, "HTTP/%*d.%*d %d", &m_httpResponseCode) != 1 ) //Kludge for newlib nano + { + //Cannot match string, error + ERR("Not a correct HTTP answer : %s\n", buf); + PRTCL_ERR(); + } + + if( (m_httpResponseCode < 200) || (m_httpResponseCode >= 300) ) + { + //Did not return a 2xx code; TODO fetch headers/(&data?) anyway and implement a mean of writing/reading headers + WARN("Response code %d", m_httpResponseCode); + PRTCL_ERR(); + } + + DBG("Reading headers"); + + memmove(buf, &buf[crlfPos+2], trfLen - (crlfPos + 2) + 1); //Be sure to move NULL-terminating char as well + trfLen -= (crlfPos + 2); + + size_t recvContentLength = 0; + bool recvChunked = false; + bool recvLengthUnknown = true; + //Now get headers + while( true ) + { + crlfPtr = strstr(buf, "\r\n"); + if(crlfPtr == NULL) + { + if( trfLen < CHUNK_SIZE - 1 ) + { + size_t newTrfLen; + ret = recv(buf + trfLen, 1, CHUNK_SIZE - trfLen - 1, &newTrfLen); + trfLen += newTrfLen; + buf[trfLen] = '\0'; + DBG("Read %d chars; In buf: [%s]", newTrfLen, buf); + CHECK_CONN_ERR(ret); + continue; + } + else + { + PRTCL_ERR(); + } + } + + crlfPos = crlfPtr - buf; + + if(crlfPos == 0) //End of headers + { + DBG("Headers read"); + memmove(buf, &buf[2], trfLen - 2 + 1); //Be sure to move NULL-terminating char as well + trfLen -= 2; + break; + } + + buf[crlfPos] = '\0'; + + char key[32]; + char value[32]; + + //key[31] = '\0'; + //value[31] = '\0'; + + memset(key, 0, 32); + memset(value, 0, 32); + + //int n = sscanf(buf, "%31[^:]: %31[^\r\n]", key, value); + + int n = 0; + + char* keyEnd = strchr(buf, ':'); + if(keyEnd != NULL) + { + *keyEnd = '\0'; + if(strlen(buf) < 32) + { + strcpy(key, buf); + n++; + char* valueStart = keyEnd + 2; + if( (valueStart - buf) < crlfPos ) + { + if(strlen(valueStart) < 32) + { + strcpy(value, valueStart); + n++; + } + } + } + } + if ( n == 2 ) + { + DBG("Read header : %s: %s\n", key, value); + if( !strcmp(key, "Content-Length") ) + { + sscanf(value, "%d", &recvContentLength); + recvLengthUnknown = false; + pDataIn->setDataLen(recvContentLength); + } + else if( !strcmp(key, "Transfer-Encoding") ) + { + if( !strcmp(value, "Chunked") || !strcmp(value, "chunked") ) + { + recvChunked = true; + recvLengthUnknown = false; + pDataIn->setIsChunked(true); + } + } + else if( !strcmp(key, "Content-Type") ) + { + pDataIn->setDataType(value); + } + + memmove(buf, &buf[crlfPos+2], trfLen - (crlfPos + 2) + 1); //Be sure to move NULL-terminating char as well + trfLen -= (crlfPos + 2); + + } + else + { + ERR("Could not parse header"); + PRTCL_ERR(); + } + + } + + //Receive data + DBG("Receiving data"); + while(true) + { + size_t readLen = 0; + + if( recvChunked ) + { + //Read chunk header + bool foundCrlf; + do + { + foundCrlf = false; + crlfPos=0; + buf[trfLen]=0; + if(trfLen >= 2) + { + for(; crlfPos < trfLen - 2; crlfPos++) + { + if( buf[crlfPos] == '\r' && buf[crlfPos + 1] == '\n' ) + { + foundCrlf = true; + break; + } + } + } + if(!foundCrlf) //Try to read more + { + if( trfLen < CHUNK_SIZE ) + { + size_t newTrfLen; + ret = recv(buf + trfLen, 0, CHUNK_SIZE - trfLen - 1, &newTrfLen); + trfLen += newTrfLen; + CHECK_CONN_ERR(ret); + continue; + } + else + { + PRTCL_ERR(); + } + } + } while(!foundCrlf); + buf[crlfPos] = '\0'; + int n = sscanf(buf, "%x", &readLen); + if(n!=1) + { + ERR("Could not read chunk length"); + PRTCL_ERR(); + } + + memmove(buf, &buf[crlfPos+2], trfLen - (crlfPos + 2)); //Not need to move NULL-terminating char any more + trfLen -= (crlfPos + 2); + + if( readLen == 0 ) + { + //Last chunk + break; + } + } + else + { + readLen = recvContentLength; + } + + DBG("Retrieving %d bytes (%d bytes in buffer)", readLen, trfLen); + + do + { + if(recvLengthUnknown ) + { + readLen = trfLen; + } + pDataIn->write(buf, MIN(trfLen, readLen)); + if(!recvLengthUnknown) + { + if( trfLen > readLen ) + { + memmove(buf, &buf[readLen], trfLen - readLen); + trfLen -= readLen; + readLen = 0; + } + else + { + readLen -= trfLen; + } + } + else + { + trfLen = 0; + } + + if(readLen || recvLengthUnknown) + { + ret = recv(buf, 1, CHUNK_SIZE - trfLen - 1, &trfLen); + if(recvLengthUnknown && (ret == HTTP_CLOSED)) + { + //Write and exit + pDataIn->write(buf, trfLen); + break; + } + CHECK_CONN_ERR(ret); + if(recvLengthUnknown && (trfLen == 0)) + { + break; + } + } + } while(readLen || recvLengthUnknown); + + if( recvChunked ) + { + if(trfLen < 2) + { + size_t newTrfLen; + //Read missing chars to find end of chunk + ret = recv(buf + trfLen, 2 - trfLen, CHUNK_SIZE - trfLen - 1, &newTrfLen); + CHECK_CONN_ERR(ret); + trfLen += newTrfLen; + } + if( (buf[0] != '\r') || (buf[1] != '\n') ) + { + ERR("Format error"); + PRTCL_ERR(); + } + memmove(buf, &buf[2], trfLen - 2); + trfLen -= 2; + } + else + { + break; + } + + } + + m_sock.close(); + DBG("Completed HTTP transaction"); + + return HTTP_OK; +} + +HTTPResult HTTPClient::recv(char* buf, size_t minLen, size_t maxLen, size_t* pReadLen) //0 on success, err code on failure +{ + DBG("Trying to read between %d and %d bytes", minLen, maxLen); + size_t readLen = 0; + + if(!m_sock.is_connected()) + { + WARN("Connection was closed by server"); + return HTTP_CLOSED; //Connection was closed by server + } + + int ret; + while(readLen < maxLen) + { + if(readLen < minLen) + { + DBG("Trying to read at most %d bytes [Blocking]", minLen - readLen); + m_sock.set_blocking(false, m_timeout); + ret = m_sock.receive_all(buf + readLen, minLen - readLen); + } + else + { + DBG("Trying to read at most %d bytes [Not blocking]", maxLen - readLen); + m_sock.set_blocking(false, 0); + ret = m_sock.receive(buf + readLen, maxLen - readLen); + } + + if( ret > 0) + { + readLen += ret; + } + else if( ret == 0 ) + { + break; + } + else + { + if(!m_sock.is_connected()) + { + ERR("Connection error (recv returned %d)", ret); + *pReadLen = readLen; + return HTTP_CONN; + } + else + { + break; + } + } + + if(!m_sock.is_connected()) + { + break; + } + } + DBG("Read %d bytes", readLen); + *pReadLen = readLen; + return HTTP_OK; +} + +HTTPResult HTTPClient::send(char* buf, size_t len) //0 on success, err code on failure +{ + if(len == 0) + { + len = strlen(buf); + } + DBG("Trying to write %d bytes", len); + size_t writtenLen = 0; + + if(!m_sock.is_connected()) + { + WARN("Connection was closed by server"); + return HTTP_CLOSED; //Connection was closed by server + } + + m_sock.set_blocking(false, m_timeout); + int ret = m_sock.send_all(buf, len); + if(ret > 0) + { + writtenLen += ret; + } + else if( ret == 0 ) + { + WARN("Connection was closed by server"); + return HTTP_CLOSED; //Connection was closed by server + } + else + { + ERR("Connection error (send returned %d)", ret); + return HTTP_CONN; + } + + DBG("Written %d bytes", writtenLen); + return HTTP_OK; +} + +HTTPResult HTTPClient::parseURL(const char* url, char* scheme, size_t maxSchemeLen, char* host, size_t maxHostLen, uint16_t* port, char* path, size_t maxPathLen) //Parse URL +{ + char* schemePtr = (char*) url; + char* hostPtr = (char*) strstr(url, "://"); + if(hostPtr == NULL) + { + WARN("Could not find host"); + return HTTP_PARSE; //URL is invalid + } + + if( maxSchemeLen < hostPtr - schemePtr + 1 ) //including NULL-terminating char + { + WARN("Scheme str is too small (%d >= %d)", maxSchemeLen, hostPtr - schemePtr + 1); + return HTTP_PARSE; + } + memcpy(scheme, schemePtr, hostPtr - schemePtr); + scheme[hostPtr - schemePtr] = '\0'; + + hostPtr+=3; + + size_t hostLen = 0; + + char* portPtr = strchr(hostPtr, ':'); + if( portPtr != NULL ) + { + hostLen = portPtr - hostPtr; + portPtr++; + if( sscanf(portPtr, "%hu", port) != 1) + { + WARN("Could not find port"); + return HTTP_PARSE; + } + } + else + { + *port=0; + } + char* pathPtr = strchr(hostPtr, '/'); + if( hostLen == 0 ) + { + hostLen = pathPtr - hostPtr; + } + + if( maxHostLen < hostLen + 1 ) //including NULL-terminating char + { + WARN("Host str is too small (%d >= %d)", maxHostLen, hostLen + 1); + return HTTP_PARSE; + } + memcpy(host, hostPtr, hostLen); + host[hostLen] = '\0'; + + size_t pathLen; + char* fragmentPtr = strchr(hostPtr, '#'); + if(fragmentPtr != NULL) + { + pathLen = fragmentPtr - pathPtr; + } + else + { + pathLen = strlen(pathPtr); + } + + if( maxPathLen < pathLen + 1 ) //including NULL-terminating char + { + WARN("Path str is too small (%d >= %d)", maxPathLen, pathLen + 1); + return HTTP_PARSE; + } + memcpy(path, pathPtr, pathLen); + path[pathLen] = '\0'; + + return HTTP_OK; +} diff --git a/examples/mbed/mbed-http-client/lib/HTTPClient/HTTPClient.h b/examples/mbed/mbed-http-client/lib/HTTPClient/HTTPClient.h new file mode 100644 index 00000000..25301c36 --- /dev/null +++ b/examples/mbed/mbed-http-client/lib/HTTPClient/HTTPClient.h @@ -0,0 +1,159 @@ +/* HTTPClient.h */ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** \file +HTTP Client header file +*/ + +#ifndef HTTP_CLIENT_H +#define HTTP_CLIENT_H + +#include "TCPSocketConnection.h" + +#define HTTP_CLIENT_DEFAULT_TIMEOUT 15000 + +class HTTPData; + +#include "IHTTPData.h" +#include "mbed.h" + +///HTTP client results +enum HTTPResult +{ + HTTP_PROCESSING, /// + +using std::size_t; + +class IHTTPData +{ + protected: + /** Get a specific header + * + */ + virtual bool getHeader(char* header, size_t maxHeaderLen) { return false; } +}; + +///This is a simple interface for HTTP data storage (impl examples are Key/Value Pairs, File, etc...) +class IHTTPDataOut : public IHTTPData +{ +protected: + friend class HTTPClient; + + /** Reset stream to its beginning + * Called by the HTTPClient on each new request + */ + virtual void readReset() = 0; + + /** Read a piece of data to be transmitted + * @param buf Pointer to the buffer on which to copy the data + * @param len Length of the buffer + * @param pReadLen Pointer to the variable on which the actual copied data length will be stored + */ + virtual int read(char* buf, size_t len, size_t* pReadLen) = 0; + + /** Get MIME type + * @param type Internet media type from Content-Type header + */ + virtual int getDataType(char* type, size_t maxTypeLen) = 0; //Internet media type for Content-Type header + + /** Determine whether the HTTP client should chunk the data + * Used for Transfer-Encoding header + */ + virtual bool getIsChunked() = 0; + + /** If the data is not chunked, get its size + * Used for Content-Length header + */ + virtual size_t getDataLen() = 0; + +}; + +///This is a simple interface for HTTP data storage (impl examples are Key/Value Pairs, File, etc...) +class IHTTPDataIn : public IHTTPData +{ +protected: + friend class HTTPClient; + + /** Reset stream to its beginning + * Called by the HTTPClient on each new request + */ + virtual void writeReset() = 0; + + /** Write a piece of data transmitted by the server + * @param buf Pointer to the buffer from which to copy the data + * @param len Length of the buffer + */ + virtual int write(const char* buf, size_t len) = 0; + + /** Set MIME type + * @param type Internet media type from Content-Type header + */ + virtual void setDataType(const char* type) = 0; + + /** Determine whether the data is chunked + * Recovered from Transfer-Encoding header + */ + virtual void setIsChunked(bool chunked) = 0; + + /** If the data is not chunked, set its size + * From Content-Length header + */ + virtual void setDataLen(size_t len) = 0; + +}; + +#endif diff --git a/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPMap.cpp b/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPMap.cpp new file mode 100644 index 00000000..5eb4c52e --- /dev/null +++ b/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPMap.cpp @@ -0,0 +1,200 @@ +/* HTTPMap.cpp */ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "HTTPMap.h" + +#include + +#include + +#define OK 0 + +using std::strncpy; + +HTTPMap::HTTPMap() : m_pos(0), m_count(0) +{ + +} + +void HTTPMap::put(const char* key, const char* value) +{ + if(m_count >= HTTPMAP_TABLE_SIZE) + { + return; + } + m_keys[m_count] = key; + m_values[m_count] = value; + m_count++; +} + +void HTTPMap::clear() +{ + m_count = 0; + m_pos = 0; +} + +/*virtual*/ void HTTPMap::readReset() +{ + m_pos = 0; +} + +/*virtual*/ int HTTPMap::read(char* buf, size_t len, size_t* pReadLen) +{ + if(m_pos >= m_count) + { + *pReadLen = 0; + m_pos = 0; + return OK; + } + + //URL encode + char* out = buf; + const char* in = m_keys[m_pos]; + if( (m_pos != 0) && (out - buf < len - 1) ) + { + *out='&'; + out++; + } + + while( (*in != '\0') && (out - buf < len - 3) ) + { + if (std::isalnum(*in) || *in == '-' || *in == '_' || *in == '.' || *in == '~') + { + *out = *in; + out++; + } + else if( *in == ' ' ) + { + *out='+'; + out++; + } + else + { + char hex[] = "0123456789abcdef"; + *out='%'; + out++; + *out=hex[(*in>>4)&0xf]; + out++; + *out=hex[(*in)&0xf]; + out++; + } + in++; + } + + if( out - buf < len - 1 ) + { + *out='='; + out++; + } + + in = m_values[m_pos]; + while( (*in != '\0') && (out - buf < len - 3) ) + { + if (std::isalnum(*in) || *in == '-' || *in == '_' || *in == '.' || *in == '~') + { + *out = *in; + out++; + } + else if( *in == ' ' ) + { + *out='+'; + out++; + } + else + { + char hex[] = "0123456789abcdef"; + *out='%'; + out++; + *out=hex[(*in>>4)&0xf]; + out++; + *out=hex[(*in)&0xf]; + out++; + } + in++; + } + + *pReadLen = out - buf; + + m_pos++; + return OK; +} + +/*virtual*/ int HTTPMap::getDataType(char* type, size_t maxTypeLen) //Internet media type for Content-Type header +{ + strncpy(type, "application/x-www-form-urlencoded", maxTypeLen-1); + type[maxTypeLen-1] = '\0'; + return OK; +} + +/*virtual*/ bool HTTPMap::getIsChunked() //For Transfer-Encoding header +{ + return false; ////Data is computed one key/value pair at a time +} + +/*virtual*/ size_t HTTPMap::getDataLen() //For Content-Length header +{ + size_t count = 0; + for(size_t i = 0; i< m_count; i++) + { + //URL encode + const char* in = m_keys[i]; + if( i != 0 ) + { + count++; + } + + while( (*in != '\0') ) + { + if (std::isalnum(*in) || *in == '-' || *in == '_' || *in == '.' || *in == '~') + { + count++; + } + else if( *in == ' ' ) + { + count++; + } + else + { + count+=3; + } + in++; + } + + count ++; + + in = m_values[i]; + while( (*in != '\0') ) + { + if (std::isalnum(*in) || *in == '-' || *in == '_' || *in == '.' || *in == '~') + { + count++; + } + else if( *in == ' ' ) + { + count++; + } + else + { + count+=3; + } + in++; + } + } + return count; +} diff --git a/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPMap.h b/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPMap.h new file mode 100644 index 00000000..c8433778 --- /dev/null +++ b/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPMap.h @@ -0,0 +1,71 @@ +/* HTTPMap.h */ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef HTTPMAP_H_ +#define HTTPMAP_H_ + +#include "../IHTTPData.h" + +#define HTTPMAP_TABLE_SIZE 32 + +/** Map of key/value pairs + * Used to transmit POST data using the application/x-www-form-urlencoded encoding + */ +class HTTPMap: public IHTTPDataOut +{ +public: + /** + Instantiates HTTPMap + It supports at most 32 key/values pairs + */ + HTTPMap(); + + /** Put Key/Value pair + The references to the parameters must remain valid as long as the clear() function is not called + @param key The key to use + @param value The corresponding value + */ + void put(const char* key, const char* value); + + /** Clear table + */ + void clear(); + +protected: + //IHTTPDataIn + virtual void readReset(); + + virtual int read(char* buf, size_t len, size_t* pReadLen); + + virtual int getDataType(char* type, size_t maxTypeLen); //Internet media type for Content-Type header + + virtual bool getIsChunked(); //For Transfer-Encoding header + + virtual size_t getDataLen(); //For Content-Length header + +private: + const char* m_keys[HTTPMAP_TABLE_SIZE]; + const char* m_values[HTTPMAP_TABLE_SIZE]; + + size_t m_pos; + size_t m_count; +}; + +#endif /* HTTPMAP_H_ */ diff --git a/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPText.cpp b/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPText.cpp new file mode 100644 index 00000000..18cd4207 --- /dev/null +++ b/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPText.cpp @@ -0,0 +1,104 @@ +/* HTTPText.cpp */ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#include "HTTPText.h" + +#include + +#define OK 0 + +using std::memcpy; +using std::strncpy; +using std::strlen; + +#define MIN(x,y) (((x)<(y))?(x):(y)) + +HTTPText::HTTPText(char* str) : m_str(str), m_pos(0) +{ + m_size = strlen(str) + 1; +} + +HTTPText::HTTPText(char* str, size_t size) : m_str(str), m_size(size), m_pos(0) +{ + +} + +//IHTTPDataIn +/*virtual*/ void HTTPText::readReset() +{ + m_pos = 0; +} + +/*virtual*/ int HTTPText::read(char* buf, size_t len, size_t* pReadLen) +{ + *pReadLen = MIN(len, m_size - 1 - m_pos); + memcpy(buf, m_str + m_pos, *pReadLen); + m_pos += *pReadLen; + return OK; +} + +/*virtual*/ int HTTPText::getDataType(char* type, size_t maxTypeLen) //Internet media type for Content-Type header +{ + strncpy(type, "text/plain", maxTypeLen-1); + type[maxTypeLen-1] = '\0'; + return OK; +} + +/*virtual*/ bool HTTPText::getIsChunked() //For Transfer-Encoding header +{ + return false; +} + +/*virtual*/ size_t HTTPText::getDataLen() //For Content-Length header +{ + return m_size - 1; +} + +//IHTTPDataOut +/*virtual*/ void HTTPText::writeReset() +{ + m_pos = 0; +} + +/*virtual*/ int HTTPText::write(const char* buf, size_t len) +{ + size_t writeLen = MIN(len, m_size - 1 - m_pos); + memcpy(m_str + m_pos, buf, writeLen); + m_pos += writeLen; + m_str[m_pos] = '\0'; + return OK; +} + +/*virtual*/ void HTTPText::setDataType(const char* type) //Internet media type from Content-Type header +{ + +} + +/*virtual*/ void HTTPText::setIsChunked(bool chunked) //From Transfer-Encoding header +{ + +} + +/*virtual*/ void HTTPText::setDataLen(size_t len) //From Content-Length header, or if the transfer is chunked, next chunk length +{ + +} + + + diff --git a/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPText.h b/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPText.h new file mode 100644 index 00000000..f55ff762 --- /dev/null +++ b/examples/mbed/mbed-http-client/lib/HTTPClient/data/HTTPText.h @@ -0,0 +1,72 @@ +/* HTTPText.h */ +/* Copyright (C) 2012 mbed.org, MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software + * and associated documentation files (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, publish, distribute, + * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#ifndef HTTPTEXT_H_ +#define HTTPTEXT_H_ + +#include "../IHTTPData.h" + +/** A data endpoint to store text +*/ +class HTTPText : public IHTTPDataIn, public IHTTPDataOut +{ +public: + /** Create an HTTPText instance for output + * @param str String to be transmitted + */ + HTTPText(char* str); + + /** Create an HTTPText instance for input + * @param str Buffer to store the incoming string + * @param size Size of the buffer + */ + HTTPText(char* str, size_t size); + +protected: + //IHTTPDataIn + virtual void readReset(); + + virtual int read(char* buf, size_t len, size_t* pReadLen); + + virtual int getDataType(char* type, size_t maxTypeLen); //Internet media type for Content-Type header + + virtual bool getIsChunked(); //For Transfer-Encoding header + + virtual size_t getDataLen(); //For Content-Length header + + //IHTTPDataOut + virtual void writeReset(); + + virtual int write(const char* buf, size_t len); + + virtual void setDataType(const char* type); //Internet media type from Content-Type header + + virtual void setIsChunked(bool chunked); //From Transfer-Encoding header + + virtual void setDataLen(size_t len); //From Content-Length header, or if the transfer is chunked, next chunk length + +private: + char* m_str; + size_t m_size; + + size_t m_pos; +}; + +#endif /* HTTPTEXT_H_ */ diff --git a/examples/mbed/mbed-http-client/platformio.ini b/examples/mbed/mbed-http-client/platformio.ini new file mode 100644 index 00000000..65c87729 --- /dev/null +++ b/examples/mbed/mbed-http-client/platformio.ini @@ -0,0 +1,25 @@ +# +# Project Configuration File +# +# A detailed documentation with the EXAMPLES is located here: +# http://docs.platformio.org/en/latest/projectconf.html +# + +# A sign `#` at the beginning of the line indicates a comment +# Comment lines are ignored. + +# Simple and base environment +# [env:mybaseenv] +# platform = %INSTALLED_PLATFORM_NAME_HERE% +# framework = +# board = +# +# Automatic targets - enable auto-uploading +# targets = upload + + +# NXP LPC Platform +[env:lpc1768] +platform = nxplpc +framework = mbed +board = lpc1768 diff --git a/examples/mbed/mbed-http-client/src/main.cpp b/examples/mbed/mbed-http-client/src/main.cpp new file mode 100644 index 00000000..2e69c69a --- /dev/null +++ b/examples/mbed/mbed-http-client/src/main.cpp @@ -0,0 +1,79 @@ +#include "mbed.h" +#include "EthernetInterface.h" +#include "HTTPClient.h" + +EthernetInterface eth; +HTTPClient http; +char str[512]; + +int main() +{ + eth.init(); //Use DHCP + + eth.connect(); + + //GET data + printf("\nTrying to fetch page...\n"); + int ret = http.get("http://mbed.org/media/uploads/donatien/hello.txt", str, 128); + if (!ret) + { + printf("Page fetched successfully - read %d characters\n", strlen(str)); + printf("Result: %s\n", str); + } + else + { + printf("Error - ret = %d - HTTP return code = %d\n", ret, http.getHTTPResponseCode()); + } + + //POST data + HTTPMap map; + HTTPText inText(str, 512); + map.put("Hello", "World"); + map.put("test", "1234"); + printf("\nTrying to post data...\n"); + ret = http.post("http://httpbin.org/post", map, &inText); + if (!ret) + { + printf("Executed POST successfully - read %d characters\n", strlen(str)); + printf("Result: %s\n", str); + } + else + { + printf("Error - ret = %d - HTTP return code = %d\n", ret, http.getHTTPResponseCode()); + } + + //PUT data + strcpy(str, "This is a PUT test!"); + HTTPText outText(str); + //HTTPText inText(str, 512); + printf("\nTrying to put resource...\n"); + ret = http.put("http://httpbin.org/put", outText, &inText); + if (!ret) + { + printf("Executed PUT successfully - read %d characters\n", strlen(str)); + printf("Result: %s\n", str); + } + else + { + printf("Error - ret = %d - HTTP return code = %d\n", ret, http.getHTTPResponseCode()); + } + + //DELETE data + //HTTPText inText(str, 512); + printf("\nTrying to delete resource...\n"); + ret = http.del("http://httpbin.org/delete", &inText); + if (!ret) + { + printf("Executed DELETE successfully - read %d characters\n", strlen(str)); + printf("Result: %s\n", str); + } + else + { + printf("Error - ret = %d - HTTP return code = %d\n", ret, http.getHTTPResponseCode()); + } + + eth.disconnect(); + + while(1) { + } +} diff --git a/examples/mbed/mbed-rtos/README.rst b/examples/mbed/mbed-rtos/README.rst new file mode 100644 index 00000000..6411da4b --- /dev/null +++ b/examples/mbed/mbed-rtos/README.rst @@ -0,0 +1,21 @@ +How to build PlatformIO based project +==================================== + +1. `Install PlatformIO `_ +2. Download `source code with examples `_ +3. Extract ZIP archive +4. Run these commands: + +.. code-block:: bash + + # Change directory to example + > cd platformio-develop/examples/mbed/mbed-rtos + + # Process example project + > platformio run + + # Upload firmware + > platformio run --target upload + + # Clean build files + > platformio run --target clean diff --git a/examples/mbed/mbed-rtos/platformio.ini b/examples/mbed/mbed-rtos/platformio.ini new file mode 100644 index 00000000..cb93e0e6 --- /dev/null +++ b/examples/mbed/mbed-rtos/platformio.ini @@ -0,0 +1,37 @@ +# +# Project Configuration File +# +# A detailed documentation with the EXAMPLES is located here: +# http://docs.platformio.org/en/latest/projectconf.html +# + +# A sign `#` at the beginning of the line indicates a comment +# Comment lines are ignored. + +# Simple and base environment +# [env:mybaseenv] +# platform = %INSTALLED_PLATFORM_NAME_HERE% +# framework = +# board = +# +# Automatic targets - enable auto-uploading +# targets = upload + + +# NXP LPC Platform +[env:lpc1768] +platform = nxplpc +framework = mbed +board = lpc1768 + +# Freescale FRDM Platform +[env:frdm_kl25z] +platform = freescalekinetis +framework = mbed +board = frdm_kl25z + +# ST STM32 Platform +[env:nucleo_f401re] +platform = ststm32 +framework = mbed +board = nucleo_f401re diff --git a/examples/mbed/mbed-rtos/src/main.cpp b/examples/mbed/mbed-rtos/src/main.cpp new file mode 100644 index 00000000..a1aa46d1 --- /dev/null +++ b/examples/mbed/mbed-rtos/src/main.cpp @@ -0,0 +1,38 @@ +#include "mbed.h" +#include "rtos.h" + +/* + * The stack size is defined in cmsis_os.h mainly dependent on the underlying toolchain and + * the C standard library. For GCC, ARM_STD and IAR it is defined with a size of 2048 bytes + * and for ARM_MICRO 512. Because of reduce RAM size some targets need a reduced stacksize. + */ +#if defined(TARGET_STM32L053R8) || defined(TARGET_STM32L053C8) +#define STACK_SIZE DEFAULT_STACK_SIZE/4 +#else +#define STACK_SIZE DEFAULT_STACK_SIZE +#endif + +void print_char(char c = '*') { + printf("%c", c); + fflush(stdout); +} + +DigitalOut led1(LED1); +DigitalOut led2(LED2); + +void led2_thread(void const *argument) { + while (true) { + led2 = !led2; + Thread::wait(1000); + print_char(); + } +} + +int main() { + Thread thread(led2_thread, NULL, osPriorityNormal, STACK_SIZE); + + while (true) { + led1 = !led1; + Thread::wait(500); + } +} diff --git a/platformio/boards/freescalekinetis.json b/platformio/boards/freescalekinetis.json index 88be3603..869a977a 100644 --- a/platformio/boards/freescalekinetis.json +++ b/platformio/boards/freescalekinetis.json @@ -78,8 +78,7 @@ }, "url": "https://developer.mbed.org/platforms/FRDM-K20D50M/", "vendor": "Freescale" - } - , + }, "frdm_k22f": { "build": { "f_cpu": "120000000L", @@ -95,5 +94,21 @@ }, "url": "https://developer.mbed.org/platforms/FRDM-K22F/", "vendor": "Freescale" + }, + "IBMEthernetKit": { + "build": { + "f_cpu": "120000000L", + "cpu": "cortex-m4", + "mcu": "mk64fn1m0vll12" + }, + "frameworks": ["mbed"], + "name": "Ethernet IoT Starter Kit", + "platform": "freescalekinetis", + "upload": { + "maximum_ram_size": 262144, + "maximum_size": 1048576 + }, + "url": "http://developer.mbed.org/platforms/IBMEthernetKit/", + "vendor": "Freescale" } } \ No newline at end of file diff --git a/platformio/boards/nordicnrf51.json b/platformio/boards/nordicnrf51.json index acdabaee..abe44026 100644 --- a/platformio/boards/nordicnrf51.json +++ b/platformio/boards/nordicnrf51.json @@ -94,8 +94,7 @@ }, "url": "https://developer.mbed.org/platforms/Nordic-nRF51-Dongle/", "vendor": "Nordic" - } - , + }, "wallBotBLE": { "build": { "f_cpu": "16000000L", @@ -111,6 +110,21 @@ }, "url": "https://developer.mbed.org/platforms/JKSoft-Wallbot-BLE/", "vendor": "JKSoft" + }, + "seeedTinyBLE": { + "build": { + "f_cpu": "16000000L", + "cpu": "cortex-m0", + "mcu": "nrf51822" + }, + "frameworks": ["mbed"], + "name": "Seeed Tiny BLE", + "platform": "nordicnrf51", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 262144 + }, + "url": "http://developer.mbed.org/platforms/Seeed-Tiny-BLE/", + "vendor": "SeeedStudio" } - } \ No newline at end of file diff --git a/platformio/boards/ststm32.json b/platformio/boards/ststm32.json index 20b77108..8b45b992 100644 --- a/platformio/boards/ststm32.json +++ b/platformio/boards/ststm32.json @@ -235,6 +235,22 @@ "url": "https://developer.mbed.org/platforms/ST-Nucleo-F302R8/", "vendor": "ST" }, + "nucleo_f303re": { + "build": { + "f_cpu": "72000000L", + "cpu": "cortex-m4", + "mcu": "stm32f303ret6" + }, + "frameworks": ["mbed"], + "name": "ST Nucleo F303RE", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 65536, + "maximum_size": 524288 + }, + "url": "http://developer.mbed.org/platforms/ST-Nucleo-F303RE/", + "vendor": "ST" + }, "nucleo_f334r8": { "build": { "f_cpu": "72000000L", diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index a53eeb0e..191e04d1 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -15,11 +15,13 @@ the mbed Developer Community. http://mbed.org/ """ +import re import xml.etree.ElementTree as ElementTree from binascii import crc32 -from os.path import join, normpath +from os import walk +from os.path import basename, isfile, join, normpath -from SCons.Script import DefaultEnvironment +from SCons.Script import DefaultEnvironment, Exit env = DefaultEnvironment() @@ -41,9 +43,10 @@ MBED_VARIANTS = { "lpc11u35": "LPC11U35_401", "mbuino": "LPC11U24", "nrf51_mkit": "NRF51822", - "redBearLab": "NRF51822", + "seeedTinyBLE": "SEEED_TINY_BLE", + "redBearLab": "RBLAB_NRF51822", "nrf51-dt": "NRF51_DK", - "redBearLabBLENano": "NRF51822", + "redBearLabBLENano": "RBLAB_NRF51822", "wallBotBLE": "NRF51822", "frdm_kl25z": "KL25Z", "frdm_kl46z": "KL46Z", @@ -53,6 +56,86 @@ MBED_VARIANTS = { "frdm_k22f": "K22F" } +MBED_LIBS_MAP = { + "dsp": {"ar": ["dsp", "cmsis_dsp"]}, + "eth": {"ar": ["eth"], "deps": ["rtos"]}, + "fat": {"ar": ["fat"]}, + "rtos": {"ar": ["rtos", "rtx"]}, + "usb": {"ar": ["USBDevice"]}, + "usb_host": {"ar": ["USBHost"]} +} + + +def get_mbedlib_includes(): + result = [] + for lib in MBED_LIBS_MAP.keys(): + includes = [] + lib_dir = join(env.subst("$PLATFORMFW_DIR"), "libs", lib) + for _, _, files in walk(lib_dir): + for libfile in files: + if libfile.endswith(".h"): + includes.append(libfile) + result.append((lib, set(includes))) + return result + + +def get_used_mbedlibs(): + re_includes = re.compile(r"^(#include\s+(?:\<|\")([^\r\n\"]+))", + re.M | re.I) + srcincs = [] + for root, _, files in walk(env.get("PROJECTSRC_DIR")): + for pfile in files: + if not any([pfile.endswith(ext) for ext in (".h", ".c", ".cpp")]): + continue + with open(join(root, pfile)) as fp: + srcincs.extend([i[1] for i in re_includes.findall(fp.read())]) + srcincs = set(srcincs) + + result = {} + for libname, libincs in get_mbedlib_includes(): + if libincs & srcincs and libname not in result: + result[libname] = MBED_LIBS_MAP[libname] + + return result + + +def add_mbedlib(libname, libar): + if libar in env.get("LIBS"): + return + + lib_dir = join(env.subst("$PLATFORMFW_DIR"), "libs", libname) + if not isfile(join(lib_dir, "TARGET_%s" % variant, + "TOOLCHAIN_GCC_ARM", "lib%s.a" % libar)): + Exit("Error: %s board doesn't support %s library!" % + (env.get("BOARD"), libname)) + + env.Append( + LIBPATH=[ + join(env.subst("$PLATFORMFW_DIR"), "libs", libname, + "TARGET_%s" % variant, "TOOLCHAIN_GCC_ARM") + ], + LIBS=[libar] + ) + + sysincdirs = ( + "eth", + "include", + "ipv4", + "lwip-eth", + "lwip-sys" + ) + + for root, _, files in walk(lib_dir): + if (not any(f.endswith(".h") for f in files) and + basename(root) not in sysincdirs): + continue + var_dir = join("$BUILD_DIR", "FrameworkMbed%sInc%d" % + (libname.upper(), crc32(root))) + if var_dir in env.get("CPPPATH"): + continue + env.VariantDir(var_dir, root) + env.Append(CPPPATH=[var_dir]) + def parse_eix_file(filename): result = {} @@ -93,6 +176,7 @@ def get_build_flags(data): flags['CFLAGS'] = list(cflags - cppflags) return flags + board_type = env.subst("$BOARD") variant = MBED_VARIANTS[ board_type] if board_type in MBED_VARIANTS else board_type.upper() @@ -123,7 +207,6 @@ for lib_path in eixdata.get("CPPPATH"): env.VariantDir(_vdir, join(variant_dir, lib_path)) env.Append(CPPPATH=[_vdir]) - env.Append( LIBPATH=[join(variant_dir, lib_path) for lib_path in eixdata.get("LIBPATH", []) @@ -135,7 +218,7 @@ env.Append( # libs = [l for l in eixdata.get("STDLIBS", []) if l not in env.get("LIBS")] -libs.append("mbed") +libs.extend(["mbed", "c", "gcc"]) libs.append(env.Library( join("$BUILD_DIR", "FrameworkMbed"), @@ -144,3 +227,12 @@ libs.append(env.Library( )) env.Append(LIBS=libs) + +for _libname, _libdata in get_used_mbedlibs().iteritems(): + for _libar in _libdata['ar']: + add_mbedlib(_libname, _libar) + if "deps" not in _libdata: + continue + for libdep in _libdata['deps']: + for _libar in MBED_LIBS_MAP[libdep]['ar']: + add_mbedlib(libdep, _libar) diff --git a/scripts/mbed_to_package.py b/scripts/mbed_to_package.py index 877c3473..3e13e460 100644 --- a/scripts/mbed_to_package.py +++ b/scripts/mbed_to_package.py @@ -11,7 +11,7 @@ from sys import path path.append("..") -from platformio.util import exec_command +from platformio.util import exec_command, get_home_dir def _unzip_generated_file(mbed_dir, output_dir, mcu): @@ -19,7 +19,6 @@ def _unzip_generated_file(mbed_dir, output_dir, mcu): mbed_dir, "build", "export", "MBED_A1_emblocks_%s.zip" % mcu) variant_dir = join(output_dir, "variant", mcu) if isfile(filename): - print "Processing board: %s" % mcu with zipfile.ZipFile(filename) as zfile: mkdir(variant_dir) zfile.extractall(variant_dir) @@ -34,6 +33,33 @@ def _unzip_generated_file(mbed_dir, output_dir, mcu): print "Warning! Skipped board: %s" % mcu +def buildlib(mbed_dir, mcu, lib="mbed"): + build_command = [ + "python", + join(mbed_dir, "workspace_tools", "build.py"), + "--mcu", mcu, + "-t", "GCC_ARM" + ] + if lib is not "mbed": + build_command.append(lib) + build_result = exec_command(build_command, cwd=getcwd()) + if build_result['returncode'] != 0: + print "* %s doesn't support %s library!" % (mcu, lib) + + +def copylibs(mbed_dir, output_dir): + libs = ["dsp", "fat", "net", "rtos", "usb", "usb_host"] + libs_dir = join(output_dir, "libs") + makedirs(libs_dir) + + print "Moving generated libraries to framework dir..." + for lib in libs: + if lib == "net": + move(join(mbed_dir, "build", lib, "eth"), libs_dir) + continue + move(join(mbed_dir, "build", lib), libs_dir) + + def main(mbed_dir, output_dir): print "Starting..." @@ -44,18 +70,34 @@ def main(mbed_dir, output_dir): print "Deleting previous framework dir..." rmtree(output_dir) + settings_file = join(mbed_dir, "workspace_tools", "private_settings.py") + if not isfile(settings_file): + with open(settings_file, "w") as f: + f.write("GCC_ARM_PATH = '%s'" % + join(get_home_dir(), "packages", "toolchain-gccarmnoneeabi", + "bin")) + makedirs(join(output_dir, "variant")) - # make .eix files + mbed_libs = ["--rtos", "--dsp", "--fat", "--eth", "--usb", "--usb_host"] + for mcu in set(gccarm.GccArm.TARGETS): - exec_command( - ["python", join(mbed_dir, "workspace_tools", "build.py"), - "--mcu", mcu, "-t", "GCC_ARM"], cwd=getcwd() - ) - exec_command( + print "Processing board: %s" % mcu + buildlib(mbed_dir, mcu) + for lib in mbed_libs: + buildlib(mbed_dir, mcu, lib) + result = exec_command( ["python", join(mbed_dir, "workspace_tools", "project.py"), "--mcu", mcu, "-i", "emblocks", "-p", "0", "-b"], cwd=getcwd() ) + if result['returncode'] != 0: + print "Unable to build the project for %s" % mcu + continue _unzip_generated_file(mbed_dir, output_dir, mcu) + copylibs(mbed_dir, output_dir) + + with open(join(output_dir, "boards.txt"), "w") as fp: + fp.write("\n".join(sorted(listdir(join(output_dir, "variant"))))) + print "Complete!" From b4a253110d4b29e69d0b506ba43ba29018bd7c21 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2015 21:44:26 +0200 Subject: [PATCH 55/58] Add supported platforms to framework and vice versa --- docs/frameworks/arduino.rst | 47 +++++++++++++++ docs/frameworks/cmsis.rst | 11 ++++ docs/frameworks/energia.rst | 14 +++++ docs/frameworks/index.rst | 2 +- .../{opencm3.rst => libopencm3.rst} | 20 ++++++- docs/frameworks/mbed.rst | 41 +++++++++++++ docs/frameworks/spl.rst | 11 ++++ docs/platforms/atmelavr.rst | 31 ++++++++++ docs/platforms/atmelsam.rst | 11 ++++ docs/platforms/freescalekinetis.rst | 18 ++++++ docs/platforms/nordicnrf51.rst | 31 ++++++++++ docs/platforms/nxplpc.rst | 11 ++++ docs/platforms/ststm32.rst | 33 ++++++++++- docs/platforms/teensy.rst | 11 ++++ docs/platforms/timsp430.rst | 37 ++++++++++++ docs/platforms/titiva.rst | 20 ++++++- scripts/docspregen.py | 59 +++++++++++++++++-- 17 files changed, 393 insertions(+), 15 deletions(-) rename docs/frameworks/{opencm3.rst => libopencm3.rst} (71%) diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 168636fb..6215048c 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -8,6 +8,26 @@ For more detailed information please visit `vendor site `_ + - ATMEGA328P + - 8 MHz + - 32 Kb + - 2 Kb + + * - ``panStampNRG`` + - `PanStamp NRG 1.1 `_ + - CC430F5137 + - 12 MHz + - 32 Kb + - 4 Kb + SainSmart ~~~~~~~~~ diff --git a/docs/frameworks/cmsis.rst b/docs/frameworks/cmsis.rst index a2b403e9..2bdf474e 100644 --- a/docs/frameworks/cmsis.rst +++ b/docs/frameworks/cmsis.rst @@ -8,6 +8,17 @@ For more detailed information please visit `vendor site `_. .. contents:: +Platforms +--------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`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. + + * - :ref:`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. + Boards ------ diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index 6bb0f699..98436f12 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -8,6 +8,26 @@ For more detailed information please visit `vendor site `_. .. contents:: +Platforms +--------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`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. + + * - :ref:`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. + + * - :ref:`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. + + * - :ref:`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. + Boards ------ @@ -83,6 +103,13 @@ Freescale - Flash - RAM + * - ``IBMEthernetKit`` + - `Ethernet IoT Starter Kit `_ + - MK64FN1M0VLL12 + - 120 MHz + - 1024 Kb + - 256 Kb + * - ``frdm_k20d50m`` - `Freescale Kinetis FRDM-K20D50M `_ - MK20DX128VLH5 @@ -384,6 +411,13 @@ ST - 64 Kb - 16 Kb + * - ``nucleo_f303re`` + - `ST Nucleo F303RE `_ + - STM32F303RET6 + - 72 MHz + - 512 Kb + - 64 Kb + * - ``nucleo_f334r8`` - `ST Nucleo F334R8 `_ - STM32F334R8T6 @@ -432,6 +466,13 @@ SeeedStudio - Flash - RAM + * - ``seeedTinyBLE`` + - `Seeed Tiny BLE `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + * - ``seeeduinoArchPro`` - `Seeeduino-Arch-Pro `_ - LPC1768 diff --git a/docs/frameworks/spl.rst b/docs/frameworks/spl.rst index 40299c7a..fa4e9cdc 100644 --- a/docs/frameworks/spl.rst +++ b/docs/frameworks/spl.rst @@ -8,6 +8,17 @@ For more detailed information please visit `vendor site `_ + - ATMEGA328P + - 8 MHz + - 32 Kb + - 2 Kb diff --git a/docs/platforms/atmelsam.rst b/docs/platforms/atmelsam.rst index 62c0cedf..a8e78bed 100644 --- a/docs/platforms/atmelsam.rst +++ b/docs/platforms/atmelsam.rst @@ -35,6 +35,17 @@ Packages +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`framework_arduino` + - Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. + Boards ------ diff --git a/docs/platforms/freescalekinetis.rst b/docs/platforms/freescalekinetis.rst index 9238e586..5f5eed08 100644 --- a/docs/platforms/freescalekinetis.rst +++ b/docs/platforms/freescalekinetis.rst @@ -29,6 +29,17 @@ Packages +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`framework_mbed` + - The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community. + Boards ------ @@ -51,6 +62,13 @@ Freescale - Flash - RAM + * - ``IBMEthernetKit`` + - `Ethernet IoT Starter Kit `_ + - MK64FN1M0VLL12 + - 120 MHz + - 1024 Kb + - 256 Kb + * - ``frdm_k20d50m`` - `Freescale Kinetis FRDM-K20D50M `_ - MK20DX128VLH5 diff --git a/docs/platforms/nordicnrf51.rst b/docs/platforms/nordicnrf51.rst index 3c54c270..04ba9de2 100644 --- a/docs/platforms/nordicnrf51.rst +++ b/docs/platforms/nordicnrf51.rst @@ -29,6 +29,17 @@ Packages +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`framework_mbed` + - The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community. + Boards ------ @@ -119,6 +130,26 @@ RedBearLab - 256 Kb - 16 Kb +SeeedStudio +~~~~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``seeedTinyBLE`` + - `Seeed Tiny BLE `_ + - NRF51822 + - 16 MHz + - 256 Kb + - 16 Kb + Switch Science ~~~~~~~~~~~~~~ diff --git a/docs/platforms/nxplpc.rst b/docs/platforms/nxplpc.rst index 9220b8e2..fd2ed5ff 100644 --- a/docs/platforms/nxplpc.rst +++ b/docs/platforms/nxplpc.rst @@ -29,6 +29,17 @@ Packages +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`framework_mbed` + - The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community. + Boards ------ diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index ba7246f9..78e3f43f 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -17,6 +17,9 @@ Packages * - Name - Contents + * - ``framework-libopencm3`` + - `libOpenCM3 Framework `_ + * - ``toolchain-gccarmnoneeabi`` - `gcc-arm-embedded `_, `GDB `_ @@ -32,9 +35,6 @@ Packages * - ``framework-mbed`` - `mbed Framework `_ - * - ``framework-opencm3`` - - `libOpenCM3 Framework `_ - * - ``ldscripts`` - `Linker Scripts `_ @@ -44,6 +44,26 @@ Packages +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`framework_cmsis` + - The ARM Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Cortex-M processor series and specifies debugger interfaces. The CMSIS enables consistent and simple software interfaces to the processor for interface peripherals, real-time operating systems, and middleware. It simplifies software re-use, reducing the learning curve for new microcontroller developers and cutting the time-to-market for devices. + + * - :ref:`framework_libopencm3` + - The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. + + * - :ref:`framework_mbed` + - The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community. + + * - :ref:`framework_spl` + - The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers. + Boards ------ @@ -164,6 +184,13 @@ ST - 64 Kb - 16 Kb + * - ``nucleo_f303re`` + - `ST Nucleo F303RE `_ + - STM32F303RET6 + - 72 MHz + - 512 Kb + - 64 Kb + * - ``nucleo_f334r8`` - `ST Nucleo F334R8 `_ - STM32F334R8T6 diff --git a/docs/platforms/teensy.rst b/docs/platforms/teensy.rst index 3eaed4da..52c18e22 100644 --- a/docs/platforms/teensy.rst +++ b/docs/platforms/teensy.rst @@ -38,6 +38,17 @@ Packages +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`framework_arduino` + - Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. + Boards ------ diff --git a/docs/platforms/timsp430.rst b/docs/platforms/timsp430.rst index 20a7ba52..b46b7219 100644 --- a/docs/platforms/timsp430.rst +++ b/docs/platforms/timsp430.rst @@ -26,12 +26,29 @@ Packages * - ``framework-energiamsp430`` - `Energia Wiring-based Framework (MSP430 Core) `_ + * - ``framework-arduinomsp430`` + - `Arduino Wiring-based Framework (MSP430 Core) `_ + .. warning:: **Linux Users:** Don't forget to install "udev" rules file `99-platformio-udev.rules `_ (an instruction is located in the file). +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`framework_arduino` + - Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. + + * - :ref:`framework_energia` + - Energia framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before. + Boards ------ @@ -41,6 +58,26 @@ Boards * For more detailed ``board`` information please scroll tables below by horizontal. +PanStamp +~~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``panStampNRG`` + - `PanStamp NRG 1.1 `_ + - CC430F5137 + - 12 MHz + - 32 Kb + - 4 Kb + TI ~~ diff --git a/docs/platforms/titiva.rst b/docs/platforms/titiva.rst index 7d14fae7..5d172bc2 100644 --- a/docs/platforms/titiva.rst +++ b/docs/platforms/titiva.rst @@ -20,15 +20,15 @@ Packages * - ``ldscripts`` - `Linker Scripts `_ + * - ``framework-libopencm3`` + - `libOpenCM3 Framework `_ + * - ``toolchain-gccarmnoneeabi`` - `gcc-arm-embedded `_, `GDB `_ * - ``tool-lm4flash`` - `Flash Programmer `_ - * - ``framework-opencm3`` - - `libOpenCM3 Framework `_ - * - ``framework-energiativa`` - `Energia Wiring-based Framework (LM4F Core) `_ @@ -38,6 +38,20 @@ Packages +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description + + * - :ref:`framework_energia` + - Energia framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before. + + * - :ref:`framework_libopencm3` + - The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. + Boards ------ diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 6462b189..d07afb95 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -12,6 +12,14 @@ from platformio import util from platformio.platforms.base import PlatformFactory, get_packages +def is_compat_platform_and_framework(platform, framework): + p = PlatformFactory.newPlatform(platform) + for pkg in p.get_packages().keys(): + if pkg.startswith("framework-%s" % framework): + return True + return False + + def generate_boards(boards): def _round_memory_size(size): @@ -110,6 +118,26 @@ Packages -------- """) lines.append(generate_packages(p.get_packages())) + + lines.append(""" +Frameworks +---------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description""") + + _frameworks = util.get_frameworks() + for framework in sorted(_frameworks.keys()): + if not is_compat_platform_and_framework(name, framework): + continue + lines.append(""" + * - :ref:`framework_{type_}` + - {description}""".format( + type_=framework, + description=_frameworks[framework]['description'])) + lines.append(""" Boards ------ @@ -140,7 +168,8 @@ Boards def update_platform_docs(): for name in PlatformFactory.get_platforms().keys(): rst_path = join( - dirname(realpath(__file__)), "..", "docs", "platforms", "%s.rst" % name) + dirname(realpath(__file__)), "..", "docs", "platforms", + "%s.rst" % name) with open(rst_path, "w") as f: f.write(generate_platform(name)) @@ -157,11 +186,31 @@ def generate_framework(type_, data): lines.append("=" * len(_title)) lines.append(data['description']) lines.append(""" -For more detailed information please visit `vendor site <%s>`_.""" % - data['url']) - lines.append(""" -.. contents:: +For more detailed information please visit `vendor site <%s>`_. +""" % data['url']) + lines.append(".. contents::") + + lines.append(""" +Platforms +--------- +.. list-table:: + :header-rows: 1 + + * - Name + - Description""") + + for platform in sorted(PlatformFactory.get_platforms().keys()): + if not is_compat_platform_and_framework(platform, type_): + continue + p = PlatformFactory.newPlatform(platform) + lines.append(""" + * - :ref:`platform_{type_}` + - {description}""".format( + type_=platform, + description=p.get_description())) + + lines.append(""" Boards ------ From a8a9451c73446f353736b418e569fab2be659e81 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2015 21:55:08 +0200 Subject: [PATCH 56/58] Fix re-arranging the *.ino/pde files when converting to *.cpp // Resolve #100 --- HISTORY.rst | 8 ++++++-- platformio/builder/tools/platformio.py | 19 ++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 7029819e..7a681716 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,8 +4,8 @@ Release History 1.2.0 (2015-03-??) ------------------ -* Initial support of `mbed `__ - framework (only core SDK) +* Added full support of `mbed `__ + framework including libraries: *RTOS, Ethernet, DSP, FAT, USB*. * Added `freescalekinetis `_ development platform with Freescale Kinetis Freedom boards * Added `nordicnrf51 `_ @@ -26,8 +26,12 @@ Release History builder (`issue #105 `_) * Renamed ``stm32`` development platform to `ststm32 `__ +* Renamed ``opencm3`` framework to + `libopencm3 `__ * Fixed uploading for `atmelsam `__ development platform +* Fixed re-arranging the ``*.ino/pde`` files when converting to ``*.cpp`` + (`issue #100 `_) 1.1.0 (2015-03-05) ------------------ diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 0b283fb2..a27d8654 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -176,7 +176,11 @@ def BuildDependentLibraries(env, src_dir): # pylint: disable=R0914 for ld in listdir(lsd_dir): inc_path = normpath(join(lsd_dir, ld, self.name)) - lib_dir = inc_path[:inc_path.index(sep, len(lsd_dir) + 1)] + try: + lib_dir = inc_path[:inc_path.index( + sep, len(lsd_dir) + 1)] + except ValueError: + continue lib_name = basename(lib_dir) # ignore user's specified libs @@ -284,9 +288,6 @@ def ConvertInoToCpp(env): continue ino_contents = item.get_text_contents() - re_includes = re.compile(r"^(#include\s+(?:\<|\")[^\r\n]+)", - re.M | re.I) - includes = re_includes.findall(ino_contents) prototypes = re.findall( r"""^( (?:\s*[a-z_\d]+){1,2} # return type @@ -297,19 +298,15 @@ def ConvertInoToCpp(env): ino_contents, re.X | re.M | re.I ) - # print includes, prototypes - - # disable previous includes - ino_contents = re_includes.sub(r"//\1", ino_contents) + prototypes = [p.strip() for p in prototypes] + # print prototypes # create new temporary C++ valid file with open(cppfile, "w") as f: f.write("#include \n") - if includes: - f.write("%s\n" % "\n".join(includes)) if prototypes: f.write("%s;\n" % ";\n".join(prototypes)) - f.write("#line 1 \"%s\"\n" % basename(item.path)) + f.write('#line 1 "%s"\n' % basename(item.path)) f.write(ino_contents) tmpcpp.append(cppfile) From e82f8dc0864c795b538d601fd7998294bc8f9863 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2015 22:29:29 +0200 Subject: [PATCH 57/58] Add 4-th custom definition which is equal to "enable_prompts" setting --- platformio/telemetry.py | 1 + 1 file changed, 1 insertion(+) diff --git a/platformio/telemetry.py b/platformio/telemetry.py index 6bd014dc..55b26f21 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -89,6 +89,7 @@ class MeasurementProtocol(TelemetryBase): self['cd1'] = get_systype() self['cd2'] = "Python/%s %s" % (platform.python_version(), platform.platform()) + self['cd4'] = 1 if app.get_setting("enable_prompts") else 0 def _prefill_screen_name(self): args = [str(s).lower() for s in sys_argv[1:]] From cef16ab1c0e633ebca843ed1a70e846dba6037cd Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 20 Mar 2015 22:29:51 +0200 Subject: [PATCH 58/58] Version bump to 1.2.0 (issues #5 #100 #105 #112 #113 #114 #115 #116 #117 #120 #122 #125) --- HISTORY.rst | 2 +- platformio/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 7a681716..cd912885 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,7 +1,7 @@ Release History =============== -1.2.0 (2015-03-??) +1.2.0 (2015-03-20) ------------------ * Added full support of `mbed `__ diff --git a/platformio/__init__.py b/platformio/__init__.py index 960b6672..f40ab4c5 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -1,7 +1,7 @@ # Copyright (C) Ivan Kravets # See LICENSE for details. -VERSION = (1, 2, "0.dev2") +VERSION = (1, 2, 0) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"