Removed separated configuration file for oslib.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11795 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
Giovanni Di Sirio 2018-03-17 11:24:50 +00:00
parent 43433fde0b
commit 0ca35b4b5a
6 changed files with 17 additions and 199 deletions

View File

@ -31,14 +31,6 @@
#ifndef CHLIB_H #ifndef CHLIB_H
#define CHLIB_H #define CHLIB_H
/* Tmeporary hack.*/
#if !defined(_CHIBIOS_RT_CONF_VER_5_0_) && !defined(_CHIBIOS_NIL_CONF_VER_3_0_)
#include "chlibconf.h"
#else
#define _CHIBIOS_LIB_CONF_
#define _CHIBIOS_LIB_CONF_VER_1_0_
#endif
/*===========================================================================*/ /*===========================================================================*/
/* Module constants. */ /* Module constants. */
/*===========================================================================*/ /*===========================================================================*/
@ -96,6 +88,10 @@
#error "malformed chlicense.h" #error "malformed chlicense.h"
#endif #endif
#if CH_CUSTOMER_LIC_LIB== FALSE
#error "ChibiOS/LIB not licensed"
#endif
#if (CH_LICENSE_FEATURES != CH_FEATURES_FULL) && \ #if (CH_LICENSE_FEATURES != CH_FEATURES_FULL) && \
(CH_LICENSE_FEATURES != CH_FEATURES_INTERMEDIATE) && \ (CH_LICENSE_FEATURES != CH_FEATURES_INTERMEDIATE) && \
(CH_LICENSE_FEATURES != CH_FEATURES_BASIC) (CH_LICENSE_FEATURES != CH_FEATURES_BASIC)
@ -135,14 +131,6 @@
(CH_LICENSE_FEATURES == CH_FEATURES_BASIC) */ (CH_LICENSE_FEATURES == CH_FEATURES_BASIC) */
/* Configuration file checks.*/ /* Configuration file checks.*/
#if !defined(_CHIBIOS_LIB_CONF_)
#error "invalid configuration file"
#endif
#if !defined(_CHIBIOS_LIB_CONF_VER_1_0_)
#error "obsolete or unknown configuration file"
#endif
#if !defined(CH_CFG_USE_SEMAPHORES) #if !defined(CH_CFG_USE_SEMAPHORES)
#error "CH_CFG_USE_SEMAPHORES not defined in chconf.h" #error "CH_CFG_USE_SEMAPHORES not defined in chconf.h"
#endif #endif

View File

@ -1,3 +1,2 @@
All the code contained under ./os/common/oslib are optional RTOS modules All the code contained under ./os/lib are high level RTOS extension modules
compatible with both RT and NIL. The code is placed under ./os/common in compatible with both RT and NIL.
order to prevent code duplication and disalignments.

View File

