Merge branch 'release/v2.10.0'

This commit is contained in:
Ivan Kravets
2016-06-13 19:49:55 +03:00
38 changed files with 401 additions and 206 deletions

View File

@ -4,10 +4,29 @@ Release Notes
PlatformIO 2.0 PlatformIO 2.0
-------------- --------------
2.10.0 (2016-06-13)
~~~~~~~~~~~~~~~~~~~
* Added support for `emonPi <https://github.com/openenergymonitor/emonpi>`__,
the OpenEnergyMonitor system
(`issue #687 <https://github.com/platformio/platformio/issues/687>`_)
* Added support for `SPL <http://platformio.org/frameworks/spl>`__
framework for STM32F0 boards
(`issue #683 <https://github.com/platformio/platformio/issues/683>`_)
* Added support for `Arduboy DevKit <https://www.arduboy.com>`__, the game system
the size of a credit card
* Updated ARM mbed framework package to v121
* Check program size before uploading to the board
(`issue #689 <https://github.com/platformio/platformio/issues/689>`_)
* Improved firmware uploading to Arduino Leonardo based boards
(`issue #691 <https://github.com/platformio/platformio/issues/691>`_)
* Fixed issue with ``-L relative/path`` when parsing ``build_flags``
(`issue #688 <https://github.com/platformio/platformio/issues/688>`_)
2.9.4 (2016-06-04) 2.9.4 (2016-06-04)
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
* Show ``udev`` warning only for the Linux OS while upload firmware * Show ``udev`` warning only for the Linux OS while uploading firmware
2.9.3 (2016-06-03) 2.9.3 (2016-06-03)
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -19,7 +19,7 @@ Demo & Projects
Project Examples Project Examples
---------------- ----------------
Preconfigured demo projects are located in `PlatformIO GitHub <https://github.com/platformio/platformio-examples/tree/develop>`_ repository. Pre-configured demo projects are located in `PlatformIO GitHub <https://github.com/platformio/platformio-examples/tree/develop>`_ repository.
"Blink Project" "Blink Project"
--------------- ---------------

View File

@ -196,6 +196,13 @@ Arduboy
- 32 Kb - 32 Kb
- 2.5 Kb - 2.5 Kb
* - ``arduboy_devkit``
- `Arduboy DevKit <https://www.arduboy.com>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
Arduino Arduino
~~~~~~~ ~~~~~~~
@ -1190,6 +1197,26 @@ OpenBCI
- 128 Kb - 128 Kb
- 32 Kb - 32 Kb
OpenEnergyMonitor
~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``emonpi``
- `emonPi <https://github.com/openenergymonitor/emonpi>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
PONTECH PONTECH
~~~~~~~ ~~~~~~~

View File

@ -19,7 +19,7 @@ integration. Arduino and MBED compatible. Ready for Cloud compiling.**
C/C++ Intelligent Code Completion and Smart Code Linter for the super-fast coding. C/C++ Intelligent Code Completion and Smart Code Linter for the super-fast coding.
Multi-projects workflow with Multiple Panes. Themes Support with dark and light colors. Multi-projects workflow with Multiple Panes. Themes Support with dark and light colors.
Built-in Terminal with PlatformIO CLI tool and support for the powerful Serial Port Monitor. Built-in Terminal with PlatformIO CLI tool and support for the powerful Serial Port Monitor.
All advanced instruments without leaving your favourite development environment. All advanced instruments without leaving your favorite development environment.
* **Development Platforms** - Embedded and Desktop development platforms with * **Development Platforms** - Embedded and Desktop development platforms with
pre-built toolchains, debuggers, uploaders and frameworks which work under pre-built toolchains, debuggers, uploaders and frameworks which work under
popular host OS: Mac, Windows, Linux (+ARM) popular host OS: Mac, Windows, Linux (+ARM)
@ -110,8 +110,7 @@ Contents
platforms/index platforms/index
platforms/embedded_boards platforms/embedded_boards
frameworks/index frameworks/index
platforms/creating_platform platforms/custom_platform_and_board
platforms/creating_board
.. toctree:: .. toctree::
:caption: Library Manager :caption: Library Manager

View File

@ -186,6 +186,13 @@ Arduboy
- 32 Kb - 32 Kb
- 2.5 Kb - 2.5 Kb
* - ``arduboy_devkit``
- `Arduboy DevKit <https://www.arduboy.com>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
Arduino Arduino
~~~~~~~ ~~~~~~~
@ -805,6 +812,26 @@ Microduino
- 64 Kb - 64 Kb
- 4 Kb - 4 Kb
OpenEnergyMonitor
~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``emonpi``
- `emonPi <https://github.com/openenergymonitor/emonpi>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
PanStamp PanStamp
~~~~~~~~ ~~~~~~~~

View File

@ -11,8 +11,8 @@
.. _board_creating: .. _board_creating:
Custom Board Custom Embedded Board
============ =====================
*PlatformIO* has pre-built settings for the most popular embedded boards. This *PlatformIO* has pre-built settings for the most popular embedded boards. This
list is available: list is available:

View File

@ -11,8 +11,8 @@
.. _platform_creating: .. _platform_creating:
Custom Platform Custom Development Platform
=============== ===========================
*PlatformIO* was developed like a tool which would build the same source code *PlatformIO* was developed like a tool which would build the same source code
for the different development platforms via single command :ref:`cmd_run` for the different development platforms via single command :ref:`cmd_run`

View File

@ -0,0 +1,19 @@
.. Copyright 2014-present Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Custom Platform & Board
=======================
.. toctree::
:maxdepth: 2
creating_platform
creating_board

View File

@ -182,6 +182,13 @@ Arduboy
- 32 Kb - 32 Kb
- 2.5 Kb - 2.5 Kb
* - ``arduboy_devkit``
- `Arduboy DevKit <https://www.arduboy.com>`_
- ATMEGA32U4
- 16 MHz
- 32 Kb
- 2.5 Kb
Arduino Arduino
~~~~~~~ ~~~~~~~
@ -1555,6 +1562,26 @@ OpenBCI
- 128 Kb - 128 Kb
- 32 Kb - 32 Kb
OpenEnergyMonitor
~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``emonpi``
- `emonPi <https://github.com/openenergymonitor/emonpi>`_
- ATMEGA328P
- 16 MHz
- 32 Kb
- 2 Kb
Outrageous Circuits Outrageous Circuits
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~

View File

