mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 18:17:13 +02:00
Merge branch 'release/v2.3.3'
This commit is contained in:
14
HISTORY.rst
14
HISTORY.rst
@ -4,6 +4,18 @@ Release History
|
|||||||
PlatformIO 2.0
|
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)
|
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
|
* Found solution for "pip/scons error: option --single-version-externally-managed not
|
||||||
recognized" when install PlatformIO using ``pip`` package manager
|
recognized" when install PlatformIO using ``pip`` package manager
|
||||||
(`issue #279 <https://github.com/platformio/platformio/issues/279>`_)
|
(`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
|
* Fixed `SConsNotInstalled` error for Linux Debian-based distributives
|
||||||
|
|
||||||
2.3.1 (2015-09-06)
|
2.3.1 (2015-09-06)
|
||||||
|
45
docs/faq.rst
45
docs/faq.rst
@ -60,23 +60,11 @@ the project developed using PlatformIO is as follows:
|
|||||||
Troubleshooting
|
Troubleshooting
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
.. _faq_troubleshooting_pioblocksprompt:
|
Installation
|
||||||
|
~~~~~~~~~~~~
|
||||||
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>`.
|
|
||||||
|
|
||||||
PlatformIO and ``scons`` aren't installed properly
|
PlatformIO and ``scons`` aren't installed properly
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||||
|
|
||||||
Try these solutions:
|
Try these solutions:
|
||||||
|
|
||||||
@ -92,10 +80,30 @@ Try these solutions:
|
|||||||
.. _faq_troubleshooting_sconssingverextmanaged:
|
.. _faq_troubleshooting_sconssingverextmanaged:
|
||||||
|
|
||||||
PIP & SCons Error: option --single-version-externally-managed not recognized
|
PIP & SCons Error: option --single-version-externally-managed not recognized
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||||||
|
|
||||||
Answered in `issue #279 <https://github.com/platformio/platformio/issues/279>`_.
|
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:
|
.. _faq_troubleshooting_pionotfoundinpath:
|
||||||
|
|
||||||
Program ``platformio`` not found in PATH
|
Program ``platformio`` not found in PATH
|
||||||
@ -156,3 +164,8 @@ ARM toolchain: cc1plus: error while loading shared libraries
|
|||||||
|
|
||||||
See related answers for
|
See related answers for
|
||||||
`error while loading shared libraries <https://github.com/platformio/platformio/issues?utf8=✓&q=error+while+loading+shared+libraries>`_.
|
`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>`_.
|
||||||
|
@ -630,6 +630,26 @@ PanStamp
|
|||||||
- 32 Kb
|
- 32 Kb
|
||||||
- 4 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
|
Quirkbot
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
|
@ -469,6 +469,13 @@ ST
|
|||||||
- 512 Kb
|
- 512 Kb
|
||||||
- 128 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``
|
* - ``nucleo_l053r8``
|
||||||
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
|
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
|
||||||
- STM32L053R8T6
|
- STM32L053R8T6
|
||||||
|
@ -601,6 +601,26 @@ PanStamp
|
|||||||
- 32 Kb
|
- 32 Kb
|
||||||
- 2 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
|
Quirkbot
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
|
|
||||||
|
@ -256,6 +256,13 @@ ST
|
|||||||
- 512 Kb
|
- 512 Kb
|
||||||
- 128 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``
|
* - ``nucleo_l053r8``
|
||||||
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
|
- `ST Nucleo L053R8 <https://developer.mbed.org/platforms/ST-Nucleo-L053R8/>`_
|
||||||
- STM32L053R8T6
|
- STM32L053R8T6
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
# See LICENSE for details.
|
# See LICENSE for details.
|
||||||
|
|
||||||
VERSION = (2, 3, 2)
|
VERSION = (2, 3, 3)
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
import json
|
import json
|
||||||
from os import environ, getenv
|
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
|
from lockfile import LockFile
|
||||||
|
|
||||||
@ -68,9 +69,8 @@ class State(object):
|
|||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
try:
|
try:
|
||||||
|
self._lock_state_file()
|
||||||
if isfile(self.path):
|
if isfile(self.path):
|
||||||
self._lock = LockFile(self.path)
|
|
||||||
self._lock.acquire()
|
|
||||||
with open(self.path, "r") as fp:
|
with open(self.path, "r") as fp:
|
||||||
self._state = json.load(fp)
|
self._state = json.load(fp)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@ -85,6 +85,18 @@ class State(object):
|
|||||||
json.dump(self._state, fp, indent=4)
|
json.dump(self._state, fp, indent=4)
|
||||||
else:
|
else:
|
||||||
json.dump(self._state, fp)
|
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:
|
if self._lock:
|
||||||
self._lock.release()
|
self._lock.release()
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"build": {
|
"build": {
|
||||||
"core": "esp8266",
|
"core": "esp8266",
|
||||||
"extra_flags": "-DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266",
|
"extra_flags": "-DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266",
|
||||||
"f_cpu": "80000000L",
|
"f_cpu": "40000000L",
|
||||||
"ldscript": "esp8266.flash.512k.ld",
|
"ldscript": "esp8266.flash.512k.ld",
|
||||||
"mcu": "esp8266",
|
"mcu": "esp8266",
|
||||||
"variant": "generic"
|
"variant": "generic"
|
||||||
|
22
platformio/boards/punchthrough.json
Normal file
22
platformio/boards/punchthrough.json
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -299,6 +299,22 @@
|
|||||||
"url": "https://developer.mbed.org/platforms/ST-Nucleo-F411RE/",
|
"url": "https://developer.mbed.org/platforms/ST-Nucleo-F411RE/",
|
||||||
"vendor": "ST"
|
"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": {
|
"nucleo_l053r8": {
|
||||||
"build": {
|
"build": {
|
||||||
"f_cpu": "48000000L",
|
"f_cpu": "48000000L",
|
||||||
|
@ -31,7 +31,7 @@ env.Replace(
|
|||||||
ASPPFLAGS=["-x", "assembler-with-cpp"],
|
ASPPFLAGS=["-x", "assembler-with-cpp"],
|
||||||
|
|
||||||
CFLAGS=[
|
CFLAGS=[
|
||||||
"-std=c99",
|
"-std=gnu99",
|
||||||
"-Wpointer-arith",
|
"-Wpointer-arith",
|
||||||
"-Wno-implicit-function-declaration",
|
"-Wno-implicit-function-declaration",
|
||||||
"-Wl,-EL",
|
"-Wl,-EL",
|
||||||
@ -76,9 +76,7 @@ env.Replace(
|
|||||||
"-cb", "$UPLOAD_SPEED",
|
"-cb", "$UPLOAD_SPEED",
|
||||||
"-cp", "$UPLOAD_PORT",
|
"-cp", "$UPLOAD_PORT",
|
||||||
"-ca", "0x00000",
|
"-ca", "0x00000",
|
||||||
"-cf", "${SOURCES[0]}",
|
"-cf", "$SOURCE"
|
||||||
"-ca", "0x40000" if "FRAMEWORK" not in env else "0x10000",
|
|
||||||
"-cf", "${SOURCES[1]}"
|
|
||||||
],
|
],
|
||||||
UPLOADCMD='$UPLOADER $UPLOADERFLAGS',
|
UPLOADCMD='$UPLOADER $UPLOADERFLAGS',
|
||||||
|
|
||||||
@ -86,7 +84,52 @@ env.Replace(
|
|||||||
PROGSUFFIX=".elf"
|
PROGSUFFIX=".elf"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "FRAMEWORK" in env:
|
||||||
|
env.Append(
|
||||||
|
LINKFLAGS=[
|
||||||
|
"-Wl,-wrap,system_restart_local",
|
||||||
|
"-Wl,-wrap,register_chipv6_phy"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
env.Append(
|
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",
|
||||||
|
"-bs", ".irom0.text",
|
||||||
|
"-bs", ".text",
|
||||||
|
"-bs", ".data",
|
||||||
|
"-bs", ".rodata",
|
||||||
|
"-bc", "-ec"
|
||||||
|
]),
|
||||||
|
suffix=".bin"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Configure SDK
|
||||||
|
#
|
||||||
|
|
||||||
|
if "FRAMEWORK" not in env:
|
||||||
|
env.Append(
|
||||||
|
CPPPATH=[
|
||||||
|
join("$PIOPACKAGES_DIR", "sdk-esp8266", "include"),
|
||||||
|
"$PROJECTSRC_DIR"
|
||||||
|
],
|
||||||
|
LIBPATH=[join("$PIOPACKAGES_DIR", "sdk-esp8266", "lib")],
|
||||||
BUILDERS=dict(
|
BUILDERS=dict(
|
||||||
ElfToBin=Builder(
|
ElfToBin=Builder(
|
||||||
action=" ".join([
|
action=" ".join([
|
||||||
@ -107,25 +150,22 @@ env.Append(
|
|||||||
suffix=".bin"
|
suffix=".bin"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
#
|
|
||||||
# Configure SDK
|
|
||||||
#
|
|
||||||
|
|
||||||
if "FRAMEWORK" not in env:
|
|
||||||
env.Append(
|
|
||||||
CPPPATH=[
|
|
||||||
join("$PIOPACKAGES_DIR", "sdk-esp8266", "include"),
|
|
||||||
"$PROJECTSRC_DIR"
|
|
||||||
],
|
|
||||||
LIBPATH=[join("$PIOPACKAGES_DIR", "sdk-esp8266", "lib")]
|
|
||||||
)
|
)
|
||||||
env.Replace(
|
env.Replace(
|
||||||
LDSCRIPT_PATH=join(
|
LDSCRIPT_PATH=join(
|
||||||
"$PIOPACKAGES_DIR", "sdk-esp8266", "ld", "eagle.app.v6.ld"),
|
"$PIOPACKAGES_DIR", "sdk-esp8266", "ld", "eagle.app.v6.ld"),
|
||||||
LIBS=["c", "gcc", "phy", "pp", "net80211", "lwip", "wpa", "main",
|
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:
|
if "uploadlazy" in COMMAND_LINE_TARGETS:
|
||||||
|
if "FRAMEWORK" not in env:
|
||||||
target_firm = [
|
target_firm = [
|
||||||
join("$BUILD_DIR", "firmware_00000.bin"),
|
join("$BUILD_DIR", "firmware_00000.bin"),
|
||||||
join("$BUILD_DIR", "firmware_%s.bin" %
|
join("$BUILD_DIR", "firmware_40000.bin")
|
||||||
("40000" if "FRAMEWORK" not in env else "10000"))
|
|
||||||
]
|
]
|
||||||
|
else:
|
||||||
|
target_firm = join("$BUILD_DIR", "firmware.bin")
|
||||||
else:
|
else:
|
||||||
|
if "FRAMEWORK" not in env:
|
||||||
target_firm = env.ElfToBin(
|
target_firm = env.ElfToBin(
|
||||||
[join("$BUILD_DIR", "firmware_00000"),
|
[join("$BUILD_DIR", "firmware_00000"),
|
||||||
join("$BUILD_DIR", "firmware_%s" %
|
join("$BUILD_DIR", "firmware_40000")], target_elf)
|
||||||
("40000" if "FRAMEWORK" not in env else "10000"))], target_elf)
|
else:
|
||||||
|
target_firm = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Target: Print binary size
|
# Target: Print binary size
|
||||||
|
@ -47,7 +47,7 @@ elif env.get("PLATFORM") == "espressif":
|
|||||||
CPPPATH=[join("$PLATFORMFW_DIR", "sdk", "include")],
|
CPPPATH=[join("$PLATFORMFW_DIR", "sdk", "include")],
|
||||||
LIBPATH=[join("$PLATFORMFW_DIR", "sdk", "lib")],
|
LIBPATH=[join("$PLATFORMFW_DIR", "sdk", "lib")],
|
||||||
LIBS=["smartconfig", "pp", "main", "wpa", "lwip",
|
LIBS=["smartconfig", "pp", "main", "wpa", "lwip",
|
||||||
"net80211", "phy", "hal", "gcc", "m"]
|
"net80211", "wps", "crypto", "phy", "hal", "gcc", "m"]
|
||||||
)
|
)
|
||||||
|
|
||||||
env.Replace(PLATFORMFW_DIR=PLATFORMFW_DIR)
|
env.Replace(PLATFORMFW_DIR=PLATFORMFW_DIR)
|
||||||
|
@ -147,7 +147,7 @@ def DumpIDEData(env):
|
|||||||
for item in env.get("CPPDEFINES", []):
|
for item in env.get("CPPDEFINES", []):
|
||||||
if isinstance(item, list):
|
if isinstance(item, list):
|
||||||
item = "=".join(item)
|
item = "=".join(item)
|
||||||
data['defines'].append(env.subst(item))
|
data['defines'].append(env.subst(item).replace('\\"', '"'))
|
||||||
|
|
||||||
# special symbol for Atmel AVR MCU
|
# special symbol for Atmel AVR MCU
|
||||||
board = env.get("BOARD_OPTIONS", {})
|
board = env.get("BOARD_OPTIONS", {})
|
||||||
|
@ -32,6 +32,11 @@ def cli():
|
|||||||
for cmd in cmds:
|
for cmd in cmds:
|
||||||
r = None
|
r = None
|
||||||
r = util.exec_command(cmd)
|
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 r['returncode'] == 0
|
||||||
assert last in r['out'].strip()
|
assert last in r['out'].strip()
|
||||||
click.secho(
|
click.secho(
|
||||||
|
@ -87,7 +87,9 @@ class FDSHASumMismatch(PlatformioException):
|
|||||||
|
|
||||||
class NotPlatformProject(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):
|
class UndefinedEnvPlatform(PlatformioException):
|
||||||
|
@ -13,7 +13,7 @@ include_directories("{{include}}")
|
|||||||
% end
|
% end
|
||||||
|
|
||||||
% for define in defines:
|
% for define in defines:
|
||||||
add_definitions(-D{{define}})
|
add_definitions(-D{{!define}})
|
||||||
% end
|
% end
|
||||||
|
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
|
@ -41,13 +41,13 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<NMakeBuildCommandLine>platformio -f -c visualstudio run</NMakeBuildCommandLine>
|
<NMakeBuildCommandLine>platformio -f -c visualstudio run</NMakeBuildCommandLine>
|
||||||
<NMakeCleanCommandLine>platformio -f -c visualstudio run --target clean</NMakeCleanCommandLine>
|
<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>
|
<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>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<NMakeBuildCommandLine>platformio run</NMakeBuildCommandLine>
|
<NMakeBuildCommandLine>platformio run</NMakeBuildCommandLine>
|
||||||
<NMakeCleanCommandLine>platformio run --target clean</NMakeCleanCommandLine>
|
<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>
|
<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>
|
||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
|
@ -248,7 +248,7 @@ def measure_caller(calller_id):
|
|||||||
"action": "Misc",
|
"action": "Misc",
|
||||||
"label": calller_id
|
"label": calller_id
|
||||||
}
|
}
|
||||||
if calller_id in ProjectGenerator.get_supported_ides():
|
if calller_id in (["atom", "vim"] + ProjectGenerator.get_supported_ides()):
|
||||||
event['action'] = "IDE"
|
event['action'] = "IDE"
|
||||||
on_event(**event)
|
on_event(**event)
|
||||||
|
|
||||||
|
@ -249,7 +249,8 @@ def get_serialports():
|
|||||||
from serial.tools.list_ports_posix import comports
|
from serial.tools.list_ports_posix import comports
|
||||||
else:
|
else:
|
||||||
raise exception.GetSerialPortsError(os.name)
|
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():
|
def get_logicaldisks():
|
||||||
|
@ -97,7 +97,7 @@ def main():
|
|||||||
("Fixing Windows %PATH% Environment", fix_winpython_pathenv, []),
|
("Fixing Windows %PATH% Environment", fix_winpython_pathenv, []),
|
||||||
("Installing Python Package Manager", install_pip, []),
|
("Installing Python Package Manager", install_pip, []),
|
||||||
("Installing PlatformIO and dependencies", install_pypi_packages,
|
("Installing PlatformIO and dependencies", install_pypi_packages,
|
||||||
[["setuptools", "virtualenv", "platformio"]])
|
[["setuptools", "platformio"]])
|
||||||
]
|
]
|
||||||
|
|
||||||
if not IS_WINDOWS:
|
if not IS_WINDOWS:
|
||||||
|
Reference in New Issue
Block a user