@ -1,126 +0,0 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @file templates/chlibconf.h
* @brief Configuration file template.
* @details A copy of this file must be placed in each project directory, it
* contains the application specific kernel settings.
*
* @addtogroup oslib_config
* @details OS Library related settings.
* @{
*/
#ifndef CHLIBCONF_H
#define CHLIBCONF_H
#define _CHIBIOS_LIB_CONF_
#define _CHIBIOS_LIB_CONF_VER_1_0_
/**
* @brief Mailboxes APIs.
* @details If enabled then the asynchronous messages (mailboxes) APIs are
* included in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_SEMAPHORES in chconf.h.
*/
#define CH_CFG_USE_MAILBOXES TRUE
/**
* @brief Core Memory Manager APIs.
* @details If enabled then the core memory manager APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_MEMCORE TRUE
/**
* @brief Heap Allocator APIs.
* @details If enabled then the memory heap allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
* @p CH_CFG_USE_SEMAPHORES in chconf.h.
* @note Mutexes are recommended.
*/
#define CH_CFG_USE_HEAP TRUE
/**
* @brief Memory Pools Allocator APIs.
* @details If enabled then the memory pools allocator APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_MEMPOOLS TRUE
/**
* @brief Objects FIFOs APIs.
* @details If enabled then the objects FIFOs APIs are included
* in the kernel.
*
* @note The default is @p TRUE.
*/
#define CH_CFG_USE_OBJ_FIFOS TRUE
/**
* @brief Objects Factory APIs.
* @details If enabled then the objects factory APIs are included in the
* kernel.
*
* @note The default is @p FALSE.
*/
#define CH_CFG_USE_FACTORY TRUE
/**
* @brief Maximum length for object names.
* @details If the specified length is zero then the name is stored by
* pointer but this could have unintended side effects.
*/
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
/**
* @brief Enables the registry of generic objects.
*/
#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
/**
* @brief Enables factory for generic buffers.
*/
#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
/**
* @brief Enables factory for semaphores.
*/
#define CH_CFG_FACTORY_SEMAPHORES TRUE
/**
* @brief Enables factory for mailboxes.
*/
#define CH_CFG_FACTORY_MAILBOXES TRUE
/**
* @brief Enables factory for objects FIFOs.
*/
#define CH_CFG_FACTORY_OBJ_FIFOS TRUE
#endif /* CHLIBCONF_H */
/** @} */

View File

@ -418,6 +418,11 @@
/* Derived constants and error checks. */ /* Derived constants and error checks. */
/*===========================================================================*/ /*===========================================================================*/
/* License checks.*/
#if !defined(CH_CUSTOMER_LIC_NIL) || !defined(CH_LICENSE_FEATURES)
#error "malformed chlicense.h"
#endif
#if CH_CUSTOMER_LIC_NIL == FALSE #if CH_CUSTOMER_LIC_NIL == FALSE
#error "ChibiOS/NIL not licensed" #error "ChibiOS/NIL not licensed"
#endif #endif

View File

@ -115,11 +115,7 @@
#endif #endif
#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) #if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#error " not defined in chconf.h" #error "CH_CFG_USE_CONDVARS_TIMEOUT not defined in chconf.h"
#endif
#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
#error " not defined in chconf.h"
#endif #endif
#if !defined(CH_CFG_USE_EVENTS) #if !defined(CH_CFG_USE_EVENTS)
@ -138,59 +134,10 @@
#error "CH_CFG_USE_MESSAGES_PRIORITY not defined in chconf.h" #error "CH_CFG_USE_MESSAGES_PRIORITY not defined in chconf.h"
#endif #endif
#if !defined(CH_CFG_USE_MAILBOXES)
#error "CH_CFG_USE_MAILBOXES not defined in chconf.h"
#endif
#if !defined(CH_CFG_USE_MEMCORE)
#error "CH_CFG_USE_MEMCORE not defined in chconf.h"
#endif
#if !defined(CH_CFG_USE_HEAP)
#error "CH_CFG_USE_HEAP not defined in chconf.h"
#endif
#if !defined(CH_CFG_USE_MEMPOOLS)
#error "CH_CFG_USE_MEMPOOLS not defined in chconf.h"
#endif
#if !defined(CH_CFG_USE_OBJ_FIFOS)
#error "CH_CFG_USE_OBJ_FIFOS not defined in chconf.h"
#endif
#if !defined(CH_CFG_USE_DYNAMIC) #if !defined(CH_CFG_USE_DYNAMIC)
#error "CH_CFG_USE_DYNAMIC not defined in chconf.h" #error "CH_CFG_USE_DYNAMIC not defined in chconf.h"
#endif #endif
/* Objects factory options checks.*/
#if !defined(CH_CFG_USE_FACTORY)
#error "CH_CFG_USE_FACTORY not defined in chconf.h"
#endif
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
#error "CH_CFG_FACTORY_MAX_NAMES_LENGTH not defined in chconf.h"
#endif
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
#error "CH_CFG_FACTORY_OBJECTS_REGISTRY not defined in chconf.h"
#endif
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
#error "CH_CFG_FACTORY_GENERIC_BUFFERS not defined in chconf.h"
#endif
#if !defined(CH_CFG_FACTORY_SEMAPHORES)
#error "CH_CFG_FACTORY_SEMAPHORES not defined in chconf.h"
#endif
#if !defined(CH_CFG_FACTORY_MAILBOXES)
#error "CH_CFG_FACTORY_MAILBOXES not defined in chconf.h"
#endif
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
#error "CH_CFG_FACTORY_OBJ_FIFOS not defined in chconf.h"
#endif
/* Debug options checks.*/ /* Debug options checks.*/
#if !defined(CH_DBG_STATISTICS) #if !defined(CH_DBG_STATISTICS)
#error "CH_DBG_STATISTICS not defined in chconf.h" #error "CH_DBG_STATISTICS not defined in chconf.h"

View File

@ -37,6 +37,11 @@
/* Derived constants and error checks. */ /* Derived constants and error checks. */
/*===========================================================================*/ /*===========================================================================*/
/* License checks.*/
#if !defined(CH_CUSTOMER_LIC_RT) || !defined(CH_LICENSE_FEATURES)
#error "malformed chlicense.h"
#endif
#if CH_CUSTOMER_LIC_RT == FALSE #if CH_CUSTOMER_LIC_RT == FALSE
#error "ChibiOS/RT not licensed" #error "ChibiOS/RT not licensed"
#endif #endif