@ -373,7 +373,7 @@ For more detailed information about available flags/options go to:
``src_build_flags`` ``src_build_flags``
^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
An option ``src_build_flags`` has the same behaviour like ``build_flags`` An option ``src_build_flags`` has the same behavior like ``build_flags``
but will be applied only for the project source code from but will be applied only for the project source code from
:ref:`projectconf_pio_src_dir` directory. :ref:`projectconf_pio_src_dir` directory.
@ -585,7 +585,7 @@ Example:
``lib_dfcyclic`` ``lib_dfcyclic``
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
Control cyclic (recursive) behaviour for ``Library Dependency Finder (LDF)``. Control cyclic (recursive) behavior for ``Library Dependency Finder (LDF)``.
By default, this option is turned OFF (``lib_dfcyclic=False``) and means that By default, this option is turned OFF (``lib_dfcyclic=False``) and means that
``LDF`` will find only libraries which are included in source files from the ``LDF`` will find only libraries which are included in source files from the
project :ref:`projectconf_pio_src_dir`. project :ref:`projectconf_pio_src_dir`.

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -30,7 +30,7 @@ PlatformIO CLI provides special :ref:`cmd_init` command for configuring your pro
It allows to initialize new empty project or update existing with the new data. It allows to initialize new empty project or update existing with the new data.
What is more, :ref:`cmd_init` can be used for :ref:`ide`. It means that you will What is more, :ref:`cmd_init` can be used for :ref:`ide`. It means that you will
be able to import pre-generated PlatformIO project using favourite IDE and be able to import pre-generated PlatformIO project using favorite IDE and
extend it with the professional instruments for IoT development. extend it with the professional instruments for IoT development.
This tutorial is based on the next popular embedded boards and development This tutorial is based on the next popular embedded boards and development

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -29,7 +29,7 @@ Description
:ref:`cmd_ci` command is conceived of as "hot key" for building project with :ref:`cmd_ci` command is conceived of as "hot key" for building project with
arbitrary source code structure. In a nutshell, using ``SRC`` and arbitrary source code structure. In a nutshell, using ``SRC`` and
:option:`platformio ci --lib` contents PlatformIO initialises via :option:`platformio ci --lib` contents PlatformIO initializes via
:ref:`cmd_init` new project in :option:`platformio ci --build-dir` :ref:`cmd_init` new project in :option:`platformio ci --build-dir`
with the build environments (using :option:`platformio ci --board` or with the build environments (using :option:`platformio ci --board` or
:option:`platformio ci --project-conf`) and processes them via :ref:`cmd_run` :option:`platformio ci --project-conf`) and processes them via :ref:`cmd_run`

View File

@ -1,4 +1,4 @@
.. Copyright 2014-2016 Ivan Kravets <me@ikravets.com> .. Copyright 2014-present Ivan Kravets <me@ikravets.com>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@ -47,7 +47,7 @@ Options
.. option:: .. option::
-d, --project-dir -d, --project-dir
A path to the directory where *PlatformIO* will initialise new project. A path to the directory where *PlatformIO* will initialize new project.
.. option:: .. option::
-b, --board -b, --board

View File

@ -14,7 +14,7 @@
import sys import sys
VERSION = (2, 9, 4) VERSION = (2, 10, 0)
__version__ = ".".join([str(s) for s in VERSION]) __version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio" __title__ = "platformio"

View File

@ -7,7 +7,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Adafruit Flora", "usb_product": "Adafruit Flora",
"variant": "flora", "variant": "flora",
"hwid": [ "hwids": [
["0x239A", "0x8004"] ["0x239A", "0x8004"]
] ]
}, },
@ -36,7 +36,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Bluefruit Micro", "usb_product": "Bluefruit Micro",
"variant": "bluefruitmicro", "variant": "bluefruitmicro",
"hwid": [ "hwids": [
["0x239A", "0x800A"] ["0x239A", "0x800A"]
] ]
}, },
@ -85,7 +85,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Feather 32u4", "usb_product": "Feather 32u4",
"variant": "feather32u4", "variant": "feather32u4",
"hwid": [ "hwids": [
["0x239A", "0x800C"] ["0x239A", "0x800C"]
] ]
}, },

View File

