From 483627ee0c6220ed0e5cd74e949b78ab93b4a414 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Sun, 29 Nov 2009 13:29:22 +0100 Subject: [PATCH] Template application updated to build for RTEMS 4.9.x environment. Signed-off-by: Pavel Pisa --- rtems-omk-template/.gitignore | 2 ++ rtems-omk-template/appfoo/init.c | 17 ++++++++++++++--- rtems-omk-template/appfoo/system.h | 3 ++- rtems-omk-template/config/config.csb336 | 4 ++++ rtems-omk-template/config/config.ec555 | 2 +- rtems-omk-template/config/config.mo376 | 2 +- 6 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 rtems-omk-template/.gitignore create mode 100644 rtems-omk-template/config/config.csb336 diff --git a/rtems-omk-template/.gitignore b/rtems-omk-template/.gitignore new file mode 100644 index 0000000..189b17f --- /dev/null +++ b/rtems-omk-template/.gitignore @@ -0,0 +1,2 @@ +_build +_compiled diff --git a/rtems-omk-template/appfoo/init.c b/rtems-omk-template/appfoo/init.c index 06f57dc..d24847c 100644 --- a/rtems-omk-template/appfoo/init.c +++ b/rtems-omk-template/appfoo/init.c @@ -33,6 +33,17 @@ #define BUILD_VERSION_STRING(major,minor,patch) \ __XSTRING(major) "." __XSTRING(minor) "." __XSTRING(patch) +#define RTEMS_VER_CODE VER_CODE(__RTEMS_MAJOR__ ,__RTEMS_MINOR__ ,__RTEMS_REVISION__) + +#if RTEMS_VER_CODE < VER_CODE(4,7,99) + #define rtems_shell_add_cmd shell_add_cmd + #define rtems_shell_init(m_task_name,m_task_stacksize,m_task_priority,m_devname,m_forever,m_wait,m_login_check) \ + shell_init(m_task_name,m_task_stacksize,m_task_priority,m_devname,shell_init,m_forever) +#elif RTEMS_VER_CODE < VER_CODE(4,9,99) + #define rtems_shell_init(m_task_name,m_task_stacksize,m_task_priority,m_devname,m_forever,m_wait,m_login_check) \ + rtems_shell_init(m_task_name,m_task_stacksize,m_task_priority,m_devname,m_forever,m_wait) +#endif + void bad_rtems_status(rtems_status_code status, int fail_level, const char *text) { @@ -83,10 +94,10 @@ rtems_task Init( status = rtems_task_start( Task_1_id, Task_1, 0 ); check_rtems_status(status, 0, "rtems_task_start of Task_1\n"); - shell_init("SHLL",RTEMS_MINIMUM_STACK_SIZE+0x1000, - SHELL_TASK_PRIORITY,"/dev/console",B19200 | CS8, 0); + rtems_shell_init("SHLL",RTEMS_MINIMUM_STACK_SIZE+0x1000, + SHELL_TASK_PRIORITY,"/dev/console",1,0, NULL); - shell_add_cmd("testcmd", "app", + rtems_shell_add_cmd("testcmd", "app", "test command for shell", testcmd_forshell); diff --git a/rtems-omk-template/appfoo/system.h b/rtems-omk-template/appfoo/system.h index 38498dc..7279551 100644 --- a/rtems-omk-template/appfoo/system.h +++ b/rtems-omk-template/appfoo/system.h @@ -26,7 +26,8 @@ rtems_task Init( #include /* for device driver prototypes */ #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK #define TICKS_PER_SECOND 1000 diff --git a/rtems-omk-template/config/config.csb336 b/rtems-omk-template/config/config.csb336 new file mode 100644 index 0000000..67c02d0 --- /dev/null +++ b/rtems-omk-template/config/config.csb336 @@ -0,0 +1,4 @@ +# CSB336 BSP for COGENT CSB336 and PiKRON PiMX1 boards +# This file should be symlinked as config.target into project +# Makefile.rules directory +RTEMS_MAKEFILE_PATH=/opt/rtems4.9/arm-rtems4.9/csb336 diff --git a/rtems-omk-template/config/config.ec555 b/rtems-omk-template/config/config.ec555 index ebbb6a2..e71e2d4 100644 --- a/rtems-omk-template/config/config.ec555 +++ b/rtems-omk-template/config/config.ec555 @@ -1,4 +1,4 @@ # EC555 BSP for Wuerz-elektronik EC555 board # This file should be symlinked as config.target into project # Makefile.rules directory -RTEMS_MAKEFILE_PATH=/opt/rtems/powerpc-rtems/ec555 +RTEMS_MAKEFILE_PATH=/opt/rtems4.9/powerpc-rtems4.9/ec555 diff --git a/rtems-omk-template/config/config.mo376 b/rtems-omk-template/config/config.mo376 index 2f5ffe4..e112dff 100644 --- a/rtems-omk-template/config/config.mo376 +++ b/rtems-omk-template/config/config.mo376 @@ -1,4 +1,4 @@ # EC555 BSP for Wuerz-elektronik EC555 board # This file should be symlinked as config.target into project # Makefile.rules directory -RTEMS_MAKEFILE_PATH=/opt/rtems/m68k-rtems/mo376 +RTEMS_MAKEFILE_PATH=/opt/rtems4.9/m68k-rtems4.9/mo376 -- 2.39.2