samples: micro: add a true hello world sample

Change-Id: I01707428ac49c3c35b2c8bcc625a21d88cf6eb33
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/samples/microkernel/apps/hello_world/Makefile b/samples/microkernel/apps/hello_world/Makefile
new file mode 100644
index 0000000..0d56ce6
--- /dev/null
+++ b/samples/microkernel/apps/hello_world/Makefile
@@ -0,0 +1,6 @@
+MDEF_FILE = prj.mdef
+KERNEL_TYPE = micro
+BOARD ?= qemu_x86
+CONF_FILE = prj.conf
+
+include ${ZEPHYR_BASE}/Makefile.inc
diff --git a/samples/microkernel/apps/hello_world/README.txt b/samples/microkernel/apps/hello_world/README.txt
new file mode 100644
index 0000000..1c33d5d
--- /dev/null
+++ b/samples/microkernel/apps/hello_world/README.txt
@@ -0,0 +1,33 @@
+Title: Synchronisation
+
+Description:
+
+A simple Hello World example using the microkernel.
+
+--------------------------------------------------------------------------------
+
+Building and Running Project:
+
+This microkernel project outputs to the console.  It can be built and executed
+on QEMU as follows:
+
+    make qemu
+
+--------------------------------------------------------------------------------
+
+Troubleshooting:
+
+Problems caused by out-dated project information can be addressed by
+issuing one of the following commands then rebuilding the project:
+
+    make clean          # discard results of previous builds
+                        # but keep existing configuration info
+or
+    make pristine       # discard results of previous builds
+                        # and restore pre-defined configuration info
+
+--------------------------------------------------------------------------------
+
+Sample Output:
+
+Hello World!
diff --git a/samples/microkernel/apps/hello_world/prj.conf b/samples/microkernel/apps/hello_world/prj.conf
new file mode 100644
index 0000000..edf1545
--- /dev/null
+++ b/samples/microkernel/apps/hello_world/prj.conf
@@ -0,0 +1,2 @@
+# Use standard security profile. (=> no need for a random number generator)
+CONFIG_STDOUT_CONSOLE=y
diff --git a/samples/microkernel/apps/hello_world/prj.mdef b/samples/microkernel/apps/hello_world/prj.mdef
new file mode 100644
index 0000000..6c33f79
--- /dev/null
+++ b/samples/microkernel/apps/hello_world/prj.mdef
@@ -0,0 +1,5 @@
+% Application       : Hello demo
+
+% TASK NAME  PRIO ENTRY STACK GROUPS
+% ==================================
+  TASK TASKA    7 main  2048 [EXE]
diff --git a/samples/microkernel/apps/hello_world/src/Makefile b/samples/microkernel/apps/hello_world/src/Makefile
new file mode 100644
index 0000000..00066e1
--- /dev/null
+++ b/samples/microkernel/apps/hello_world/src/Makefile
@@ -0,0 +1 @@
+obj-y = main.o
diff --git a/samples/microkernel/apps/hello_world/src/main.c b/samples/microkernel/apps/hello_world/src/main.c
new file mode 100644
index 0000000..e138e4d
--- /dev/null
+++ b/samples/microkernel/apps/hello_world/src/main.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2012-2014 Wind River Systems, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <zephyr.h>
+
+#if defined(CONFIG_STDOUT_CONSOLE)
+#include <stdio.h>
+#define PRINT           printf
+#else
+#include <misc/printk.h>
+#define PRINT           printk
+#endif
+
+void main(void)
+{
+	PRINT("Hello World!\n");
+}