@ -7,7 +7,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "LilyPad USB", "usb_product": "LilyPad USB",
"variant": "leonardo", "variant": "leonardo",
"hwid": [ "hwids": [
["0x1B4F", "0x9207"], ["0x1B4F", "0x9207"],
["0x1B4F", "0x9208"] ["0x1B4F", "0x9208"]
] ]
@ -164,7 +164,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Arduino Esplora", "usb_product": "Arduino Esplora",
"variant": "leonardo", "variant": "leonardo",
"hwid": [ "hwids": [
["0x2341", "0x003C"], ["0x2341", "0x003C"],
["0x2341", "0x803C"], ["0x2341", "0x803C"],
["0x2A03", "0x003C"], ["0x2A03", "0x003C"],
@ -237,7 +237,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Arduino Leonardo", "usb_product": "Arduino Leonardo",
"variant": "leonardo", "variant": "leonardo",
"hwid": [ "hwids": [
["0x2341", "0x0036"], ["0x2341", "0x0036"],
["0x2341", "0x8036"], ["0x2341", "0x8036"],
["0x2A03", "0x0036"], ["0x2A03", "0x0036"],
@ -268,7 +268,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Arduino Leonardo ETH", "usb_product": "Arduino Leonardo ETH",
"variant": "leonardo", "variant": "leonardo",
"hwid": [ "hwids": [
["0x2A03", "0x8040"], ["0x2A03", "0x8040"],
["0x2A03", "0x0040"] ["0x2A03", "0x0040"]
] ]
@ -402,7 +402,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Arduino Micro", "usb_product": "Arduino Micro",
"variant": "micro", "variant": "micro",
"hwid": [ "hwids": [
["0x2341", "0x0037"], ["0x2341", "0x0037"],
["0x2341", "0x8037"], ["0x2341", "0x8037"],
["0x2A03", "0x0037"], ["0x2A03", "0x0037"],
@ -601,7 +601,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Robot Control", "usb_product": "Robot Control",
"variant": "robot_control", "variant": "robot_control",
"hwid": [ "hwids": [
["0x2341", "0x0038"], ["0x2341", "0x0038"],
["0x2341", "0x8038"], ["0x2341", "0x8038"],
["0x2A03", "0x0038"], ["0x2A03", "0x0038"],
@ -632,7 +632,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Robot Motor", "usb_product": "Robot Motor",
"variant": "robot_motor", "variant": "robot_motor",
"hwid": [ "hwids": [
["0x2341", "0x0039"], ["0x2341", "0x0039"],
["0x2341", "0x8039"], ["0x2341", "0x8039"],
["0x2A03", "0x0039"], ["0x2A03", "0x0039"],
@ -662,7 +662,7 @@
"f_cpu": "16000000L", "f_cpu": "16000000L",
"mcu": "atmega328p", "mcu": "atmega328p",
"variant": "standard", "variant": "standard",
"hwid": [ "hwids": [
["0x2341", "0x0043"], ["0x2341", "0x0043"],
["0x2341", "0x0001"], ["0x2341", "0x0001"],
["0x2A03", "0x0043"] ["0x2A03", "0x0043"]
@ -689,7 +689,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Arduino Yun", "usb_product": "Arduino Yun",
"variant": "yun", "variant": "yun",
"hwid": [ "hwids": [
["0x2341", "0x0041"], ["0x2341", "0x0041"],
["0x2341", "0x8041"], ["0x2341", "0x8041"],
["0x2A03", "0x0041"], ["0x2A03", "0x0041"],
@ -721,7 +721,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Arduino Yun Mini", "usb_product": "Arduino Yun Mini",
"variant": "yun", "variant": "yun",
"hwid": [ "hwids": [
["0x2A03", "0x8050"], ["0x2A03", "0x8050"],
["0x2A03", "0x0050"] ["0x2A03", "0x0050"]
] ]
@ -751,7 +751,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Arduino Industrial 101", "usb_product": "Arduino Industrial 101",
"variant": "yun", "variant": "yun",
"hwid": [ "hwids": [
["0x2A03", "0x8056"], ["0x2A03", "0x8056"],
["0x2A03", "0x0056"] ["0x2A03", "0x0056"]
] ]
@ -781,7 +781,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Linino One", "usb_product": "Linino One",
"variant": "yun", "variant": "yun",
"hwid": [ "hwids": [
["0x2A03", "0x8001"], ["0x2A03", "0x8001"],
["0x2A03", "0x0001"] ["0x2A03", "0x0001"]
] ]
@ -813,7 +813,7 @@
"usb_product": "Arduino Due", "usb_product": "Arduino Due",
"variant": "arduino_due_x", "variant": "arduino_due_x",
"ldscript": "sam3x8e.ld", "ldscript": "sam3x8e.ld",
"hwid": [ "hwids": [
["0x2341", "0x003D"], ["0x2341", "0x003D"],
["0x2A03", "0x003D"] ["0x2A03", "0x003D"]
] ]
@ -843,7 +843,7 @@
"usb_product": "Arduino Due", "usb_product": "Arduino Due",
"variant": "arduino_due_x", "variant": "arduino_due_x",
"ldscript": "sam3x8e.ld", "ldscript": "sam3x8e.ld",
"hwid": [ "hwids": [
["0x2341", "0x003E"], ["0x2341", "0x003E"],
["0x2A03", "0x003E"] ["0x2A03", "0x003E"]
] ]
@ -873,7 +873,7 @@
"usb_product": "Arduino Zero", "usb_product": "Arduino Zero",
"variant": "arduino_zero", "variant": "arduino_zero",
"ldscript": "flash_with_bootloader.ld", "ldscript": "flash_with_bootloader.ld",
"hwid": [ "hwids": [
["0x2341", "0x804D"], ["0x2341", "0x804D"],
["0x03EB", "0x2157"] ["0x03EB", "0x2157"]
] ]
@ -903,7 +903,7 @@
"usb_product": "Arduino Zero", "usb_product": "Arduino Zero",
"variant": "arduino_zero", "variant": "arduino_zero",
"ldscript": "flash_with_bootloader.ld", "ldscript": "flash_with_bootloader.ld",
"hwid": [ "hwids": [
["0x2341", "0x804D"], ["0x2341", "0x804D"],
["0x2341", "0x004D"], ["0x2341", "0x004D"],
["0x2341", "0x824D"] ["0x2341", "0x824D"]

View File

@ -85,7 +85,7 @@
"ldscript": "sam3x8e.ld", "ldscript": "sam3x8e.ld",
"usb_product": "Digistump DigiX", "usb_product": "Digistump DigiX",
"variant": "digispark_digix", "variant": "digispark_digix",
"hwid": [ "hwids": [
["0x16D0", "0x078A"] ["0x16D0", "0x078A"]
] ]
}, },

View File

@ -7,7 +7,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "EngduinoV1", "usb_product": "EngduinoV1",
"variant": "engduinov1", "variant": "engduinov1",
"hwid": [ "hwids": [
["0x1B4F", "0x9208"] ["0x1B4F", "0x9208"]
] ]
}, },
@ -35,7 +35,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "EngduinoV2", "usb_product": "EngduinoV2",
"variant": "engduinov2", "variant": "engduinov2",
"hwid": [ "hwids": [
["0x1B4F", "0x9208"] ["0x1B4F", "0x9208"]
] ]
}, },
@ -63,7 +63,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "EngduinoV3", "usb_product": "EngduinoV3",
"variant": "engduinov3", "variant": "engduinov3",
"hwid": [ "hwids": [
["0x1B4F", "0x9208"] ["0x1B4F", "0x9208"]
] ]
}, },

View File

@ -133,7 +133,10 @@
"flash_mode": "qio", "flash_mode": "qio",
"ldscript": "esp8266.flash.4m1m.ld", "ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266", "mcu": "esp8266",
"variant": "nodemcu" "variant": "nodemcu",
"hwids": [
["0x10C4", "0xEA60"]
]
}, },
"frameworks": ["arduino", "simba"], "frameworks": ["arduino", "simba"],
"name": "NodeMCU 0.9 (ESP-12 Module)", "name": "NodeMCU 0.9 (ESP-12 Module)",
@ -158,7 +161,10 @@
"flash_mode": "dio", "flash_mode": "dio",
"ldscript": "esp8266.flash.4m1m.ld", "ldscript": "esp8266.flash.4m1m.ld",
"mcu": "esp8266", "mcu": "esp8266",
"variant": "nodemcu" "variant": "nodemcu",
"hwids": [
["0x10C4", "0xEA60"]
]
}, },
"frameworks": ["arduino", "simba"], "frameworks": ["arduino", "simba"],
"name": "NodeMCU 1.0 (ESP-12E Module)", "name": "NodeMCU 1.0 (ESP-12E Module)",

View File

@ -8,7 +8,7 @@
"mcu": "ARCv2EM", "mcu": "ARCv2EM",
"usb_product": "Genuino 101", "usb_product": "Genuino 101",
"variant": "arduino_101", "variant": "arduino_101",
"hwid": [ "hwids": [
["0x8087", "0x0AB6"] ["0x8087", "0x0AB6"]
] ]
}, },
@ -18,11 +18,8 @@
"upload": { "upload": {
"maximum_ram_size": 81920, "maximum_ram_size": 81920,
"maximum_size": 196608, "maximum_size": 196608,
"use_1200bps_touch": true,
"protocol": "script", "protocol": "script",
"require_upload_port" : true, "require_upload_port" : true
"speed": 115200,
"wait_for_upload_port": false
}, },
"url": "https://www.arduino.cc/en/Main/ArduinoBoard101", "url": "https://www.arduino.cc/en/Main/ArduinoBoard101",
"vendor": "Intel" "vendor": "Intel"

View File

@ -6,7 +6,7 @@
"cpu": "fpga", "cpu": "fpga",
"mcu": "ice40hx1k", "mcu": "ice40hx1k",
"variant": "1k", "variant": "1k",
"hwid": [ "hwids": [
["0x0403", "0x6010"] ["0x0403", "0x6010"]
] ]
}, },
@ -28,7 +28,7 @@
"cpu": "fpga", "cpu": "fpga",
"mcu": "ice40hx1k", "mcu": "ice40hx1k",
"variant": "1k", "variant": "1k",
"hwid": [ "hwids": [
["0x0403", "0x6010"] ["0x0403", "0x6010"]
] ]
}, },

