forked from platformio/platformio-core
Merge branch 'release/v2.2.1'
This commit is contained in:
11
HISTORY.rst
11
HISTORY.rst
@ -1,6 +1,17 @@
|
|||||||
Release History
|
Release History
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
2.2.1 (2015-??-??)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
* Project generator for `CLion IDE <http://docs.platformio.org/en/latest/ide/clion.html>`__
|
||||||
|
(`issue #132 <https://github.com/platformio/platformio/issues/132>`_)
|
||||||
|
* Updated ``tool-bossac`` package to 1.5 version for `atmelsam <http://docs.platformio.org/en/latest/platforms/atmelsam.html>`__ platform
|
||||||
|
* Updated ``sdk-esp8266`` package for `espressif <http://docs.platformio.org/en/latest/platforms/espressif.html>`__ platform
|
||||||
|
(`issue #251 <https://github.com/platformio/platformio/issues/251>`_)
|
||||||
|
* Fixed incorrect arguments handling for `platformio serialports monitor <http://docs.platformio.org/en/latest/userguide/cmd_serialports.html#platformio-serialports-monitor>`_ command
|
||||||
|
(`issue #248 <https://github.com/platformio/platformio/issues/248>`_)
|
||||||
|
|
||||||
2.2.0 (2015-07-01)
|
2.2.0 (2015-07-01)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
BIN
docs/_static/ide-platformio-clion.png
vendored
Normal file
BIN
docs/_static/ide-platformio-clion.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
@ -134,7 +134,7 @@ same for the all projects, don't need to modify them):
|
|||||||
function InstallScons ($python_home) {
|
function InstallScons ($python_home) {
|
||||||
Write-Host "Start installing Scons"
|
Write-Host "Start installing Scons"
|
||||||
$pip_path = $python_home + "/Scripts/pip.exe"
|
$pip_path = $python_home + "/Scripts/pip.exe"
|
||||||
& $pip_path install --egg "http://sourceforge.net/projects/scons/files/latest/download"
|
& $pip_path install --egg "http://dl.platformio.org/scons.zip"
|
||||||
Write-Host "Scons installed"
|
Write-Host "Scons installed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ IDE Integration
|
|||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
ide/arduino
|
ide/arduino
|
||||||
|
ide/clion
|
||||||
ide/eclipse
|
ide/eclipse
|
||||||
ide/energia
|
ide/energia
|
||||||
ide/qtcreator
|
ide/qtcreator
|
||||||
|
51
docs/ide/clion.rst
Normal file
51
docs/ide/clion.rst
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
.. _ide_clion:
|
||||||
|
|
||||||
|
CLion
|
||||||
|
=====
|
||||||
|
|
||||||
|
The `CLion <https://www.jetbrains.com/clion/>`_ is a cross-platform C/C++ IDE
|
||||||
|
for Linux, OS X, and Windows integrated with the CMake build system. The
|
||||||
|
initial version will support the GCC and Clang compilers and GDB debugger.
|
||||||
|
Clion includes such features as a smart editor, code quality assurance,
|
||||||
|
automated refactorings, project manager, integrated version control systems.
|
||||||
|
|
||||||
|
This software can be used with:
|
||||||
|
|
||||||
|
* all available :ref:`platforms`
|
||||||
|
* all available :ref:`frameworks`
|
||||||
|
|
||||||
|
Refer to the `CDT Documentation <https://www.jetbrains.com/clion/documentation/>`_
|
||||||
|
page for more detailed information.
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
Integration
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Project Generator
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Since PlatformIO 2.0 you can generate CLion compatible project using
|
||||||
|
:option:`platformio init --ide` command. Please choose board type using
|
||||||
|
:ref:`cmd_boards` command and run:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
platformio init --ide clion --board %TYPE%
|
||||||
|
|
||||||
|
Then import this project from start menu or via ``File > Import Project>`` and
|
||||||
|
specify root directory where is located :ref:`projectconf`.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
CLion is still in the development stage, so some of the features (like,
|
||||||
|
auto-complete) probably will not work with PlatformIO. See
|
||||||
|
`CLion issue #CPP-3977 <https://youtrack.jetbrains.com/issue/CPP-3977>`_.
|
||||||
|
|
||||||
|
Active discussion located in
|
||||||
|
`PlatformIO issue #132 <https://github.com/platformio/platformio/issues/132>`_.
|
||||||
|
|
||||||
|
Screenshot
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. image:: ../_static/ide-platformio-clion.png
|
||||||
|
:target: http://docs.platformio.org/en/latest/_static/ide-platformio-clion.png
|
@ -34,6 +34,12 @@ application:
|
|||||||
:ref:`MUST DISABLE <faq_troubleshooting_pioblocksprompt>` all prompts.
|
:ref:`MUST DISABLE <faq_troubleshooting_pioblocksprompt>` all prompts.
|
||||||
It will allow you to avoid blocking.
|
It will allow you to avoid blocking.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
Troubleshooting
|
Troubleshooting
|
||||||
---------------
|
---------------
|
||||||
@ -65,6 +71,10 @@ script. Then run the following (you might need to run ``sudo`` first):
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# change directory to folder where is located downloaded "get-platformio.py"
|
||||||
|
cd /path/to/dir/where/is/installer/script
|
||||||
|
|
||||||
|
# run it
|
||||||
python get-platformio.py
|
python get-platformio.py
|
||||||
|
|
||||||
|
|
||||||
@ -72,6 +82,10 @@ On *Windows OS* it may look like:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# change directory to folder where is located downloaded "get-platformio.py"
|
||||||
|
cd C:\path\to\dir\where\is\installer\script
|
||||||
|
|
||||||
|
# run it
|
||||||
C:\Python27\python.exe get-platformio.py
|
C:\Python27\python.exe get-platformio.py
|
||||||
|
|
||||||
Full Guide
|
Full Guide
|
||||||
|
@ -33,6 +33,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -33,6 +33,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -36,6 +36,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -27,6 +27,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -27,6 +27,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -27,6 +27,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -27,6 +27,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -42,6 +42,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -36,6 +36,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -33,6 +33,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -36,6 +36,9 @@ Packages
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Frameworks
|
Frameworks
|
||||||
|
@ -15,19 +15,54 @@
|
|||||||
#include "smartconfig.h"
|
#include "smartconfig.h"
|
||||||
|
|
||||||
void ICACHE_FLASH_ATTR
|
void ICACHE_FLASH_ATTR
|
||||||
smartconfig_done(void *data)
|
smartconfig_done(sc_status status, void *pdata)
|
||||||
{
|
{
|
||||||
struct station_config *sta_conf = data;
|
switch(status) {
|
||||||
|
case SC_STATUS_WAIT:
|
||||||
|
os_printf("SC_STATUS_WAIT\n");
|
||||||
|
break;
|
||||||
|
case SC_STATUS_FIND_CHANNEL:
|
||||||
|
os_printf("SC_STATUS_FIND_CHANNEL\n");
|
||||||
|
break;
|
||||||
|
case SC_STATUS_GETTING_SSID_PSWD:
|
||||||
|
os_printf("SC_STATUS_GETTING_SSID_PSWD\n");
|
||||||
|
sc_type *type = pdata;
|
||||||
|
if (*type == SC_TYPE_ESPTOUCH) {
|
||||||
|
os_printf("SC_TYPE:SC_TYPE_ESPTOUCH\n");
|
||||||
|
} else {
|
||||||
|
os_printf("SC_TYPE:SC_TYPE_AIRKISS\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SC_STATUS_LINK:
|
||||||
|
os_printf("SC_STATUS_LINK\n");
|
||||||
|
struct station_config *sta_conf = pdata;
|
||||||
|
|
||||||
|
wifi_station_set_config(sta_conf);
|
||||||
|
wifi_station_disconnect();
|
||||||
|
wifi_station_connect();
|
||||||
|
break;
|
||||||
|
case SC_STATUS_LINK_OVER:
|
||||||
|
os_printf("SC_STATUS_LINK_OVER\n");
|
||||||
|
if (pdata != NULL) {
|
||||||
|
uint8 phone_ip[4] = {0};
|
||||||
|
|
||||||
wifi_station_set_config(sta_conf);
|
os_memcpy(phone_ip, (uint8*)pdata, 4);
|
||||||
wifi_station_disconnect();
|
os_printf("Phone ip: %d.%d.%d.%d\n",phone_ip[0],phone_ip[1],phone_ip[2],phone_ip[3]);
|
||||||
wifi_station_connect();
|
}
|
||||||
|
smartconfig_stop();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void user_rf_pre_init(void)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void user_init(void)
|
void user_init(void)
|
||||||
{
|
{
|
||||||
os_printf("SDK version:%s\n", system_get_sdk_version());
|
os_printf("SDK version:%s\n", system_get_sdk_version());
|
||||||
|
|
||||||
wifi_set_opmode(STATION_MODE);
|
wifi_set_opmode(STATION_MODE);
|
||||||
smartconfig_start(SC_TYPE_AIRKISS, smartconfig_done);
|
smartconfig_start(smartconfig_done);
|
||||||
}
|
}
|
||||||
|
@ -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, 2, 0)
|
VERSION = (2, 2, 1)
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -122,7 +122,7 @@ if "FRAMEWORK" not in env:
|
|||||||
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", "at", "ssl"]
|
"json", "upgrade", "smartconfig", "pwm", "at", "ssl"]
|
||||||
)
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -136,7 +136,11 @@ target_elf = env.BuildFirmware()
|
|||||||
#
|
#
|
||||||
|
|
||||||
if "uploadlazy" in COMMAND_LINE_TARGETS:
|
if "uploadlazy" in COMMAND_LINE_TARGETS:
|
||||||
target_firm = join("$BUILD_DIR", "firmware.bin")
|
target_firm = [
|
||||||
|
join("$BUILD_DIR", "firmware_00000.bin"),
|
||||||
|
join("$BUILD_DIR", "firmware_%s.bin" %
|
||||||
|
("40000" if "FRAMEWORK" not in env else "10000"))
|
||||||
|
]
|
||||||
else:
|
else:
|
||||||
target_firm = env.ElfToBin(
|
target_firm = env.ElfToBin(
|
||||||
[join("$BUILD_DIR", "firmware_00000"),
|
[join("$BUILD_DIR", "firmware_00000"),
|
||||||
|
@ -6,7 +6,8 @@ from glob import glob
|
|||||||
from os import getenv, listdir, sep, walk
|
from os import getenv, listdir, sep, walk
|
||||||
from os.path import basename, dirname, isdir, isfile, join, normpath
|
from os.path import basename, dirname, isdir, isfile, join, normpath
|
||||||
|
|
||||||
from SCons.Script import DefaultEnvironment, Exit, SConscript
|
from SCons.Script import (COMMAND_LINE_TARGETS, DefaultEnvironment, Exit,
|
||||||
|
SConscript)
|
||||||
from SCons.Util import case_sensitive_suffixes
|
from SCons.Util import case_sensitive_suffixes
|
||||||
|
|
||||||
from platformio.util import pioversion_to_intstr
|
from platformio.util import pioversion_to_intstr
|
||||||
@ -155,7 +156,7 @@ def LookupSources(env, variant_dir, src_dir, duplicate=True, src_filter=None):
|
|||||||
|
|
||||||
|
|
||||||
def BuildFramework(env):
|
def BuildFramework(env):
|
||||||
if "FRAMEWORK" not in env:
|
if "FRAMEWORK" not in env or "uploadlazy" in COMMAND_LINE_TARGETS:
|
||||||
return
|
return
|
||||||
|
|
||||||
if env['FRAMEWORK'].lower() in ("arduino", "energia"):
|
if env['FRAMEWORK'].lower() in ("arduino", "energia"):
|
||||||
|
@ -163,7 +163,7 @@ class EnvironmentProcessor(object):
|
|||||||
telemetry.on_run_environment(self.options, build_targets)
|
telemetry.on_run_environment(self.options, build_targets)
|
||||||
|
|
||||||
# install platform and libs dependencies
|
# install platform and libs dependencies
|
||||||
_autoinstall_platform(self.cmd_ctx, platform)
|
_autoinstall_platform(self.cmd_ctx, platform, build_targets)
|
||||||
if "lib_install" in self.options:
|
if "lib_install" in self.options:
|
||||||
_autoinstall_libs(self.cmd_ctx, self.options['lib_install'])
|
_autoinstall_libs(self.cmd_ctx, self.options['lib_install'])
|
||||||
|
|
||||||
@ -171,14 +171,34 @@ class EnvironmentProcessor(object):
|
|||||||
return p.run(build_vars, build_targets, self.verbose_level)
|
return p.run(build_vars, build_targets, self.verbose_level)
|
||||||
|
|
||||||
|
|
||||||
def _autoinstall_platform(ctx, platform):
|
def _autoinstall_platform(ctx, platform, targets):
|
||||||
installed_platforms = PlatformFactory.get_platforms(
|
installed_platforms = PlatformFactory.get_platforms(
|
||||||
installed=True).keys()
|
installed=True).keys()
|
||||||
if (platform not in installed_platforms and (
|
cmd_options = {}
|
||||||
not app.get_setting("enable_prompts") or
|
p = PlatformFactory.newPlatform(platform)
|
||||||
|
|
||||||
|
if "uploadlazy" in targets:
|
||||||
|
upload_tools = p.pkg_aliases_to_names(["uploader"])
|
||||||
|
|
||||||
|
# platform without uploaders
|
||||||
|
if not upload_tools and platform in installed_platforms:
|
||||||
|
return
|
||||||
|
# uploaders are already installed
|
||||||
|
if set(upload_tools) <= set(p.get_installed_packages()):
|
||||||
|
return
|
||||||
|
|
||||||
|
cmd_options['skip_default_package'] = True
|
||||||
|
if upload_tools:
|
||||||
|
cmd_options['with_package'] = ["uploader"]
|
||||||
|
|
||||||
|
elif (platform in installed_platforms and
|
||||||
|
set(p.get_default_packages()) <= set(p.get_installed_packages())):
|
||||||
|
return
|
||||||
|
|
||||||
|
if (not app.get_setting("enable_prompts") or
|
||||||
click.confirm("The platform '%s' has not been installed yet. "
|
click.confirm("The platform '%s' has not been installed yet. "
|
||||||
"Would you like to install it now?" % platform))):
|
"Would you like to install it now?" % platform)):
|
||||||
ctx.invoke(cmd_platforms_install, platforms=[platform])
|
ctx.invoke(cmd_platforms_install, platforms=[platform], **cmd_options)
|
||||||
|
|
||||||
|
|
||||||
def _autoinstall_libs(ctx, libids_list):
|
def _autoinstall_libs(ctx, libids_list):
|
||||||
|
@ -68,7 +68,7 @@ def serialports_list(json_output):
|
|||||||
@click.option("--quiet", is_flag=True,
|
@click.option("--quiet", is_flag=True,
|
||||||
help="Diagnostics: suppress non-error messages, default=Off")
|
help="Diagnostics: suppress non-error messages, default=Off")
|
||||||
def serialports_monitor(**kwargs):
|
def serialports_monitor(**kwargs):
|
||||||
sys.argv = sys.argv[3:]
|
sys.argv = sys.argv[2:]
|
||||||
|
|
||||||
if not kwargs['port']:
|
if not kwargs['port']:
|
||||||
for item in get_serialports():
|
for item in get_serialports():
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
# See LICENSE for details.
|
# See LICENSE for details.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from glob import glob
|
from os import listdir, makedirs, walk
|
||||||
from os import listdir, walk
|
|
||||||
from os.path import abspath, basename, expanduser, isdir, join, relpath
|
from os.path import abspath, basename, expanduser, isdir, join, relpath
|
||||||
|
|
||||||
import bottle
|
import bottle
|
||||||
@ -76,14 +75,26 @@ class ProjectGenerator(object):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def get_tpls(self):
|
def get_tpls(self):
|
||||||
|
tpls = []
|
||||||
tpls_dir = join(util.get_source_dir(), "ide", "tpls", self.ide)
|
tpls_dir = join(util.get_source_dir(), "ide", "tpls", self.ide)
|
||||||
return glob(join(tpls_dir, ".*.tpl")) + glob(join(tpls_dir, "*.tpl"))
|
for root, _, files in walk(tpls_dir):
|
||||||
|
for f in files:
|
||||||
|
if f.endswith(".tpl"):
|
||||||
|
tpls.append((
|
||||||
|
root.replace(tpls_dir, ""), join(root, f)))
|
||||||
|
return tpls
|
||||||
|
|
||||||
def generate(self):
|
def generate(self):
|
||||||
for tpl_path in self.get_tpls():
|
for _relpath, _path in self.get_tpls():
|
||||||
file_name = basename(tpl_path)[:-4]
|
tpl_dir = self.project_dir
|
||||||
with open(join(self.project_dir, file_name), "w") as f:
|
if _relpath:
|
||||||
f.write(self._render_tpl(tpl_path).encode("utf8"))
|
tpl_dir = join(self.project_dir, _relpath)[1:]
|
||||||
|
if not isdir(tpl_dir):
|
||||||
|
makedirs(tpl_dir)
|
||||||
|
|
||||||
|
file_name = basename(_path)[:-4]
|
||||||
|
with open(join(tpl_dir, file_name), "w") as f:
|
||||||
|
f.write(self._render_tpl(_path).encode("utf8"))
|
||||||
|
|
||||||
def _render_tpl(self, tpl_path):
|
def _render_tpl(self, tpl_path):
|
||||||
content = ""
|
content = ""
|
||||||
|
8
platformio/ide/tpls/clion/.idea/clion.iml.tpl
generated
Normal file
8
platformio/ide/tpls/clion/.idea/clion.iml.tpl
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="CPP_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
9
platformio/ide/tpls/clion/.idea/modules.xml.tpl
generated
Normal file
9
platformio/ide/tpls/clion/.idea/modules.xml.tpl
generated
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/clion.iml" filepath="$PROJECT_DIR$/.idea/clion.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/platformio.iml" filepath="$PROJECT_DIR$/.idea/platformio.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
8
platformio/ide/tpls/clion/.idea/platformio.iml.tpl
generated
Normal file
8
platformio/ide/tpls/clion/.idea/platformio.iml.tpl
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="CPP_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
266
platformio/ide/tpls/clion/.idea/workspace.xml.tpl
generated
Normal file
266
platformio/ide/tpls/clion/.idea/workspace.xml.tpl
generated
Normal file
@ -0,0 +1,266 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CMakeRunConfigurationManager" shouldGenerate="true" assignedExecutableTargets="true" buildAllGenerated="true">
|
||||||
|
<generated>
|
||||||
|
<config projectName="{{project_name}}" targetName="PLATFORMIO_CLEAN" />
|
||||||
|
<config projectName="{{project_name}}" targetName="PLATFORMIO_RUN" />
|
||||||
|
<config projectName="{{project_name}}" targetName="PLATFORMIO" />
|
||||||
|
<config projectName="{{project_name}}" targetName="{{project_name}}" />
|
||||||
|
<config projectName="{{project_name}}" targetName="DEBUG" />
|
||||||
|
<config projectName="{{project_name}}" targetName="PLATFORMIO_BUILD" />
|
||||||
|
<config projectName="{{project_name}}" targetName="PLATFORMIO_UPLOAD" />
|
||||||
|
</generated>
|
||||||
|
</component>
|
||||||
|
<component name="CMakeSettings" AUTO_RELOAD="true" GENERATION_PASS_SYSTEM_ENVIRONMENT="true">
|
||||||
|
<ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||||
|
<envs />
|
||||||
|
</ADDITIONAL_GENERATION_ENVIRONMENT>
|
||||||
|
</component>
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="ec922180-b3d3-40f1-af0b-2568113a9075" name="Default" comment="" />
|
||||||
|
<ignored path="platformio.iws" />
|
||||||
|
<ignored path=".idea/workspace.xml" />
|
||||||
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
|
<option name="TRACKING_ENABLED" value="true" />
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
||||||
|
<component name="CreatePatchCommitExecutor">
|
||||||
|
<option name="PATCH_PATH" value="" />
|
||||||
|
</component>
|
||||||
|
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||||
|
<component name="FavoritesManager">
|
||||||
|
<favorites_list name="{{project_name}}" />
|
||||||
|
</component>
|
||||||
|
<component name="FileEditorManager">
|
||||||
|
<leaf>
|
||||||
|
<file leaf-file-name="CMakeLists.txt" pinned="false" current-in-tab="true">
|
||||||
|
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state vertical-scroll-proportion="0.15758981">
|
||||||
|
<caret line="8" column="49" selection-start-line="8" selection-start-column="49" selection-end-line="8" selection-end-column="49" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
% for file in srcfiles:
|
||||||
|
<file leaf-file-name="{{file}}" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR/${{file}}">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state vertical-scroll-proportion="0.0">
|
||||||
|
<caret line="24" column="4" selection-start-line="24" selection-start-column="4" selection-end-line="24" selection-end-column="4" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
% end
|
||||||
|
</leaf>
|
||||||
|
</component>
|
||||||
|
<component name="JsBuildToolGruntFileManager" detection-done="true" />
|
||||||
|
<component name="JsGulpfileManager">
|
||||||
|
<detection-done>true</detection-done>
|
||||||
|
</component>
|
||||||
|
<component name="NamedScopeManager">
|
||||||
|
<order />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectFrameBounds">
|
||||||
|
<option name="x" value="252" />
|
||||||
|
<option name="y" value="21" />
|
||||||
|
<option name="width" value="1400" />
|
||||||
|
<option name="height" value="1000" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectInspectionProfilesVisibleTreeState">
|
||||||
|
<entry key="Project Default">
|
||||||
|
<profile-state>
|
||||||
|
<expanded-state>
|
||||||
|
<State>
|
||||||
|
<id />
|
||||||
|
</State>
|
||||||
|
</expanded-state>
|
||||||
|
<selected-state>
|
||||||
|
<State>
|
||||||
|
<id>C/C++</id>
|
||||||
|
</State>
|
||||||
|
</selected-state>
|
||||||
|
</profile-state>
|
||||||
|
</entry>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||||
|
<OptionsSetting value="true" id="Add" />
|
||||||
|
<OptionsSetting value="true" id="Remove" />
|
||||||
|
<OptionsSetting value="true" id="Checkout" />
|
||||||
|
<OptionsSetting value="true" id="Update" />
|
||||||
|
<OptionsSetting value="true" id="Status" />
|
||||||
|
<OptionsSetting value="true" id="Edit" />
|
||||||
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectView">
|
||||||
|
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||||
|
<flattenPackages />
|
||||||
|
<showMembers />
|
||||||
|
<showModules />
|
||||||
|
<showLibraryContents />
|
||||||
|
<hideEmptyPackages />
|
||||||
|
<abbreviatePackageNames />
|
||||||
|
<autoscrollToSource />
|
||||||
|
<autoscrollFromSource />
|
||||||
|
<sortByType />
|
||||||
|
</navigator>
|
||||||
|
<panes>
|
||||||
|
<pane id="ProjectPane">
|
||||||
|
<subPane>
|
||||||
|
<PATH>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="{{project_name}}" />
|
||||||
|
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$1$1" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
</PATH>
|
||||||
|
<PATH>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="{{project_name}}" />
|
||||||
|
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$1$1" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="{{project_name}}" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
</PATH>
|
||||||
|
<PATH>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="{{project_name}}" />
|
||||||
|
<option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$1$1" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="{{project_name}}" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="src" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
</PATH>
|
||||||
|
</subPane>
|
||||||
|
</pane>
|
||||||
|
</panes>
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">
|
||||||
|
<property name="recentsLimit" value="5" />
|
||||||
|
<property name="settings.editor.selected.configurable" value="CPPToolchains" />
|
||||||
|
<property name="settings.editor.splitter.proportion" value="0.2" />
|
||||||
|
<property name="last_opened_file_path" value="$PROJECT_DIR$/CMakeLists.txt" />
|
||||||
|
<property name="restartRequiresConfirmation" value="true" />
|
||||||
|
<property name="FullScreen" value="false" />
|
||||||
|
</component>
|
||||||
|
<component name="RunManager" selected="Application.PLATFORMIO_BUILD">
|
||||||
|
<configuration default="true" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="{{project_name}}" TARGET_NAME="{{project_name}}" CONFIG_NAME="Debug">
|
||||||
|
<envs />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
|
||||||
|
<node-options />
|
||||||
|
<gulpfile />
|
||||||
|
<tasks />
|
||||||
|
<arguments />
|
||||||
|
<pass-parent-envs>true</pass-parent-envs>
|
||||||
|
<envs />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="false" name="Build All" type="CMakeRunConfiguration" factoryName="Application" WORKING_DIR="" PASS_PARENT_ENVS="FALSE" CONFIG_NAME="Debug" EXPLICIT_BUILD_TARGET_NAME="all">
|
||||||
|
<envs />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="false" name="PLATFORMIO_BUILD" type="CMakeRunConfiguration" factoryName="Application" WORKING_DIR="" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="{{project_name}}" TARGET_NAME="PLATFORMIO_BUILD" CONFIG_NAME="Debug">
|
||||||
|
<envs />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="false" name="PLATFORMIO_CLEAN" type="CMakeRunConfiguration" factoryName="Application" WORKING_DIR="" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="{{project_name}}" TARGET_NAME="PLATFORMIO_CLEAN" CONFIG_NAME="Debug">
|
||||||
|
<envs />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<configuration default="false" name="PLATFORMIO_UPLOAD" type="CMakeRunConfiguration" factoryName="Application" WORKING_DIR="" PASS_PARENT_ENVS="FALSE" PROJECT_NAME="{{project_name}}" TARGET_NAME="PLATFORMIO_UPLOAD" CONFIG_NAME="Debug">
|
||||||
|
<envs />
|
||||||
|
<method />
|
||||||
|
</configuration>
|
||||||
|
<list size="4">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="Application.Build All" />
|
||||||
|
<item index="1" class="java.lang.String" itemvalue="Application.PLATFORMIO_BUILD" />
|
||||||
|
<item index="2" class="java.lang.String" itemvalue="Application.PLATFORMIO_CLEAN" />
|
||||||
|
<item index="3" class="java.lang.String" itemvalue="Application.PLATFORMIO_UPLOAD" />
|
||||||
|
</list>
|
||||||
|
</component>
|
||||||
|
<component name="ShelveChangesManager" show_recycled="false" />
|
||||||
|
<component name="SvnConfiguration">
|
||||||
|
<configuration />
|
||||||
|
</component>
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="ec922180-b3d3-40f1-af0b-2568113a9075" name="Default" comment="" />
|
||||||
|
<created>1435919971910</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<updated>1435919971910</updated>
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="ToolWindowManager">
|
||||||
|
<frame x="252" y="21" width="1400" height="1000" extended-state="0" />
|
||||||
|
<editor active="true" />
|
||||||
|
<layout>
|
||||||
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||||
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32996634" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32996634" sideWeight="0.4631503" order="7" side_tool="true" content_ui="tabs" />
|
||||||
|
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32996634" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32996634" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||||
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32996634" sideWeight="0.53684974" order="7" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||||
|
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
|
</layout>
|
||||||
|
</component>
|
||||||
|
<component name="Vcs.Log.UiProperties">
|
||||||
|
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
||||||
|
<collection />
|
||||||
|
</option>
|
||||||
|
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
|
||||||
|
<collection />
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="VcsContentAnnotationSettings">
|
||||||
|
<option name="myLimit" value="2678400000" />
|
||||||
|
</component>
|
||||||
|
<component name="XDebuggerManager">
|
||||||
|
<breakpoint-manager>
|
||||||
|
<option name="time" value="4" />
|
||||||
|
</breakpoint-manager>
|
||||||
|
<watches-manager />
|
||||||
|
</component>
|
||||||
|
<component name="masterDetails">
|
||||||
|
<states>
|
||||||
|
<state key="ScopeChooserConfigurable.UI">
|
||||||
|
<settings>
|
||||||
|
<splitter-proportions>
|
||||||
|
<option name="proportions">
|
||||||
|
<list>
|
||||||
|
<option value="0.2" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</splitter-proportions>
|
||||||
|
</settings>
|
||||||
|
</state>
|
||||||
|
</states>
|
||||||
|
</component>
|
||||||
|
</project>
|
31
platformio/ide/tpls/clion/CMakeLists.txt.tpl
Normal file
31
platformio/ide/tpls/clion/CMakeLists.txt.tpl
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.2)
|
||||||
|
project({{project_name}})
|
||||||
|
% for include in includes:
|
||||||
|
% if include.startswith(user_home_dir):
|
||||||
|
include_directories("$ENV{HOME}{{include.replace(user_home_dir, '').replace("\\", "/")}}")
|
||||||
|
% else:
|
||||||
|
include_directories("{{include}}")
|
||||||
|
% end
|
||||||
|
% end
|
||||||
|
|
||||||
|
% for define in defines:
|
||||||
|
add_definitions(-D{{define}})
|
||||||
|
% end
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
PLATFORMIO_BUILD ALL
|
||||||
|
COMMAND platformio -f run
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
PLATFORMIO_UPLOAD ALL
|
||||||
|
COMMAND platformio -f run --target upload
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
PLATFORMIO_CLEAN ALL
|
||||||
|
COMMAND platformio -f run --target clean
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
@ -25,10 +25,12 @@ class AtmelavrPlatform(BasePlatform):
|
|||||||
},
|
},
|
||||||
|
|
||||||
"tool-avrdude": {
|
"tool-avrdude": {
|
||||||
|
"alias": "uploader",
|
||||||
"default": True
|
"default": True
|
||||||
},
|
},
|
||||||
|
|
||||||
"tool-micronucleus": {
|
"tool-micronucleus": {
|
||||||
|
"alias": "uploader",
|
||||||
"default": True
|
"default": True
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -51,11 +53,11 @@ class AtmelavrPlatform(BasePlatform):
|
|||||||
for v in variables:
|
for v in variables:
|
||||||
if "BOARD=" not in v:
|
if "BOARD=" not in v:
|
||||||
continue
|
continue
|
||||||
tuploader = "tool-avrdude"
|
disable_tool = "tool-micronucleus"
|
||||||
_, board = v.split("=")
|
_, board = v.split("=")
|
||||||
bdata = get_boards(board)
|
bdata = get_boards(board)
|
||||||
if "digispark" in bdata['build']['core']:
|
if "digispark" in bdata['build']['core']:
|
||||||
tuploader = "tool-micronucleus"
|
disable_tool = "tool-avrdude"
|
||||||
self.PACKAGES[tuploader]['alias'] = "uploader"
|
del self.PACKAGES[disable_tool]['alias']
|
||||||
break
|
break
|
||||||
return BasePlatform.run(self, variables, targets, verbose)
|
return BasePlatform.run(self, variables, targets, verbose)
|
||||||
|
@ -242,6 +242,10 @@ class BasePlatform(object):
|
|||||||
names.append(name)
|
names.append(name)
|
||||||
return names
|
return names
|
||||||
|
|
||||||
|
def get_default_packages(self):
|
||||||
|
return [k for k, v in self.get_packages().items()
|
||||||
|
if v.get("default", False)]
|
||||||
|
|
||||||
def get_installed_packages(self):
|
def get_installed_packages(self):
|
||||||
pm = PackageManager()
|
pm = PackageManager()
|
||||||
return [n for n in self.get_packages().keys() if pm.is_installed(n)]
|
return [n for n in self.get_packages().keys() if pm.is_installed(n)]
|
||||||
|
@ -91,6 +91,9 @@ def generate_packages(packages):
|
|||||||
**Linux Users:** Don't forget to install "udev" rules file
|
**Linux Users:** Don't forget to install "udev" rules file
|
||||||
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
|
||||||
|
|
||||||
|
**Windows Users:** Please check that you have correctly installed USB driver
|
||||||
|
from board manufacturer
|
||||||
|
|
||||||
""")
|
""")
|
||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
|
|
||||||
|
@ -100,9 +100,7 @@ def main():
|
|||||||
("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"], ["platformio"], [
|
[["setuptools"], ["platformio"], [
|
||||||
"--egg",
|
"--egg", "http://dl.platformio.org/scons.zip"
|
||||||
"http://sourceforge.net/projects/platformio-storage/files/"
|
|
||||||
"scons.zip/download"
|
|
||||||
]]
|
]]
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
|
4
tox.ini
4
tox.ini
@ -11,7 +11,7 @@ deps =
|
|||||||
isort
|
isort
|
||||||
flake8
|
flake8
|
||||||
commands =
|
commands =
|
||||||
pip install --egg http://sourceforge.net/projects/platformio-storage/files/scons.zip/download
|
pip install --egg http://dl.platformio.org/scons.zip
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
@ -48,5 +48,5 @@ passenv = *
|
|||||||
deps = pytest
|
deps = pytest
|
||||||
commands =
|
commands =
|
||||||
{envpython} --version
|
{envpython} --version
|
||||||
pip install --egg http://sourceforge.net/projects/platformio-storage/files/scons.zip/download
|
pip install --egg http://dl.platformio.org/scons.zip
|
||||||
py.test -v --basetemp="{envtmpdir}" tests
|
py.test -v --basetemp="{envtmpdir}" tests
|
||||||
|
Reference in New Issue
Block a user