Minor extension of appfoo example and testing with RTEMS 4.10.99.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Tue, 6 Aug 2013 13:25:07 +0000 (15:25 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Tue, 6 Aug 2013 13:25:07 +0000 (15:25 +0200)
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
rtems-omk-template/appfoo/init.c
rtems-omk-template/appfoo/system.h
rtems-omk-template/appfoo/task_1.c

index f7037f2..6326b66 100644 (file)
 #include <rtems/monitor.h>
 #include <rtems/shell.h>
 
+#define CONFIGURE_SHELL_COMMANDS_INIT
+#define CONFIGURE_SHELL_COMMANDS_ALL
+#define CONFIGURE_SHELL_MOUNT_MSDOS
+
+#include <rtems/shellconfig.h>
+
 #define BUILD_VERSION_STRING(major,minor,patch) \
         __XSTRING(major) "." __XSTRING(minor) "." __XSTRING(patch)
 
@@ -74,7 +80,7 @@ rtems_task Init(
   
   rtems_monitor_init(RTEMS_MONITOR_SUSPEND|RTEMS_MONITOR_GLOBAL);
   /*rtems_capture_cli_init (0);*/
-  
+
   printf( "Starting application " SW_VER_ID " v "
           BUILD_VERSION_STRING(SW_VER_MAJOR,SW_VER_MINOR,SW_VER_PATCH)
          "\n" );
index 7279551..59067c7 100644 (file)
@@ -48,6 +48,8 @@ rtems_task Init(
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
+#define CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_ZERO_DRIVER
 
 #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
 /*#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM*/
index ffd6fa2..9631ac6 100644 (file)
@@ -13,13 +13,16 @@ rtems_task Task_1(
   rtems_task_argument argument
 )
 {
+  int loops = 10;
   rtems_status_code status;
   printf("*** Starting up Task_1 ***\n");
 
-  while(1){
+  while(loops--){
     printf("Task_1 woken\n");
     status = rtems_task_wake_after( TICKS_PER_SECOND );
     check_rtems_status( status, 0, "rtems_task_wake_after" );
   }
+  printf("*** Suspend Task_1 ***\n");
+  rtems_task_suspend( RTEMS_SELF );
 }