View File

@ -16,8 +16,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/cerebot-32mx4-limited-time-see-chipkit-pro-mx4/", "url": "http://store.digilentinc.com/cerebot-32mx4-limited-time-see-chipkit-pro-mx4/",
"vendor": "Digilent" "vendor": "Digilent"
@ -40,8 +39,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=TDGL004", "url": "http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=TDGL004",
"vendor": "Digilent" "vendor": "Digilent"
@ -64,8 +62,7 @@
"maximum_size": 126976, "maximum_size": 126976,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/chipkit-mx3-microcontroller-board-with-pmod-headers/", "url": "http://store.digilentinc.com/chipkit-mx3-microcontroller-board-with-pmod-headers/",
"vendor": "Digilent" "vendor": "Digilent"
@ -88,8 +85,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/chipkit-pro-mx4-embedded-systems-trainer-board/", "url": "http://store.digilentinc.com/chipkit-pro-mx4-embedded-systems-trainer-board/",
"vendor": "Digilent" "vendor": "Digilent"
@ -112,8 +108,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/chipkit-pro-mx7-advanced-peripherals-embedded-systems-trainer-board/", "url": "http://store.digilentinc.com/chipkit-pro-mx7-advanced-peripherals-embedded-systems-trainer-board/",
"vendor": "Digilent" "vendor": "Digilent"
@ -136,8 +131,7 @@
"maximum_size": 122880, "maximum_size": 122880,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/microchip-chipkit/chipkit_pi", "url": "http://www.element14.com/community/community/knode/dev_platforms_kits/element14_dev_kits/microchip-chipkit/chipkit_pi",
"vendor": "element14" "vendor": "element14"
@ -160,8 +154,7 @@
"maximum_size": 126976, "maximum_size": 126976,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/chipkit-cmod-breadboardable-mz-microcontroller-board/", "url": "http://store.digilentinc.com/chipkit-cmod-breadboardable-mz-microcontroller-board/",
"vendor": "Digilent" "vendor": "Digilent"
@ -184,8 +177,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://www.seeedstudio.com/wiki/CUI32Stem", "url": "http://www.seeedstudio.com/wiki/CUI32Stem",
"vendor": "SeeedStudio" "vendor": "SeeedStudio"
@ -208,8 +200,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://www.schmalzhaus.com/UBW32/", "url": "http://www.schmalzhaus.com/UBW32/",
"vendor": "UBW32" "vendor": "UBW32"
@ -232,8 +223,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://www.schmalzhaus.com/UBW32/", "url": "http://www.schmalzhaus.com/UBW32/",
"vendor": "UBW32" "vendor": "UBW32"
@ -256,8 +246,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://www.pontech.com/productdisplay/uav100", "url": "http://www.pontech.com/productdisplay/uav100",
"vendor": "PONTECH" "vendor": "PONTECH"
@ -280,8 +269,7 @@
"maximum_size": 122880, "maximum_size": 122880,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/chipkit-dp32-dip-package-prototyping-microcontroller-board/", "url": "http://store.digilentinc.com/chipkit-dp32-dip-package-prototyping-microcontroller-board/",
"vendor": "Digilent" "vendor": "Digilent"
@ -304,8 +292,7 @@
"maximum_size": 122880, "maximum_size": 122880,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://fubarino.org/mini/", "url": "http://fubarino.org/mini/",
"vendor": "Fubarino" "vendor": "Fubarino"
@ -328,8 +315,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://fubarino.org/sd/index.html", "url": "http://fubarino.org/sd/index.html",
"vendor": "Fubarino" "vendor": "Fubarino"
@ -352,8 +338,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/chipkit-max32-microcontroller-board-with-mega-r3-headers/", "url": "http://store.digilentinc.com/chipkit-max32-microcontroller-board-with-mega-r3-headers/",
"vendor": "Digilent" "vendor": "Digilent"
@ -376,8 +361,7 @@
"maximum_size": 258048, "maximum_size": 258048,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "https://www.olimex.com/Products/Duino/PIC32/PIC32-PINGUINO/open-source-hardware", "url": "https://www.olimex.com/Products/Duino/PIC32/PIC32-PINGUINO/open-source-hardware",
"vendor": "Olimex" "vendor": "Olimex"
@ -400,8 +384,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://www.4dsystems.com.au/product/Picadillo_35T/", "url": "http://www.4dsystems.com.au/product/Picadillo_35T/",
"vendor": "4DSystems" "vendor": "4DSystems"
@ -424,8 +407,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://quick240.com/quicki/", "url": "http://quick240.com/quicki/",
"vendor": "PONTECH" "vendor": "PONTECH"
@ -448,8 +430,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/chipkit-uc32-basic-microcontroller-board-with-uno-r3-headers/", "url": "http://store.digilentinc.com/chipkit-uc32-basic-microcontroller-board-with-uno-r3-headers/",
"vendor": "Digilent" "vendor": "Digilent"
@ -472,8 +453,7 @@
"maximum_size": 126976, "maximum_size": 126976,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/chipkit-uno32-basic-microcontroller-board-retired-see-chipkit-uc32/", "url": "http://store.digilentinc.com/chipkit-uno32-basic-microcontroller-board-retired-see-chipkit-uc32/",
"vendor": "Digilent" "vendor": "Digilent"
@ -496,8 +476,7 @@
"maximum_size": 520192, "maximum_size": 520192,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/chipkit-wf32-wifi-enabled-microntroller-board-with-uno-r3-headers/", "url": "http://store.digilentinc.com/chipkit-wf32-wifi-enabled-microntroller-board-with-uno-r3-headers/",
"vendor": "Digilent" "vendor": "Digilent"
@ -520,8 +499,7 @@
"maximum_size": 2080768, "maximum_size": 2080768,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/chipkit-wi-fire-wifi-enabled-mz-microcontroller-board/", "url": "http://store.digilentinc.com/chipkit-wi-fire-wifi-enabled-mz-microcontroller-board/",
"vendor": "Digilent" "vendor": "Digilent"
@ -544,8 +522,7 @@
"maximum_size": 2080768, "maximum_size": 2080768,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://store.digilentinc.com/", "url": "http://store.digilentinc.com/",
"vendor": "Digilent" "vendor": "Digilent"
@ -568,8 +545,7 @@
"maximum_size": 122880, "maximum_size": 122880,
"protocol": "stk500v2", "protocol": "stk500v2",
"require_upload_port" : true, "require_upload_port" : true,
"speed": 115200, "speed": 115200
"wait_for_upload_port": true
}, },
"url": "http://shop.openbci.com/", "url": "http://shop.openbci.com/",
"vendor": "OpenBCI" "vendor": "OpenBCI"

