![]() |
|
|||
File indexing completed on 2025-05-11 08:24:42
0001 /* SPDX-License-Identifier: BSD-2-Clause */ 0002 0003 /** 0004 * @file 0005 * 0006 * Minimum Size Application Initialization 0007 */ 0008 0009 /* 0010 * COPYRIGHT (c) 1989-2012. 0011 * On-Line Applications Research Corporation (OAR). 0012 * 0013 * Redistribution and use in source and binary forms, with or without 0014 * modification, are permitted provided that the following conditions 0015 * are met: 0016 * 1. Redistributions of source code must retain the above copyright 0017 * notice, this list of conditions and the following disclaimer. 0018 * 2. Redistributions in binary form must reproduce the above copyright 0019 * notice, this list of conditions and the following disclaimer in the 0020 * documentation and/or other materials provided with the distribution. 0021 * 0022 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 0023 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0024 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0025 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 0026 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0027 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0028 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0029 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0030 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0031 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0032 * POSSIBILITY OF SUCH DAMAGE. 0033 */ 0034 0035 #ifdef HAVE_CONFIG_H 0036 #include "config.h" 0037 #endif 0038 0039 #include <bsp.h> 0040 #include <rtems/score/thread.h> 0041 0042 static void *Init( uintptr_t ignored ) 0043 { 0044 /* initialize application */ 0045 0046 /* Real application would call idle loop functionality */ 0047 0048 /* but in this case, just return and fall into a fatal error */ 0049 0050 return NULL; 0051 } 0052 0053 /* configuration information */ 0054 0055 /* 0056 * This application has no device drivers. 0057 */ 0058 /* NOTICE: the clock driver is explicitly disabled */ 0059 #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER 0060 0061 /* 0062 * This application has no filesytem and libio support. 0063 */ 0064 #define CONFIGURE_APPLICATION_DISABLE_FILESYSTEM 0065 0066 /* 0067 * This disables reentrancy support in the C Library. It is usually 0068 * not something an application wants to do unless the development 0069 * team is committed to using C Library routines that are KNOWN to 0070 * be reentrant. Caveat Emptor!! 0071 */ 0072 #define CONFIGURE_DISABLE_NEWLIB_REENTRANCY 0073 0074 /* 0075 * This test does not use any stdio. 0076 */ 0077 #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 0 0078 0079 /* 0080 * This may prevent us from running on every architecture but it 0081 * demonstrates that the user can specify how small of a minimum 0082 * stack they want. 0083 */ 0084 #ifdef RTEMS_GCOV_COVERAGE 0085 #define CONFIGURE_MINIMUM_TASK_STACK_SIZE \ 0086 (CPU_STACK_MINIMUM_SIZE - CPU_STACK_ALIGNMENT) 0087 #else 0088 #define CONFIGURE_MINIMUM_TASK_STACK_SIZE 512 0089 #endif 0090 0091 /* 0092 * Keep the interrupt/initialization stack as is. Otherwise, the test may fail 0093 * in the low level system initialization. 0094 */ 0095 #ifdef BSP_INTERRUPT_STACK_SIZE 0096 #define CONFIGURE_INTERRUPT_STACK_SIZE BSP_INTERRUPT_STACK_SIZE 0097 #else 0098 #define CONFIGURE_INTERRUPT_STACK_SIZE CPU_STACK_MINIMUM_SIZE 0099 #endif 0100 0101 /* 0102 * This lowers the number of priorities that this test is able to 0103 * use. The Idle task will be running at the lowest priority. 0104 */ 0105 #define CONFIGURE_MAXIMUM_PRIORITY 15 0106 0107 /* 0108 * In this application, the initialization task performs the system 0109 * initialization and then transforms itself into the idle task. 0110 */ 0111 #define CONFIGURE_IDLE_TASK_BODY Init 0112 #define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION 0113 0114 /* 0115 * If you are debugging confdefs.h, define this 0116 */ 0117 /* #define CONFIGURE_CONFDEFS_DEBUG */ 0118 0119 /* 0120 * Instantiate the configuration tables. 0121 */ 0122 #define CONFIGURE_INIT 0123 0124 #include <rtems/confdefs.h> 0125 0126 /* global variables */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |