cpu_conf_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef CPU_CONF_COMMON_H
20 #define CPU_CONF_COMMON_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
40 #ifndef THREAD_EXTRA_STACKSIZE_PRINTF
41 #define THREAD_EXTRA_STACKSIZE_PRINTF (512)
42 #endif
43 #ifndef THREAD_STACKSIZE_DEFAULT
44 #define THREAD_STACKSIZE_DEFAULT (1024)
45 #endif
46 #ifndef THREAD_STACKSIZE_IDLE
47 #define THREAD_STACKSIZE_IDLE (256)
48 #endif
49 
55 #ifndef ISR_STACKSIZE
56 #define ISR_STACKSIZE (512U)
57 #endif
58 
64 #ifdef __ARM_FEATURE_CLZ
65 #define BITARITHM_LSB_BUILTIN
66 #define BITARITHM_HAS_CLZ
67 #else
68 #define BITARITHM_LSB_LOOKUP
69 #endif
70 
110 #ifndef CPU_CORTEXM_PRIORITY_GROUPING
111 #define CPU_CORTEXM_PRIORITY_GROUPING (0)
112 #endif
113 
144 #ifndef CPU_CORTEXM_PENDSV_IRQ_PRIO
145 #define CPU_CORTEXM_PENDSV_IRQ_PRIO (UINT8_MAX)
146 #endif
147 
152 #define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".puf")))
153 
154 #if CPU_HAS_BACKUP_RAM || DOXYGEN
155 
159 #define BACKUP_RAM __attribute__((section(".backup.bss")))
160 
165 #define BACKUP_RAM_DATA __attribute__((section(".backup.data")))
166 #endif /* CPU_HAS_BACKUP_RAM */
167 
168 
172 #define IRQ_API_INLINED (1)
173 
174 #ifdef __cplusplus
175 }
176 #endif
177 
178 #endif /* CPU_CONF_COMMON_H */
179