diff options
Diffstat (limited to 'lib/chibios/os/license')
-rw-r--r-- | lib/chibios/os/license/chcustomer.h | 103 | ||||
-rw-r--r-- | lib/chibios/os/license/chlicense.h | 200 | ||||
-rw-r--r-- | lib/chibios/os/license/chversion.h | 103 | ||||
-rw-r--r-- | lib/chibios/os/license/license.dox | 37 | ||||
-rw-r--r-- | lib/chibios/os/license/license.mk | 9 |
5 files changed, 452 insertions, 0 deletions
diff --git a/lib/chibios/os/license/chcustomer.h b/lib/chibios/os/license/chcustomer.h new file mode 100644 index 000000000..8d1b950e0 --- /dev/null +++ b/lib/chibios/os/license/chcustomer.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014, | ||
3 | 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio. | ||
4 | |||
5 | This file is part of ChibiOS. | ||
6 | |||
7 | ChibiOS is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation version 3 of the License. | ||
10 | |||
11 | ChibiOS is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | /** | ||
21 | * @file chcustomer.h | ||
22 | * @brief Customer-related info. | ||
23 | * | ||
24 | * @addtogroup chibios_customer | ||
25 | * @details This module incapsulates licensee information, this is only | ||
26 | * meaningful for commercial licenses. It is a stub for public | ||
27 | * releases. | ||
28 | * @{ | ||
29 | */ | ||
30 | |||
31 | #ifndef CHCUSTOMER_H | ||
32 | #define CHCUSTOMER_H | ||
33 | |||
34 | /*===========================================================================*/ | ||
35 | /* Module constants. */ | ||
36 | /*===========================================================================*/ | ||
37 | |||
38 | /** | ||
39 | * @brief Customer readable identifier. | ||
40 | */ | ||
41 | #define CH_CUSTOMER_ID_STRING "Santa, North Pole" | ||
42 | |||
43 | /** | ||
44 | * @brief Customer code. | ||
45 | */ | ||
46 | #define CH_CUSTOMER_ID_CODE "xxxx-yyyy" | ||
47 | |||
48 | /** | ||
49 | * @brief Current license. | ||
50 | * @note This setting is reserved to the copyright owner. | ||
51 | * @note Changing this setting invalidates the license. | ||
52 | * @note The license statement in the source headers is valid, applicable | ||
53 | * and binding regardless this setting. | ||
54 | */ | ||
55 | #define CH_LICENSE CH_LICENSE_GPL | ||
56 | |||
57 | /** | ||
58 | * @name Licensed Products | ||
59 | * @{ | ||
60 | */ | ||
61 | #define CH_CUSTOMER_LIC_RT TRUE | ||
62 | #define CH_CUSTOMER_LIC_NIL TRUE | ||
63 | #define CH_CUSTOMER_LIC_OSLIB TRUE | ||
64 | #define CH_CUSTOMER_LIC_EX TRUE | ||
65 | #define CH_CUSTOMER_LIC_SB TRUE | ||
66 | #define CH_CUSTOMER_LIC_PORT_CM0 TRUE | ||
67 | #define CH_CUSTOMER_LIC_PORT_CM3 TRUE | ||
68 | #define CH_CUSTOMER_LIC_PORT_CM4 TRUE | ||
69 | #define CH_CUSTOMER_LIC_PORT_CM7 TRUE | ||
70 | #define CH_CUSTOMER_LIC_PORT_ARM79 TRUE | ||
71 | #define CH_CUSTOMER_LIC_PORT_E200Z0 TRUE | ||
72 | #define CH_CUSTOMER_LIC_PORT_E200Z2 TRUE | ||
73 | #define CH_CUSTOMER_LIC_PORT_E200Z3 TRUE | ||
74 | #define CH_CUSTOMER_LIC_PORT_E200Z4 TRUE | ||
75 | /** @} */ | ||
76 | |||
77 | /*===========================================================================*/ | ||
78 | /* Module pre-compile time settings. */ | ||
79 | /*===========================================================================*/ | ||
80 | |||
81 | /*===========================================================================*/ | ||
82 | /* Derived constants and error checks. */ | ||
83 | /*===========================================================================*/ | ||
84 | |||
85 | /*===========================================================================*/ | ||
86 | /* Module data structures and types. */ | ||
87 | /*===========================================================================*/ | ||
88 | |||
89 | /*===========================================================================*/ | ||
90 | /* Module macros. */ | ||
91 | /*===========================================================================*/ | ||
92 | |||
93 | /*===========================================================================*/ | ||
94 | /* External declarations. */ | ||
95 | /*===========================================================================*/ | ||
96 | |||
97 | /*===========================================================================*/ | ||
98 | /* Module inline functions. */ | ||
99 | /*===========================================================================*/ | ||
100 | |||
101 | #endif /* CHCUSTOMER_H */ | ||
102 | |||
103 | /** @} */ | ||
diff --git a/lib/chibios/os/license/chlicense.h b/lib/chibios/os/license/chlicense.h new file mode 100644 index 000000000..f496a5fa8 --- /dev/null +++ b/lib/chibios/os/license/chlicense.h | |||
@@ -0,0 +1,200 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014, | ||
3 | 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio. | ||
4 | |||
5 | This file is part of ChibiOS. | ||
6 | |||
7 | ChibiOS is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation version 3 of the License. | ||
10 | |||
11 | ChibiOS is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | /** | ||
21 | * @file chlicense.h | ||
22 | * @brief License Module macros and structures. | ||
23 | * | ||
24 | * @addtogroup chibios_license | ||
25 | * @details This module contains all the definitions required for defining | ||
26 | * a licensing scheme for customers or public releases. | ||
27 | * @{ | ||
28 | */ | ||
29 | |||
30 | #ifndef CHLICENSE_H | ||
31 | #define CHLICENSE_H | ||
32 | |||
33 | /*===========================================================================*/ | ||
34 | /* Module constants. */ | ||
35 | /*===========================================================================*/ | ||
36 | |||
37 | /** | ||
38 | * @name Allowed Features Levels | ||
39 | * @{ | ||
40 | */ | ||
41 | #define CH_FEATURES_BASIC 0 | ||
42 | #define CH_FEATURES_INTERMEDIATE 1 | ||
43 | #define CH_FEATURES_FULL 2 | ||
44 | /** @} */ | ||
45 | |||
46 | /** | ||
47 | * @name Deployment Options | ||
48 | * @{ | ||
49 | */ | ||
50 | #define CH_DEPLOY_UNLIMITED -1 | ||
51 | #define CH_DEPLOY_NONE 0 | ||
52 | /** @} */ | ||
53 | |||
54 | /** | ||
55 | * @name Licensing Options | ||
56 | * @{ | ||
57 | */ | ||
58 | #define CH_LICENSE_GPL 0 | ||
59 | #define CH_LICENSE_GPL_EXCEPTION 1 | ||
60 | #define CH_LICENSE_COMMERCIAL_FREE 2 | ||
61 | #define CH_LICENSE_COMMERCIAL_DEV_1000 3 | ||
62 | #define CH_LICENSE_COMMERCIAL_DEV_5000 4 | ||
63 | #define CH_LICENSE_COMMERCIAL_FULL 5 | ||
64 | #define CH_LICENSE_COMMERCIAL_RUNTIME 6 | ||
65 | #define CH_LICENSE_PARTNER 7 | ||
66 | /** @} */ | ||
67 | |||
68 | #include "chcustomer.h" | ||
69 | #if CH_LICENSE == CH_LICENSE_PARTNER | ||
70 | #include "chpartner.h" | ||
71 | #endif | ||
72 | #if CH_LICENSE == CH_LICENSE_COMMERCIAL_RUNTIME | ||
73 | #include "chruntime.h" | ||
74 | #endif | ||
75 | |||
76 | /*===========================================================================*/ | ||
77 | /* Module pre-compile time settings. */ | ||
78 | /*===========================================================================*/ | ||
79 | |||
80 | /*===========================================================================*/ | ||
81 | /* Derived constants and error checks. */ | ||
82 | /*===========================================================================*/ | ||
83 | |||
84 | #if (CH_LICENSE == CH_LICENSE_GPL) || defined(__DOXYGEN__) | ||
85 | /** | ||
86 | * @brief License identification string. | ||
87 | * @details This string identifies the license in a machine-readable | ||
88 | * format. | ||
89 | */ | ||
90 | #define CH_LICENSE_TYPE_STRING "GNU General Public License 3 (GPL3)" | ||
91 | |||
92 | /** | ||
93 | * @brief Customer identification string. | ||
94 | * @details This information is only available for registered commercial users. | ||
95 | */ | ||
96 | #define CH_LICENSE_ID_STRING "N/A" | ||
97 | |||
98 | /** | ||
99 | * @brief Customer code. | ||
100 | * @details This information is only available for registered commercial users. | ||
101 | */ | ||
102 | #define CH_LICENSE_ID_CODE "N/A" | ||
103 | |||
104 | /** | ||
105 | * @brief Code modifiability restrictions. | ||
106 | * @details This setting defines if the source code is user-modifiable or not. | ||
107 | */ | ||
108 | #define CH_LICENSE_MODIFIABLE_CODE TRUE | ||
109 | |||
110 | /** | ||
111 | * @brief Code functionality restrictions. | ||
112 | */ | ||
113 | #define CH_LICENSE_FEATURES CH_FEATURES_FULL | ||
114 | |||
115 | /** | ||
116 | * @brief Code deploy restrictions. | ||
117 | * @details This is the per-core deploy limit allowed under the current | ||
118 | * license scheme. | ||
119 | */ | ||
120 | #define CH_LICENSE_MAX_DEPLOY CH_DEPLOY_UNLIMITED | ||
121 | |||
122 | #elif CH_LICENSE == CH_LICENSE_GPL_EXCEPTION | ||
123 | #define CH_LICENSE_TYPE_STRING "GNU General Public License 3 (GPL3) + Exception" | ||
124 | #define CH_LICENSE_ID_STRING "N/A" | ||
125 | #define CH_LICENSE_ID_CODE "N/A" | ||
126 | #define CH_LICENSE_MODIFIABLE_CODE FALSE | ||
127 | #define CH_LICENSE_FEATURES CH_FEATURES_BASIC | ||
128 | #define CH_LICENSE_MAX_DEPLOY CH_DEPLOY_UNLIMITED | ||
129 | |||
130 | #elif CH_LICENSE == CH_LICENSE_COMMERCIAL_FREE | ||
131 | #define CH_LICENSE_TYPE_STRING "Zero Cost Registered License for 500 Cores" | ||
132 | #define CH_LICENSE_ID_STRING "N/A" | ||
133 | #define CH_LICENSE_ID_CODE "2017-0000" | ||
134 | #define CH_LICENSE_MODIFIABLE_CODE FALSE | ||
135 | #define CH_LICENSE_FEATURES CH_FEATURES_INTERMEDIATE | ||
136 | #define CH_LICENSE_MAX_DEPLOY 500 | ||
137 | |||
138 | #elif CH_LICENSE == CH_LICENSE_COMMERCIAL_DEV_1000 | ||
139 | #define CH_LICENSE_TYPE_STRING "Developer Commercial License for 1000 Cores" | ||
140 | #define CH_LICENSE_ID_STRING CH_CUSTOMER_ID_STRING | ||
141 | #define CH_LICENSE_ID_CODE CH_CUSTOMER_ID_CODE | ||
142 | #define CH_LICENSE_MODIFIABLE_CODE TRUE | ||
143 | #define CH_LICENSE_FEATURES CH_FEATURES_FULL | ||
144 | #define CH_LICENSE_DEPLOY_LIMIT 1000 | ||
145 | |||
146 | #elif CH_LICENSE == CH_LICENSE_COMMERCIAL_DEV_5000 | ||
147 | #define CH_LICENSE_TYPE_STRING "Developer Commercial License for 5000 Cores" | ||
148 | #define CH_LICENSE_ID_STRING CH_CUSTOMER_ID_STRING | ||
149 | #define CH_LICENSE_ID_CODE CH_CUSTOMER_ID_CODE | ||
150 | #define CH_LICENSE_MODIFIABLE_CODE TRUE | ||
151 | #define CH_LICENSE_FEATURES CH_FEATURES_FULL | ||
152 | #define CH_LICENSE_DEPLOY_LIMIT 5000 | ||
153 | |||
154 | #elif CH_LICENSE == CH_LICENSE_COMMERCIAL_FULL | ||
155 | #define CH_LICENSE_TYPE_STRING "Full Commercial License for Unlimited Deployment" | ||
156 | #define CH_LICENSE_ID_STRING CH_CUSTOMER_ID_STRING | ||
157 | #define CH_LICENSE_ID_CODE CH_CUSTOMER_ID_CODE | ||
158 | #define CH_LICENSE_MODIFIABLE_CODE TRUE | ||
159 | #define CH_LICENSE_FEATURES CH_FEATURES_FULL | ||
160 | #define CH_LICENSE_MAX_DEPLOY CH_DEPLOY_UNLIMITED | ||
161 | |||
162 | #elif CH_LICENSE == CH_LICENSE_COMMERCIAL_RUNTIME | ||
163 | #define CH_LICENSE_TYPE_STRING "Runtime Commercial License" | ||
164 | #define CH_LICENSE_ID_STRING CH_CUSTOMER_ID_STRING | ||
165 | #define CH_LICENSE_ID_CODE CH_CUSTOMER_ID_CODE | ||
166 | #define CH_LICENSE_MODIFIABLE_CODE TRUE | ||
167 | #define CH_LICENSE_FEATURES CH_FEATURES_FULL | ||
168 | #define CH_LICENSE_MAX_DEPLOY CH_RUNTIME_MAX_DEPLOY | ||
169 | |||
170 | #elif CH_LICENSE == CH_LICENSE_PARTNER | ||
171 | #define CH_LICENSE_TYPE_STRING "Partners Special Commercial License" | ||
172 | #define CH_LICENSE_ID_STRING CH_CUSTOMER_ID_STRING | ||
173 | #define CH_LICENSE_ID_CODE CH_CUSTOMER_ID_CODE | ||
174 | #define CH_LICENSE_MODIFIABLE_CODE CH_PARTNER_MODIFIABLE_CODE | ||
175 | #define CH_LICENSE_FEATURES CH_PARTNER_FEATURES | ||
176 | #define CH_LICENSE_MAX_DEPLOY CH_PARTNER_MAX_DEPLOY | ||
177 | |||
178 | #else | ||
179 | #error "invalid licensing option" | ||
180 | #endif | ||
181 | |||
182 | /*===========================================================================*/ | ||
183 | /* Module data structures and types. */ | ||
184 | /*===========================================================================*/ | ||
185 | |||
186 | /*===========================================================================*/ | ||
187 | /* Module macros. */ | ||
188 | /*===========================================================================*/ | ||
189 | |||
190 | /*===========================================================================*/ | ||
191 | /* External declarations. */ | ||
192 | /*===========================================================================*/ | ||
193 | |||
194 | /*===========================================================================*/ | ||
195 | /* Module inline functions. */ | ||
196 | /*===========================================================================*/ | ||
197 | |||
198 | #endif /* CHLICENSE_H */ | ||
199 | |||
200 | /** @} */ | ||
diff --git a/lib/chibios/os/license/chversion.h b/lib/chibios/os/license/chversion.h new file mode 100644 index 000000000..e453dfa3a --- /dev/null +++ b/lib/chibios/os/license/chversion.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014, | ||
3 | 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio. | ||
4 | |||
5 | This file is part of ChibiOS. | ||
6 | |||
7 | ChibiOS is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation version 3 of the License. | ||
10 | |||
11 | ChibiOS is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | /** | ||
21 | * @file chversion.h | ||
22 | * @brief Version Module macros and structures. | ||
23 | * | ||
24 | * @addtogroup chibios_version | ||
25 | * @details This module contains information about the ChibiOS release, it | ||
26 | * is common to all subsystems. | ||
27 | * @{ | ||
28 | */ | ||
29 | |||
30 | #ifndef CHVERSION_H | ||
31 | #define CHVERSION_H | ||
32 | |||
33 | /*===========================================================================*/ | ||
34 | /* Module constants. */ | ||
35 | /*===========================================================================*/ | ||
36 | |||
37 | /** | ||
38 | * @brief ChibiOS product identification macro. | ||
39 | */ | ||
40 | #define _CHIBIOS_ | ||
41 | |||
42 | /** | ||
43 | * @brief Stable release flag. | ||
44 | */ | ||
45 | #define CH_VERSION_STABLE 1 | ||
46 | |||
47 | /** | ||
48 | * @name ChibiOS version identification | ||
49 | * @{ | ||
50 | */ | ||
51 | /** | ||
52 | * @brief ChibiOS version string. | ||
53 | */ | ||
54 | #define CH_VERSION "20.3.4" | ||
55 | |||
56 | /** | ||
57 | * @brief ChibiOS version release year. | ||
58 | */ | ||
59 | #define CH_VERSION_YEAR 20 | ||
60 | |||
61 | /** | ||
62 | * @brief ChibiOS version release month. | ||
63 | */ | ||
64 | #define CH_VERSION_MONTH 3 | ||
65 | |||
66 | /** | ||
67 | * @brief ChibiOS version patch number. | ||
68 | */ | ||
69 | #define CH_VERSION_PATCH 4 | ||
70 | |||
71 | /** | ||
72 | * @brief ChibiOS version nickname. | ||
73 | */ | ||
74 | #define CH_VERSION_NICKNAME "Conca" | ||
75 | /** @} */ | ||
76 | |||
77 | /*===========================================================================*/ | ||
78 | /* Module pre-compile time settings. */ | ||
79 | /*===========================================================================*/ | ||
80 | |||
81 | /*===========================================================================*/ | ||
82 | /* Derived constants and error checks. */ | ||
83 | /*===========================================================================*/ | ||
84 | |||
85 | /*===========================================================================*/ | ||
86 | /* Module data structures and types. */ | ||
87 | /*===========================================================================*/ | ||
88 | |||
89 | /*===========================================================================*/ | ||
90 | /* Module macros. */ | ||
91 | /*===========================================================================*/ | ||
92 | |||
93 | /*===========================================================================*/ | ||
94 | /* External declarations. */ | ||
95 | /*===========================================================================*/ | ||
96 | |||
97 | /*===========================================================================*/ | ||
98 | /* Module inline functions. */ | ||
99 | /*===========================================================================*/ | ||
100 | |||
101 | #endif /* CHVERSION_H */ | ||
102 | |||
103 | /** @} */ | ||
diff --git a/lib/chibios/os/license/license.dox b/lib/chibios/os/license/license.dox new file mode 100644 index 000000000..896ea46af --- /dev/null +++ b/lib/chibios/os/license/license.dox | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014, | ||
3 | 2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio. | ||
4 | |||
5 | This file is part of ChibiOS. | ||
6 | |||
7 | ChibiOS is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation version 3 of the License. | ||
10 | |||
11 | ChibiOS is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | GNU General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | /** | ||
21 | * @defgroup licensing Release and Licensing | ||
22 | */ | ||
23 | |||
24 | /** | ||
25 | * @defgroup chibios_version Release Information | ||
26 | * @ingroup licensing | ||
27 | */ | ||
28 | |||
29 | /** | ||
30 | * @defgroup chibios_customer Customer Information | ||
31 | * @ingroup licensing | ||
32 | */ | ||
33 | |||
34 | /** | ||
35 | * @defgroup chibios_license License Settings | ||
36 | * @ingroup licensing | ||
37 | */ | ||
diff --git a/lib/chibios/os/license/license.mk b/lib/chibios/os/license/license.mk new file mode 100644 index 000000000..84adc296a --- /dev/null +++ b/lib/chibios/os/license/license.mk | |||
@@ -0,0 +1,9 @@ | |||
1 | # List of all the licensing subsystem files. | ||
2 | LICSRC := | ||
3 | |||
4 | # Required include directories | ||
5 | LICINC := $(CHIBIOS)/os/license | ||
6 | |||
7 | # Shared variables | ||
8 | ALLCSRC += $(LICSRC) | ||
9 | ALLINC += $(LICINC) | ||