Added licensing checks to ports.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9289 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
Giovanni Di Sirio 2016-04-16 10:44:16 +00:00
parent bb42a06ea0
commit c3615cd90e
12 changed files with 85 additions and 1 deletions

View File

@ -26,6 +26,7 @@
*/ */
#define _FROM_ASM_ #define _FROM_ASM_
#include "chlicense.h"
#include "chconf.h" #include "chconf.h"
#include "armparams.h" #include "armparams.h"

View File

@ -118,6 +118,14 @@
/* Derived constants and error checks. */ /* Derived constants and error checks. */
/*===========================================================================*/ /*===========================================================================*/
#if !defined(CH_CUSTOMER_LICENSED_PORT_CM0)
#error "CH_CUSTOMER_LICENSED_PORT_CM0 not defined"
#endif
#if CH_CUSTOMER_LICENSED_PORT_CM0 == FALSE
#error "ChibiOS Cortex-M0 port not licensed"
#endif
/** /**
* @name Architecture and Compiler * @name Architecture and Compiler
* @{ * @{

View File

@ -192,6 +192,15 @@
* @{ * @{
*/ */
#if (CORTEX_MODEL == 3) || defined(__DOXYGEN__) #if (CORTEX_MODEL == 3) || defined(__DOXYGEN__)
#if !defined(CH_CUSTOMER_LICENSED_PORT_CM3)
#error "CH_CUSTOMER_LICENSED_PORT_CM3 not defined"
#endif
#if CH_CUSTOMER_LICENSED_PORT_CM3 == FALSE
#error "ChibiOS Cortex-M3 port not licensed"
#endif
/** /**
* @brief Macro defining the specific ARM architecture. * @brief Macro defining the specific ARM architecture.
*/ */
@ -212,6 +221,15 @@
#endif #endif
#elif (CORTEX_MODEL == 4) #elif (CORTEX_MODEL == 4)
#if !defined(CH_CUSTOMER_LICENSED_PORT_CM4)
#error "CH_CUSTOMER_LICENSED_PORT_CM4 not defined"
#endif
#if CH_CUSTOMER_LICENSED_PORT_CM4 == FALSE
#error "ChibiOS Cortex-M4 port not licensed"
#endif
#define PORT_ARCHITECTURE_ARM_v7ME #define PORT_ARCHITECTURE_ARM_v7ME
#define PORT_ARCHITECTURE_NAME "ARMv7E-M" #define PORT_ARCHITECTURE_NAME "ARMv7E-M"
#if CORTEX_USE_FPU #if CORTEX_USE_FPU
@ -229,7 +247,16 @@
#endif #endif
#elif (CORTEX_MODEL == 7) #elif (CORTEX_MODEL == 7)
#define PORT_ARCHITECTURE_ARM_v7ME
#if !defined(CH_CUSTOMER_LICENSED_PORT_CM7)
#error "CH_CUSTOMER_LICENSED_PORT_CM7 not defined"
#endif
#if CH_CUSTOMER_LICENSED_PORT_CM7 == FALSE
#error "ChibiOS Cortex-M7 port not licensed"
#endif
#define PORT_ARCHITECTURE_ARM_v7ME
#define PORT_ARCHITECTURE_NAME "ARMv7E-M" #define PORT_ARCHITECTURE_NAME "ARMv7E-M"
#if CORTEX_USE_FPU #if CORTEX_USE_FPU
#if PORT_ENABLE_GUARD_PAGES == FALSE #if PORT_ENABLE_GUARD_PAGES == FALSE

View File

@ -34,6 +34,7 @@
#endif #endif
#define _FROM_ASM_ #define _FROM_ASM_
#include "chlicense.h"
#include "chconf.h" #include "chconf.h"
#include "chcore.h" #include "chcore.h"

View File

@ -34,6 +34,7 @@
#endif #endif
#define _FROM_ASM_ #define _FROM_ASM_
#include "chlicense.h"
#include "chconf.h" #include "chconf.h"
#include "chcore.h" #include "chcore.h"

View File

@ -34,6 +34,7 @@
#endif #endif
#define _FROM_ASM_ #define _FROM_ASM_
#include "chlicense.h"
#include "chconf.h" #include "chconf.h"
#include "chcore.h" #include "chcore.h"

