📄 confdefs.h
字号:
/* confdefs.h * * This include file contains the configuration table template that will * be instantiated by an application based on the setting of a number * of macros. The macros are documented in the Configuring a System * chapter of the Classic API User's Guide * * The model is to estimate the memory required for each configured item * and sum those estimates. The estimate can be too high or too low for * a variety of reasons: * * Reasons estimate is too high: * + FP contexts (not all tasks are FP) * * Reasons estimate is too low: * + stacks greater than minimum size * + messages * + application must account for device driver resources * + application must account for add-on library resource requirements * * NOTE: Eventually this may be able to take into account some of * the above. This procedure has evolved from just enough to * support the RTEMS Test Suites into something that can be * used remarkably reliably by most applications. * * COPYRIGHT (c) 1989-2002. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. * * $Id: confdefs.h,v 1.55.2.4 2005/09/01 13:27:02 joel Exp $ */#ifndef __CONFIGURATION_TEMPLATE_h#define __CONFIGURATION_TEMPLATE_h #ifdef __cplusplusextern "C" {#endif/* * Include the executive's configuration */#include <rtems/score/cpuopts.h>extern rtems_initialization_tasks_table Initialization_tasks[];extern rtems_driver_address_table Device_drivers[];extern rtems_configuration_table Configuration;extern rtems_multiprocessing_table Multiprocessing_configuration;#ifdef RTEMS_POSIX_APIextern posix_api_configuration_table Configuration_POSIX_API;#endif#ifdef RTEMS_ITRON_APIextern itron_api_configuration_table Configuration_ITRON_API;#endif/* * RTEMS C Library and Newlib support */#ifdef RTEMS_NEWLIB#define CONFIGURE_NEWLIB_EXTENSION 1#else#define CONFIGURE_NEWLIB_EXTENSION 0#endif#define CONFIGURE_MALLOC_REGION 1/* * File descriptors managed by libio */#ifndef CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3#endif#define CONFIGURE_LIBIO_SEMAPHORES \ (CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS + 1)#ifdef CONFIGURE_INITunsigned32 rtems_libio_number_iops = CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS;#endif/* * Termios resources */#ifdef CONFIGURE_TERMIOS_DISABLED#define CONFIGURE_TERMIOS_SEMAPHORES 0#else#ifndef CONFIGURE_NUMBER_OF_TERMIOS_PORTS#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1#endif#define CONFIGURE_TERMIOS_SEMAPHORES \ ((CONFIGURE_NUMBER_OF_TERMIOS_PORTS * 4) + 1)#endif/* * Mount Table Configuration */#include <imfs.h>#ifdef CONFIGURE_INIT#ifndef CONFIGURE_HAS_OWN_MOUNT_TABLErtems_filesystem_mount_table_t configuration_mount_table = {#ifdef CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM &IMFS_ops,#else /* using miniIMFS as base filesystem */ &miniIMFS_ops,#endif RTEMS_FILESYSTEM_READ_WRITE, NULL, NULL};rtems_filesystem_mount_table_t *rtems_filesystem_mount_table = &configuration_mount_table;int rtems_filesystem_mount_table_size = 1;#endif#endif/* * Stack Checker Requirements * * NOTE: This does not automatically enable reporting at program exit. */#ifdef STACK_CHECKER_ON#define CONFIGURE_STACK_CHECKER_EXTENSION 1#else#define CONFIGURE_STACK_CHECKER_EXTENSION 0#endif/* * Interrupt Stack Space * * NOTE: There is currently no way for the application to override * the interrupt stack size set by the BSP. */#if (CPU_ALLOCATE_INTERRUPT_STACK == 0)#undef CONFIGURE_INTERRUPT_STACK_MEMORY#define CONFIGURE_INTERRUPT_STACK_MEMORY 0#else #ifndef CONFIGURE_INTERRUPT_STACK_MEMORY #define CONFIGURE_INTERRUPT_STACK_MEMORY RTEMS_MINIMUM_STACK_SIZE #endif#endif/* * Default User Initialization Task Table. This table guarantees that * one user initialization table is defined. */#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE#ifdef CONFIGURE_HAS_OWN_INIT_TASK_TABLE/* * The user is defining their own table information and setting the * appropriate variables. */#else#ifndef CONFIGURE_INIT_TASK_NAME#define CONFIGURE_INIT_TASK_NAME rtems_build_name( 'U', 'I', '1', ' ' )#endif#ifndef CONFIGURE_INIT_TASK_STACK_SIZE#define CONFIGURE_INIT_TASK_STACK_SIZE RTEMS_MINIMUM_STACK_SIZE #endif#ifndef CONFIGURE_INIT_TASK_PRIORITY#define CONFIGURE_INIT_TASK_PRIORITY 1#endif#ifndef CONFIGURE_INIT_TASK_ATTRIBUTES#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_DEFAULT_ATTRIBUTES #endif#ifndef CONFIGURE_INIT_TASK_ENTRY_POINT#define CONFIGURE_INIT_TASK_ENTRY_POINT Init #endif#ifndef CONFIGURE_INIT_TASK_INITIAL_MODES#define CONFIGURE_INIT_TASK_INITIAL_MODES RTEMS_NO_PREEMPT #endif#ifndef CONFIGURE_INIT_TASK_ARGUMENTS#define CONFIGURE_INIT_TASK_ARGUMENTS 0 #endif#ifdef CONFIGURE_INITrtems_initialization_tasks_table Initialization_tasks[] = { { CONFIGURE_INIT_TASK_NAME, CONFIGURE_INIT_TASK_STACK_SIZE, CONFIGURE_INIT_TASK_PRIORITY, CONFIGURE_INIT_TASK_ATTRIBUTES, CONFIGURE_INIT_TASK_ENTRY_POINT, CONFIGURE_INIT_TASK_INITIAL_MODES, CONFIGURE_INIT_TASK_ARGUMENTS }};#endif#define CONFIGURE_INIT_TASK_TABLE Initialization_tasks#define CONFIGURE_INIT_TASK_TABLE_SIZE \ sizeof(CONFIGURE_INIT_TASK_TABLE) / sizeof(rtems_initialization_tasks_table)#endif /* CONFIGURE_HAS_OWN_INIT_TASK_TABLE */#else /* CONFIGURE_RTEMS_INIT_TASKS_TABLE */#define CONFIGURE_INIT_TASK_TABLE NULL#define CONFIGURE_INIT_TASK_TABLE_SIZE 0#define CONFIGURE_INIT_TASK_STACK_SIZE 0#endif/* * Map obsolete names to current ones * * NOTE: These should be obsoleted in a future release. */#ifdef CONFIGURE_TEST_NEEDS_TIMER_DRIVER#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER#endif#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER#endif #ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER#endif #ifdef CONFIGURE_TEST_NEEDS_RTC_DRIVER#define CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER#endif #ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER#define CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER#endif/* * Default Device Driver Table. Each driver needed by the test is explicitly * choosen by that test. There is always a null driver entry. */#define NULL_DRIVER_TABLE_ENTRY \ { NULL, NULL, NULL, NULL, NULL, NULL }#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER#include <console.h>#endif#ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER#include <clockdrv.h>#endif#ifdef CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER#include <timerdrv.h>#endif#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER#include <rtc.h>#endif#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER#include <rtems/devnull.h>#endif#ifndef CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE#ifdef CONFIGURE_INITrtems_driver_address_table Device_drivers[] = {#ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER CONSOLE_DRIVER_TABLE_ENTRY,#endif#ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER CLOCK_DRIVER_TABLE_ENTRY,#endif#ifdef CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER RTC_DRIVER_TABLE_ENTRY,#endif#ifdef CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER DEVNULL_DRIVER_TABLE_ENTRY,#endif#ifdef CONFIGURE_APPLICATION_NEEDS_NULL_DRIVER NULL_DRIVER_TABLE_ENTRY#elif !defined(CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER) && \ !defined(CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER) && \ !defined(CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER) && \ !defined(CONFIGURE_APPLICATION_NEEDS_STUB_DRIVER) NULL_DRIVER_TABLE_ENTRY#endif};#endif#endif /* CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE *//* * Default the number of drivers per node. This value may be * overridden by the user. */#define CONFIGURE_NUMBER_OF_DRIVERS \ ((sizeof(Device_drivers) / sizeof(rtems_driver_address_table)))#ifndef CONFIGURE_MAXIMUM_DRIVERS#define CONFIGURE_MAXIMUM_DRIVERS CONFIGURE_NUMBER_OF_DRIVERS#endif/* * Default the number of devices per device driver. This value may be * overridden by the user. */#ifndef CONFIGURE_MAXIMUM_DEVICES#define CONFIGURE_MAXIMUM_DEVICES 20#endif/* * Default Multiprocessing Configuration Table. The defaults are * appropriate for most of the RTEMS Multiprocessor Test Suite. Each * value may be overridden within each test to customize the environment. */#ifdef CONFIGURE_MP_APPLICATION#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE#ifndef CONFIGURE_MP_NODE_NUMBER#define CONFIGURE_MP_NODE_NUMBER NODE_NUMBER#endif#ifndef CONFIGURE_MP_MAXIMUM_NODES#define CONFIGURE_MP_MAXIMUM_NODES 2#endif#ifndef CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS#define CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS 32#endif#ifndef CONFIGURE_MP_MAXIMUM_PROXIES#define CONFIGURE_MP_MAXIMUM_PROXIES 32#endif#ifndef CONFIGURE_MP_MPCI_TABLE_POINTER#include <mpci.h>#define CONFIGURE_MP_MPCI_TABLE_POINTER &MPCI_table#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -