Merge branch 'release/v2.3.3'

This commit is contained in:
Ivan Kravets
2015-10-02 16:24:02 +01:00
21 changed files with 236 additions and 54 deletions

View File

@ -4,6 +4,18 @@ Release History
PlatformIO 2.0
--------------
2.3.3 (2015-10-02)
~~~~~~~~~~~~~~~~~~
* Added support for LightBlue Bean board
(`pull #292 <https://github.com/platformio/platformio/pull/292>`_)
* Added support for ST Nucleo F446RE board
(`pull #293 <https://github.com/platformio/platformio/pull/293>`_)
* Fixed broken lock file for "appstate" storage
(`issue #288 <https://github.com/platformio/platformio/issues/288>`_)
* Fixed ESP8266 compile errors about RAM size when adding 1 library
(`issue #296 <https://github.com/platformio/platformio/issues/296>`_)
2.3.2 (2015-09-10)
~~~~~~~~~~~~~~~~~~
@ -16,6 +28,8 @@ PlatformIO 2.0
* Found solution for "pip/scons error: option --single-version-externally-managed not
recognized" when install PlatformIO using ``pip`` package manager
(`issue #279 <https://github.com/platformio/platformio/issues/279>`_)
* Fixed firmware uploading to Arduino Leonardo board using Mac OS
(`issue #287 <https://github.com/platformio/platformio/issues/287>`_)
* Fixed `SConsNotInstalled` error for Linux Debian-based distributives
2.3.1 (2015-09-06)

View File

