cpu_conf_common.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 Kaspar Schleiser <kaspar@schleiser.de>
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
36 #ifndef THREAD_EXTRA_STACKSIZE_PRINTF
37 #define THREAD_EXTRA_STACKSIZE_PRINTF (512)
38 #endif
39 #ifndef THREAD_STACKSIZE_DEFAULT
40 #define THREAD_STACKSIZE_DEFAULT (1024)
41 #endif
42 #ifndef THREAD_STACKSIZE_IDLE
43 #define THREAD_STACKSIZE_IDLE (256)
44 #endif
51 #ifndef ISR_STACKSIZE
52 #define ISR_STACKSIZE (512U)
53 #endif
60 #ifdef __ARM_FEATURE_CLZ
61 #define BITARITHM_LSB_BUILTIN
62 #define BITARITHM_HAS_CLZ
63 #else
64 #define BITARITHM_LSB_LOOKUP
65 #endif
106 #ifndef CPU_CORTEXM_PRIORITY_GROUPING
107 #define CPU_CORTEXM_PRIORITY_GROUPING (0)
108 #endif
109 
140 #ifndef CPU_CORTEXM_PENDSV_IRQ_PRIO
141 #define CPU_CORTEXM_PENDSV_IRQ_PRIO (UINT8_MAX)
142 #endif
148 #define PUF_SRAM_ATTRIBUTES __attribute__((used, section(".puf")))
149 
150 #if CPU_HAS_BACKUP_RAM || DOXYGEN
155 #define BACKUP_RAM __attribute__((section(".backup.bss")))
156 
161 #define BACKUP_RAM_DATA __attribute__((section(".backup.data")))
162 
167 #define BACKUP_RAM_NOINIT __attribute__((section(".backup.noinit")))
168 #endif /* CPU_HAS_BACKUP_RAM */
169 
173 #define IRQ_API_INLINED (1)
174 
175 #if defined(CPU_CORE_CORTEX_M0) || defined(CPU_CORE_CORTEX_M0PLUS) \
176  || defined(CPU_CORE_CORTEX_M23)
180 #define CPU_CYCLES_PER_LOOP (4)
181 #endif
182 
183 #ifdef __cplusplus
184 }
185 #endif
186