View File

@ -34,6 +34,7 @@
#endif #endif
#define _FROM_ASM_ #define _FROM_ASM_
#include "chlicense.h"
#include "chconf.h" #include "chconf.h"
#include "chcore.h" #include "chcore.h"

View File

@ -34,6 +34,7 @@
#endif #endif
#define _FROM_ASM_ #define _FROM_ASM_
#include "chlicense.h"
#include "chconf.h" #include "chconf.h"
#include "chcore.h" #include "chcore.h"

View File

@ -34,6 +34,7 @@
#endif #endif
#define _FROM_ASM_ #define _FROM_ASM_
#include "chlicense.h"
#include "chconf.h" #include "chconf.h"
#include "chcore.h" #include "chcore.h"

View File

@ -178,13 +178,53 @@
* @brief Name of the architecture variant. * @brief Name of the architecture variant.
*/ */
#if (PPC_VARIANT == PPC_VARIANT_e200z0) || defined(__DOXYGEN__) #if (PPC_VARIANT == PPC_VARIANT_e200z0) || defined(__DOXYGEN__)
#if !defined(CH_CUSTOMER_LICENSED_PORT_E200Z0)
#error "CH_CUSTOMER_LICENSED_PORT_E200Z0 not defined"
#endif
#if CH_CUSTOMER_LICENSED_PORT_E200Z0 == FALSE
#error "ChibiOS Power e200z0 port not licensed"
#endif
#define PORT_CORE_VARIANT_NAME "e200z0" #define PORT_CORE_VARIANT_NAME "e200z0"
#elif PPC_VARIANT == PPC_VARIANT_e200z2 #elif PPC_VARIANT == PPC_VARIANT_e200z2
#if !defined(CH_CUSTOMER_LICENSED_PORT_E200Z2)
#error "CH_CUSTOMER_LICENSED_PORT_E200Z2 not defined"
#endif
#if CH_CUSTOMER_LICENSED_PORT_E200Z2 == FALSE
#error "ChibiOS Power e200z2 port not licensed"
#endif
#define PORT_CORE_VARIANT_NAME "e200z2" #define PORT_CORE_VARIANT_NAME "e200z2"
#elif PPC_VARIANT == PPC_VARIANT_e200z3 #elif PPC_VARIANT == PPC_VARIANT_e200z3
#if !defined(CH_CUSTOMER_LICENSED_PORT_E200Z3)
#error "CH_CUSTOMER_LICENSED_PORT_E200Z3 not defined"
#endif
#if CH_CUSTOMER_LICENSED_PORT_E200Z3 == FALSE
#error "ChibiOS Power e200z3 port not licensed"
#endif
#define PORT_CORE_VARIANT_NAME "e200z3" #define PORT_CORE_VARIANT_NAME "e200z3"
#elif PPC_VARIANT == PPC_VARIANT_e200z4 #elif PPC_VARIANT == PPC_VARIANT_e200z4
#if !defined(CH_CUSTOMER_LICENSED_PORT_E200Z4)
#error "CH_CUSTOMER_LICENSED_PORT_E200Z4 not defined"
#endif
#if CH_CUSTOMER_LICENSED_PORT_E200Z4 == FALSE
#error "ChibiOS Power e200z4 port not licensed"
#endif
#define PORT_CORE_VARIANT_NAME "e200z4" #define PORT_CORE_VARIANT_NAME "e200z4"
#else #else
#error "unknown or unsupported PowerPC variant specified" #error "unknown or unsupported PowerPC variant specified"
#endif #endif

View File

@ -45,6 +45,7 @@
* Imports the PPC configuration headers. * Imports the PPC configuration headers.
*/ */
#define _FROM_ASM_ #define _FROM_ASM_
#include "chlicense.h"
#include "chconf.h" #include "chconf.h"
#include "chcore.h" #include "chcore.h"

View File

@ -42,6 +42,7 @@
/*===========================================================================*/ /*===========================================================================*/
#define _FROM_ASM_ #define _FROM_ASM_
#include "chlicense.h"
#include "chconf.h" #include "chconf.h"
#include "chcore.h" #include "chcore.h"