summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/ChangeLog12
-rw-r--r--cpukit/libmisc/dummy/dummy.c14
-rw-r--r--cpukit/sapi/include/confdefs.h77
3 files changed, 91 insertions, 12 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 4415999fae..191daf509e 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,15 @@
+2008-04-17 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * libmisc/dummy/dummy.c, sapi/include/confdefs.h: Add checks for
+ application configuration errors. If any POSIX objects or a POSIX
+ init thread is configured without POSIX being configure, then error
+ out. Similarly for ITRON. Add
+ CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER configuration
+ parameter so the application has to explicitly configure the Clock
+ driver in or out if the Timer driver is not configured. Also verify
+ RTEMS was built for multiprocessing, if the user tries to configure a
+ multiprocessing application.
+
2008-04-12 Chris Johns <chrisj@rtems.org>
* libmisc/shell/shell.c, libmisc/shell/shell.h,
diff --git a/cpukit/libmisc/dummy/dummy.c b/cpukit/libmisc/dummy/dummy.c
index c59114375c..7402d34d25 100644
--- a/cpukit/libmisc/dummy/dummy.c
+++ b/cpukit/libmisc/dummy/dummy.c
@@ -1,11 +1,7 @@
-/* Init
+/*
+ * Dummy configuration file
*
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- *
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -31,13 +27,17 @@ int main( int, char **, char **);
/* configuration information */
+/* This is enough to get a basic main() up. */
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_MAXIMUM_TASKS 10
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
#define CONFIGURE_INIT_TASK_ENTRY_POINT (void *)main
+/* Include basic device drivers needed to call delays */
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
#define CONFIGURE_INIT
#include <rtems/confdefs.h>
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 197ffc4374..19b65417a7 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -1368,14 +1368,18 @@ rtems_configuration_table Configuration = {
}
#endif
-/*
- * Some warnings and error checking
+/******************************************************************
+ ******************************************************************
+ ******************************************************************
+ * CONFIGURATION WARNINGS AND ERROR CHECKING *
+ ******************************************************************
+ ******************************************************************
+ ******************************************************************
*/
/*
* Make sure a task/thread of some sort is configured
*/
-
#if (CONFIGURE_MAXIMUM_TASKS == 0) && \
(CONFIGURE_MAXIMUM_POSIX_THREADS == 0) && \
(CONFIGURE_MAXIMUM_ADA_TASKS == 0) && \
@@ -1387,7 +1391,6 @@ rtems_configuration_table Configuration = {
* Make sure at least one of the initialization task/thread
* tables was defined.
*/
-
#if !defined(CONFIGURE_RTEMS_INIT_TASKS_TABLE) && \
!defined(CONFIGURE_POSIX_INIT_THREAD_TABLE) && \
!defined(CONFIGURE_ITRON_INIT_TASK_TABLE)
@@ -1395,6 +1398,71 @@ rtems_configuration_table Configuration = {
#endif
/*
+ * If the user is trying to configure a multiprocessing application and
+ * RTEMS was not configured and built multiprocessing, then error out.
+ */
+#if defined(CONFIGURE_MP_APPLICATION) && \
+ !defined(RTEMS_MULTIPROCESSING)
+#error "CONFIGURATION ERROR: RTEMS not configured for multiprocessing!!"
+#endif
+
+/*
+ * If an attempt was made to configure POSIX objects and
+ * the POSIX API was not configured into RTEMS, error out.
+ */
+#if !defined(RTEMS_POSIX_API)
+ #if ((CONFIGURE_MAXIMUM_POSIX_THREADS != 0) || \
+ (CONFIGURE_MAXIMUM_POSIX_MUTEXES != 0) || \
+ (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES != 0) || \
+ (CONFIGURE_MAXIMUM_POSIX_KEYS != 0) || \
+ (CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \
+ (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \
+ (CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES != 0) || \
+ (CONFIGURE_MAXIMUM_POSIX_SEMAPHORES != 0) || \
+ (CONFIGURE_MAXIMUM_POSIX_BARRIERS != 0) || \
+ (CONFIGURE_MAXIMUM_POSIX_SPINLOCKS != 0) || \
+ (CONFIGURE_MAXIMUM_POSIX_RWLOCKS != 0) || \
+ defined(CONFIGURE_POSIX_INIT_THREAD_TABLE)
+ #error "CONFIGURATION ERROR: POSIX API support not configured!!"
+ #endif
+#endif
+
+/*
+ * If an attempt was made to configure ITRON objects and
+ * the ITRON API was not configured into RTEMS, error out.
+ */
+#if !defined(RTEMS_ITRON_API)
+ #if ((CONFIGURE_MAXIMUM_ITRON_TASKS != 0) || \
+ (CONFIGURE_MAXIMUM_ITRON_SEMAPHORES != 0) || \
+ (CONFIGURE_MAXIMUM_ITRON_EVENTFLAGS != 0) || \
+ (CONFIGURE_MAXIMUM_ITRON_MAILBOXES != 0) || \
+ (CONFIGURE_MAXIMUM_ITRON_MESSAGE_BUFFERS != 0) || \
+ (CONFIGURE_MAXIMUM_ITRON_PORTS != 0) || \
+ (CONFIGURE_MAXIMUM_ITRON_MEMORY_POOLS != 0) || \
+ (CONFIGURE_MAXIMUM_ITRON_FIXED_MEMORY_POOLS != 0)) || \
+ defined(CONFIGURE_ITRON_INIT_TASK_TABLE)
+ #error "CONFIGURATION ERROR: ITRON API support not configured!!"
+ #endif
+#endif
+
+/*
+ * You must either explicity include or exclude the clock driver.
+ * It is such a common newbie error to leave it out. Maybe this
+ * will put an end to it.
+ *
+ * NOTE: If you are using the timer driver, it is considered
+ * mutually exclusive with the clock driver because it
+ * is assume to use the smae hardware.
+ */
+#if !defined(CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE)
+ #if !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \
+ !defined(CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER) && \
+ !defined(CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER)
+ #error "CONFIGURATION ERROR: Do you want the clock driver or not?!?"
+ #endif
+#endif
+
+/*
* These names have been obsoleted so make the user application stop compiling
*/
#if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \
@@ -1405,6 +1473,5 @@ rtems_configuration_table Configuration = {
#error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete"
#endif
-
#endif
/* end of include file */