cpu: cortexm*: move cpu_conf.h stuff from cpu.h into cpu_conf_common.h

pr/gpio
Kaspar Schleiser 7 years ago
parent 2b010b5337
commit 6881f65f46

@ -19,6 +19,7 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#include "cc2538.h"
#include "cc2538_gpio.h"
#include "cc2538_uart.h"

@ -39,40 +39,6 @@
extern "C" {
#endif
/**
* @brief Configuration of default stack sizes
*
* As all members of the Cortex-M family behave identical in terms of stack
* usage, we define the default stack size values here centrally for all CPU
* implementations.
*
* If needed, you can overwrite these values the the `cpu_conf.h` file of the
* specific CPU implementation.
*
* @todo Adjust values for Cortex-M4F with FPU?
* @todo Configure second set if no newlib nano.specs are available?
* @{
*/
#ifndef THREAD_EXTRA_STACKSIZE_PRINTF
#define THREAD_EXTRA_STACKSIZE_PRINTF (512)
#endif
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#ifndef THREAD_STACKSIZE_IDLE
#define THREAD_STACKSIZE_IDLE (256)
#endif
/** @} */
/**
* @brief Stack size used for the exception (ISR) stack
* @{
*/
#ifndef ISR_STACKSIZE
#define ISR_STACKSIZE (512U)
#endif
/** @} */
/**
* @brief Some members of the Cortex-M family have architecture specific
* atomic operations in atomic_arch.c

@ -0,0 +1,65 @@
/*
* Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.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_cortexm_common
* @{
*
* @file
* @brief Common CPU definitione for Cortex-M family based MCUs
*
* @author Kaspar Schleiser <kaspar@schleiser.de>
*/
#ifndef CPU_CONF_COMMON_H_
#define CPU_CONF_COMMON_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Configuration of default stack sizes
*
* As all members of the Cortex-M family behave identical in terms of stack
* usage, we define the default stack size values here centrally for all CPU
* implementations.
*
* If needed, you can overwrite these values the the `cpu_conf.h` file of the
* specific CPU implementation.
*
* @todo Adjust values for Cortex-M4F with FPU?
* @todo Configure second set if no newlib nano.specs are available?
* @{
*/
#ifndef THREAD_EXTRA_STACKSIZE_PRINTF
#define THREAD_EXTRA_STACKSIZE_PRINTF (512)
#endif
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#ifndef THREAD_STACKSIZE_IDLE
#define THREAD_STACKSIZE_IDLE (256)
#endif
/** @} */
/**
* @brief Stack size used for the exception (ISR) stack
* @{
*/
#ifndef ISR_STACKSIZE
#define ISR_STACKSIZE (512U)
#endif
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* CPU_CONF_COMMON_H_ */
/** @} */

@ -21,6 +21,8 @@
#ifndef CPU_CONF_H
#define CPU_CONF_H
#include "cpu_conf_common.h"
#if (CPU_MODEL == ezr32wg330f256r60)
#include "ezr32wg330f256r60.h"
#else

@ -21,6 +21,8 @@
#ifndef CPU_CONF_H_
#define CPU_CONF_H_
#include "cpu_conf_common.h"
#ifdef __cplusplus
extern "C"
{

@ -24,6 +24,8 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#ifdef CPU_MODEL_MK64FN1M0VLL12
#include "MK64F12.h"
#else

@ -25,6 +25,8 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#ifdef CPU_MODEL_KW21D256
#include "MKW22D5.h"
#elif CPU_MODEL_KW21D512

@ -21,6 +21,7 @@
#ifndef CPU_CONF_H
#define CPU_CONF_H
#include "cpu_conf_common.h"
#include <stdio.h>
#include <stdlib.h>

@ -21,6 +21,8 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#include "LPC11Uxx.h"
#ifdef __cplusplus

@ -21,6 +21,8 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#include "LPC17xx.h"
#ifdef __cplusplus

@ -19,6 +19,7 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#include "nrf51.h"
#include "nrf51_bitfields.h"

@ -20,6 +20,7 @@
#ifndef CPU_CONF_H
#define CPU_CONF_H
#include "cpu_conf_common.h"
#include "nrf52.h"
#include "nrf52_bitfields.h"

@ -21,6 +21,7 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#include "sam3x8e.h"
#ifdef __cplusplus

@ -18,6 +18,8 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#include "samd21.h"
#ifdef __cplusplus

@ -18,6 +18,8 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#include "atmel/saml21.h"
#ifdef __cplusplus

@ -21,6 +21,8 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#ifdef CPU_MODEL_STM32F051R8
#include "stm32f051x8.h"
#endif

@ -23,6 +23,8 @@
#ifndef CPU_CONF_H
#define CPU_CONF_H
#include "cpu_conf_common.h"
#if defined(CPU_MODEL_STM32F103CB) || defined(CPU_MODEL_STM32F103RB)
#include "stm32f103xb.h"
#elif defined(CPU_MODEL_STM32F103RE)

@ -22,6 +22,8 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#ifdef CPU_MODEL_STM32F303VC
#include "stm32f303xc.h"
#endif

@ -21,6 +21,8 @@
#ifndef __CPU_CONF_H
#define __CPU_CONF_H
#include "cpu_conf_common.h"
#if defined(CPU_MODEL_STM32F401RE)
#include "stm32f401xe.h"
#elif defined(CPU_MODEL_STM32F407VG)

@ -21,6 +21,8 @@
#ifndef CPUCONF_H_
#define CPUCONF_H_
#include "cpu_conf_common.h"
#include "stm32l1xx.h"
#ifdef __cplusplus

Loading…
Cancel
Save