Added a configuration file for sandboxes.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15267 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2021-12-27 12:56:46 +00:00
parent 046eefc043
commit 6810ebca2d
3 changed files with 121 additions and 16 deletions

View File

@ -0,0 +1,50 @@
/*
ChibiOS - Copyright (C) 2006..2020 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 sb/templates/sbconf.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 SB_CONFIG
* @details Sandboxes-related settings and hooks.
* @{
*/
#ifndef SBCONF_H
#define SBCONF_H
#define __CHIBIOS_SB_CONF__
#define __CHIBIOS_SB_CONF_VER_3_0__
/**
* @brief Number of memory regions for each sandbox.
*/
#if !defined(SB_CFG_NUM_REGIONS) || defined(__DOXYGEN__)
#define SB_CFG_NUM_REGIONS 2
#endif
/**
* @brief Enables Posix API in sandboxes using VFS.
*/
#if !defined(SB_CFG_ENABLE_VFS) || defined(__DOXYGEN__)
#define SB_CFG_ENABLE_VFS TRUE
#endif
#endif /* SBCONF_H */
/** @} */

View File

@ -0,0 +1,50 @@
/*
ChibiOS - Copyright (C) 2006..2020 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 sb/templates/sbconf.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 SB_CONFIG
* @details Sandboxes-related settings and hooks.
* @{
*/
#ifndef SBCONF_H
#define SBCONF_H
#define __CHIBIOS_SB_CONF__
#define __CHIBIOS_SB_CONF_VER_3_0__
/**
* @brief Number of memory regions for each sandbox.
*/
#if !defined(SB_CFG_NUM_REGIONS) || defined(__DOXYGEN__)
#define SB_CFG_NUM_REGIONS 2
#endif
/**
* @brief Enables Posix API in sandboxes using VFS.
*/
#if !defined(SB_CFG_ENABLE_VFS) || defined(__DOXYGEN__)
#define SB_CFG_ENABLE_VFS TRUE
#endif
#endif /* SBCONF_H */
/** @} */

View File

@ -49,17 +49,17 @@
/**
* @brief Safety Extensions version string.
*/
#define CH_SB_VERSION "2.1.0"
#define CH_SB_VERSION "3.0.0"
/**
* @brief Safety Extensions version major number.
*/
#define CH_SB_MAJOR 2
#define CH_SB_MAJOR 3
/**
* @brief Safety Extensions version minor number.
*/
#define CH_SB_MINOR 1
#define CH_SB_MINOR 0
/**
* @brief Safety Extensions version patch number.
@ -71,24 +71,29 @@
/* Module pre-compile time settings. */
/*===========================================================================*/
/**
* @brief Number of memory regions for each sandbox.
*/
#if !defined(SB_CFG_NUM_REGIONS) || defined(__DOXYGEN__)
#define SB_CFG_NUM_REGIONS 2
#endif
/**
* @brief Enables Posix API in sandboxes using VFS.
*/
#if !defined(SB_CFG_ENABLE_VFS) || defined(__DOXYGEN__)
#define SB_CFG_ENABLE_VFS TRUE
#endif
#include "sbconf.h"
/*===========================================================================*/
/* Derived constants and error checks. */
/*===========================================================================*/
#if !defined(__CHIBIOS_SB_CONF__)
#error "missing or wrong configuration file"
#endif
#if !defined(__CHIBIOS_SB_CONF_VER_3_0__)
#error "obsolete or unknown configuration file"
#endif
/* Checks on configuration options.*/
#if !defined(SB_CFG_NUM_REGIONS) || defined(__DOXYGEN__)
#error "SB_CFG_NUM_REGIONS not defined in sbconf.h"
#endif
#if !defined(SB_CFG_ENABLE_VFS) || defined(__DOXYGEN__)
#error "SB_CFG_ENABLE_VFS not defined in sbconf.h"
#endif
/* License checks.*/
#if !defined(CH_CUSTOMER_LIC_SB) || !defined(CH_LICENSE_FEATURES)
#error "malformed chlicense.h"