diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-04-16 10:44:16 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-04-16 10:44:16 +0000 |
commit | c3615cd90efe574cd82517591e3f6689d873b3e9 (patch) | |
tree | faab347582e54e7a4e9e21f1161e5206d53bd7b0 /os/common/ports/ARMCMx | |
parent | bb42a06ea099afc1070c8421e2695bb037434e97 (diff) | |
download | ChibiOS-c3615cd90efe574cd82517591e3f6689d873b3e9.tar.gz ChibiOS-c3615cd90efe574cd82517591e3f6689d873b3e9.tar.bz2 ChibiOS-c3615cd90efe574cd82517591e3f6689d873b3e9.zip |
Added licensing checks to ports.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9289 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/ports/ARMCMx')
-rw-r--r-- | os/common/ports/ARMCMx/chcore_v6m.h | 8 | ||||
-rw-r--r-- | os/common/ports/ARMCMx/chcore_v7m.h | 29 | ||||
-rw-r--r-- | os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s | 1 | ||||
-rw-r--r-- | os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s | 1 | ||||
-rw-r--r-- | os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v6m.s | 1 | ||||
-rw-r--r-- | os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s | 1 | ||||
-rw-r--r-- | os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v6m.s | 1 | ||||
-rw-r--r-- | os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s | 1 |
8 files changed, 42 insertions, 1 deletions
diff --git a/os/common/ports/ARMCMx/chcore_v6m.h b/os/common/ports/ARMCMx/chcore_v6m.h index 06039ecc6..07fb06afa 100644 --- a/os/common/ports/ARMCMx/chcore_v6m.h +++ b/os/common/ports/ARMCMx/chcore_v6m.h @@ -118,6 +118,14 @@ /* 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
* @{
diff --git a/os/common/ports/ARMCMx/chcore_v7m.h b/os/common/ports/ARMCMx/chcore_v7m.h index bf6a998f3..668d9e3b0 100644 --- a/os/common/ports/ARMCMx/chcore_v7m.h +++ b/os/common/ports/ARMCMx/chcore_v7m.h @@ -192,6 +192,15 @@ * @{
*/
#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.
*/
@@ -212,6 +221,15 @@ #endif
#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_NAME "ARMv7E-M"
#if CORTEX_USE_FPU
@@ -229,7 +247,16 @@ #endif
#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"
#if CORTEX_USE_FPU
#if PORT_ENABLE_GUARD_PAGES == FALSE
diff --git a/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s b/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s index d7ccbcc57..15cb8bdac 100644 --- a/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s +++ b/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v6m.s @@ -34,6 +34,7 @@ #endif
#define _FROM_ASM_
+#include "chlicense.h"
#include "chconf.h"
#include "chcore.h"
diff --git a/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s b/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s index 4c228189c..943892d24 100644 --- a/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s +++ b/os/common/ports/ARMCMx/compilers/GCC/chcoreasm_v7m.s @@ -34,6 +34,7 @@ #endif
#define _FROM_ASM_
+#include "chlicense.h"
#include "chconf.h"
#include "chcore.h"
diff --git a/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v6m.s b/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v6m.s index de4c9f031..81c680bb5 100644 --- a/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v6m.s +++ b/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v6m.s @@ -34,6 +34,7 @@ #endif
#define _FROM_ASM_
+#include "chlicense.h"
#include "chconf.h"
#include "chcore.h"
diff --git a/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s b/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s index b30a819f7..c1a19fc29 100644 --- a/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s +++ b/os/common/ports/ARMCMx/compilers/IAR/chcoreasm_v7m.s @@ -34,6 +34,7 @@ #endif
#define _FROM_ASM_
+#include "chlicense.h"
#include "chconf.h"
#include "chcore.h"
diff --git a/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v6m.s b/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v6m.s index 892e46361..3a769d49a 100644 --- a/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v6m.s +++ b/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v6m.s @@ -34,6 +34,7 @@ #endif
#define _FROM_ASM_
+#include "chlicense.h"
#include "chconf.h"
#include "chcore.h"
diff --git a/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s b/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s index ebedf6a39..3915313da 100644 --- a/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s +++ b/os/common/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s @@ -34,6 +34,7 @@ #endif
#define _FROM_ASM_
+#include "chlicense.h"
#include "chconf.h"
#include "chcore.h"
|