source: rtems/testsuites/samples/minimum/init.c @ e313551

4.11
Last change on this file since e313551 was e313551, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 22, 2011 at 10:58:44 AM

Add HAVE_CONFIG_H.

  • Property mode set to 100644
File size: 3.5 KB
Line 
1/*  Minimum Size Application Initialization
2 *
3 *  COPYRIGHT (c) 1989-2008.
4 *  On-Line Applications Research Corporation (OAR).
5 *
6 *  The license and distribution terms for this file may be
7 *  found in the file LICENSE in this distribution or at
8 *  http://www.rtems.com/license/LICENSE.
9 *
10 *  $Id$
11 */
12
13#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
14
15#ifdef HAVE_CONFIG_H
16#include "config.h"
17#endif
18
19#include <bsp.h>
20#include <rtems/score/thread.h>
21
22rtems_task Init(
23  rtems_task_argument ignored
24)
25{
26  /* initialize application */
27
28  /* Real application would call idle loop functionality */
29
30  /* but in this case, just return and fall into a fatal error */
31}
32
33/* configuration information */
34
35/*
36 * This fatal extension adds some bytes to the absolute minimum, but it
37 * prevents the _CPU_Fatal_halt().
38 */
39static void Fatal_extension(
40  uint32_t source,
41  bool is_internal,
42  uint32_t error
43)
44{
45  _Thread_Stop_multitasking();
46}
47
48#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = Fatal_extension }
49
50/*
51 * This application has no device drivers.
52 */
53/* NOTICE: the clock driver is explicitly disabled */
54#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
55
56/*
57 *  This application has no filesytem and libio support.
58 */
59#define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
60
61/*
62 *  This disables reentrancy support in the C Library.  It is usually
63 *  not something an application wants to do unless the development
64 *  team is committed to using C Library routines that are KNOWN to
65 *  be reentrant.  Caveat Emptor!!
66 */
67#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY
68
69/*
70 *  This test does not need the console driver so there is no reason
71 *  to configure termios.
72 */
73#define CONFIGURE_TERMIOS_DISABLED
74
75/*
76 *  This test does not use any stdio.
77 */
78#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 0
79
80/*
81 *  This may prevent us from running on every architecture but it
82 *  demonstrates that the user can specify how small of a minimum
83 *  stack they want.
84 */
85#define CONFIGURE_MINIMUM_TASK_STACK_SIZE 512
86
87/*
88 *  This lowers the number of priorities that this test is able to
89 *  use.  The Idle task will be running at the lowest priority.
90 */
91#define CONFIGURE_MAXIMUM_PRIORITY 15
92
93/*
94 *  This disables Classic API Notepads and saves 16 uint32_t's of RAM
95 *  per Task Control Block.  If you aren't using these and are tight
96 *  on RAM, this is an option.
97 */
98#define CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS
99
100/*
101 *  This configures RTEMS to use a single memory pool for the RTEMS Workspace
102 *  and C Program Heap.  If not defined, there will be separate memory pools
103 *  for the RTEMS Workspace and C Program Heap.  Having separate pools
104 *  does haved some advantages in the event a task blows a stack or writes
105 *  outside its memory area. However, in low memory systems the overhead of
106 *  the two pools plus the potential for unused memory in either pool is
107 *  very undesirable.
108 *
109 *  In high memory environments, this is desirable when you want to use
110 *  the RTEMS "unlimited" objects option.  You will be able to create objects
111 *  until you run out of memory.
112 */
113#define CONFIGURE_UNIFIED_WORK_AREAS
114
115/*
116 *  In this application, the initialization task performs the system
117 *  initialization and then transforms itself into the idle task.
118 */
119#define CONFIGURE_IDLE_TASK_BODY Init
120#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
121
122/*
123 *  If you are debugging confdefs.h, define this
124 */
125/* #define CONFIGURE_CONFDEFS_DEBUG */
126
127/*
128 *  Instantiate the configuration tables.
129 */
130#define CONFIGURE_INIT
131
132#include <rtems/confdefs.h>
133
134/* global variables */
Note: See TracBrowser for help on using the repository browser.