@ -60,23 +60,11 @@ the project developed using PlatformIO is as follows:
Troubleshooting
---------------
.. _faq_troubleshooting_pioblocksprompt:
PlatformIO blocks command execution using user prompt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you are going to run *PlatformIO* from **subprocess**, you **MUST
DISABLE** all prompts. It will allow you to avoid blocking.
There are a few options:
- using :option:`platformio --force` option before each command
- using environment variable :envvar:`PLATFORMIO_SETTING_ENABLE_PROMPTS=No <PLATFORMIO_SETTING_ENABLE_PROMPTS>`
- disable global setting ``enable_prompts`` via :ref:`cmd_settings` command
- masking under Continuous Integration system via environment variable
:envvar:`CI=true <CI>`.
Installation
~~~~~~~~~~~~
PlatformIO and ``scons`` aren't installed properly
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
''''''''''''''''''''''''''''''''''''''''''''''''''
Try these solutions:
@ -92,10 +80,30 @@ Try these solutions:
.. _faq_troubleshooting_sconssingverextmanaged:
PIP & SCons Error: option --single-version-externally-managed not recognized
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Answered in `issue #279 <https://github.com/platformio/platformio/issues/279>`_.
[Errno 1] Operation not permitted
'''''''''''''''''''''''''''''''''
Answered in `issue #295 <https://github.com/platformio/platformio/issues/295#issuecomment-143772005>`_.
.. _faq_troubleshooting_pioblocksprompt:
PlatformIO blocks command execution using user prompt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you are going to run *PlatformIO* from **subprocess**, you **MUST
DISABLE** all prompts. It will allow you to avoid blocking.
There are a few options:
- using :option:`platformio --force` option before each command
- using environment variable :envvar:`PLATFORMIO_SETTING_ENABLE_PROMPTS=No <PLATFORMIO_SETTING_ENABLE_PROMPTS>`
- disable global setting ``enable_prompts`` via :ref:`cmd_settings` command
- masking under Continuous Integration system via environment variable
:envvar:`CI=true <CI>`.
.. _faq_troubleshooting_pionotfoundinpath:
Program ``platformio`` not found in PATH
@ -156,3 +164,8 @@ ARM toolchain: cc1plus: error while loading shared libraries
See related answers for
`error while loading shared libraries <https://github.com/platformio/platformio/issues?utf8=✓&q=error+while+loading+shared+libraries>`_.
Archlinux: libncurses.so.5: cannot open shared object file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Answered in `issue #291 <https://github.com/platformio/platformio/issues/291>`_.

View File

@ -630,6 +630,26 @@ PanStamp
- 32 Kb
- 4 Kb
Punch Through
~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lightblue-bean``
- `LightBlue Bean <https://punchthrough.com/bean>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
Quirkbot
~~~~~~~~

View File

@ -469,6 +469,13 @@ ST
- 512 Kb
- 128 Kb
* - ``nucleo_f446re``
- `ST Nucleo F446RE <https://developer.mbed.org/platforms/ST-Nucleo-F446RE/>`_
- STM32F446RET6
- 180 MHz
- 512 Kb
- 128 Kb
* - ``nucleo_l053r8``
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
- STM32L053R8T6

View File

@ -601,6 +601,26 @@ PanStamp
- 32 Kb
- 2 Kb
Punch Through
~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``lightblue-bean``
- `LightBlue Bean <https://punchthrough.com/bean>`_
- ATMEGA328P
- 8 MHz
- 32 Kb
- 2 Kb
Quirkbot
~~~~~~~~

View File

@ -256,6 +256,13 @@ ST
- 512 Kb
- 128 Kb
* - ``nucleo_f446re``
- `ST Nucleo F446RE <https://developer.mbed.org/platforms/ST-Nucleo-F446RE/>`_
- STM32F446RET6
- 180 MHz
- 512 Kb
- 128 Kb
* - ``nucleo_l053r8``
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
- STM32L053R8T6

View File

@ -1,7 +1,7 @@
# Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
VERSION = (2, 3, 2)
VERSION = (2, 3, 3)
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -3,7 +3,8 @@
import json
from os import environ, getenv
from os.path import isfile, join
from os.path import getmtime, isfile, join
from time import time
from lockfile import LockFile
@ -68,9 +69,8 @@ class State(object):
def __enter__(self):
try:
self._lock_state_file()
if isfile(self.path):
self._lock = LockFile(self.path)
self._lock.acquire()
with open(self.path, "r") as fp:
self._state = json.load(fp)
except ValueError:
@ -85,6 +85,18 @@ class State(object):
json.dump(self._state, fp, indent=4)
else:
json.dump(self._state, fp)
self._unlock_state_file()
def _lock_state_file(self):
self._lock = LockFile(self.path)
if (self._lock.is_locked() and
(time() - getmtime(self._lock.lock_file)) > 10):
self._lock.break_lock()
self._lock.acquire()
def _unlock_state_file(self):
if self._lock:
self._lock.release()

View File

@ -3,7 +3,7 @@
"build": {
"core": "esp8266",
"extra_flags": "-DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266",
"f_cpu": "80000000L",
"f_cpu": "40000000L",
"ldscript": "esp8266.flash.512k.ld",
"mcu": "esp8266",
"variant": "generic"

View File

@ -0,0 +1,22 @@
{
"lightblue-bean": {
"name": "LightBlue Bean",
"vendor": "Punch Through",
"url": "https://punchthrough.com/bean",
"platform": "atmelavr",
"frameworks": ["arduino"],
"build": {
"core": "bean",
"variant": "bean",
"extra_flags": "-DARDUINO_ARCH_AVR",
"mcu": "atmega328p",
"f_cpu": "8000000L"
},
"upload": {
"maximum_size": 32256,
"maximum_ram_size": 2048
}
}
}

View File

@ -299,6 +299,22 @@
"url": "https://developer.mbed.org/platforms/ST-Nucleo-F411RE/",
"vendor": "ST"
},
"nucleo_f446re": {
"build": {
"f_cpu": "180000000L",
"cpu": "cortex-m4",
"mcu": "stm32f446ret6"
},
"frameworks": ["mbed"],
"name": "ST Nucleo F446RE",
"platform": "ststm32",
"upload": {
"maximum_ram_size": 131072,
"maximum_size": 524288
},
"url": "https://developer.mbed.org/platforms/ST-Nucleo-F446RE/",
"vendor": "ST"
},
"nucleo_l053r8": {
"build": {
"f_cpu": "48000000L",

View File

@ -31,7 +31,7 @@ env.Replace(
ASPPFLAGS=["-x", "assembler-with-cpp"],
CFLAGS=[
"-std=c99",
"-std=gnu99",
"-Wpointer-arith",
"-Wno-implicit-function-declaration",
"-Wl,-EL",
@ -76,9 +76,7 @@ env.Replace(
"-cb", "$UPLOAD_SPEED",
"-cp", "$UPLOAD_PORT",
"-ca", "0x00000",
"-cf", "${SOURCES[0]}",
"-ca", "0x40000" if "FRAMEWORK" not in env else "0x10000",
"-cf", "${SOURCES[1]}"
"-cf", "$SOURCE"
],
UPLOADCMD='$UPLOADER $UPLOADERFLAGS',
@ -86,23 +84,35 @@ env.Replace(
PROGSUFFIX=".elf"
)
if "FRAMEWORK" in env:
env.Append(
LINKFLAGS=[
"-Wl,-wrap,system_restart_local",
"-Wl,-wrap,register_chipv6_phy"
]
)
env.Append(
BUILDERS=dict(
ElfToBin=Builder(
action=" ".join([
"$UPLOADER",
"-eo", join("$PLATFORMFW_DIR", "bootloaders",
"eboot", "eboot.elf"),
"-bo", "$TARGET",
"-bm", "dio",
"-bf", "${BOARD_OPTIONS['build']['f_cpu'][:2]}",
"-bz", str(int(env.get("BOARD_OPTIONS", {}).get(
"upload", {}).get("maximum_size") / 1024)) + "K",
"-bs", ".text",
"-bp", "4096",
"-ec",
"-eo", "$SOURCES",
"-bo", "${TARGETS[0]}",
"-bm", "qio",
"-bf", "40",
"-bz", "512K",
"-bs", ".irom0.text",
"-bs", ".text",
"-bs", ".data",
"-bs", ".rodata",
"-bc", "-ec",
"-eo", "$SOURCES",
"-es", ".irom0.text", "${TARGETS[1]}",
"-ec", "-v"
"-bc", "-ec"
]),
suffix=".bin"
)
@ -119,13 +129,43 @@ if "FRAMEWORK" not in env:
join("$PIOPACKAGES_DIR", "sdk-esp8266", "include"),
"$PROJECTSRC_DIR"
],
LIBPATH=[join("$PIOPACKAGES_DIR", "sdk-esp8266", "lib")]
LIBPATH=[join("$PIOPACKAGES_DIR", "sdk-esp8266", "lib")],
BUILDERS=dict(
ElfToBin=Builder(
action=" ".join([
"$UPLOADER",
"-eo", "$SOURCES",
"-bo", "${TARGETS[0]}",
"-bm", "qio",
"-bf", "40",
"-bz", "512K",
"-bs", ".text",
"-bs", ".data",
"-bs", ".rodata",
"-bc", "-ec",
"-eo", "$SOURCES",
"-es", ".irom0.text", "${TARGETS[1]}",
"-ec", "-v"
]),
suffix=".bin"
)
)
)
env.Replace(
LDSCRIPT_PATH=join(
"$PIOPACKAGES_DIR", "sdk-esp8266", "ld", "eagle.app.v6.ld"),
LIBS=["c", "gcc", "phy", "pp", "net80211", "lwip", "wpa", "main",
"json", "upgrade", "smartconfig", "pwm", "at", "ssl"]
"json", "upgrade", "smartconfig", "pwm", "at", "ssl"],
UPLOADERFLAGS=[
"-vv",
"-cd", "ck",
"-cb", "$UPLOAD_SPEED",
"-cp", "$UPLOAD_PORT",
"-ca", "0x00000",
"-cf", "${SOURCES[0]}",
"-ca", "0x40000",
"-cf", "${SOURCES[1]}"
]
)
#
@ -139,17 +179,20 @@ target_elf = env.BuildProgram()
#
if "uploadlazy" in COMMAND_LINE_TARGETS:
target_firm = [
join("$BUILD_DIR", "firmware_00000.bin"),
join("$BUILD_DIR", "firmware_%s.bin" %
("40000" if "FRAMEWORK" not in env else "10000"))
]
if "FRAMEWORK" not in env:
target_firm = [
join("$BUILD_DIR", "firmware_00000.bin"),
join("$BUILD_DIR", "firmware_40000.bin")
]
else:
target_firm = join("$BUILD_DIR", "firmware.bin")
else:
target_firm = env.ElfToBin(
[join("$BUILD_DIR", "firmware_00000"),
join("$BUILD_DIR", "firmware_%s" %
("40000" if "FRAMEWORK" not in env else "10000"))], target_elf)
if "FRAMEWORK" not in env:
target_firm = env.ElfToBin(
[join("$BUILD_DIR", "firmware_00000"),
join("$BUILD_DIR", "firmware_40000")], target_elf)
else:
target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
#
# Target: Print binary size

View File

@ -47,7 +47,7 @@ elif env.get("PLATFORM") == "espressif":
CPPPATH=[join("$PLATFORMFW_DIR", "sdk", "include")],
LIBPATH=[join("$PLATFORMFW_DIR", "sdk", "lib")],
LIBS=["smartconfig", "pp", "main", "wpa", "lwip",
"net80211", "phy", "hal", "gcc", "m"]
"net80211", "wps", "crypto", "phy", "hal", "gcc", "m"]
)
env.Replace(PLATFORMFW_DIR=PLATFORMFW_DIR)

View File

@ -147,7 +147,7 @@ def DumpIDEData(env):
for item in env.get("CPPDEFINES", []):
if isinstance(item, list):
item = "=".join(item)
data['defines'].append(env.subst(item))
data['defines'].append(env.subst(item).replace('\\"', '"'))
# special symbol for Atmel AVR MCU
board = env.get("BOARD_OPTIONS", {})

View File

@ -32,6 +32,11 @@ def cli():
for cmd in cmds:
r = None
r = util.exec_command(cmd)
# try pip with disabled cache
if r['returncode'] != 0 and cmd[0] == "pip":
r = util.exec_command(["pip", "--no-cache-dir"] + cmd[1:])
assert r['returncode'] == 0
assert last in r['out'].strip()
click.secho(

View File

@ -87,7 +87,9 @@ class FDSHASumMismatch(PlatformioException):
class NotPlatformProject(PlatformioException):
MESSAGE = "Not a PlatformIO project (%s). Use `platformio init` command"
MESSAGE = "Not a PlatformIO project. `platformio.ini` file has not been "\
"found in current working directory (%s). To initialize new project "\
"please use `platformio init` command"
class UndefinedEnvPlatform(PlatformioException):

View File

@ -13,7 +13,7 @@ include_directories("{{include}}")
% end
% for define in defines:
add_definitions(-D{{define}})
add_definitions(-D{{!define}})
% end
add_custom_target(

View File

@ -41,13 +41,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakeBuildCommandLine>platformio -f -c visualstudio run</NMakeBuildCommandLine>
<NMakeCleanCommandLine>platformio -f -c visualstudio run --target clean</NMakeCleanCommandLine>
<NMakePreprocessorDefinitions>{{";".join(defines)}}</NMakePreprocessorDefinitions>
<NMakePreprocessorDefinitions>{{!";".join(defines)}}</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>{{";".join(["$(HOMEDRIVE)$(HOMEPATH)%s" % i.replace(user_home_dir, "") if i.startswith(user_home_dir) else i for i in includes])}}</NMakeIncludeSearchPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>platformio run</NMakeBuildCommandLine>
<NMakeCleanCommandLine>platformio run --target clean</NMakeCleanCommandLine>
<NMakePreprocessorDefinitions>{";".join(defines)}}</NMakePreprocessorDefinitions>
<NMakePreprocessorDefinitions>{{!";".join(defines)}}</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath>{{";".join(["$(HOMEDRIVE)$(HOMEPATH)%s" % i.replace(user_home_dir, "") if i.startswith(user_home_dir) else i for i in includes])}}</NMakeIncludeSearchPath>
</PropertyGroup>
<ItemDefinitionGroup>

View File

@ -248,7 +248,7 @@ def measure_caller(calller_id):
"action": "Misc",
"label": calller_id
}
if calller_id in ProjectGenerator.get_supported_ides():
if calller_id in (["atom", "vim"] + ProjectGenerator.get_supported_ides()):
event['action'] = "IDE"
on_event(**event)

View File

@ -249,7 +249,8 @@ 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() if p]
def get_logicaldisks():

View File

@ -97,7 +97,7 @@ def main():
("Fixing Windows %PATH% Environment", fix_winpython_pathenv, []),
("Installing Python Package Manager", install_pip, []),
("Installing PlatformIO and dependencies", install_pypi_packages,
[["setuptools", "virtualenv", "platformio"]])
[["setuptools", "platformio"]])
]
if not IS_WINDOWS: