mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
0c2cfe99e6
Adds a separate board for native64 instead of the `NATIVE_64BIT` workaround. The files in `boards/native64` are more or less dummy files and just include the `boards/native` logic (similar to `openlabs-kw41z-mini-256kib`). The main logic for native is in `makefiles/arch/native.inc.mk`, `cpu/native` and `boards/native`. The remaining changes concern the build system, and change native board checks to native CPU checks to cover both boards.
97 lines
2.2 KiB
C
97 lines
2.2 KiB
C
/**
|
|
* Native CPU configuration
|
|
*
|
|
* Copyright (C) 2013 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
|
|
*
|
|
* 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.
|
|
*
|
|
* @ingroup cpu_native
|
|
* @{
|
|
* @file
|
|
* @author Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
|
|
* @}
|
|
*/
|
|
#ifndef CPU_CONF_H
|
|
#define CPU_CONF_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief CPU specific default stack sizes
|
|
*
|
|
* TODO: tighten stack sizes
|
|
*
|
|
* @{
|
|
*/
|
|
#ifndef THREAD_STACKSIZE_DEFAULT
|
|
#if (__SIZEOF_POINTER__ == 8)
|
|
#define THREAD_STACKSIZE_DEFAULT (16384)
|
|
#else
|
|
#define THREAD_STACKSIZE_DEFAULT (8192)
|
|
#endif
|
|
#endif
|
|
#ifndef THREAD_STACKSIZE_IDLE
|
|
#define THREAD_STACKSIZE_IDLE (THREAD_STACKSIZE_DEFAULT)
|
|
#endif
|
|
#ifndef THREAD_EXTRA_STACKSIZE_PRINTF
|
|
#define THREAD_EXTRA_STACKSIZE_PRINTF (4096)
|
|
#endif
|
|
#ifndef THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT
|
|
#define THREAD_EXTRA_STACKSIZE_PRINTF_FLOAT (4096)
|
|
#endif
|
|
/* for core/include/thread.h */
|
|
#ifndef THREAD_STACKSIZE_MINIMUM
|
|
#define THREAD_STACKSIZE_MINIMUM (THREAD_STACKSIZE_DEFAULT)
|
|
#endif
|
|
/* native internal */
|
|
#ifndef ISR_STACKSIZE
|
|
#define ISR_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
|
|
#endif
|
|
/** @} */
|
|
|
|
/**
|
|
* @brief Native internal Ethernet protocol number
|
|
*/
|
|
#define NATIVE_ETH_PROTO 0x1234
|
|
|
|
#if (defined(CONFIG_GNRC_PKTBUF_SIZE)) && (CONFIG_GNRC_PKTBUF_SIZE < 2048)
|
|
# undef CONFIG_GNRC_PKTBUF_SIZE
|
|
# define CONFIG_GNRC_PKTBUF_SIZE (2048)
|
|
#endif
|
|
|
|
/**
|
|
* @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)
|
|
/** @} */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* CPU_CONF_H */
|