mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Merge branch 'release/v2.9.3'
This commit is contained in:
@ -4,6 +4,13 @@ Release Notes
|
|||||||
PlatformIO 2.0
|
PlatformIO 2.0
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
2.9.3 (2016-06-03)
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Added support for Arduboy, the game system the size of a credit card
|
||||||
|
* Updated `99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`__ for Linux OS
|
||||||
|
* Refactored firmware uploading to the embedded boards with SAM-BA bootloader
|
||||||
|
|
||||||
2.9.2 (2016-06-02)
|
2.9.2 (2016-06-02)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ Here are recent articles about PlatformIO:
|
|||||||
2016
|
2016
|
||||||
^^^^
|
^^^^
|
||||||
|
|
||||||
|
* Jun 3, 2016 - **Daniel Eichhorn** - `ESP8266: Continuous Delivery Pipeline – Push To Production <http://blog.squix.org/2016/06/esp8266-continuous-delivery-pipeline-push-to-production.html>`_
|
||||||
* May 30, 2016 - **Ron Moerman** - `IoT Development with PlatformIO <https://electronicsworkbench.io/blog/platformio>`_
|
* May 30, 2016 - **Ron Moerman** - `IoT Development with PlatformIO <https://electronicsworkbench.io/blog/platformio>`_
|
||||||
* May 29, 2016 - **Chris Synan** - `Reverse Engineer RF Remote Controller for IoT! <http://www.instructables.com/id/Reverse-Engineer-RF-Remote-Controller-for-IoT/?ALLSTEPS>`_
|
* May 29, 2016 - **Chris Synan** - `Reverse Engineer RF Remote Controller for IoT! <http://www.instructables.com/id/Reverse-Engineer-RF-Remote-Controller-for-IoT/?ALLSTEPS>`_
|
||||||
* May 26, 2016 - **Charlie Key** - `7 Best Developer Tools To Build Your NEXT Internet of Things Application <https://www.losant.com/blog/7-best-developer-tools-to-build-your-next-internet-of-things-application>`_
|
* May 26, 2016 - **Charlie Key** - `7 Best Developer Tools To Build Your NEXT Internet of Things Application <https://www.losant.com/blog/7-best-developer-tools-to-build-your-next-internet-of-things-application>`_
|
||||||
|
@ -176,6 +176,26 @@ Adafruit
|
|||||||
- 8 Kb
|
- 8 Kb
|
||||||
- 0.5 Kb
|
- 0.5 Kb
|
||||||
|
|
||||||
|
Arduboy
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Type ``board``
|
||||||
|
- Name
|
||||||
|
- Microcontroller
|
||||||
|
- Frequency
|
||||||
|
- Flash
|
||||||
|
- RAM
|
||||||
|
|
||||||
|
* - ``arduboy``
|
||||||
|
- `Arduboy <https://www.arduboy.com>`_
|
||||||
|
- ATMEGA32U4
|
||||||
|
- 16 MHz
|
||||||
|
- 32 Kb
|
||||||
|
- 2.5 Kb
|
||||||
|
|
||||||
Arduino
|
Arduino
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
|
@ -166,6 +166,26 @@ Adafruit
|
|||||||
- 8 Kb
|
- 8 Kb
|
||||||
- 0.5 Kb
|
- 0.5 Kb
|
||||||
|
|
||||||
|
Arduboy
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Type ``board``
|
||||||
|
- Name
|
||||||
|
- Microcontroller
|
||||||
|
- Frequency
|
||||||
|
- Flash
|
||||||
|
- RAM
|
||||||
|
|
||||||
|
* - ``arduboy``
|
||||||
|
- `Arduboy <https://www.arduboy.com>`_
|
||||||
|
- ATMEGA32U4
|
||||||
|
- 16 MHz
|
||||||
|
- 32 Kb
|
||||||
|
- 2.5 Kb
|
||||||
|
|
||||||
Arduino
|
Arduino
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
|
@ -162,6 +162,26 @@ Adafruit
|
|||||||
- 8 Kb
|
- 8 Kb
|
||||||
- 0.5 Kb
|
- 0.5 Kb
|
||||||
|
|
||||||
|
Arduboy
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
:header-rows: 1
|
||||||
|
|
||||||
|
* - Type ``board``
|
||||||
|
- Name
|
||||||
|
- Microcontroller
|
||||||
|
- Frequency
|
||||||
|
- Flash
|
||||||
|
- RAM
|
||||||
|
|
||||||
|
* - ``arduboy``
|
||||||
|
- `Arduboy <https://www.arduboy.com>`_
|
||||||
|
- ATMEGA32U4
|
||||||
|
- 16 MHz
|
||||||
|
- 32 Kb
|
||||||
|
- 2.5 Kb
|
||||||
|
|
||||||
Arduino
|
Arduino
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
|
||||||
|
@ -240,6 +240,7 @@ Using Arduino Framework with Staging version
|
|||||||
Articles
|
Articles
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
* Jun 3, 2016 - **Daniel Eichhorn** - `ESP8266: Continuous Delivery Pipeline – Push To Production <http://blog.squix.org/2016/06/esp8266-continuous-delivery-pipeline-push-to-production.html>`_
|
||||||
* May 29, 2016 - **Chris Synan** - `Reverse Engineer RF Remote Controller for IoT! <http://www.instructables.com/id/Reverse-Engineer-RF-Remote-Controller-for-IoT/?ALLSTEPS>`_
|
* May 29, 2016 - **Chris Synan** - `Reverse Engineer RF Remote Controller for IoT! <http://www.instructables.com/id/Reverse-Engineer-RF-Remote-Controller-for-IoT/?ALLSTEPS>`_
|
||||||
* May 22, 2016 - **Pedro Minatel** - `Estação meteorológica com ESP8266 (Weather station with ESP8266, Portuguese) <http://pedrominatel.com.br/esp8266/estacao-meteorologica-com-esp8266/>`_
|
* May 22, 2016 - **Pedro Minatel** - `Estação meteorológica com ESP8266 (Weather station with ESP8266, Portuguese) <http://pedrominatel.com.br/esp8266/estacao-meteorologica-com-esp8266/>`_
|
||||||
* May 16, 2016 - **Pedro Minatel** - `Controle remoto WiFi com ESP8266 (WiFi remote control using ESP8266, Portuguese) <http://pedrominatel.com.br/esp8266/controle-remoto-wifi-com-esp8266/>`_
|
* May 16, 2016 - **Pedro Minatel** - `Controle remoto WiFi com ESP8266 (WiFi remote control using ESP8266, Portuguese) <http://pedrominatel.com.br/esp8266/controle-remoto-wifi-com-esp8266/>`_
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
VERSION = (2, 9, 2)
|
VERSION = (2, 9, 3)
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -738,5 +738,37 @@
|
|||||||
},
|
},
|
||||||
"url": "http://www.atmel.com/devices/ATTINY85.aspx",
|
"url": "http://www.atmel.com/devices/ATTINY85.aspx",
|
||||||
"vendor": "Generic ATTiny"
|
"vendor": "Generic ATTiny"
|
||||||
|
},
|
||||||
|
|
||||||
|
"arduboy": {
|
||||||
|
"build": {
|
||||||
|
"core": "arduino",
|
||||||
|
"extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO",
|
||||||
|
"f_cpu": "16000000L",
|
||||||
|
"mcu": "atmega32u4",
|
||||||
|
"usb_product": "Arduino Leonardo",
|
||||||
|
"variant": "leonardo",
|
||||||
|
"hwid": [
|
||||||
|
["0x2341", "0x0036"],
|
||||||
|
["0x2341", "0x8036"],
|
||||||
|
["0x2A03", "0x0036"],
|
||||||
|
["0x2A03", "0x8036"]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"frameworks": ["arduino"],
|
||||||
|
"name": "Arduboy",
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@ from time import sleep
|
|||||||
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default,
|
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default,
|
||||||
DefaultEnvironment, SConscript)
|
DefaultEnvironment, SConscript)
|
||||||
|
|
||||||
|
from platformio.util import get_serialports
|
||||||
|
|
||||||
|
|
||||||
def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
|
def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
|
||||||
|
|
||||||
@ -63,11 +65,13 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
|
|||||||
if not upload_options.get("disable_flushing", False):
|
if not upload_options.get("disable_flushing", False):
|
||||||
env.FlushSerialBuffer("$UPLOAD_PORT")
|
env.FlushSerialBuffer("$UPLOAD_PORT")
|
||||||
|
|
||||||
|
before_ports = get_serialports()
|
||||||
|
|
||||||
if upload_options.get("use_1200bps_touch", False):
|
if upload_options.get("use_1200bps_touch", False):
|
||||||
env.TouchSerialPort("$UPLOAD_PORT", 1200)
|
env.TouchSerialPort("$UPLOAD_PORT", 1200)
|
||||||
|
|
||||||
if upload_options.get("wait_for_upload_port", False):
|
if upload_options.get("wait_for_upload_port", False):
|
||||||
env.Replace(UPLOAD_PORT=env.WaitForNewSerialPort())
|
env.Replace(UPLOAD_PORT=env.WaitForNewSerialPort(before_ports))
|
||||||
|
|
||||||
|
|
||||||
env = DefaultEnvironment()
|
env = DefaultEnvironment()
|
||||||
|
@ -21,6 +21,8 @@ from os.path import basename, join
|
|||||||
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default,
|
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default,
|
||||||
DefaultEnvironment, SConscript)
|
DefaultEnvironment, SConscript)
|
||||||
|
|
||||||
|
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()
|
env.AutodetectUploadPort()
|
||||||
@ -39,11 +41,13 @@ def BeforeUpload(target, source, env): # pylint: disable=W0613,W0621
|
|||||||
if not upload_options.get("disable_flushing", False):
|
if not upload_options.get("disable_flushing", False):
|
||||||
env.FlushSerialBuffer("$UPLOAD_PORT")
|
env.FlushSerialBuffer("$UPLOAD_PORT")
|
||||||
|
|
||||||
|
before_ports = get_serialports()
|
||||||
|
|
||||||
if upload_options.get("use_1200bps_touch", False):
|
if upload_options.get("use_1200bps_touch", False):
|
||||||
env.TouchSerialPort("$UPLOAD_PORT", 1200)
|
env.TouchSerialPort("$UPLOAD_PORT", 1200)
|
||||||
|
|
||||||
if upload_options.get("wait_for_upload_port", False):
|
if upload_options.get("wait_for_upload_port", False):
|
||||||
env.Replace(UPLOAD_PORT=env.WaitForNewSerialPort())
|
env.Replace(UPLOAD_PORT=env.WaitForNewSerialPort(before_ports))
|
||||||
|
|
||||||
# use only port name for BOSSA
|
# use only port name for BOSSA
|
||||||
if "/" in env.subst("$UPLOAD_PORT"):
|
if "/" in env.subst("$UPLOAD_PORT"):
|
||||||
|
@ -47,22 +47,27 @@ def TouchSerialPort(env, port, baudrate):
|
|||||||
sleep(0.4)
|
sleep(0.4)
|
||||||
|
|
||||||
|
|
||||||
def WaitForNewSerialPort(env):
|
def WaitForNewSerialPort(env, before):
|
||||||
before = [i['port'] for i in get_serialports(use_grep=True)]
|
print "Waiting for the new upload port..."
|
||||||
sleep(0.5)
|
prev_port = env.subst("$UPLOAD_PORT")
|
||||||
new_port = None
|
new_port = None
|
||||||
elapsed = 0
|
elapsed = 0
|
||||||
while elapsed < 10:
|
while elapsed < 5 and new_port is None:
|
||||||
now = [i['port'] for i in get_serialports(use_grep=True)]
|
now = get_serialports()
|
||||||
diff = list(set(now) - set(before))
|
for p in now:
|
||||||
if diff:
|
if p not in before:
|
||||||
new_port = diff[0]
|
new_port = p['port']
|
||||||
break
|
break
|
||||||
|
|
||||||
before = now
|
before = now
|
||||||
sleep(0.25)
|
sleep(0.25)
|
||||||
elapsed += 0.25
|
elapsed += 0.25
|
||||||
|
|
||||||
|
if not new_port:
|
||||||
|
for p in now:
|
||||||
|
if prev_port == p['port']:
|
||||||
|
new_port = p['port']
|
||||||
|
break
|
||||||
|
|
||||||
if not new_port:
|
if not new_port:
|
||||||
env.Exit("Error: Couldn't find a board on the selected port. "
|
env.Exit("Error: Couldn't find a board on the selected port. "
|
||||||
"Check that you have the correct port selected. "
|
"Check that you have the correct port selected. "
|
||||||
@ -85,6 +90,14 @@ def AutodetectUploadPort(env):
|
|||||||
env.Replace(UPLOAD_PORT=item['disk'])
|
env.Replace(UPLOAD_PORT=item['disk'])
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
if not isfile("/etc/udev/99-platformio-udev.rules"):
|
||||||
|
print (
|
||||||
|
"\nWarning! Please install `99-platformio-udev.rules` and "
|
||||||
|
"check that your board's PID and VID are listed in the rules."
|
||||||
|
"\n https://raw.githubusercontent.com/platformio/platformio"
|
||||||
|
"/develop/scripts/99-platformio-udev.rules\n"
|
||||||
|
)
|
||||||
|
|
||||||
board_build_opts = env.get("BOARD_OPTIONS", {}).get("build", {})
|
board_build_opts = env.get("BOARD_OPTIONS", {}).get("build", {})
|
||||||
for item in get_serialports():
|
for item in get_serialports():
|
||||||
if "VID:PID" not in item['hwid']:
|
if "VID:PID" not in item['hwid']:
|
||||||
|
@ -280,34 +280,7 @@ def exec_command(*args, **kwargs):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def get_serialports(use_grep=False):
|
def get_serialports():
|
||||||
|
|
||||||
def _grep_serial_ports():
|
|
||||||
result = []
|
|
||||||
if system() == "Windows":
|
|
||||||
output = exec_command(["mode"]).get("out", "")
|
|
||||||
for line in output.split("\n"):
|
|
||||||
line = line.strip()
|
|
||||||
if "COM" in line:
|
|
||||||
result.append({"port": line[line.index("COM"):-1],
|
|
||||||
"description": "", "hwid": ""})
|
|
||||||
else:
|
|
||||||
if system() == "Linux":
|
|
||||||
patterns = ["/dev/%s*" % p for p in (
|
|
||||||
"ttyS", "ttyUSB", "ttyACM", "ttyAMA", "rfcomm", "ttyO")]
|
|
||||||
else:
|
|
||||||
patterns = ["/dev/tty.*", "/dev/cu.*"]
|
|
||||||
for pattern in patterns:
|
|
||||||
for port in glob(pattern):
|
|
||||||
result.append(
|
|
||||||
{"port": port, "description": "", "hwid": ""})
|
|
||||||
return result
|
|
||||||
|
|
||||||
if use_grep:
|
|
||||||
result = _grep_serial_ports()
|
|
||||||
if result:
|
|
||||||
return result
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from serial.tools.list_ports import comports
|
from serial.tools.list_ports import comports
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@ -325,9 +298,9 @@ def get_serialports(use_grep=False):
|
|||||||
result.append({"port": p, "description": d, "hwid": h})
|
result.append({"port": p, "description": d, "hwid": h})
|
||||||
|
|
||||||
# fix for PySerial
|
# fix for PySerial
|
||||||
if not result and not use_grep:
|
if not result and system() == "Darwin":
|
||||||
result = _grep_serial_ports()
|
for p in glob("/dev/tty.*"):
|
||||||
|
result.append({"port": p, "description": "n/a", "hwid": "n/a"})
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,8 +45,15 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", MODE:="066
|
|||||||
# QinHeng Electronics HL-340 USB-Serial adapter
|
# QinHeng Electronics HL-340 USB-Serial adapter
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE:="0666"
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE:="0666"
|
||||||
|
|
||||||
# ARDUINO UNO
|
# Arduino boards
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0043", MODE:="0666"
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="[08][02]*", MODE:="0666"
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="[08][02]*", MODE:="0666"
|
||||||
|
|
||||||
|
# Arduino SAM-BA
|
||||||
|
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
|
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", ENV{MTP_NO_PROBE}="1"
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", MODE:="0666"
|
||||||
|
KERNEL=="ttyACM*", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", MODE:="0666"
|
||||||
|
|
||||||
# Digistump boards
|
# Digistump boards
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666"
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666"
|
||||||
|
Reference in New Issue
Block a user