From afc57a0947799afa466ddb26e440a60d206826e6 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Tue, 6 Aug 2013 15:25:07 +0200 Subject: [PATCH] Minor extension of appfoo example and testing with RTEMS 4.10.99. Signed-off-by: Pavel Pisa --- rtems-omk-template/appfoo/init.c | 8 +++++++- rtems-omk-template/appfoo/system.h | 2 ++ rtems-omk-template/appfoo/task_1.c | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/rtems-omk-template/appfoo/init.c b/rtems-omk-template/appfoo/init.c index f7037f2..6326b66 100644 --- a/rtems-omk-template/appfoo/init.c +++ b/rtems-omk-template/appfoo/init.c @@ -30,6 +30,12 @@ #include #include +#define CONFIGURE_SHELL_COMMANDS_INIT +#define CONFIGURE_SHELL_COMMANDS_ALL +#define CONFIGURE_SHELL_MOUNT_MSDOS + +#include + #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" ); diff --git a/rtems-omk-template/appfoo/system.h b/rtems-omk-template/appfoo/system.h index 7279551..59067c7 100644 --- a/rtems-omk-template/appfoo/system.h +++ b/rtems-omk-template/appfoo/system.h @@ -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*/ diff --git a/rtems-omk-template/appfoo/task_1.c b/rtems-omk-template/appfoo/task_1.c index ffd6fa2..9631ac6 100644 --- a/rtems-omk-template/appfoo/task_1.c +++ b/rtems-omk-template/appfoo/task_1.c @@ -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 ); } -- 2.39.2