Add "Hello World" example for desktop platforms

This commit is contained in:
Ivan Kravets
2015-08-09 21:46:43 +03:00
parent c9491f47e1
commit 5679271913
3 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,18 @@
How to build PlatformIO based project
=====================================
1. `Install PlatformIO <http://docs.platformio.org/en/latest/installation.html>`_
2. Download `source code with examples <https://github.com/platformio/platformio/archive/develop.zip>`_
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

View File

@ -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

View File

@ -0,0 +1,7 @@
#include <stdio.h>
int main()
{
printf("Hello World from PlatformIO!\n");
return 0;
}