forked from platformio/platformio-core
Merge branch 'release/v0.3.0'
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,3 +3,5 @@
|
|||||||
.pioenvs
|
.pioenvs
|
||||||
.tox
|
.tox
|
||||||
.sconsign.dblite
|
.sconsign.dblite
|
||||||
|
examples/ide-eclipse/.metadata
|
||||||
|
examples/ide-eclipse/RemoteSystemsTempFiles
|
||||||
|
10
HISTORY.rst
10
HISTORY.rst
@ -1,6 +1,16 @@
|
|||||||
Release History
|
Release History
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
0.3.0 (2014-06-21)
|
||||||
|
---------
|
||||||
|
|
||||||
|
* Allowed to pass multiple "SomePlatform" to install/uninstall commands
|
||||||
|
* Added "IDE Integration" section to README with Eclipse project examples
|
||||||
|
* Created auto installer script for *PlatformIO* (`issue #3 <https://github.com/ivankravets/platformio/issues/3>`_)
|
||||||
|
* Added "Super-Quick" way to Installation section (README)
|
||||||
|
* Implemented "build_flags" option for environments (`issue #4 <https://github.com/ivankravets/platformio/issues/4>`_)
|
||||||
|
|
||||||
|
|
||||||
0.2.0 (2014-06-15)
|
0.2.0 (2014-06-15)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
67
README.rst
67
README.rst
@ -10,19 +10,22 @@ PlatformIO
|
|||||||
.. image:: https://pypip.in/version/platformio/badge.png
|
.. image:: https://pypip.in/version/platformio/badge.png
|
||||||
:target: https://pypi.python.org/pypi/platformio/
|
:target: https://pypi.python.org/pypi/platformio/
|
||||||
:alt: Latest Version
|
:alt: Latest Version
|
||||||
|
.. image:: https://pypip.in/download/platformio/badge.png
|
||||||
|
:target: https://pypi.python.org/pypi/platformio/
|
||||||
|
:alt: Downloads
|
||||||
.. image:: https://pypip.in/license/platformio/badge.png
|
.. image:: https://pypip.in/license/platformio/badge.png
|
||||||
:target: https://pypi.python.org/pypi/platformio/
|
:target: https://pypi.python.org/pypi/platformio/
|
||||||
:alt: License
|
:alt: License
|
||||||
|
|
||||||
|
|
||||||
**Platformio** is a console tool to build code with different development
|
**PlatformIO** is a console tool to build code with different development
|
||||||
platforms.
|
platforms.
|
||||||
|
|
||||||
You have no need to install any *IDE* or compile any toolchains. *Platformio*
|
You have no need to install any *IDE* or compile any toolchains. *PlatformIO*
|
||||||
has pre-built different development platforms including: compiler, debugger,
|
has pre-built different development platforms including: compiler, debugger,
|
||||||
flasher (for embedded) and many other useful tools.
|
flasher (for embedded) and many other useful tools.
|
||||||
|
|
||||||
**Platformio** allows developer to compile the same code with different
|
**PlatformIO** allows developer to compile the same code with different
|
||||||
platforms using only one command ``platformio run``. This happens due to
|
platforms using only one command ``platformio run``. This happens due to
|
||||||
``platformio.ini`` project's file (see
|
``platformio.ini`` project's file (see
|
||||||
`default template <https://github.com/ivankravets/platformio/blob/develop/platformio/projectconftpl.ini>`_)
|
`default template <https://github.com/ivankravets/platformio/blob/develop/platformio/projectconftpl.ini>`_)
|
||||||
@ -33,7 +36,12 @@ Each platform consists of packages which are located in own repository.
|
|||||||
Due to ``platformio update`` command you will have up-to-date development
|
Due to ``platformio update`` command you will have up-to-date development
|
||||||
instruments.
|
instruments.
|
||||||
|
|
||||||
**Platformio** is well suited for **embedded development**. It can:
|
.. image:: examples/platformio-examples.png
|
||||||
|
:target: https://github.com/ivankravets/platformio/raw/develop/examples/platformio-examples.png
|
||||||
|
:alt: Examples
|
||||||
|
:width: 730px
|
||||||
|
|
||||||
|
**PlatformIO** is well suited for **embedded development**. It can:
|
||||||
|
|
||||||
* Automatically analyse dependency
|
* Automatically analyse dependency
|
||||||
* Reliably detect build changes
|
* Reliably detect build changes
|
||||||
@ -56,10 +64,16 @@ It has support for many popular embedded platforms like these:
|
|||||||
See project `examples with screenshots <https://github.com/ivankravets/platformio/tree/develop/examples>`_.
|
See project `examples with screenshots <https://github.com/ivankravets/platformio/tree/develop/examples>`_.
|
||||||
|
|
||||||
|
|
||||||
|
IDE Integration
|
||||||
|
---------------
|
||||||
|
|
||||||
|
* [Eclipse] `Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO <http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio>`_
|
||||||
|
|
||||||
|
|
||||||
Python & OS Support
|
Python & OS Support
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
**Platformio** is written in `Python <https://www.python.org>`_ and works with
|
**PlatformIO** is written in `Python <https://www.python.org>`_ and works with
|
||||||
versions 2.6 and 2.7 on Unix/Linux, OS X, and Windows.
|
versions 2.6 and 2.7 on Unix/Linux, OS X, and Windows.
|
||||||
|
|
||||||
|
|
||||||
@ -68,9 +82,6 @@ Quickstart
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Install platformio
|
|
||||||
$ pip install platformio && pip install --egg scons
|
|
||||||
|
|
||||||
# Print all availalbe development platforms for installing
|
# Print all availalbe development platforms for installing
|
||||||
$ platformio search all
|
$ platformio search all
|
||||||
|
|
||||||
@ -93,29 +104,55 @@ Installation
|
|||||||
|
|
||||||
All commands below should be executed in
|
All commands below should be executed in
|
||||||
`Command-line <http://en.wikipedia.org/wiki/Command-line_interface>`_
|
`Command-line <http://en.wikipedia.org/wiki/Command-line_interface>`_
|
||||||
application in your OS:
|
application in your *OS*:
|
||||||
|
|
||||||
* *Unix/Linux/OS X* this is *Terminal* application.
|
* *Unix/Linux/OS X* this is *Terminal* application.
|
||||||
* *Windows* this is
|
* *Windows* this is
|
||||||
`Command Prompt <http://en.wikipedia.org/wiki/Command_Prompt>`_ (``cmd.exe``)
|
`Command Prompt <http://en.wikipedia.org/wiki/Command_Prompt>`_ (``cmd.exe``)
|
||||||
application.
|
application.
|
||||||
|
|
||||||
2. Check a ``python`` version:
|
Also, the `Python Interpreter <https://www.python.org/downloads/>`_ (2.6 or 2.7)
|
||||||
|
is required.
|
||||||
|
|
||||||
|
|
||||||
|
Super-Quick
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
To install or upgrade *PlatformIO*, download
|
||||||
|
`get-platformio.py <https://raw.githubusercontent.com/ivankravets/platformio/develop/scripts/get-platformio.py>`_ script.
|
||||||
|
|
||||||
|
Then run the following (which may require administrator access):
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ python get-platformio.py
|
||||||
|
|
||||||
|
On *Windows OS* it may look like:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
C:\Python27\python.exe get-platformio.py
|
||||||
|
|
||||||
|
|
||||||
|
Full Guide
|
||||||
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
1. Check a ``python`` version (only 2.6-2.7 is supported):
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ python --version
|
$ python --version
|
||||||
|
|
||||||
Windows OS Users only:
|
*Windows OS* Users only:
|
||||||
|
|
||||||
* `Download Python <https://www.python.org/downloads/>`_ and install it.
|
* `Download Python 2.7 <https://www.python.org/downloads/>`_ and install it.
|
||||||
* Add to PATH system variable ``;C:\Python27;C:\Python27\Scripts;`` and
|
* Add to PATH system variable ``;C:\Python27;C:\Python27\Scripts;`` and
|
||||||
reopen *Command Prompt* (``cmd.exe``) application. Please read this
|
reopen *Command Prompt* (``cmd.exe``) application. Please read this
|
||||||
article `How to set the path and environment variables in Windows
|
article `How to set the path and environment variables in Windows
|
||||||
<http://www.computerhope.com/issues/ch000549.htm>`_.
|
<http://www.computerhope.com/issues/ch000549.htm>`_.
|
||||||
|
|
||||||
|
|
||||||
2. Check a ``pip`` tool for installing and managing Python packages:
|
2. Check a ``pip`` tool for installing and managing *Python* packages:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
@ -193,7 +230,7 @@ Search for development platforms:
|
|||||||
``platformio install``
|
``platformio install``
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
*Platformio* has pre-built development platforms with related packages. You
|
*PlatformIO* has pre-built development platforms with related packages. You
|
||||||
can install one of them:
|
can install one of them:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@ -294,7 +331,7 @@ Initialize new platformio based project.
|
|||||||
After this command ``platformio`` will create:
|
After this command ``platformio`` will create:
|
||||||
|
|
||||||
* ``.pioenvs`` - a temporary working directory.
|
* ``.pioenvs`` - a temporary working directory.
|
||||||
* ``lib`` - a directory for project specific libraries. Platformio will
|
* ``lib`` - a directory for project specific libraries. PlatformIO will
|
||||||
compile their to static libraries and link to executable file
|
compile their to static libraries and link to executable file
|
||||||
* ``src`` - a source directory. Put code here.
|
* ``src`` - a source directory. Put code here.
|
||||||
* ``platformio.ini`` - a configuration file for project
|
* ``platformio.ini`` - a configuration file for project
|
||||||
|
14
examples/ide-eclipse/README.rst
Normal file
14
examples/ide-eclipse/README.rst
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Eclipse IDE Integration
|
||||||
|
=======================
|
||||||
|
|
||||||
|
The detailed information and steps are described in this article:
|
||||||
|
`Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO <http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio>`_.
|
||||||
|
|
||||||
|
|
||||||
|
.. image:: http://www.ikravets.com/wp-content/uploads/2014/06/eclipse_build_arduino_pro5v-1024x822.png
|
||||||
|
:width: 850px
|
||||||
|
:target: http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio
|
||||||
|
|
||||||
|
.. image:: http://www.ikravets.com/wp-content/uploads/2014/06/eclipse_debugging_result_1-1024x775.png
|
||||||
|
:width: 850px
|
||||||
|
:target: http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio
|
77
examples/ide-eclipse/arduino_pro5/.cproject
Normal file
77
examples/ide-eclipse/arduino_pro5/.cproject
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?fileVersion 4.0.0?>
|
||||||
|
|
||||||
|
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
<cconfiguration id="0.910961921">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.910961921" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.910961921" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||||
|
<folderInfo id="0.910961921." name="/" resourcePath="">
|
||||||
|
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.952979152" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||||
|
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.952979152.52310970" name=""/>
|
||||||
|
<builder id="org.eclipse.cdt.build.core.settings.default.builder.1519453406" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1409095472" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1624502120" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.239157887" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/frameworks/arduino/cores/arduino""/>
|
||||||
|
</option>
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.922107295" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.149990277" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.54121539" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1096940598" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/frameworks/arduino/cores/arduino""/>
|
||||||
|
</option>
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1198905600" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.762536863" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1310559623" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.41298875" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/frameworks/arduino/cores/arduino""/>
|
||||||
|
</option>
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.884639970" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.549319812" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
</cconfiguration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<project id="arduino_pro5.null.189551033" name="arduino_pro5"/>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
<scannerConfigBuildInfo instanceId="0.910961921">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
|
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||||
|
<configuration configurationName="Default">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/arduino_pro5"/>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
</cproject>
|
27
examples/ide-eclipse/arduino_pro5/.project
Normal file
27
examples/ide-eclipse/arduino_pro5/.project
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>arduino_pro5</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
5
examples/ide-eclipse/arduino_pro5/Makefile
Normal file
5
examples/ide-eclipse/arduino_pro5/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all:
|
||||||
|
platformio run -t upload
|
||||||
|
|
||||||
|
clean:
|
||||||
|
platformio run -t clean
|
8
examples/ide-eclipse/arduino_pro5/platformio.ini
Normal file
8
examples/ide-eclipse/arduino_pro5/platformio.ini
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
|
# See LICENSE for details.
|
||||||
|
|
||||||
|
[env:arduino_pro5v]
|
||||||
|
platform = atmelavr
|
||||||
|
framework = arduino
|
||||||
|
board = pro16MHzatmega168
|
||||||
|
upload_port = /dev/tty.SLAB_USBtoUART
|
20
examples/ide-eclipse/arduino_pro5/src/main.c
Normal file
20
examples/ide-eclipse/arduino_pro5/src/main.c
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
|
* See LICENSE for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Arduino.h"
|
||||||
|
#define WLED 13 // Most Arduino boards already have an LED attached to pin 13 on the board itself
|
||||||
|
|
||||||
|
void setup()
|
||||||
|
{
|
||||||
|
pinMode(WLED, OUTPUT); // set pin as output
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop()
|
||||||
|
{
|
||||||
|
digitalWrite(WLED, HIGH); // set the LED on
|
||||||
|
delay(1000); // wait for a second
|
||||||
|
digitalWrite(WLED, LOW); // set the LED off
|
||||||
|
delay(1000); // wait for a second
|
||||||
|
}
|
75
examples/ide-eclipse/atmelavr_atmega168/.cproject
Normal file
75
examples/ide-eclipse/atmelavr_atmega168/.cproject
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?fileVersion 4.0.0?>
|
||||||
|
|
||||||
|
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
<cconfiguration id="0.1706826288">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1706826288" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1706826288" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||||
|
<folderInfo id="0.1706826288." name="/" resourcePath="">
|
||||||
|
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.944229927" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||||
|
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.944229927.1146791472" name=""/>
|
||||||
|
<builder id="org.eclipse.cdt.build.core.settings.default.builder.81097189" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.615700392" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.509191184" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1976688999" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||||
|
</option>
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1146079252" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1061741986" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.524184308" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1379816017" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||||
|
</option>
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1180078676" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.492516621" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.746817635" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.905883681" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/atmelavr/tools/toolchain/avr/include""/>
|
||||||
|
</option>
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.symbols.1589314232" name="Symbols" superClass="org.eclipse.cdt.build.core.settings.holder.symbols" valueType="definedSymbols">
|
||||||
|
<listOptionValue builtIn="false" value="__AVR_ATmega168__"/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.247974714" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
</cconfiguration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<project id="test.null.312168076" name="test"/>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
<scannerConfigBuildInfo instanceId="0.1706826288">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
|
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||||
|
<configuration configurationName="Default">
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/test"/>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||||
|
</cproject>
|
27
examples/ide-eclipse/atmelavr_atmega168/.project
Normal file
27
examples/ide-eclipse/atmelavr_atmega168/.project
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>atmelavr_atmega168</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
@ -0,0 +1,67 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.cdt.codan.checkers.errnoreturn=Warning
|
||||||
|
org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
|
||||||
|
org.eclipse.cdt.codan.checkers.errreturnvalue=Error
|
||||||
|
org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.checkers.noreturn=Error
|
||||||
|
org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},implicit\=>false}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},unknown\=>false,exceptions\=>()}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},skip\=>true}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>()}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},paramNot\=>false}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},else\=>false,afterelse\=>false}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},macro\=>true,exceptions\=>("@(\#)","$Id")}
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
|
||||||
|
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
|
5
examples/ide-eclipse/atmelavr_atmega168/Makefile
Normal file
5
examples/ide-eclipse/atmelavr_atmega168/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all:
|
||||||
|
platformio run -t upload
|
||||||
|
|
||||||
|
clean:
|
||||||
|
platformio run -t clean
|
12
examples/ide-eclipse/atmelavr_atmega168/platformio.ini
Normal file
12
examples/ide-eclipse/atmelavr_atmega168/platformio.ini
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
|
# See LICENSE for details.
|
||||||
|
|
||||||
|
[env:atmelavr_atmega168]
|
||||||
|
platform = atmelavr
|
||||||
|
board_mcu = atmega168
|
||||||
|
board_f_cpu = 16000000L
|
||||||
|
|
||||||
|
upload_port = /dev/tty.SLAB_USBtoUART
|
||||||
|
# upload_port = COM3
|
||||||
|
upload_protocol = arduino
|
||||||
|
upload_speed = 19200
|
23
examples/ide-eclipse/atmelavr_atmega168/src/main.c
Normal file
23
examples/ide-eclipse/atmelavr_atmega168/src/main.c
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
|
* See LICENSE for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
// make the LED pin an output for PORTB5
|
||||||
|
DDRB = 1 << 5;
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
_delay_ms(500);
|
||||||
|
|
||||||
|
// toggle the LED
|
||||||
|
PORTB ^= 1 << 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
61
examples/ide-eclipse/tilaunchpad_msp430g2/.cproject
Normal file
61
examples/ide-eclipse/tilaunchpad_msp430g2/.cproject
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?fileVersion 4.0.0?>
|
||||||
|
|
||||||
|
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
<cconfiguration id="0.1778616297">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1778616297" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.1778616297" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||||
|
<folderInfo id="0.1778616297." name="/" resourcePath="">
|
||||||
|
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.576447412" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||||
|
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.576447412.203226592" name=""/>
|
||||||
|
<builder id="org.eclipse.cdt.build.core.settings.default.builder.592280532" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.251286138" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1824859462" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.2021826184" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/timsp430/tools/toolchain/msp430/include""/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1509314343" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1251065831" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1876118829" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/timsp430/tools/toolchain/msp430/include""/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.518683230" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.847615484" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1922525168" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/timsp430/tools/toolchain/msp430/include""/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.68822385" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
</cconfiguration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<project id="tilaunchpad_msp430g2.null.26341321" name="tilaunchpad_msp430g2"/>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
<scannerConfigBuildInfo instanceId="0.1778616297">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
|
<storageModule moduleId="refreshScope"/>
|
||||||
|
</cproject>
|
27
examples/ide-eclipse/tilaunchpad_msp430g2/.project
Normal file
27
examples/ide-eclipse/tilaunchpad_msp430g2/.project
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>tilaunchpad_msp430g2</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
5
examples/ide-eclipse/tilaunchpad_msp430g2/Makefile
Normal file
5
examples/ide-eclipse/tilaunchpad_msp430g2/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all:
|
||||||
|
platformio run -t upload
|
||||||
|
|
||||||
|
clean:
|
||||||
|
platformio run -t clean
|
9
examples/ide-eclipse/tilaunchpad_msp430g2/platformio.ini
Normal file
9
examples/ide-eclipse/tilaunchpad_msp430g2/platformio.ini
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
|
# See LICENSE for details.
|
||||||
|
|
||||||
|
[env:launchpad_msp430g2]
|
||||||
|
platform = timsp430
|
||||||
|
board_mcu = msp430g2553
|
||||||
|
board_f_cpu = 16000000L
|
||||||
|
|
||||||
|
upload_protocol = rf2500
|
26
examples/ide-eclipse/tilaunchpad_msp430g2/src/main.c
Normal file
26
examples/ide-eclipse/tilaunchpad_msp430g2/src/main.c
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
|
* See LICENSE for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <msp430g2553.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
WDTCTL = WDTPW + WDTHOLD;
|
||||||
|
|
||||||
|
// make the LED pin an output for P1.0
|
||||||
|
P1DIR |= 0x01;
|
||||||
|
|
||||||
|
volatile int i;
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
for (i = 0; i < 10000; i++);
|
||||||
|
|
||||||
|
// toggle the LED
|
||||||
|
P1OUT ^= 0x01;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
64
examples/ide-eclipse/titiva_lm4f120/.cproject
Normal file
64
examples/ide-eclipse/titiva_lm4f120/.cproject
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?fileVersion 4.0.0?>
|
||||||
|
|
||||||
|
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
<cconfiguration id="0.18931736">
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.18931736" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
||||||
|
<externalSettings/>
|
||||||
|
<extensions>
|
||||||
|
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
</extensions>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<configuration artifactName="${ProjName}" buildProperties="" description="" id="0.18931736" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
|
||||||
|
<folderInfo id="0.18931736." name="/" resourcePath="">
|
||||||
|
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.946409409" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
|
||||||
|
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.946409409.264614082" name=""/>
|
||||||
|
<builder id="org.eclipse.cdt.build.core.settings.default.builder.2099118713" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1860044306" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.490604788" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1186638432" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/frameworks/energia/cores/lm4f""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/tools/toolchain/arm-none-eabi/include""/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1338936035" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.1620533967" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1007143336" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/frameworks/energia/cores/lm4f""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/tools/toolchain/arm-none-eabi/include""/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2051673558" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
<tool id="org.eclipse.cdt.build.core.settings.holder.549164281" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
|
||||||
|
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.454536693" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/frameworks/energia/cores/lm4f""/>
|
||||||
|
<listOptionValue builtIn="false" value=""${HOME}/.platformio/titiva/tools/toolchain/arm-none-eabi/include""/>
|
||||||
|
</option>
|
||||||
|
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1468046922" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
|
||||||
|
</tool>
|
||||||
|
</toolChain>
|
||||||
|
</folderInfo>
|
||||||
|
</configuration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
</cconfiguration>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
<project id="titiva_lm4f120h5qr.null.1743670775" name="titiva_lm4f120h5qr"/>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
<scannerConfigBuildInfo instanceId="0.18931736">
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
</storageModule>
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
|
<storageModule moduleId="refreshScope"/>
|
||||||
|
</cproject>
|
27
examples/ide-eclipse/titiva_lm4f120/.project
Normal file
27
examples/ide-eclipse/titiva_lm4f120/.project
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>titiva_lm4f120</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
5
examples/ide-eclipse/titiva_lm4f120/Makefile
Normal file
5
examples/ide-eclipse/titiva_lm4f120/Makefile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
all:
|
||||||
|
platformio run -t upload
|
||||||
|
|
||||||
|
clean:
|
||||||
|
platformio run -t clean
|
8
examples/ide-eclipse/titiva_lm4f120/platformio.ini
Normal file
8
examples/ide-eclipse/titiva_lm4f120/platformio.ini
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
|
# See LICENSE for details.
|
||||||
|
|
||||||
|
[env:launchpad_lm4f120]
|
||||||
|
platform = titiva
|
||||||
|
framework = energia
|
||||||
|
board = lplm4f120h5qr
|
||||||
|
targets = upload
|
42
examples/ide-eclipse/titiva_lm4f120/src/main.c
Normal file
42
examples/ide-eclipse/titiva_lm4f120/src/main.c
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
|
* See LICENSE for details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define false 0
|
||||||
|
#define true 1
|
||||||
|
typedef int bool;
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include "inc/hw_memmap.h"
|
||||||
|
#include "driverlib/gpio.h"
|
||||||
|
#include "driverlib/sysctl.h"
|
||||||
|
|
||||||
|
#define LED_RED GPIO_PIN_1
|
||||||
|
#define LED_BLUE GPIO_PIN_2
|
||||||
|
#define LED_GREEN GPIO_PIN_3
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
SysCtlClockSet(
|
||||||
|
SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN);
|
||||||
|
|
||||||
|
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
|
||||||
|
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN);
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_RED);
|
||||||
|
SysCtlDelay(3000000);
|
||||||
|
GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_BLUE);
|
||||||
|
SysCtlDelay(3000000);
|
||||||
|
GPIOPinWrite(GPIO_PORTF_BASE, LED_RED|LED_BLUE|LED_GREEN, LED_GREEN);
|
||||||
|
SysCtlDelay(3000000);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// hook for Energia main.cpp where these methods are defined
|
||||||
|
void setup() {}
|
||||||
|
void loop() {}
|
BIN
examples/platformio-examples.png
Normal file
BIN
examples/platformio-examples.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 258 KiB |
@ -12,13 +12,9 @@ Wiring Framework (Arduino + Energia) Blink Example
|
|||||||
$ cd platformio-develop/examples/wiring-blink/
|
$ cd platformio-develop/examples/wiring-blink/
|
||||||
|
|
||||||
# Install Atmel AVR development platform with Arduino Framework
|
# Install Atmel AVR development platform with Arduino Framework
|
||||||
$ platformio install atmelavr --with-package=framework-arduinoavr
|
|
||||||
|
|
||||||
# Install TI MSP430 development platform with Energia Framework
|
# Install TI MSP430 development platform with Energia Framework
|
||||||
$ platformio install timsp430 --with-package=framework-energiamsp430
|
|
||||||
|
|
||||||
# Install TI TIVA development platform with Energia Framework
|
# Install TI TIVA development platform with Energia Framework
|
||||||
$ platformio install titiva --with-package=framework-energiativa
|
$ platformio install atmelavr timsp430 titiva
|
||||||
|
|
||||||
# Process example project
|
# Process example project
|
||||||
$ platformio run
|
$ platformio run
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 4.0 MiB |
@ -16,3 +16,4 @@ board = lpmsp430g2553
|
|||||||
platform = titiva
|
platform = titiva
|
||||||
framework = energia
|
framework = energia
|
||||||
board = lplm4f120h5qr
|
board = lplm4f120h5qr
|
||||||
|
build_flags = "-DLED_PIN=GREEN_LED"
|
||||||
|
@ -8,27 +8,22 @@
|
|||||||
with intervals of 1 second (1000 milliseconds)
|
with intervals of 1 second (1000 milliseconds)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef ENERGIA
|
|
||||||
|
|
||||||
#include "Energia.h"
|
|
||||||
#define WLED RED_LED
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
#define WLED 13 // Most Arduino boards already have an LED attached to pin 13 on the board itself
|
|
||||||
|
|
||||||
|
#ifndef LED_PIN
|
||||||
|
#define LED_PIN 13 // Most Arduino boards already have an LED attached to pin 13 on the board itself
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
pinMode(WLED, OUTPUT); // set pin as output
|
pinMode(LED_PIN, OUTPUT); // set pin as output
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
digitalWrite(WLED, HIGH); // set the LED on
|
digitalWrite(LED_PIN, HIGH); // set the LED on
|
||||||
delay(1000); // wait for a second
|
delay(1000); // wait for a second
|
||||||
digitalWrite(WLED, LOW); // set the LED off
|
digitalWrite(LED_PIN, LOW); // set the LED off
|
||||||
delay(1000); // wait for a second
|
delay(1000); // wait for a second
|
||||||
}
|
}
|
||||||
|
@ -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 = (0, 2, 0)
|
VERSION = (0, 3, 0)
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -35,7 +35,7 @@ class PlatformioCLI(MultiCommand):
|
|||||||
|
|
||||||
|
|
||||||
@command(cls=PlatformioCLI)
|
@command(cls=PlatformioCLI)
|
||||||
@version_option(__version__)
|
@version_option(__version__, "platformio")
|
||||||
def cli():
|
def cli():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ commonvars.AddVariables(
|
|||||||
("PIOENV",),
|
("PIOENV",),
|
||||||
("PLATFORM",),
|
("PLATFORM",),
|
||||||
("FRAMEWORK",),
|
("FRAMEWORK",),
|
||||||
|
("BUILD_FLAGS",),
|
||||||
|
|
||||||
# board options
|
# board options
|
||||||
("BOARD",),
|
("BOARD",),
|
||||||
|
@ -26,9 +26,9 @@ env.Replace(
|
|||||||
ASFLAGS=[
|
ASFLAGS=[
|
||||||
"-g", # include debugging info (so errors include line numbers)
|
"-g", # include debugging info (so errors include line numbers)
|
||||||
"-x", "assembler-with-cpp",
|
"-x", "assembler-with-cpp",
|
||||||
"-mmcu=$BOARD_MCU",
|
"-mmcu=$BOARD_MCU"
|
||||||
"-DF_CPU=$BOARD_F_CPU"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
CCFLAGS=[
|
CCFLAGS=[
|
||||||
"-g", # include debugging info (so errors include line numbers)
|
"-g", # include debugging info (so errors include line numbers)
|
||||||
"-Os", # optimize for size
|
"-Os", # optimize for size
|
||||||
@ -36,11 +36,15 @@ env.Replace(
|
|||||||
"-ffunction-sections", # place each function in its own section
|
"-ffunction-sections", # place each function in its own section
|
||||||
"-fdata-sections",
|
"-fdata-sections",
|
||||||
"-MMD", # output dependancy info
|
"-MMD", # output dependancy info
|
||||||
"-mmcu=$BOARD_MCU",
|
"-mmcu=$BOARD_MCU"
|
||||||
"-DF_CPU=$BOARD_F_CPU"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
CXXFLAGS=["-fno-exceptions"],
|
CXXFLAGS=["-fno-exceptions"],
|
||||||
|
|
||||||
|
CPPDEFINES=[
|
||||||
|
"F_CPU=$BOARD_F_CPU"
|
||||||
|
],
|
||||||
|
|
||||||
LINKFLAGS=[
|
LINKFLAGS=[
|
||||||
"-Os",
|
"-Os",
|
||||||
"-Wl,--gc-sections",
|
"-Wl,--gc-sections",
|
||||||
@ -62,6 +66,9 @@ env.Replace(
|
|||||||
UPLOADEEPCMD="$UPLOADER $UPLOADERFLAGS -U eeprom:w:$SOURCES:i"
|
UPLOADEEPCMD="$UPLOADER $UPLOADERFLAGS -U eeprom:w:$SOURCES:i"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "BUILD_FLAGS" in env:
|
||||||
|
env.MergeFlags(env['BUILD_FLAGS'])
|
||||||
|
|
||||||
env.Append(
|
env.Append(
|
||||||
BUILDERS=dict(
|
BUILDERS=dict(
|
||||||
ElfToEep=Builder(
|
ElfToEep=Builder(
|
||||||
|
@ -19,18 +19,14 @@ BOARD_OPTIONS = env.ParseBoardOptions(
|
|||||||
ARDUINO_VERSION = int(
|
ARDUINO_VERSION = int(
|
||||||
open(join(env.subst("$PLATFORMFW_DIR"),
|
open(join(env.subst("$PLATFORMFW_DIR"),
|
||||||
"version.txt")).read().replace(".", "").strip())
|
"version.txt")).read().replace(".", "").strip())
|
||||||
ARDUINO_FLAGS = [
|
|
||||||
"-DARDUINO=%d" % ARDUINO_VERSION,
|
|
||||||
"-DARDUINO_%s" % BOARD_OPTIONS['build.board']
|
|
||||||
]
|
|
||||||
|
|
||||||
# usb flags
|
# usb flags
|
||||||
|
ARDUINO_USBDEFINES = []
|
||||||
if "build.usb_product" in BOARD_OPTIONS:
|
if "build.usb_product" in BOARD_OPTIONS:
|
||||||
ARDUINO_FLAGS += [
|
ARDUINO_USBDEFINES = [
|
||||||
"-DUSB_VID=%s" % BOARD_OPTIONS['build.vid'],
|
"USB_VID=%s" % BOARD_OPTIONS['build.vid'],
|
||||||
"-DUSB_PID=%s" % BOARD_OPTIONS['build.pid'],
|
"USB_PID=%s" % BOARD_OPTIONS['build.pid'],
|
||||||
"-DUSB_PRODUCT=%s" % BOARD_OPTIONS['build.usb_product'].replace(
|
"USB_PRODUCT=%s" % BOARD_OPTIONS['build.usb_product'].replace('"', "")
|
||||||
'"', "")
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# include board variant
|
# include board variant
|
||||||
@ -40,8 +36,10 @@ env.VariantDir(
|
|||||||
)
|
)
|
||||||
|
|
||||||
env.Append(
|
env.Append(
|
||||||
ASFLAGS=ARDUINO_FLAGS,
|
CPPDEFINES=[
|
||||||
CCFLAGS=ARDUINO_FLAGS,
|
"ARDUINO=%d" % ARDUINO_VERSION,
|
||||||
|
"ARDUINO_%s" % BOARD_OPTIONS['build.board']
|
||||||
|
] + ARDUINO_USBDEFINES,
|
||||||
CPPPATH=[
|
CPPPATH=[
|
||||||
join("$BUILD_DIR", "core"),
|
join("$BUILD_DIR", "core"),
|
||||||
join("$BUILD_DIR", "variant")
|
join("$BUILD_DIR", "variant")
|
||||||
|
@ -19,10 +19,6 @@ BOARD_OPTIONS = env.ParseBoardOptions(
|
|||||||
ENERGIA_VERSION = int(
|
ENERGIA_VERSION = int(
|
||||||
open(join(env.subst("$PLATFORMFW_DIR"),
|
open(join(env.subst("$PLATFORMFW_DIR"),
|
||||||
"version.txt")).read().replace(".", "").strip())
|
"version.txt")).read().replace(".", "").strip())
|
||||||
ENERGIA_FLAGS = [
|
|
||||||
"-DARDUINO=101",
|
|
||||||
"-DENERGIA=%d" % ENERGIA_VERSION
|
|
||||||
]
|
|
||||||
|
|
||||||
# include board variant
|
# include board variant
|
||||||
env.VariantDir(
|
env.VariantDir(
|
||||||
@ -31,8 +27,10 @@ env.VariantDir(
|
|||||||
)
|
)
|
||||||
|
|
||||||
env.Append(
|
env.Append(
|
||||||
ASFLAGS=ENERGIA_FLAGS,
|
CPPDEFINES=[
|
||||||
CCFLAGS=ENERGIA_FLAGS,
|
"ARDUINO=101",
|
||||||
|
"ENERGIA=%d" % ENERGIA_VERSION
|
||||||
|
],
|
||||||
CPPPATH=[
|
CPPPATH=[
|
||||||
join("$BUILD_DIR", "core"),
|
join("$BUILD_DIR", "core"),
|
||||||
join("$BUILD_DIR", "variant")
|
join("$BUILD_DIR", "variant")
|
||||||
|
@ -28,9 +28,9 @@ env.Replace(
|
|||||||
ASFLAGS=[
|
ASFLAGS=[
|
||||||
"-g", # include debugging info (so errors include line numbers)
|
"-g", # include debugging info (so errors include line numbers)
|
||||||
"-x", "-assembler-with-cpp",
|
"-x", "-assembler-with-cpp",
|
||||||
"-mmcu=$BOARD_MCU",
|
"-mmcu=$BOARD_MCU"
|
||||||
"-DF_CPU=$BOARD_F_CPU"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
CCFLAGS=[
|
CCFLAGS=[
|
||||||
"-g", # include debugging info (so errors include line numbers)
|
"-g", # include debugging info (so errors include line numbers)
|
||||||
"-Os", # optimize for size
|
"-Os", # optimize for size
|
||||||
@ -38,8 +38,11 @@ env.Replace(
|
|||||||
"-ffunction-sections", # place each function in its own section
|
"-ffunction-sections", # place each function in its own section
|
||||||
"-fdata-sections",
|
"-fdata-sections",
|
||||||
"-MMD", # output dependancy info
|
"-MMD", # output dependancy info
|
||||||
"-mmcu=$BOARD_MCU",
|
"-mmcu=$BOARD_MCU"
|
||||||
"-DF_CPU=$BOARD_F_CPU"
|
],
|
||||||
|
|
||||||
|
CPPDEFINES=[
|
||||||
|
"F_CPU=$BOARD_F_CPU"
|
||||||
],
|
],
|
||||||
|
|
||||||
LINK="$CC",
|
LINK="$CC",
|
||||||
@ -57,6 +60,9 @@ env.Replace(
|
|||||||
UPLOADCMD='$UPLOADER $UPLOADERFLAGS "prog $SOURCES"'
|
UPLOADCMD='$UPLOADER $UPLOADERFLAGS "prog $SOURCES"'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "BUILD_FLAGS" in env:
|
||||||
|
env.MergeFlags(env['BUILD_FLAGS'])
|
||||||
|
|
||||||
env.Append(
|
env.Append(
|
||||||
BUILDERS=dict(
|
BUILDERS=dict(
|
||||||
ElfToHex=Builder(
|
ElfToHex=Builder(
|
||||||
|
@ -31,8 +31,7 @@ env.Replace(
|
|||||||
"-mcpu=cortex-m4",
|
"-mcpu=cortex-m4",
|
||||||
"-mfloat-abi=hard",
|
"-mfloat-abi=hard",
|
||||||
"-mfpu=fpv4-sp-d16",
|
"-mfpu=fpv4-sp-d16",
|
||||||
"-fsingle-precision-constant",
|
"-fsingle-precision-constant"
|
||||||
"-DF_CPU=$BOARD_F_CPU"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
CCFLAGS=[
|
CCFLAGS=[
|
||||||
@ -47,8 +46,7 @@ env.Replace(
|
|||||||
"-mfloat-abi=hard",
|
"-mfloat-abi=hard",
|
||||||
"-mfpu=fpv4-sp-d16",
|
"-mfpu=fpv4-sp-d16",
|
||||||
"-fsingle-precision-constant",
|
"-fsingle-precision-constant",
|
||||||
"-MMD", # output dependancy info
|
"-MMD" # output dependancy info
|
||||||
"-DF_CPU=$BOARD_F_CPU"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
CXXFLAGS=[
|
CXXFLAGS=[
|
||||||
@ -56,6 +54,10 @@ env.Replace(
|
|||||||
"-fno-exceptions"
|
"-fno-exceptions"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
CPPDEFINES=[
|
||||||
|
"F_CPU=$BOARD_F_CPU"
|
||||||
|
],
|
||||||
|
|
||||||
LINKFLAGS=[
|
LINKFLAGS=[
|
||||||
"-Os",
|
"-Os",
|
||||||
"-nostartfiles",
|
"-nostartfiles",
|
||||||
@ -73,6 +75,9 @@ env.Replace(
|
|||||||
UPLOADCMD="$UPLOADER $SOURCES"
|
UPLOADCMD="$UPLOADER $SOURCES"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "BUILD_FLAGS" in env:
|
||||||
|
env.MergeFlags(env['BUILD_FLAGS'])
|
||||||
|
|
||||||
env.Append(
|
env.Append(
|
||||||
BUILDERS=dict(
|
BUILDERS=dict(
|
||||||
ElfToBin=Builder(
|
ElfToBin=Builder(
|
||||||
|
@ -7,13 +7,15 @@ from platformio.platforms._base import PlatformFactory
|
|||||||
|
|
||||||
|
|
||||||
@command("install", short_help="Install new platforms")
|
@command("install", short_help="Install new platforms")
|
||||||
@argument("platform")
|
@argument("platforms", nargs=-1)
|
||||||
@option('--with-package', multiple=True, metavar="<package>")
|
@option('--with-package', multiple=True, metavar="<package>")
|
||||||
@option('--without-package', multiple=True, metavar="<package>")
|
@option('--without-package', multiple=True, metavar="<package>")
|
||||||
def cli(platform, with_package, without_package):
|
def cli(platforms, with_package, without_package):
|
||||||
|
|
||||||
p = PlatformFactory().newPlatform(platform)
|
for platform in platforms:
|
||||||
|
|
||||||
if p.install(with_package, without_package):
|
p = PlatformFactory().newPlatform(platform)
|
||||||
secho("The platform '%s' has been successfully installed!" % platform,
|
|
||||||
fg="green")
|
if p.install(with_package, without_package):
|
||||||
|
secho("The platform '%s' has been successfully installed!" %
|
||||||
|
platform, fg="green")
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from click import command, echo, option, secho, style
|
from click import command, echo, option, secho, style
|
||||||
|
|
||||||
from platformio.exception import ProjecEnvsNotAvaialable, UndefinedEnvPlatform
|
from platformio.exception import ProjectEnvsNotAvaialable, UndefinedEnvPlatform
|
||||||
from platformio.platforms._base import PlatformFactory
|
from platformio.platforms._base import PlatformFactory
|
||||||
from platformio.util import get_project_config
|
from platformio.util import get_project_config
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ def cli(environment, target):
|
|||||||
config = get_project_config()
|
config = get_project_config()
|
||||||
|
|
||||||
if not config.sections():
|
if not config.sections():
|
||||||
raise ProjecEnvsNotAvaialable()
|
raise ProjectEnvsNotAvaialable()
|
||||||
|
|
||||||
for section in config.sections():
|
for section in config.sections():
|
||||||
if section[:4] != "env:":
|
if section[:4] != "env:":
|
||||||
|
@ -9,13 +9,15 @@ from platformio.platforms._base import PlatformFactory
|
|||||||
|
|
||||||
|
|
||||||
@command("uninstall", short_help="Uninstall the platforms")
|
@command("uninstall", short_help="Uninstall the platforms")
|
||||||
@argument("platform")
|
@argument("platforms", nargs=-1)
|
||||||
def cli(platform):
|
def cli(platforms):
|
||||||
|
|
||||||
if platform not in PackageManager.get_installed():
|
for platform in platforms:
|
||||||
raise PlatformNotInstalledYet(platform)
|
|
||||||
|
|
||||||
p = PlatformFactory().newPlatform(platform)
|
if platform not in PackageManager.get_installed():
|
||||||
if p.uninstall():
|
raise PlatformNotInstalledYet(platform)
|
||||||
secho("The platform '%s' has been successfully "
|
|
||||||
"uninstalled!" % platform, fg="green")
|
p = PlatformFactory().newPlatform(platform)
|
||||||
|
if p.uninstall():
|
||||||
|
secho("The platform '%s' has been successfully "
|
||||||
|
"uninstalled!" % platform, fg="green")
|
||||||
|
@ -63,7 +63,7 @@ class FDSHASumMismatch(PlatformioException):
|
|||||||
|
|
||||||
class NotPlatformProject(PlatformioException):
|
class NotPlatformProject(PlatformioException):
|
||||||
|
|
||||||
MESSAGE = "Not a platformio project. Use `platformio init` command"
|
MESSAGE = "Not a PlatformIO project. Use `platformio init` command"
|
||||||
|
|
||||||
|
|
||||||
class UndefinedEnvPlatform(PlatformioException):
|
class UndefinedEnvPlatform(PlatformioException):
|
||||||
@ -82,6 +82,6 @@ class ProjectInitialized(PlatformioException):
|
|||||||
"Process it with `platformio run` command")
|
"Process it with `platformio run` command")
|
||||||
|
|
||||||
|
|
||||||
class ProjecEnvsNotAvaialable(PlatformioException):
|
class ProjectEnvsNotAvaialable(PlatformioException):
|
||||||
|
|
||||||
MESSAGE = "Please setup environments in `platformio.ini` file."
|
MESSAGE = "Please setup environments in `platformio.ini` file."
|
||||||
|
@ -11,6 +11,11 @@
|
|||||||
#[env:mybaseenv]
|
#[env:mybaseenv]
|
||||||
#platform = %INSTALLED_PLATFORM_NAME_HERE%
|
#platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||||
|
|
||||||
|
# Environment with specific build flags
|
||||||
|
#[env:specbuildflags]
|
||||||
|
#platform = %INSTALLED_PLATFORM_NAME_HERE%
|
||||||
|
#build_flags = "-I/opt/include -L/opt/lib -lfoo -DMYDEFINE=13"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Atmel AVR based board
|
# Atmel AVR based board
|
||||||
#
|
#
|
||||||
|
120
scripts/get-platformio.py
Normal file
120
scripts/get-platformio.py
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
|
# See LICENSE for details.
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
from subprocess import check_output
|
||||||
|
from tempfile import NamedTemporaryFile
|
||||||
|
|
||||||
|
|
||||||
|
CURINTERPRETER_PATH = os.path.normpath(sys.executable)
|
||||||
|
IS_WINDOWS = sys.platform.startswith("win")
|
||||||
|
|
||||||
|
|
||||||
|
def fix_winpython_pathenv():
|
||||||
|
"""
|
||||||
|
Add Python & Python Scripts to the search path on Windows
|
||||||
|
"""
|
||||||
|
import ctypes
|
||||||
|
from ctypes.wintypes import HWND, UINT, WPARAM, LPARAM, LPVOID
|
||||||
|
try:
|
||||||
|
import _winreg as winreg
|
||||||
|
except ImportError:
|
||||||
|
import winreg
|
||||||
|
|
||||||
|
# took these lines from the native "win_add2path.py"
|
||||||
|
pythonpath = os.path.dirname(CURINTERPRETER_PATH)
|
||||||
|
scripts = os.path.join(pythonpath, "Scripts")
|
||||||
|
|
||||||
|
with winreg.CreateKey(winreg.HKEY_CURRENT_USER, u"Environment") as key:
|
||||||
|
try:
|
||||||
|
envpath = winreg.QueryValueEx(key, u"PATH")[0]
|
||||||
|
except WindowsError:
|
||||||
|
envpath = u"%PATH%"
|
||||||
|
|
||||||
|
paths = [envpath]
|
||||||
|
for path in (pythonpath, scripts):
|
||||||
|
if path and path not in envpath and os.path.isdir(path):
|
||||||
|
paths.append(path)
|
||||||
|
|
||||||
|
envpath = os.pathsep.join(paths)
|
||||||
|
winreg.SetValueEx(key, u"PATH", 0, winreg.REG_EXPAND_SZ, envpath)
|
||||||
|
winreg.ExpandEnvironmentStrings(envpath)
|
||||||
|
|
||||||
|
# notify the system about the changes
|
||||||
|
SendMessage = ctypes.windll.user32.SendMessageW
|
||||||
|
SendMessage.argtypes = HWND, UINT, WPARAM, LPVOID
|
||||||
|
SendMessage.restype = LPARAM
|
||||||
|
SendMessage(0xFFFF, 0x1A, 0, u"Environment")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def exec_python_cmd(args):
|
||||||
|
return check_output([CURINTERPRETER_PATH] + args, shell=IS_WINDOWS).strip()
|
||||||
|
|
||||||
|
|
||||||
|
def install_pip():
|
||||||
|
try:
|
||||||
|
from urllib2 import urlopen
|
||||||
|
except ImportError:
|
||||||
|
from urllib.request import urlopen
|
||||||
|
|
||||||
|
f = NamedTemporaryFile(delete=False)
|
||||||
|
response = urlopen("https://bootstrap.pypa.io/get-pip.py")
|
||||||
|
f.write(response.read())
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
try:
|
||||||
|
print (exec_python_cmd([f.name]))
|
||||||
|
finally:
|
||||||
|
os.unlink(f.name)
|
||||||
|
|
||||||
|
|
||||||
|
def install_pypi_packages(packages):
|
||||||
|
for p in packages:
|
||||||
|
print (exec_python_cmd(["-m", "pip", "install", "-U"] + p.split()))
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
steps = [
|
||||||
|
("Fixing Windows %PATH% Environment", fix_winpython_pathenv, []),
|
||||||
|
("Installing Python Package Manager", install_pip, []),
|
||||||
|
("Installing PlatformIO and dependencies", install_pypi_packages,
|
||||||
|
(["platformio", "--egg scons"],)),
|
||||||
|
]
|
||||||
|
|
||||||
|
if not IS_WINDOWS:
|
||||||
|
del steps[0]
|
||||||
|
|
||||||
|
is_error = False
|
||||||
|
for s in steps:
|
||||||
|
print ("\n==> %s ..." % s[0])
|
||||||
|
try:
|
||||||
|
s[1](*s[2])
|
||||||
|
print ("[SUCCESS]")
|
||||||
|
except Exception, e:
|
||||||
|
is_error = True
|
||||||
|
print (e)
|
||||||
|
print ("[FAILURE]")
|
||||||
|
|
||||||
|
if is_error:
|
||||||
|
print ("The installation process has been FAILED!\n"
|
||||||
|
"Please report about this problem here\n"
|
||||||
|
"< https://github.com/ivankravets/platformio/issues >")
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
print ("\n ==> Installation process has been "
|
||||||
|
"successfully FINISHED! <==\n")
|
||||||
|
|
||||||
|
try:
|
||||||
|
print (check_output("platformio", shell=IS_WINDOWS))
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
print (exec_python_cmd(["-m", "platformio"]))
|
||||||
|
finally:
|
||||||
|
print ("\n Please RESTART your Terminal Application and run "
|
||||||
|
"`platformio --help` command.")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
5
setup.py
5
setup.py
@ -1,6 +1,8 @@
|
|||||||
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
# Copyright (C) Ivan Kravets <me@ikravets.com>
|
||||||
# See LICENSE for details.
|
# See LICENSE for details.
|
||||||
|
|
||||||
|
from sys import platform as sysplatform
|
||||||
|
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
from platformio import (__author__, __description__, __email__, __license__,
|
from platformio import (__author__, __description__, __email__, __license__,
|
||||||
@ -17,11 +19,10 @@ setup(
|
|||||||
license=__license__,
|
license=__license__,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"click",
|
"click",
|
||||||
"colorama",
|
|
||||||
"pyserial",
|
"pyserial",
|
||||||
"requests",
|
"requests",
|
||||||
# "SCons"
|
# "SCons"
|
||||||
],
|
] + (["colorama"] if sysplatform.startswith("win") else []),
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
package_data={"platformio": ["*.ini"]},
|
package_data={"platformio": ["*.ini"]},
|
||||||
entry_points={
|
entry_points={
|
||||||
|
Reference in New Issue
Block a user