View File

@ -132,7 +132,7 @@
"f_cpu": "16000000L", "f_cpu": "16000000L",
"mcu": "atmega32u4", "mcu": "atmega32u4",
"variant": "32u4", "variant": "32u4",
"hwid": [ "hwids": [
["0x2341", "0x8036"] ["0x2341", "0x8036"]
] ]
}, },

View File

@ -43,6 +43,28 @@
"vendor": "BitWizard" "vendor": "BitWizard"
}, },
"emonpi": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR -DAVR_EMONPI",
"f_cpu": "16000000L",
"mcu": "atmega328p",
"variant": "standard"
},
"frameworks": ["arduino"],
"name": "emonPi",
"platform": "atmelavr",
"upload": {
"maximum_ram_size": 2048,
"maximum_size": 30720,
"protocol": "arduino",
"require_upload_port" : true,
"speed": 115200
},
"url": "https://github.com/openenergymonitor/emonpi",
"vendor": "OpenEnergyMonitor"
},
"sainSmartDue": { "sainSmartDue": {
"build": { "build": {
"core": "arduino", "core": "arduino",
@ -53,7 +75,7 @@
"usb_product": "Arduino Due", "usb_product": "Arduino Due",
"variant": "arduino_due_x", "variant": "arduino_due_x",
"ldscript": "sam3x8e.ld", "ldscript": "sam3x8e.ld",
"hwid": [ "hwids": [
["0x2341", "0x003E"] ["0x2341", "0x003E"]
] ]
}, },
@ -82,7 +104,7 @@
"usb_product": "Arduino Due", "usb_product": "Arduino Due",
"variant": "arduino_due_x", "variant": "arduino_due_x",
"ldscript": "sam3x8e.ld", "ldscript": "sam3x8e.ld",
"hwid": [ "hwids": [
["0x2341", "0x003E"] ["0x2341", "0x003E"]
] ]
}, },
@ -326,7 +348,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "RedBearLab Blend", "usb_product": "RedBearLab Blend",
"variant": "leonardo", "variant": "leonardo",
"hwid": [ "hwids": [
["0x2341", "0x8036"] ["0x2341", "0x8036"]
] ]
}, },
@ -355,7 +377,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "RedBearLab Blend", "usb_product": "RedBearLab Blend",
"variant": "micro", "variant": "micro",
"hwid": [ "hwids": [
["0x03EB", "0x2404"] ["0x03EB", "0x2404"]
] ]
}, },
@ -384,7 +406,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "RedBearLab Blend", "usb_product": "RedBearLab Blend",
"variant": "micro", "variant": "micro",
"hwid": [ "hwids": [
["0x03EB", "0x2404"] ["0x03EB", "0x2404"]
] ]
}, },
@ -435,7 +457,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "LightUp", "usb_product": "LightUp",
"variant": "leonardo", "variant": "leonardo",
"hwid": [ "hwids": [
["0x1d50", "0x6096"] ["0x1d50", "0x6096"]
] ]
}, },
@ -531,7 +553,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"variant" : "quirkbot", "variant" : "quirkbot",
"usb_product": "Quirkbot", "usb_product": "Quirkbot",
"hwid": [ "hwids": [
["0x2886", "0xf004"], ["0x2886", "0xf004"],
["0x2886", "0xf005"], ["0x2886", "0xf005"],
["0x2886", "0xf006"], ["0x2886", "0xf006"],
@ -743,16 +765,14 @@
"arduboy": { "arduboy": {
"build": { "build": {
"core": "arduino", "core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO", "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_ARDUBOY -DARDUBOY_10",
"f_cpu": "16000000L", "f_cpu": "16000000L",
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "Arduino Leonardo", "usb_product": "Arduboy",
"variant": "leonardo", "variant": "leonardo",
"hwid": [ "hwids": [
["0x2341", "0x0036"], ["0x2341", "0x0036"],
["0x2341", "0x8036"], ["0x2341", "0x8036"]
["0x2A03", "0x0036"],
["0x2A03", "0x8036"]
] ]
}, },
"frameworks": ["arduino"], "frameworks": ["arduino"],
@ -770,5 +790,35 @@
}, },
"url": "https://www.arduboy.com", "url": "https://www.arduboy.com",
"vendor": "Arduboy" "vendor": "Arduboy"
},
"arduboy_devkit": {
"build": {
"core": "arduino",
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_ARDUBOY_DEVKIT -DAB_DEVKIT",
"f_cpu": "16000000L",
"mcu": "atmega32u4",
"usb_product": "Arduboy DevKit",
"variant": "leonardo",
"hwids": [
["0x2341", "0x0036"],
["0x2341", "0x8036"]
]
},
"frameworks": ["arduino"],
"name": "Arduboy DevKit",
"platform": "atmelavr",
"upload": {
"disable_flushing": true,
"maximum_ram_size": 2560,
"maximum_size": 28672,
"protocol": "avr109",
"require_upload_port" : true,
"speed": 57600,
"use_1200bps_touch": true,
"wait_for_upload_port": true
},
"url": "https://www.arduboy.com",
"vendor": "Arduboy"
} }
} }

View File

@ -28,7 +28,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "SparkFun Pro Micro", "usb_product": "SparkFun Pro Micro",
"variant": "sparkfun_promicro", "variant": "sparkfun_promicro",
"hwid": [ "hwids": [
["0x1B4F", "0x9205"], ["0x1B4F", "0x9205"],
["0x1B4F", "0x9206"] ["0x1B4F", "0x9206"]
] ]
@ -57,7 +57,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "SparkFun Pro Micro", "usb_product": "SparkFun Pro Micro",
"variant": "sparkfun_promicro", "variant": "sparkfun_promicro",
"hwid": [ "hwids": [
["0x1B4F", "0x9203"], ["0x1B4F", "0x9203"],
["0x1B4F", "0x9204"] ["0x1B4F", "0x9204"]
] ]
@ -86,7 +86,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "SparkFun Fio v3", "usb_product": "SparkFun Fio v3",
"variant": "sparkfun_promicro", "variant": "sparkfun_promicro",
"hwid": [ "hwids": [
["0x1B4F", "0xF100"], ["0x1B4F", "0xF100"],
["0x1B4F", "0xF101"] ["0x1B4F", "0xF101"]
] ]
@ -115,7 +115,7 @@
"mcu": "atmega32u4", "mcu": "atmega32u4",
"usb_product": "SparkFun MaKey", "usb_product": "SparkFun MaKey",
"variant": "sparkfun_promicro", "variant": "sparkfun_promicro",
"hwid": [ "hwids": [
["0x1B4F", "0x2B74"], ["0x1B4F", "0x2B74"],
["0x1B4F", "0x2B75"] ["0x1B4F", "0x2B75"]
] ]

View File

