diff --git a/HISTORY.rst b/HISTORY.rst index 1491f318..04ec3bea 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,8 @@ PlatformIO 2.0 2.8.5 (2016-02-??) ~~~~~~~~~~~~~~~~~~ +* Project generator for `NetBeans IDE `__ + (`issue #541 `_) * Added support for the ESP8266 ESP-07 board to `Espressif `__ (`issue #527 `_) diff --git a/docs/_static/ide-platformio-netbeans.jpg b/docs/_static/ide-platformio-netbeans.jpg deleted file mode 100644 index 948bf132..00000000 Binary files a/docs/_static/ide-platformio-netbeans.jpg and /dev/null differ diff --git a/docs/_static/ide-platformio-netbeans.png b/docs/_static/ide-platformio-netbeans.png new file mode 100644 index 00000000..310b85cb Binary files /dev/null and b/docs/_static/ide-platformio-netbeans.png differ diff --git a/docs/ide/netbeans.rst b/docs/ide/netbeans.rst index 482ec232..4a0d75b5 100644 --- a/docs/ide/netbeans.rst +++ b/docs/ide/netbeans.rst @@ -29,7 +29,28 @@ for details. Integration ----------- -Please follow to `How to Integrate PlatformIO with Netbeans `_ instructions. +Choose board ``type`` using :ref:`cmd_boards` or `Embedded Boards Explorer `_ +command and generate project via :option:`platformio init --ide` command: + +.. code-block:: shell + + platformio init --ide netbeans --board %TYPE% + + # For example, generate project for Arduino UNO + platformio init --ide netbeans --board uno + +Then: + +1. Open this project via ``Menu: File > Open Project...`` +2. Add new files to ``src`` directory (``*.c, *.cpp, *.ino, etc.``) via + right-click on ``src`` folder in the "Projects" pane +3. Build project using ``Menu: Run > Build Project`` +4. Upload firmware using ``Menu: Run > Run Project`` + +.. warning:: + The libraries which are added, installed or used in the project + after generating process wont be reflected in IDE. To fix it you + need to reinitialize project using :ref:`cmd_init` (repeat it). Articles / Manuals ------------------ @@ -41,5 +62,5 @@ See the full list with :ref:`articles`. Screenshot ----------- -.. image:: ../_static/ide-platformio-netbeans.jpg - :target: http://www.instructables.com/id/How-to-Integrate-PlatformIO-With-Netbeans/ +.. image:: ../_static/ide-platformio-netbeans.png + :target: http://docs.platformio.org/en/latest/_images/ide-platformio-netbeans.png diff --git a/platformio/__init__.py b/platformio/__init__.py index 404a33e9..6675d873 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (2, 8, "5.dev1") +VERSION = (2, 8, "5.dev2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/ide/tpls/netbeans/nbproject/configurations.xml.tpl b/platformio/ide/tpls/netbeans/nbproject/configurations.xml.tpl new file mode 100644 index 00000000..3224e317 --- /dev/null +++ b/platformio/ide/tpls/netbeans/nbproject/configurations.xml.tpl @@ -0,0 +1,70 @@ + + + + + platformio.ini + + + nbproject/private/launcher.properties + + + ^(nbproject|.pioenvs)$ + + . + + + + + + default + false + false + + + + + + . + {{platformio_path}} -f -c netbeans run + {{platformio_path}} -f -c netbeans run --target clean + + + + src + % for include in includes: + {{include}} + % end + + + % for define in defines: + {{define}} + % end + + + + + src + % for include in includes: + {{include}} + % end + + + % for define in defines: + {{define}} + % end + + + + + . + + + + + + + + diff --git a/platformio/ide/tpls/netbeans/nbproject/private/configurations.xml.tpl b/platformio/ide/tpls/netbeans/nbproject/private/configurations.xml.tpl new file mode 100644 index 00000000..7e8f68a4 --- /dev/null +++ b/platformio/ide/tpls/netbeans/nbproject/private/configurations.xml.tpl @@ -0,0 +1,61 @@ + + + + + + + + + platformio.ini + + + + + + + localhost + {{4 if "darwin" in systype else 2 if "linux" in systype else 1}} + + + + . + ${AUTO_FOLDER} + + ${AUTO_FOLDER} + + ${MAKE} ${ITEM_NAME}.o + ${AUTO_COMPILE} + + ${AUTO_COMPILE} + + + + + + + + + + + + + + + gdb + + + + "${OUTPUT_PATH}" + {{platformio_path}} -f -c netbeans run --target upload + + {{platformio_path}} -f -c netbeans run --target upload + . + false + 0 + 0 + + + + + + diff --git a/platformio/ide/tpls/netbeans/nbproject/private/launcher.properties.tpl b/platformio/ide/tpls/netbeans/nbproject/private/launcher.properties.tpl new file mode 100644 index 00000000..6cc2127d --- /dev/null +++ b/platformio/ide/tpls/netbeans/nbproject/private/launcher.properties.tpl @@ -0,0 +1,40 @@ +# Launchers File syntax: +# +# [Must-have property line] +# launcher1.runCommand= +# [Optional extra properties] +# launcher1.displayName= +# launcher1.buildCommand= +# launcher1.runDir= +# launcher1.symbolFiles= +# launcher1.env.= +# (If this value is quoted with ` it is handled as a native command which execution result will become the value) +# [Common launcher properties] +# common.runDir= +# (This value is overwritten by a launcher specific runDir value if the latter exists) +# common.env.= +# (Environment variables from common launcher are merged with launcher specific variables) +# common.symbolFiles= +# (This value is overwritten by a launcher specific symbolFiles value if the latter exists) +# +# In runDir, symbolFiles and env fields you can use these macroses: +# ${PROJECT_DIR} - project directory absolute path +# ${OUTPUT_PATH} - linker output path (relative to project directory path) +# ${OUTPUT_BASENAME}- linker output filename +# ${TESTDIR} - test files directory (relative to project directory path) +# ${OBJECTDIR} - object files directory (relative to project directory path) +# ${CND_DISTDIR} - distribution directory (relative to project directory path) +# ${CND_BUILDDIR} - build directory (relative to project directory path) +# ${CND_PLATFORM} - platform name +# ${CND_CONF} - configuration name +# ${CND_DLIB_EXT} - dynamic library extension +# +# All the project launchers must be listed in the file! +# +# launcher1.runCommand=... +# launcher2.runCommand=... +# ... +# common.runDir=... +# common.env.KEY=VALUE + +# launcher1.runCommand= \ No newline at end of file diff --git a/platformio/ide/tpls/netbeans/nbproject/private/private.xml.tpl b/platformio/ide/tpls/netbeans/nbproject/private/private.xml.tpl new file mode 100644 index 00000000..4f3fdc62 --- /dev/null +++ b/platformio/ide/tpls/netbeans/nbproject/private/private.xml.tpl @@ -0,0 +1,10 @@ + + + + true + + + 0 + 0 + + diff --git a/platformio/ide/tpls/netbeans/nbproject/project.xml.tpl b/platformio/ide/tpls/netbeans/nbproject/project.xml.tpl new file mode 100644 index 00000000..ad4ea18f --- /dev/null +++ b/platformio/ide/tpls/netbeans/nbproject/project.xml.tpl @@ -0,0 +1,26 @@ + + + org.netbeans.modules.cnd.makeproject + + + {{project_name}} + + + + UTF-8 + + + . + + + + Default + 0 + + + + false + + + +