diff --git a/.gitignore b/.gitignore index f3fa86a2..b2891149 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,5 @@ .pioenvs .tox .sconsign.dblite -examples/ide-eclipse/.metadata -examples/ide-eclipse/RemoteSystemsTempFiles docs/_build dist diff --git a/HISTORY.rst b/HISTORY.rst index 0bcb7c4d..ddfe695d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -465,9 +465,9 @@ PlatformIO 0.0 * Fixed "*OSError: [Errno 2] No such file or directory*" within `platformio run `__ command when PlatformIO isn't installed properly -* Fixed example for `Eclipse IDE with Tiva board `_ +* Fixed example for `Eclipse IDE with Tiva board `_ (`issue #32 `_) -* Upgraded `Eclipse Project Examples `_ +* Upgraded `Eclipse Project Examples `_ to latest *Luna* and *PlatformIO* releases 0.9.0 (2014-12-01) diff --git a/docs/ide/arduino.rst b/docs/ide/arduino.rst index 7cd3b3a5..894cb461 100644 --- a/docs/ide/arduino.rst +++ b/docs/ide/arduino.rst @@ -23,7 +23,6 @@ Integration More detailed information is located in PlatformIO blog: `Integration of PlatformIO library manager to Arduino IDE `_. - Screenshot ---------- diff --git a/docs/ide/clion.rst b/docs/ide/clion.rst index 2ec8d709..f02001f2 100644 --- a/docs/ide/clion.rst +++ b/docs/ide/clion.rst @@ -55,3 +55,11 @@ Screenshot .. image:: ../_static/ide-platformio-clion.png :target: http://docs.platformio.org/en/latest/_static/ide-platformio-clion.png + +Examples +-------- + +"Blink" Project +^^^^^^^^^^^^^^^ + +Source code of `CLion "Blink" Project `_. diff --git a/docs/ide/eclipse.rst b/docs/ide/eclipse.rst index 4a51b6af..63f18c1e 100644 --- a/docs/ide/eclipse.rst +++ b/docs/ide/eclipse.rst @@ -47,10 +47,16 @@ Manual Integration * `Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO `_ * `Improvised MBED FRDM-K64F Eclipse/PlatformIO Setup and Software Installation `_ -`More examples (TI MSP430, TI TIVA, etc.) `_ - Screenshot ---------- .. image:: ../_static/ide-platformio-eclipse.png :target: http://www.ikravets.com/computer-life/programming/2014/06/20/building-and-debugging-atmel-avr-arduino-based-project-using-eclipse-ideplatformio + +Examples +-------- + +"Blink" Project +^^^^^^^^^^^^^^^ + +Source code of `Eclipse "Blink" Project `_. diff --git a/docs/ide/qtcreator.rst b/docs/ide/qtcreator.rst index 2708b1b5..772c6ac9 100644 --- a/docs/ide/qtcreator.rst +++ b/docs/ide/qtcreator.rst @@ -37,7 +37,9 @@ Since PlatformIO 2.0 you can generate Qt Creator compatible project using Then import this project via ``File > New File or Project > Import Project`` and specify root directory where is located :ref:`projectconf`. -After import, we need to delete default build and clean steps and configure project with PlatformIO source code builder (click on Projects label on left menu or ``Ctrl+5`` shortcut): +After import need to delete default "build" & "clean" steps and configure +project with PlatformIO source code builder (click on Projects label on left +menu or ``Ctrl+5`` shortcut): .. image:: ../_static/ide-platformio-qtcreator-3.png :target: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-3.png @@ -134,12 +136,21 @@ Edit the content to match the code described below. framework = arduino board = uno - Conclusion ----------- +~~~~~~~~~~ -Taking everything into account, we can build project with shortcut ``Ctrl+Shift+B`` or using ``Menu: Build > Build All``: +Taking everything into account, we can build project with shortcut ``Ctrl+Shift+B`` or using ``Menu: Build > Build All``. + +Screenshot +---------- .. image:: ../_static/ide-platformio-qtcreator-7.png :target: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-7.png +Examples +-------- + +"Blink" Project +^^^^^^^^^^^^^^^ + +Source code of `Qt Creator "Blink" Project `_. diff --git a/docs/ide/sublimetext.rst b/docs/ide/sublimetext.rst index 4eab4fa6..c3cd928c 100644 --- a/docs/ide/sublimetext.rst +++ b/docs/ide/sublimetext.rst @@ -144,8 +144,19 @@ Copy the source code which is described below to it. board = uno Conclusion ----------- +~~~~~~~~~~ Taking everything into account, we can open project directory in Sublime Text using ``Menu: File > Open Folder`` and build it with shortcut ``Ctrl+B`` (Windows/Linux) or ``Cmd+B`` (Mac), clean project with shortcut ``F11`` and upload firmware to target with shortcut ``F12``. +Screenshot +---------- + .. image:: ../_static/ide-sublime-text-platformio-newproject-5.png + +Examples +-------- + +"Blink" Project +^^^^^^^^^^^^^^^ + +Source code of `Sublime Text "Blink" Project `_. diff --git a/docs/ide/visualstudio.rst b/docs/ide/visualstudio.rst index 5780839d..4659e548 100644 --- a/docs/ide/visualstudio.rst +++ b/docs/ide/visualstudio.rst @@ -123,9 +123,20 @@ Copy the source code which is described below to it. Conclusion ----------- +~~~~~~~~~~ -Taking everything into account, we can build project with shortcut ``Ctrl+Shift+B`` or using ``Menu: Build > Build Solution``: +Taking everything into account, we can build project with shortcut ``Ctrl+Shift+B`` or using ``Menu: Build > Build Solution``. + +Screenshot +---------- .. image:: ../_static/ide-vs-platformio-newproject-8.png :target: http://docs.platformio.org/en/latest/_static/ide-vs-platformio-newproject-8.png + +Examples +-------- + +"Blink" Project +^^^^^^^^^^^^^^^ + +Source code of `Visual Studio "Blink" Project `_. diff --git a/examples/ide-eclipse/README.rst b/examples/ide-eclipse/README.rst deleted file mode 100644 index c29734d7..00000000 --- a/examples/ide-eclipse/README.rst +++ /dev/null @@ -1,14 +0,0 @@ -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 `_. - - -.. image:: http://www.ikravets.com/wp-content/uploads/2014/06/eclipse_platformio_build_arduino_uno.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 diff --git a/examples/ide-eclipse/arduino_pro5/src/main.c b/examples/ide-eclipse/arduino_pro5/src/main.c deleted file mode 100644 index 07fc3605..00000000 --- a/examples/ide-eclipse/arduino_pro5/src/main.c +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (C) Ivan Kravets - * 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 -} diff --git a/examples/ide-eclipse/atmelavr_atmega168/.cproject b/examples/ide-eclipse/atmelavr_atmega168/.cproject deleted file mode 100644 index e544fe2b..00000000 --- a/examples/ide-eclipse/atmelavr_atmega168/.cproject +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/ide-eclipse/atmelavr_atmega168/.project b/examples/ide-eclipse/atmelavr_atmega168/.project deleted file mode 100644 index b42a0017..00000000 --- a/examples/ide-eclipse/atmelavr_atmega168/.project +++ /dev/null @@ -1,27 +0,0 @@ - - - atmelavr_atmega168 - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - diff --git a/examples/ide-eclipse/atmelavr_atmega168/.settings/org.eclipse.cdt.codan.core.prefs b/examples/ide-eclipse/atmelavr_atmega168/.settings/org.eclipse.cdt.codan.core.prefs deleted file mode 100644 index 77386c23..00000000 --- a/examples/ide-eclipse/atmelavr_atmega168/.settings/org.eclipse.cdt.codan.core.prefs +++ /dev/null @@ -1,67 +0,0 @@ -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}} diff --git a/examples/ide-eclipse/atmelavr_atmega168/platformio.ini b/examples/ide-eclipse/atmelavr_atmega168/platformio.ini deleted file mode 100644 index f195b366..00000000 --- a/examples/ide-eclipse/atmelavr_atmega168/platformio.ini +++ /dev/null @@ -1,28 +0,0 @@ -# -# Project Configuration File -# -# A detailed documentation with the EXAMPLES is located here: -# http://docs.platformio.org/en/latest/projectconf.html -# - -# A sign `#` at the beginning of the line indicates a comment -# Comment lines are ignored. - -# Simple and base environment -# [env:mybaseenv] -# platform = %INSTALLED_PLATFORM_NAME_HERE% -# framework = -# board = -# -# Automatic targets - enable auto-uploading -# targets = upload - -[env:atmelavr_atmega168] -platform = atmelavr -board_mcu = atmega168 -board_f_cpu = 16000000L - -upload_protocol = arduino -upload_speed = 19200 - -# targets = upload diff --git a/examples/ide-eclipse/atmelavr_atmega168/src/main.c b/examples/ide-eclipse/atmelavr_atmega168/src/main.c deleted file mode 100644 index 757d3c5f..00000000 --- a/examples/ide-eclipse/atmelavr_atmega168/src/main.c +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (C) Ivan Kravets - * See LICENSE for details. - */ - -#include -#include - -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; -} diff --git a/examples/ide-eclipse/tilaunchpad_msp430g2/.cproject b/examples/ide-eclipse/tilaunchpad_msp430g2/.cproject deleted file mode 100644 index 398d9cbf..00000000 --- a/examples/ide-eclipse/tilaunchpad_msp430g2/.cproject +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/ide-eclipse/tilaunchpad_msp430g2/.project b/examples/ide-eclipse/tilaunchpad_msp430g2/.project deleted file mode 100644 index 14e9c185..00000000 --- a/examples/ide-eclipse/tilaunchpad_msp430g2/.project +++ /dev/null @@ -1,27 +0,0 @@ - - - tilaunchpad_msp430g2 - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - diff --git a/examples/ide-eclipse/tilaunchpad_msp430g2/platformio.ini b/examples/ide-eclipse/tilaunchpad_msp430g2/platformio.ini deleted file mode 100644 index 4a112a96..00000000 --- a/examples/ide-eclipse/tilaunchpad_msp430g2/platformio.ini +++ /dev/null @@ -1,27 +0,0 @@ -# -# Project Configuration File -# -# A detailed documentation with the EXAMPLES is located here: -# http://docs.platformio.org/en/latest/projectconf.html -# - -# A sign `#` at the beginning of the line indicates a comment -# Comment lines are ignored. - -# Simple and base environment -# [env:mybaseenv] -# platform = %INSTALLED_PLATFORM_NAME_HERE% -# framework = -# board = -# -# Automatic targets - enable auto-uploading -# targets = upload - -[env:launchpad_msp430g2] -platform = timsp430 -board_mcu = msp430g2553 -board_f_cpu = 16000000L - -upload_protocol = rf2500 - -# targets = upload diff --git a/examples/ide-eclipse/tilaunchpad_msp430g2/src/main.c b/examples/ide-eclipse/tilaunchpad_msp430g2/src/main.c deleted file mode 100644 index 38a421a5..00000000 --- a/examples/ide-eclipse/tilaunchpad_msp430g2/src/main.c +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (C) Ivan Kravets - * See LICENSE for details. - */ - -#include - -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; -} diff --git a/examples/ide-eclipse/titiva_lm4f120/.cproject b/examples/ide-eclipse/titiva_lm4f120/.cproject deleted file mode 100644 index 04a84c44..00000000 --- a/examples/ide-eclipse/titiva_lm4f120/.cproject +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/ide-eclipse/titiva_lm4f120/.project b/examples/ide-eclipse/titiva_lm4f120/.project deleted file mode 100644 index 36085734..00000000 --- a/examples/ide-eclipse/titiva_lm4f120/.project +++ /dev/null @@ -1,27 +0,0 @@ - - - titiva_lm4f120 - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - diff --git a/examples/ide-eclipse/titiva_lm4f120/src/main.c b/examples/ide-eclipse/titiva_lm4f120/src/main.c deleted file mode 100644 index 3a69d908..00000000 --- a/examples/ide-eclipse/titiva_lm4f120/src/main.c +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (C) Ivan Kravets - * See LICENSE for details. - */ - -#define false 0 -#define true 1 -typedef int bool; - -#include -#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 - - -void setup() { - 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); -} - - -void loop() { - 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); -} diff --git a/examples/ide/clion/.idea/clion.iml b/examples/ide/clion/.idea/clion.iml new file mode 100644 index 00000000..bc2cd874 --- /dev/null +++ b/examples/ide/clion/.idea/clion.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/examples/ide/clion/.idea/modules.xml b/examples/ide/clion/.idea/modules.xml new file mode 100644 index 00000000..9ce81f04 --- /dev/null +++ b/examples/ide/clion/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/examples/ide/clion/.idea/platformio.iml b/examples/ide/clion/.idea/platformio.iml new file mode 100644 index 00000000..bc2cd874 --- /dev/null +++ b/examples/ide/clion/.idea/platformio.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/examples/ide/clion/.idea/workspace.xml b/examples/ide/clion/.idea/workspace.xml new file mode 100644 index 00000000..da64747e --- /dev/null +++ b/examples/ide/clion/.idea/workspace.xml @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + C/C++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1435919971910 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/examples/ide/clion/CMakeLists.txt b/examples/ide/clion/CMakeLists.txt new file mode 100644 index 00000000..81e7ec23 --- /dev/null +++ b/examples/ide/clion/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.2) +project(clion) + +set(PLATFORMIO_CMD platformio) + +include_directories("$ENV{HOME}/.platformio/packages/framework-arduinoavr/variants/standard") +include_directories("$ENV{HOME}/.platformio/packages/framework-arduinoavr/cores/arduino") +include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/avr/include") +include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/bfd/include") +include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/4.8.1/include") +include_directories("$ENV{HOME}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/4.8.1/include-fixed") + +add_definitions(-DF_CPU=16000000L) +add_definitions(-DARDUINO_ARCH_AVR) +add_definitions(-DARDUINO_AVR_UNO) +add_definitions(-DARDUINO=10605) +add_definitions(-DPLATFORMIO=020300) +add_definitions(-D__AVR_ATmega328P__) + +add_custom_target( + PLATFORMIO_BUILD ALL + COMMAND ${PLATFORMIO_CMD} -f -c clion run + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +add_custom_target( + PLATFORMIO_UPLOAD ALL + COMMAND ${PLATFORMIO_CMD} -f -c clion run --target upload + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) + +add_custom_target( + PLATFORMIO_CLEAN ALL + COMMAND ${PLATFORMIO_CMD} -f -c clion run --target clean + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) \ No newline at end of file diff --git a/examples/ide/clion/README.rst b/examples/ide/clion/README.rst new file mode 100644 index 00000000..73698c03 --- /dev/null +++ b/examples/ide/clion/README.rst @@ -0,0 +1,8 @@ +CLion IDE Integration +===================== + +The detailed information and steps are described in the main documentation: +`PlatformIO integration with CLion IDE `_. + +.. image:: http://docs.platformio.org/en/latest/_images/ide-platformio-clion.png + :target: http://docs.platformio.org/en/latest/ide/clion.html diff --git a/examples/ide/clion/lib/readme.txt b/examples/ide/clion/lib/readme.txt new file mode 100644 index 00000000..413c26e5 --- /dev/null +++ b/examples/ide/clion/lib/readme.txt @@ -0,0 +1,8 @@ + +Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html + +This directory is intended for the project specific (private) libraries. +PlatformIO will compile them to static libraries and link to executable file. + +The source code of each library should be placed in separate directory. +For example, "lib/private_lib/[here are source files]". diff --git a/examples/ide/sublime-text/platformio.ini b/examples/ide/clion/platformio.ini similarity index 91% rename from examples/ide/sublime-text/platformio.ini rename to examples/ide/clion/platformio.ini index 785c3eda..7e183bf7 100644 --- a/examples/ide/sublime-text/platformio.ini +++ b/examples/ide/clion/platformio.ini @@ -17,7 +17,8 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:flora8] +[env:uno] platform = atmelavr framework = arduino -board = flora8 +board = uno +# targets = upload diff --git a/examples/ide/clion/src/blink.ino b/examples/ide/clion/src/blink.ino new file mode 100644 index 00000000..807607e2 --- /dev/null +++ b/examples/ide/clion/src/blink.ino @@ -0,0 +1,13 @@ +// Most Arduino boards already have a LED attached to pin 13 on the board itself +#define LED_PIN 13 + +void setup() { + pinMode(LED_PIN, OUTPUT); // set pin as output +} + +void loop() { + digitalWrite(LED_PIN, HIGH); // set the LED on + delay(1000); // wait for a second + digitalWrite(LED_PIN, LOW); // set the LED off + delay(1000); // wait for a second +} diff --git a/examples/ide-eclipse/arduino_pro5/.cproject b/examples/ide/eclipse/.cproject similarity index 56% rename from examples/ide-eclipse/arduino_pro5/.cproject rename to examples/ide/eclipse/.cproject index 9fdb0166..f470a6b4 100644 --- a/examples/ide-eclipse/arduino_pro5/.cproject +++ b/examples/ide/eclipse/.cproject @@ -15,43 +15,66 @@ - + - + @@ -63,7 +86,7 @@ - + @@ -74,7 +97,7 @@ - + diff --git a/examples/ide-eclipse/arduino_pro5/.project b/examples/ide/eclipse/.project similarity index 96% rename from examples/ide-eclipse/arduino_pro5/.project rename to examples/ide/eclipse/.project index 25893375..acbd3183 100644 --- a/examples/ide-eclipse/arduino_pro5/.project +++ b/examples/ide/eclipse/.project @@ -1,6 +1,6 @@ - arduino_pro5 + eclipse diff --git a/examples/ide/eclipse/.settings/language.settings.xml b/examples/ide/eclipse/.settings/language.settings.xml new file mode 100644 index 00000000..2135df98 --- /dev/null +++ b/examples/ide/eclipse/.settings/language.settings.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/examples/ide/eclipse/README.rst b/examples/ide/eclipse/README.rst new file mode 100644 index 00000000..bb4bfbe6 --- /dev/null +++ b/examples/ide/eclipse/README.rst @@ -0,0 +1,8 @@ +Eclipse IDE Integration +======================= + +The detailed information and steps are described in the main documentation: +`PlatformIO integration with Eclipse IDE `_. + +.. image:: http://docs.platformio.org/en/latest/_images/ide-platformio-eclipse.png + :target: http://docs.platformio.org/en/latest/ide/eclipse.html diff --git a/examples/ide/eclipse/lib/readme.txt b/examples/ide/eclipse/lib/readme.txt new file mode 100644 index 00000000..413c26e5 --- /dev/null +++ b/examples/ide/eclipse/lib/readme.txt @@ -0,0 +1,8 @@ + +Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html + +This directory is intended for the project specific (private) libraries. +PlatformIO will compile them to static libraries and link to executable file. + +The source code of each library should be placed in separate directory. +For example, "lib/private_lib/[here are source files]". diff --git a/examples/ide/visual-studio/platformio.ini b/examples/ide/eclipse/platformio.ini similarity index 91% rename from examples/ide/visual-studio/platformio.ini rename to examples/ide/eclipse/platformio.ini index b79bfb2d..7e183bf7 100644 --- a/examples/ide/visual-studio/platformio.ini +++ b/examples/ide/eclipse/platformio.ini @@ -17,7 +17,8 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:arduino_uno] +[env:uno] platform = atmelavr framework = arduino -board = uno \ No newline at end of file +board = uno +# targets = upload diff --git a/examples/ide/eclipse/src/blink.ino b/examples/ide/eclipse/src/blink.ino new file mode 100644 index 00000000..807607e2 --- /dev/null +++ b/examples/ide/eclipse/src/blink.ino @@ -0,0 +1,13 @@ +// Most Arduino boards already have a LED attached to pin 13 on the board itself +#define LED_PIN 13 + +void setup() { + pinMode(LED_PIN, OUTPUT); // set pin as output +} + +void loop() { + digitalWrite(LED_PIN, HIGH); // set the LED on + delay(1000); // wait for a second + digitalWrite(LED_PIN, LOW); // set the LED off + delay(1000); // wait for a second +} diff --git a/examples/ide/qtcreator/README.rst b/examples/ide/qtcreator/README.rst new file mode 100644 index 00000000..6136828a --- /dev/null +++ b/examples/ide/qtcreator/README.rst @@ -0,0 +1,8 @@ +Qt Creator IDE Integration +========================== + +The detailed information and steps are described in the main documentation: +`PlatformIO integration with Qt Creator `_. + +.. image:: http://docs.platformio.org/en/latest/_static/ide-platformio-qtcreator-7.png + :target: http://docs.platformio.org/en/latest/ide/qtcreator.html diff --git a/examples/ide/qtcreator/lib/readme.txt b/examples/ide/qtcreator/lib/readme.txt new file mode 100644 index 00000000..413c26e5 --- /dev/null +++ b/examples/ide/qtcreator/lib/readme.txt @@ -0,0 +1,8 @@ + +Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html + +This directory is intended for the project specific (private) libraries. +PlatformIO will compile them to static libraries and link to executable file. + +The source code of each library should be placed in separate directory. +For example, "lib/private_lib/[here are source files]". diff --git a/examples/ide/qtcreator/platformio.ini b/examples/ide/qtcreator/platformio.ini index b79bfb2d..7e183bf7 100644 --- a/examples/ide/qtcreator/platformio.ini +++ b/examples/ide/qtcreator/platformio.ini @@ -17,7 +17,8 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:arduino_uno] +[env:uno] platform = atmelavr framework = arduino -board = uno \ No newline at end of file +board = uno +# targets = upload diff --git a/examples/ide/qtcreator/platformio.pro b/examples/ide/qtcreator/platformio.pro index 22188cd8..5caa33a2 100644 --- a/examples/ide/qtcreator/platformio.pro +++ b/examples/ide/qtcreator/platformio.pro @@ -2,15 +2,22 @@ win32 { HOMEDIR += $$(USERPROFILE) } else { - HOMEDIR += $$(PWD) + HOMEDIR += $$(HOME) } -INCLUDEPATH += "$$HOMEDIR/.platformio/packages/framework-arduinoavr/cores/arduino" -INCLUDEPATH += "$$HOMEDIR/.platformio/packages/toolchain-atmelavr/avr/include" +INCLUDEPATH += "$${HOMEDIR}/.platformio/packages/framework-arduinoavr/variants/standard" +INCLUDEPATH += "$${HOMEDIR}/.platformio/packages/framework-arduinoavr/cores/arduino" +INCLUDEPATH += "$${HOMEDIR}/.platformio/packages/toolchain-atmelavr/avr/include" +INCLUDEPATH += "$${HOMEDIR}/.platformio/packages/toolchain-atmelavr/bfd/include" +INCLUDEPATH += "$${HOMEDIR}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/4.8.1/include" +INCLUDEPATH += "$${HOMEDIR}/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/4.8.1/include-fixed" -win32:INCLUDEPATH ~= s,/,\\,g - -# DEFINES += __AVR_ATmega328__ +DEFINES += "F_CPU=16000000L" +DEFINES += "ARDUINO_ARCH_AVR" +DEFINES += "ARDUINO_AVR_UNO" +DEFINES += "ARDUINO=10605" +DEFINES += "PLATFORMIO=020300" +DEFINES += "__AVR_ATmega328P__" OTHER_FILES += \ platformio.ini diff --git a/examples/ide/qtcreator/src/main.c b/examples/ide/qtcreator/src/main.c index 34714182..262a6310 100644 --- a/examples/ide/qtcreator/src/main.c +++ b/examples/ide/qtcreator/src/main.c @@ -1,25 +1,15 @@ #include "Arduino.h" -/* - Blink - Turns on an LED on for one second, then off for one second, repeatedly. - - This example code is in the public domain. -*/ - -int led = 1; // blink 'digital' pin 1 - AKA the built in red LED -// the setup routine runs once when you press reset: +// Most Arduino boards already have a LED attached to pin 13 on the board itself +#define LED_PIN 13 + void setup() { - // initialize the digital pin as an output. - pinMode(led, OUTPUT); - + pinMode(LED_PIN, OUTPUT); // set pin as output } -// the loop routine runs over and over again forever: void loop() { - digitalWrite(led, HIGH); - delay(1000); - digitalWrite(led, LOW); - delay(1000); + digitalWrite(LED_PIN, HIGH); // set the LED on + delay(1000); // wait for a second + digitalWrite(LED_PIN, LOW); // set the LED off + delay(1000); // wait for a second } - diff --git a/examples/ide/sublime-text/src/Blink.pde b/examples/ide/sublime-text/src/Blink.pde deleted file mode 100644 index a4282d6b..00000000 --- a/examples/ide/sublime-text/src/Blink.pde +++ /dev/null @@ -1,24 +0,0 @@ -/* - Blink - Turns on an LED on for one second, then off for one second, repeatedly. - - This example code is in the public domain. -*/ - -int led = 1; // blink 'digital' pin 1 - AKA the built in red LED - -// the setup routine runs once when you press reset: -void setup() { - // initialize the digital pin as an output. - pinMode(led, OUTPUT); - -} - -// the loop routine runs over and over again forever: -void loop() { - digitalWrite(led, HIGH); - delay(1000); - digitalWrite(led, LOW); - delay(1000); -} - diff --git a/examples/ide/sublimetext/README.rst b/examples/ide/sublimetext/README.rst new file mode 100644 index 00000000..78da7c22 --- /dev/null +++ b/examples/ide/sublimetext/README.rst @@ -0,0 +1,8 @@ +Sublime Text Integration +======================== + +The detailed information and steps are described in the main documentation: +`PlatformIO integration with Sublime Text `_. + +.. image:: http://docs.platformio.org/en/latest/_images/ide-sublime-text-platformio-newproject-5.png + :target: http://docs.platformio.org/en/latest/ide/sublimetext.html diff --git a/examples/ide/sublimetext/lib/readme.txt b/examples/ide/sublimetext/lib/readme.txt new file mode 100644 index 00000000..413c26e5 --- /dev/null +++ b/examples/ide/sublimetext/lib/readme.txt @@ -0,0 +1,8 @@ + +Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html + +This directory is intended for the project specific (private) libraries. +PlatformIO will compile them to static libraries and link to executable file. + +The source code of each library should be placed in separate directory. +For example, "lib/private_lib/[here are source files]". diff --git a/examples/ide-eclipse/arduino_pro5/platformio.ini b/examples/ide/sublimetext/platformio.ini similarity index 87% rename from examples/ide-eclipse/arduino_pro5/platformio.ini rename to examples/ide/sublimetext/platformio.ini index 4e2b4dff..758fd356 100644 --- a/examples/ide-eclipse/arduino_pro5/platformio.ini +++ b/examples/ide/sublimetext/platformio.ini @@ -17,9 +17,8 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:arduino_pro5v] +[env:leonardo] platform = atmelavr framework = arduino -board = pro16MHzatmega168 - -# targets = upload \ No newline at end of file +board = leonardo +# targets = upload diff --git a/examples/ide/sublime-text/platformio.sublime-project b/examples/ide/sublimetext/platformio.sublime-project similarity index 76% rename from examples/ide/sublime-text/platformio.sublime-project rename to examples/ide/sublimetext/platformio.sublime-project index e8bd688b..8e810e03 100644 --- a/examples/ide/sublime-text/platformio.sublime-project +++ b/examples/ide/sublimetext/platformio.sublime-project @@ -5,6 +5,7 @@ "cmd": [ "platformio", + "-f", "-c", "sublimetext", "run" ], "name": "PlatformIO", @@ -14,8 +15,9 @@ "cmd": [ "platformio", + "-f", "-c", "sublimetext", "run", - "-t", + "--target", "clean" ], "name": "Clean" @@ -24,8 +26,9 @@ "cmd": [ "platformio", + "-f", "-c", "sublimetext", "run", - "-t", + "--target", "upload" ], "name": "Upload" diff --git a/examples/ide/sublimetext/src/blink.ino b/examples/ide/sublimetext/src/blink.ino new file mode 100644 index 00000000..807607e2 --- /dev/null +++ b/examples/ide/sublimetext/src/blink.ino @@ -0,0 +1,13 @@ +// Most Arduino boards already have a LED attached to pin 13 on the board itself +#define LED_PIN 13 + +void setup() { + pinMode(LED_PIN, OUTPUT); // set pin as output +} + +void loop() { + digitalWrite(LED_PIN, HIGH); // set the LED on + delay(1000); // wait for a second + digitalWrite(LED_PIN, LOW); // set the LED off + delay(1000); // wait for a second +} diff --git a/examples/ide/visual-studio/blink.vcxproj.filters b/examples/ide/visual-studio/blink.vcxproj.filters deleted file mode 100644 index 87bc92f6..00000000 --- a/examples/ide/visual-studio/blink.vcxproj.filters +++ /dev/null @@ -1,29 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {cad450ef-1a84-42d4-a5b5-a1736b8833d3} - - - - - - - - - Source Files\src - - - \ No newline at end of file diff --git a/examples/ide/visual-studio/src/blink.pde b/examples/ide/visual-studio/src/blink.pde deleted file mode 100644 index a4282d6b..00000000 --- a/examples/ide/visual-studio/src/blink.pde +++ /dev/null @@ -1,24 +0,0 @@ -/* - Blink - Turns on an LED on for one second, then off for one second, repeatedly. - - This example code is in the public domain. -*/ - -int led = 1; // blink 'digital' pin 1 - AKA the built in red LED - -// the setup routine runs once when you press reset: -void setup() { - // initialize the digital pin as an output. - pinMode(led, OUTPUT); - -} - -// the loop routine runs over and over again forever: -void loop() { - digitalWrite(led, HIGH); - delay(1000); - digitalWrite(led, LOW); - delay(1000); -} - diff --git a/examples/ide/visualstudio/README.rst b/examples/ide/visualstudio/README.rst new file mode 100644 index 00000000..683412ba --- /dev/null +++ b/examples/ide/visualstudio/README.rst @@ -0,0 +1,8 @@ +Visual Studio Integration +========================= + +The detailed information and steps are described in the main documentation: +`PlatformIO integration with Visual Studio `_. + +.. image:: http://docs.platformio.org/en/latest/_images/ide-vs-platformio-newproject-8.png + :target: http://docs.platformio.org/en/latest/ide/visualstudio.html diff --git a/examples/ide/visualstudio/lib/readme.txt b/examples/ide/visualstudio/lib/readme.txt new file mode 100644 index 00000000..fa10918b --- /dev/null +++ b/examples/ide/visualstudio/lib/readme.txt @@ -0,0 +1,8 @@ + +Documentation: http://docs.platformio.org/en/latest/userguide/cmd_init.html + +This directory is intended for the project specific (private) libraries. +PlatformIO will compile them to static libraries and link to executable file. + +The source code of each library should be placed in separate directory. +For example, "lib/private_lib/[here are source files]". diff --git a/examples/ide-eclipse/titiva_lm4f120/platformio.ini b/examples/ide/visualstudio/platformio.ini similarity index 84% rename from examples/ide-eclipse/titiva_lm4f120/platformio.ini rename to examples/ide/visualstudio/platformio.ini index 3dfecf6a..829194f0 100644 --- a/examples/ide-eclipse/titiva_lm4f120/platformio.ini +++ b/examples/ide/visualstudio/platformio.ini @@ -16,10 +16,9 @@ # # Automatic targets - enable auto-uploading # targets = upload - -[env:launchpad_lm4f120] -platform = titiva -framework = energia -board = lplm4f120h5qr - -# targets = upload + +[env:uno] +platform = atmelavr +framework = arduino +board = uno +# targets = upload diff --git a/examples/ide/visual-studio/blink.vcxproj b/examples/ide/visualstudio/platformio.vcxproj similarity index 63% rename from examples/ide/visual-studio/blink.vcxproj rename to examples/ide/visualstudio/platformio.vcxproj index 1bef37cb..36707b41 100644 --- a/examples/ide/visual-studio/blink.vcxproj +++ b/examples/ide/visualstudio/platformio.vcxproj @@ -1,62 +1,63 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {0FA9C3A8-452B-41EF-A418-9102B170F49F} - MakeFileProj - - - - Makefile - true - v120 - - - Makefile - false - v120 - - - - - - - - - - - - - platformio run - platformio run -t clean - WIN32;_DEBUG;$(NMakePreprocessorDefinitions) - $(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\toolchain-atmelavr\avr\include;$(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\framework-arduinoavr\cores\arduino;$(NMakeIncludeSearchPath) - - - platformio run - platformio run -t clean - WIN32;NDEBUG;$(NMakePreprocessorDefinitions) - $(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\toolchain-atmelavr\avr\include;$(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\framework-arduinoavr\cores\arduino;$(NMakeIncludeSearchPath) - - - - - - - - - - - - - - \ No newline at end of file + + + + + Debug + Win32 + + + Release + Win32 + + + + {0FA9C3A8-452B-41EF-A418-9102B170F49F} + MakeFileProj + + + + Makefile + true + v120 + + + Makefile + false + v120 + + + + + + + + + + + + + platformio -f -c visualstudio run + platformio -f -c visualstudio run --target clean + F_CPU=16000000L;ARDUINO_ARCH_AVR;ARDUINO_AVR_UNO;ARDUINO=10605;PLATFORMIO=020300;__AVR_ATmega328P__ + $(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\framework-arduinoavr\variants\standard;$(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\framework-arduinoavr\cores\arduino;$(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\toolchain-atmelavr\avr\include;$(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\toolchain-atmelavr\lib\gcc\avr\4.8.1\include;$(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\toolchain-atmelavr\lib\gcc\avr\4.8.1\include-fixed + + + platformio run + platformio run --target clean + {";".join(defines)}} + $(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\framework-arduinoavr\variants\standard;$(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\framework-arduinoavr\cores\arduino;$(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\toolchain-atmelavr\avr\include;$(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\toolchain-atmelavr\lib\gcc\avr\4.8.1\include;$(HOMEDRIVE)$(HOMEPATH)\.platformio\packages\toolchain-atmelavr\lib\gcc\avr\4.8.1\include-fixed + + + + + + + + + + + + Source Files + + + diff --git a/examples/ide/visualstudio/platformio.vcxproj.filters b/examples/ide/visualstudio/platformio.vcxproj.filters new file mode 100644 index 00000000..a1327e90 --- /dev/null +++ b/examples/ide/visualstudio/platformio.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;ino;pde + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + + + + + + Source Files + + + diff --git a/examples/ide/visualstudio/src/blink.ino b/examples/ide/visualstudio/src/blink.ino new file mode 100644 index 00000000..807607e2 --- /dev/null +++ b/examples/ide/visualstudio/src/blink.ino @@ -0,0 +1,13 @@ +// Most Arduino boards already have a LED attached to pin 13 on the board itself +#define LED_PIN 13 + +void setup() { + pinMode(LED_PIN, OUTPUT); // set pin as output +} + +void loop() { + digitalWrite(LED_PIN, HIGH); // set the LED on + delay(1000); // wait for a second + digitalWrite(LED_PIN, LOW); // set the LED off + delay(1000); // wait for a second +} diff --git a/platformio/ide/projectgenerator.py b/platformio/ide/projectgenerator.py index b92ccffc..f5f46791 100644 --- a/platformio/ide/projectgenerator.py +++ b/platformio/ide/projectgenerator.py @@ -120,12 +120,12 @@ class ProjectGenerator(object): "user_home_dir": abspath(expanduser("~")), "project_dir": self.project_dir, "systype": util.get_systype(), - "platformio_path": self._fix_os_path( - util.where_is_program("platformio")), + "platformio_path": util.where_is_program("platformio"), "env_pathsep": os.pathsep, "env_path": self._fix_os_path(os.getenv("PATH")) }) @staticmethod def _fix_os_path(path): - return re.sub(r"[\\]+", "\\\\", path) + return (re.sub(r"[\\]+", '\\' * 4, path) if "windows" in + util.get_systype() else path)