cpu_conf.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.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_H
20 #define CPU_CONF_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 /* MARK: - CPU-specific default stack sizes */
34 #if !defined(THREAD_STACKSIZE_DEFAULT) || defined(DOXYGEN)
38 # if (__SIZEOF_POINTER__ == 8)
39 # define THREAD_STACKSIZE_DEFAULT (16384)
40 # else
41 # define THREAD_STACKSIZE_DEFAULT (8192)
42 # endif
43 #endif
47 #if !defined(THREAD_STACKSIZE_IDLE) || defined(DOXYGEN)
48 # define THREAD_STACKSIZE_IDLE (THREAD_STACKSIZE_DEFAULT)
49 #endif
53 #if !defined(THREAD_EXTRA_STACKSIZE_PRINTF) || defined(DOXYGEN)
54 # define THREAD_EXTRA_STACKSIZE_PRINTF (4096)
55 #endif
59 #if !defined(THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT) || defined(DOXYGEN)
60 # define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (4096)
61 #endif
62 /* for core/include/thread.h */
66 #if !defined(THREAD_STACKSIZE_MINIMUM) || defined(DOXYGEN)
67 # define THREAD_STACKSIZE_MINIMUM (THREAD_STACKSIZE_DEFAULT)
68 #endif
69 /* native internal */
73 #if !defined(ISR_STACKSIZE) || defined(DOXYGEN)
74 # define ISR_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
75 #endif
78 /* MARK: - Networking constants */
86 #define NATIVE_ETH_PROTO 0x1234
87 
88 #if (defined(CONFIG_GNRC_PKTBUF_SIZE)) && (CONFIG_GNRC_PKTBUF_SIZE < 2048)
89 # undef CONFIG_GNRC_PKTBUF_SIZE
90 # define CONFIG_GNRC_PKTBUF_SIZE (2048)
91 #endif
94 /* MARK: - Native flash emulation */
103 #if !defined(FLASHPAGE_SIZE) || defined(DOXYGEN)
104 # define FLASHPAGE_SIZE (512)
105 #endif
106 
110 #if !defined(FLASHPAGE_NUMOF) || defined(DOXYGEN)
111 # define FLASHPAGE_NUMOF (32)
112 #endif
113 
119 #if !defined(FLASHPAGE_WRITE_BLOCK_ALIGNMENT) || defined(DOXYGEN)
120 # define FLASHPAGE_WRITE_BLOCK_ALIGNMENT (8)
121 #endif
129 #if !defined(FLASHPAGE_WRITE_BLOCK_SIZE) || defined(DOXYGEN)
130 # define FLASHPAGE_WRITE_BLOCK_SIZE (16)
131 #endif
132 
138 #if !defined(FLASHPAGE_ERASE_STATE) || defined(DOXYGEN)
139 # define FLASHPAGE_ERASE_STATE (0x0)
140 #endif
141 
146 
150 #define CPU_FLASH_BASE ((uintptr_t)_native_flash)
153 #ifdef __cplusplus
154 }
155 #endif
156 
157 #endif /* CPU_CONF_H */
char _native_flash[FLASHPAGE_SIZE *FLASHPAGE_NUMOF]
Emulated flash buffer.
#define FLASHPAGE_NUMOF
Total number of emulated flash pages.
Definition: cpu_conf.h:111
#define FLASHPAGE_SIZE
Size of a single emulated flash page.
Definition: cpu_conf.h:104