source: rtems/testsuites/samples/minimum/init.c @ 65f52d0

5
Last change on this file since 65f52d0 was 65f52d0, checked in by Sebastian Huber <sebastian.huber@…>, on 07/25/18 at 09:25:30

samples/minimum: Use default interrupt stack size

Update #3433.

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