2013-03-06 10:29:49 +01:00
|
|
|
/**
|
|
|
|
* Native CPU configuration
|
|
|
|
*
|
2015-09-27 18:58:30 +02:00
|
|
|
* Copyright (C) 2013 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
|
2013-03-06 10:29:49 +01:00
|
|
|
*
|
2014-08-23 15:43:13 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2013-03-06 10:29:49 +01:00
|
|
|
*
|
2018-06-01 12:17:51 +02:00
|
|
|
* @ingroup cpu_native
|
2013-03-06 10:29:49 +01:00
|
|
|
* @{
|
|
|
|
* @file
|
2015-09-27 18:58:30 +02:00
|
|
|
* @author Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
|
2013-03-06 10:29:49 +01:00
|
|
|
* @}
|
|
|
|
*/
|
2017-05-23 18:19:52 +02:00
|
|
|
#ifndef CPU_CONF_H
|
|
|
|
#define CPU_CONF_H
|
2013-03-06 01:08:15 +01:00
|
|
|
|
2014-10-13 10:53:20 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-05-26 16:45:34 +02:00
|
|
|
/**
|
|
|
|
* @brief CPU specific default stack sizes
|
|
|
|
*
|
|
|
|
* TODO: tighten stack sizes
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
2021-05-07 13:12:01 +02:00
|
|
|
#ifndef THREAD_STACKSIZE_DEFAULT
|
2015-05-26 16:45:34 +02:00
|
|
|
#define THREAD_STACKSIZE_DEFAULT (8192)
|
2021-05-07 13:12:01 +02:00
|
|
|
#endif
|
|
|
|
#ifndef THREAD_STACKSIZE_IDLE
|
2021-09-25 22:51:57 +02:00
|
|
|
#define THREAD_STACKSIZE_IDLE (THREAD_STACKSIZE_DEFAULT)
|
2021-05-07 13:12:01 +02:00
|
|
|
#endif
|
|
|
|
#ifndef THREAD_EXTRA_STACKSIZE_PRINTF
|
2015-06-04 16:04:14 +02:00
|
|
|
#define THREAD_EXTRA_STACKSIZE_PRINTF (4096)
|
2021-05-07 13:12:01 +02:00
|
|
|
#endif
|
|
|
|
#ifndef THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT
|
2015-06-04 16:04:14 +02:00
|
|
|
#define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (4096)
|
2021-05-07 13:12:01 +02:00
|
|
|
#endif
|
2013-10-25 11:01:37 +02:00
|
|
|
/* for core/include/thread.h */
|
2021-05-07 13:12:01 +02:00
|
|
|
#ifndef THREAD_STACKSIZE_MINIMUM
|
2021-09-25 22:51:57 +02:00
|
|
|
#define THREAD_STACKSIZE_MINIMUM (THREAD_STACKSIZE_DEFAULT)
|
2021-05-07 13:12:01 +02:00
|
|
|
#endif
|
2013-10-25 11:01:37 +02:00
|
|
|
/* native internal */
|
2021-05-07 13:12:01 +02:00
|
|
|
#ifndef ISR_STACKSIZE
|
2021-09-25 22:51:57 +02:00
|
|
|
#define ISR_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
|
2021-05-07 13:12:01 +02:00
|
|
|
#endif
|
2015-05-26 16:45:34 +02:00
|
|
|
/** @} */
|
2013-03-06 01:08:15 +01:00
|
|
|
|
2015-05-26 16:45:34 +02:00
|
|
|
/**
|
|
|
|
* @brief Native internal Ethernet protocol number
|
|
|
|
*/
|
2013-06-26 23:29:09 +02:00
|
|
|
#define NATIVE_ETH_PROTO 0x1234
|
2013-03-21 17:08:41 +01:00
|
|
|
|
2020-05-11 15:44:40 +02:00
|
|
|
#if (defined(CONFIG_GNRC_PKTBUF_SIZE)) && (CONFIG_GNRC_PKTBUF_SIZE < 2048)
|
|
|
|
# undef CONFIG_GNRC_PKTBUF_SIZE
|
|
|
|
# define CONFIG_GNRC_PKTBUF_SIZE (2048)
|
2016-12-14 14:17:14 +01:00
|
|
|
#endif
|
|
|
|
|
2021-02-05 18:23:10 +01:00
|
|
|
/**
|
|
|
|
* @brief Native Flash emulation
|
|
|
|
* Use unusual parameters to trigger edge cases
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#ifndef FLASHPAGE_SIZE
|
|
|
|
#define FLASHPAGE_SIZE (512)
|
|
|
|
#endif
|
|
|
|
#ifndef FLASHPAGE_NUMOF
|
|
|
|
#define FLASHPAGE_NUMOF (32)
|
|
|
|
#endif
|
|
|
|
#ifndef FLASHPAGE_WRITE_BLOCK_ALIGNMENT
|
|
|
|
#define FLASHPAGE_WRITE_BLOCK_ALIGNMENT (8)
|
|
|
|
#endif
|
|
|
|
#ifndef FLASHPAGE_WRITE_BLOCK_SIZE
|
|
|
|
#define FLASHPAGE_WRITE_BLOCK_SIZE (16)
|
|
|
|
#endif
|
|
|
|
#ifndef FLASHPAGE_ERASE_STATE
|
|
|
|
#define FLASHPAGE_ERASE_STATE (0x0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern char _native_flash[FLASHPAGE_SIZE * FLASHPAGE_NUMOF];
|
|
|
|
|
|
|
|
#define CPU_FLASH_BASE ((uintptr_t)_native_flash)
|
|
|
|
/** @} */
|
|
|
|
|
2014-10-13 10:53:20 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-05-23 18:19:52 +02:00
|
|
|
#endif /* CPU_CONF_H */
|