cpu/k60: adapted to centralized cpu conf

dev/timer
Hauke Petersen 8 years ago
parent 52e51bfea1
commit d4d34a782e

@ -29,9 +29,11 @@ include $(KINETIS_COMMON)Makefile.include
export LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts
export LINKERSCRIPT = $(CPU_MODEL).ld
#export the CPU model
#export the CPU model and architecture
MODEL = $(shell echo $(CPU_MODEL)|tr 'a-z' 'A-Z')
export CFLAGS += -DCPU_MODEL_$(MODEL)
ARCH = $(shell echo $(CPU_ARCH) | tr 'a-z-' 'A-Z_')
export CFLAGS += -DCPU_ARCH_$(ARCH)
# include CPU specific includes
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include

@ -20,8 +20,6 @@
* @author Joakim Gebart <joakim.gebart@eistec.se>
*/
extern void *_vector_rom[];
/** @brief Current core clock frequency */
uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK;
/** @brief Current system clock frequency */
@ -46,15 +44,10 @@ static void check_running_cpu_revision(void);
*/
void cpu_init(void)
{
/* initialize the Cortex-M core */
cortexm_init();
/* Check that we are running on the CPU that this code was built for */
check_running_cpu_revision();
/* configure the vector table location to internal flash */
SCB->VTOR = (uint32_t)_vector_rom;
/* set pendSV interrupt to lowest possible priority */
NVIC_SetPriority(PendSV_IRQn, 0xff);
}
static void check_running_cpu_revision(void)

@ -61,6 +61,15 @@ extern "C"
/* Compatibility definitions between the two different Freescale headers */
#include "MK60-comp.h"
/**
* @brief ARM Cortex-M specific CPU configuration
* @{
*/
#define CPU_DEFAULT_IRQ_PRIO (1U)
#define CPU_IRQ_NUMOF (104U)
#define CPU_FLASH_BASE (0x00000000)
/** @} */
/**
* @name GPIO pin mux function numbers
*/
@ -76,20 +85,6 @@ extern "C"
#define PIN_INTERRUPT_FALLING 0b1010
#define PIN_INTERRUPT_EDGE 0b1011
/** @} */
/**
* @name Kernel stack size configuration
*
* TODO: Tune this
* @{
*/
#define THREAD_EXTRA_STACKSIZE_PRINTF (1024)
#ifndef THREAD_STACKSIZE_DEFAULT
#define THREAD_STACKSIZE_DEFAULT (1024)
#endif
#define THREAD_STACKSIZE_IDLE (256)
/** @} */
/**
* @name Length and address for reading CPU_ID (named UID in Freescale documents)
@ -99,15 +94,6 @@ extern "C"
#define CPUID_ID_PTR ((void *)(&(SIM->UIDH)))
/** @} */
#ifndef UART0_BUFSIZE
/**
* @brief UART0 buffer size definition for compatibility reasons
*
* TODO: remove once the remodeling of the uart0 driver is done
*/
#define UART0_BUFSIZE (128)
#endif
/**
* @name UART driver settings
*/

Loading…
Cancel
Save