diff --git a/examples/desktop/hello-world/README.rst b/examples/desktop/hello-world/README.rst new file mode 100644 index 00000000..27f3cb49 --- /dev/null +++ b/examples/desktop/hello-world/README.rst @@ -0,0 +1,18 @@ +How to build PlatformIO based project +===================================== + +1. `Install PlatformIO `_ +2. Download `source code with examples `_ +3. Extract ZIP archive +4. Run these commands: + +.. code-block:: bash + + # Change directory to example + > cd platformio-develop/examples/desktop/hello-world + + # Process example project + > platformio run + + # Clean build files + > platformio run --target clean diff --git a/examples/desktop/hello-world/platformio.ini b/examples/desktop/hello-world/platformio.ini new file mode 100644 index 00000000..9d028e13 --- /dev/null +++ b/examples/desktop/hello-world/platformio.ini @@ -0,0 +1,24 @@ +# +# 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:native] +platform = native + +[env:win32] +platform = windows_x86 diff --git a/examples/desktop/hello-world/src/main.c b/examples/desktop/hello-world/src/main.c new file mode 100644 index 00000000..21049ca9 --- /dev/null +++ b/examples/desktop/hello-world/src/main.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("Hello World from PlatformIO!\n"); + return 0; +}