@ -586,6 +586,22 @@
"url": "https://developer.mbed.org/platforms/ST-Nucleo-L073RZ/", "url": "https://developer.mbed.org/platforms/ST-Nucleo-L073RZ/",
"vendor": "ST" "vendor": "ST"
}, },
"nucleo_l031k6": {
"build": {
"f_cpu": "32000000L",
"cpu": "cortex-m0plus",
"mcu": "stm32l031k6t6"
},
"frameworks": ["mbed"],
"name": "ST Nucleo L031K6",
"platform": "ststm32",
"upload": {
"maximum_ram_size": 8192,
"maximum_size": 32768
},
"url": "https://developer.mbed.org/platforms/ST-Nucleo-L031K6/",
"vendor": "ST"
},
"seeedArchMax": { "seeedArchMax": {
"build": { "build": {
"f_cpu": "168000000L", "f_cpu": "168000000L",

View File

@ -49,18 +49,19 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
env.AutodetectUploadPort() env.AutodetectUploadPort()
env.Append(UPLOADERFLAGS=["-P", '"$UPLOAD_PORT"']) env.Append(UPLOADERFLAGS=["-P", '"$UPLOAD_PORT"'])
if env.subst("$BOARD") == "raspduino": if env.subst("$BOARD") in ("raspduino", "emonpi"):
def _rpi_sysgpio(path, value): def _rpi_sysgpio(path, value):
with open(path, "w") as f: with open(path, "w") as f:
f.write(str(value)) f.write(str(value))
_rpi_sysgpio("/sys/class/gpio/export", 18) pin_num = 18 if env.subst("$BOARD") == "raspduino" else 4
_rpi_sysgpio("/sys/class/gpio/gpio18/direction", "out") _rpi_sysgpio("/sys/class/gpio/export", pin_num)
_rpi_sysgpio("/sys/class/gpio/gpio18/value", 1) _rpi_sysgpio("/sys/class/gpio/gpio%d/direction" % pin_num, "out")
_rpi_sysgpio("/sys/class/gpio/gpio%d/value" % pin_num, 1)
sleep(0.1) sleep(0.1)
_rpi_sysgpio("/sys/class/gpio/gpio18/value", 0) _rpi_sysgpio("/sys/class/gpio/gpio%d/value" % pin_num, 0)
_rpi_sysgpio("/sys/class/gpio/unexport", 18) _rpi_sysgpio("/sys/class/gpio/unexport", pin_num)
else: else:
if not upload_options.get("disable_flushing", False): if not upload_options.get("disable_flushing", False):
env.FlushSerialBuffer("$UPLOAD_PORT") env.FlushSerialBuffer("$UPLOAD_PORT")
@ -148,10 +149,9 @@ AlwaysBuild(upload)
# Target: Upload EEPROM data (from EEMEM directive) # Target: Upload EEPROM data (from EEMEM directive)
# #
uploadeep = env.Alias( uploadeep = env.Alias("uploadeep",
"uploadeep", env.ElfToEep(join("$BUILD_DIR", "firmware"), target_elf),
env.ElfToEep(join("$BUILD_DIR", "firmware"), target_elf), [BeforeUpload, "$UPLOADEEPCMD"])
[BeforeUpload, "$UPLOADEEPCMD"])
AlwaysBuild(uploadeep) AlwaysBuild(uploadeep)
# #

View File

@ -25,8 +25,6 @@ from platformio.util import get_serialports
def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621 def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
env.AutodetectUploadPort()
board_type = env.subst("$BOARD") board_type = env.subst("$BOARD")
if "zero" not in board_type: if "zero" not in board_type:
env.Append( env.Append(
@ -176,8 +174,9 @@ AlwaysBuild(target_size)
if env.subst("$BOARD") == "zero": if env.subst("$BOARD") == "zero":
upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD") upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD")
else: else:
upload = env.Alias(["upload", "uploadlazy"], target_firm, upload = env.Alias(
[BeforeUpload, "$UPLOADCMD"]) ["upload", "uploadlazy"], target_firm,
[env.AutodetectUploadPort, BeforeUpload, "$UPLOADCMD"])
AlwaysBuild(upload) AlwaysBuild(upload)

View File

@ -346,7 +346,7 @@ AlwaysBuild(target_size)
target_upload = env.Alias( target_upload = env.Alias(
["upload", "uploadlazy", "uploadfs"], target_firm, ["upload", "uploadlazy", "uploadfs"], target_firm,
[lambda target, source, env: env.AutodetectUploadPort(), "$UPLOADCMD"]) [env.AutodetectUploadPort, "$UPLOADCMD"])
env.AlwaysBuild(target_upload) env.AlwaysBuild(target_upload)

View File

@ -179,8 +179,8 @@ ARDUINO_VERSION = int(
ARDUINO_USBDEFINES = [] ARDUINO_USBDEFINES = []
if "usb_product" in BOARD_BUILDOPTS: if "usb_product" in BOARD_BUILDOPTS:
ARDUINO_USBDEFINES = [ ARDUINO_USBDEFINES = [
"USB_VID=${BOARD_OPTIONS['build']['hwid'][0][0]}", "USB_VID=${BOARD_OPTIONS['build']['hwids'][0][0]}",
"USB_PID=${BOARD_OPTIONS['build']['hwid'][0][1]}", "USB_PID=${BOARD_OPTIONS['build']['hwids'][0][1]}",
'USB_PRODUCT=\\"%s\\"' % (env.subst( 'USB_PRODUCT=\\"%s\\"' % (env.subst(
"${BOARD_OPTIONS['build']['usb_product']}").replace('"', "")), "${BOARD_OPTIONS['build']['usb_product']}").replace('"', "")),
'USB_MANUFACTURER=\\"%s\\"' % (env.subst( 'USB_MANUFACTURER=\\"%s\\"' % (env.subst(

View File

@ -71,7 +71,7 @@ MBED_VARIANTS = {
"samr21_xpro": "SAMR21G18A", "samr21_xpro": "SAMR21G18A",
"saml21_xpro_b": "SAML21J18A", "saml21_xpro_b": "SAML21J18A",
"samd21_xpro": "SAMD21J18A", "samd21_xpro": "SAMD21J18A",
"bbcmicrobit": "NRF51822" "bbcmicrobit": "NRF51_MICROBIT"
} }
MBED_LIBS_MAP = { MBED_LIBS_MAP = {
@ -149,6 +149,18 @@ def add_mbedlib(libname, libar):
if (not any(f.endswith(".h") for f in files) and if (not any(f.endswith(".h") for f in files) and
basename(root) not in sysincdirs): basename(root) not in sysincdirs):
continue continue
target_includes = (
"TARGET_%s" % env.get(
"BOARD_OPTIONS", {}).get("vendor", "").upper(),
"TARGET_%s" % variant,
"TARGET_CORTEX_M"
)
if "TARGET_" in root:
if all([p not in root.upper() for p in target_includes]):
continue
var_dir = join("$BUILD_DIR", "FrameworkMbed%sInc%d" % var_dir = join("$BUILD_DIR", "FrameworkMbed%sInc%d" %
(libname.upper(), crc32(root))) (libname.upper(), crc32(root)))
if var_dir in env.get("CPPPATH"): if var_dir in env.get("CPPPATH"):

View File

@ -21,20 +21,6 @@ from os.path import join
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default, from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
DefaultEnvironment) DefaultEnvironment)
def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
if "program" in COMMAND_LINE_TARGETS:
return
env.AutodetectUploadPort()
env.Prepend(UPLOADERFLAGS=['"$UPLOAD_PORT"'])
if env.get("BOARD_OPTIONS", {}).get("upload", {}).get(
"use_1200bps_touch", False):
env.TouchSerialPort("$UPLOAD_PORT", 1200)
env = DefaultEnvironment() env = DefaultEnvironment()
env.Replace( env.Replace(
@ -112,8 +98,11 @@ env.Replace(
SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES', SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES',
UPLOADER=join("$PIOPACKAGES_DIR", "tool-arduino101load", "arduino101load"), UPLOADER=join("$PIOPACKAGES_DIR", "tool-arduino101load", "arduino101load"),
UPLOADERFLAGS=[
'"$UPLOAD_PORT"'
],
DFUUTIL=join("$PIOPACKAGES_DIR", "tool-arduino101load", "dfu-util"), DFUUTIL=join("$PIOPACKAGES_DIR", "tool-arduino101load", "dfu-util"),
UPLOADCMD='"$UPLOADER" $DFUUTIL $SOURCES $UPLOADERFLAGS verbose', UPLOADCMD='"$UPLOADER" "$DFUUTIL" $SOURCES $UPLOADERFLAGS verbose',
PROGNAME="firmware", PROGNAME="firmware",
PROGSUFFIX=".elf" PROGSUFFIX=".elf"
@ -189,8 +178,8 @@ AlwaysBuild(target_size)
# Target: Upload firmware # Target: Upload firmware
# #
upload = env.Alias( upload = env.Alias(["upload", "uploadlazy"], target_firm,
["upload", "uploadlazy"], target_firm, [BeforeUpload, "$UPLOADCMD"]) [env.AutodetectUploadPort, "$UPLOADCMD"])
AlwaysBuild(upload) AlwaysBuild(upload)
# #

View File

@ -21,12 +21,6 @@ from os.path import join
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default, from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
DefaultEnvironment) DefaultEnvironment)
def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
env.AutodetectUploadPort()
env.Prepend(UPLOADERFLAGS=["-d", '"$UPLOAD_PORT"'])
env = DefaultEnvironment() env = DefaultEnvironment()
env.Replace( env.Replace(
@ -86,7 +80,8 @@ env.Replace(
UPLOADER=join("$PIOPACKAGES_DIR", "tool-pic32prog", "pic32prog"), UPLOADER=join("$PIOPACKAGES_DIR", "tool-pic32prog", "pic32prog"),
UPLOADERFLAGS=[ UPLOADERFLAGS=[
"-b", "$UPLOAD_SPEED" "-b", "$UPLOAD_SPEED",
"-d", '"$UPLOAD_PORT"'
], ],
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES', UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS $SOURCES',
@ -179,8 +174,8 @@ AlwaysBuild(target_size)
# Target: Upload firmware # Target: Upload firmware
# #
upload = env.Alias( upload = env.Alias(["upload", "uploadlazy"], target_firm,
["upload", "uploadlazy"], target_firm, [BeforeUpload, "$UPLOADCMD"]) [env.AutodetectUploadPort, "$UPLOADCMD"])
AlwaysBuild(upload) AlwaysBuild(upload)
# #

View File

@ -63,9 +63,8 @@ AlwaysBuild(target_size)
# #
if env.subst("$BOARD") == "rfduino": if env.subst("$BOARD") == "rfduino":
upload = env.Alias( upload = env.Alias(["upload", "uploadlazy"], target_firm,
["upload", "uploadlazy"], target_firm, [env.AutodetectUploadPort, "$UPLOADCMD"])
[lambda target, source, env: env.AutodetectUploadPort(), "$UPLOADCMD"])
else: else:
upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk) upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk)
AlwaysBuild(upload) AlwaysBuild(upload)

View File

@ -17,19 +17,10 @@
""" """
from os.path import join from os.path import join
from shutil import copyfile
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default,
DefaultEnvironment, SConscript) 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() env = DefaultEnvironment()
SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py")))
@ -60,7 +51,7 @@ AlwaysBuild(target_size)
# Target: Upload by default .bin file # 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) AlwaysBuild(upload)
# #

View File

@ -100,8 +100,7 @@ AlwaysBuild(target_size)
# #
if "mbed" in env.subst("$FRAMEWORK") and not env.subst("$UPLOAD_PROTOCOL"): if "mbed" in env.subst("$FRAMEWORK") and not env.subst("$UPLOAD_PROTOCOL"):
upload = env.Alias(["upload", "uploadlazy"], upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk)
target_firm, env.UploadToDisk)
else: else:
upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD") upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD")
AlwaysBuild(upload) AlwaysBuild(upload)

View File

@ -14,6 +14,7 @@
from __future__ import absolute_import from __future__ import absolute_import
from os import environ
from os.path import isfile, join from os.path import isfile, join
from platform import system from platform import system
from shutil import copyfile from shutil import copyfile
@ -21,7 +22,7 @@ from time import sleep
from serial import Serial from serial import Serial
from platformio.util import get_logicaldisks, get_serialports, get_systype from platformio import util
def FlushSerialBuffer(env, port): def FlushSerialBuffer(env, port):
@ -36,7 +37,7 @@ def FlushSerialBuffer(env, port):
def TouchSerialPort(env, port, baudrate): def TouchSerialPort(env, port, baudrate):
if "windows" not in get_systype(): if system() != "Windows":
try: try:
s = Serial(env.subst(port)) s = Serial(env.subst(port))
s.close() s.close()
@ -53,8 +54,9 @@ def WaitForNewSerialPort(env, before):
prev_port = env.subst("$UPLOAD_PORT") prev_port = env.subst("$UPLOAD_PORT")
new_port = None new_port = None
elapsed = 0 elapsed = 0
sleep(1)
while elapsed < 5 and new_port is None: while elapsed < 5 and new_port is None:
now = get_serialports() now = util.get_serialports()
for p in now: for p in now:
if p not in before: if p not in before:
new_port = p['port'] new_port = p['port']
@ -78,40 +80,52 @@ def WaitForNewSerialPort(env, before):
return new_port return new_port
def AutodetectUploadPort(env): def AutodetectUploadPort(*args, **kwargs): # pylint: disable=unused-argument
if "UPLOAD_PORT" in env: env = args[0]
return print "Looking for upload port/disk..."
if env.subst("$FRAMEWORK") == "mbed": def _look_for_mbed_disk():
msdlabels = ("mbed", "nucleo", "frdm") msdlabels = ("mbed", "nucleo", "frdm")
for item in get_logicaldisks(): for item in util.get_logicaldisks():
if (not item['name'] or if (not item['name'] or
not any([l in item['name'].lower() for l in msdlabels])): not any([l in item['name'].lower() for l in msdlabels])):
continue continue
env.Replace(UPLOAD_PORT=item['disk']) return item['disk']
break return None
def _look_for_serial_port():
port = None
board_hwids = env.get("BOARD_OPTIONS", {}).get(
"build", {}).get("hwids", [])
for item in util.get_serialports():
if "VID:PID" not in item['hwid']:
continue
port = item['port']
for hwid in board_hwids:
hwid_str = ("%s:%s" % (hwid[0], hwid[1])).replace("0x", "")
if hwid_str in item['hwid']:
return port
return port
if "UPLOAD_PORT" in env:
print env.subst("Manually specified: $UPLOAD_PORT")
return
if env.subst("$FRAMEWORK") == "mbed":
env.Replace(UPLOAD_PORT=_look_for_mbed_disk())
else: else:
if (system() == "Linux" and if (system() == "Linux" and
not isfile("/etc/udev/99-platformio-udev.rules")): not isfile("/etc/udev/99-platformio-udev.rules")):
print ( print(
"\nWarning! Please install `99-platformio-udev.rules` and " "\nWarning! Please install `99-platformio-udev.rules` and "
"check that your board's PID and VID are listed in the rules." "check that your board's PID and VID are listed in the rules."
"\n https://raw.githubusercontent.com/platformio/platformio" "\n https://raw.githubusercontent.com/platformio/platformio"
"/develop/scripts/99-platformio-udev.rules\n" "/develop/scripts/99-platformio-udev.rules\n"
) )
env.Replace(UPLOAD_PORT=_look_for_serial_port())
board_build_opts = env.get("BOARD_OPTIONS", {}).get("build", {}) if env.subst("$UPLOAD_PORT"):
for item in get_serialports(): print env.subst("Auto-detected: $UPLOAD_PORT")
if "VID:PID" not in item['hwid']:
continue
env.Replace(UPLOAD_PORT=item['port'])
for hwid in board_build_opts.get("hwid", []):
board_hwid = ("%s:%s" % (hwid[0], hwid[1])).replace("0x", "")
if board_hwid in item['hwid']:
break
if "UPLOAD_PORT" in env:
print "Auto-detected UPLOAD_PORT/DISK: %s" % env['UPLOAD_PORT']
else: else:
env.Exit("Error: Please specify `upload_port` for environment or use " env.Exit("Error: Please specify `upload_port` for environment or use "
"global `--upload-port` option.\n" "global `--upload-port` option.\n"
@ -132,6 +146,30 @@ def UploadToDisk(_, target, source, env): # pylint: disable=W0613,W0621
"Please restart your board.") "Please restart your board.")
def CheckUploadSize(_, target, source, env): # pylint: disable=W0613,W0621
max_size = int(env.get("BOARD_OPTIONS", {}).get("upload", {}).get(
"maximum_size", 0))
if max_size == 0 or "SIZETOOL" not in env:
return
print "Check program size..."
sysenv = environ.copy()
sysenv['PATH'] = str(env['ENV']['PATH'])
cmd = [env.subst("$SIZETOOL"), "-B", str(source[0])]
result = util.exec_command(cmd, env=sysenv)
if result['returncode'] != 0:
return
print result['out'].strip()
line = result['out'].strip().splitlines()[1]
values = [v.strip() for v in line.split("\t")]
used_size = int(values[0]) + int(values[1])
if used_size > max_size:
env.Exit("Error: The program size (%d bytes) is greater "
"than maximum allowed (%s bytes)" % (used_size, max_size))
def exists(_): def exists(_):
return True return True
@ -142,4 +180,5 @@ def generate(env):
env.AddMethod(WaitForNewSerialPort) env.AddMethod(WaitForNewSerialPort)
env.AddMethod(AutodetectUploadPort) env.AddMethod(AutodetectUploadPort)
env.AddMethod(UploadToDisk) env.AddMethod(UploadToDisk)
env.AddMethod(CheckUploadSize)
return env return env

View File

@ -35,6 +35,11 @@ SRC_DEFAULT_FILTER = " ".join([
def BuildProgram(env): def BuildProgram(env):
env.Append(
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
*pioversion_to_intstr())],
)
# fix ASM handling under non-casitive OS # fix ASM handling under non-casitive OS
if not case_sensitive_suffixes(".s", ".S"): if not case_sensitive_suffixes(".s", ".S"):
env.Replace( env.Replace(
@ -78,8 +83,6 @@ def BuildProgram(env):
env.ProcessFlags([env.get("SRC_BUILD_FLAGS", None)]) env.ProcessFlags([env.get("SRC_BUILD_FLAGS", None)])
env.Append( env.Append(
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
*pioversion_to_intstr())],
CPPPATH=["$PROJECTSRC_DIR"], CPPPATH=["$PROJECTSRC_DIR"],
LIBS=deplibs, LIBS=deplibs,
LIBPATH=["$BUILD_DIR"] LIBPATH=["$BUILD_DIR"]
@ -94,11 +97,16 @@ def BuildProgram(env):
"Error: Nothing to build. Please put your source code files " "Error: Nothing to build. Please put your source code files "
"to '%s' folder" % env.subst("$PROJECTSRC_DIR")) "to '%s' folder" % env.subst("$PROJECTSRC_DIR"))
return env.Program( program = env.Program(
join("$BUILD_DIR", env.subst("$PROGNAME")), join("$BUILD_DIR", env.subst("$PROGNAME")),
sources sources
) )
if set(["upload", "uploadlazy", "program"]) & set(COMMAND_LINE_TARGETS):
env.AddPostAction(program, env.CheckUploadSize)
return program
def ProcessFlags(env, flags): def ProcessFlags(env, flags):
for f in flags: for f in flags:
@ -114,10 +122,11 @@ def ProcessFlags(env, flags):
env.Append(CPPDEFINES=[flag]) env.Append(CPPDEFINES=[flag])
env.Append(**parsed_flags) env.Append(**parsed_flags)
# fix relative CPPPATH # fix relative CPPPATH & LIBPATH
for i, p in enumerate(env.get("CPPPATH", [])): for k in ("CPPPATH", "LIBPATH"):
if isdir(p): for i, p in enumerate(env.get(k, [])):
env['CPPPATH'][i] = realpath(p) if isdir(p):
env[k][i] = realpath(p)
# fix relative path for "-include" # fix relative path for "-include"
for i, f in enumerate(env.get("CCFLAGS", [])): for i, f in enumerate(env.get("CCFLAGS", [])):
if isinstance(f, tuple) and f[0] == "-include": if isinstance(f, tuple) and f[0] == "-include":