Browse Source

cpu/stm32l4: add support for stm32l432kc

master
Alexandre Abadie 6 years ago
parent
commit
8717008959
  1. 10
      cpu/stm32l4/include/cpu_conf.h
  2. 14853
      cpu/stm32l4/include/vendor/stm32l432xx.h
  3. 30
      cpu/stm32l4/ldscripts/stm32l432kc.ld
  4. 6
      cpu/stm32l4/vectors.c

10
cpu/stm32l4/include/cpu_conf.h

@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Freie Universität Berlin
* 2017 Inria
*
* 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
@ -16,6 +17,7 @@
* @brief Implementation specific CPU configuration options
*
* @author Hauke Petersen <hauke.pertersen@fu-berlin.de>
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*/
#ifndef STM32L4_CPU_CONF_H
@ -23,8 +25,10 @@
#include "cpu_conf_common.h"
#ifdef CPU_MODEL_STM32L476RG
#if defined(CPU_MODEL_STM32L476RG)
#include "vendor/stm32l476xx.h"
#elif defined(CPU_MODEL_STM32L432KC)
#include "vendor/stm32l432xx.h"
#endif
#ifdef __cplusplus
@ -36,7 +40,11 @@ extern "C" {
* @{
*/
#define CPU_DEFAULT_IRQ_PRIO (1U)
#if defined(STM32L432KC)
#define CPU_IRQ_NUMOF (82U)
#else
#define CPU_IRQ_NUMOF (81U)
#endif
/** @} */
#ifdef __cplusplus

14853
cpu/stm32l4/include/vendor/stm32l432xx.h vendored

File diff suppressed because it is too large Load Diff

30
cpu/stm32l4/ldscripts/stm32l432kc.ld

@ -0,0 +1,30 @@
/*
* Copyright (C) 2017 Inria
*
* 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.
*/
/**
* @addtogroup cpu_stm32l4
* @{
*
* @file
* @brief Memory definitions for the STM32L432KC
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*
* @}
*/
MEMORY
{
rom (rx) : ORIGIN = 0x08000000, LENGTH = 256K
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
cpuid (r) : ORIGIN = 0x1fff7590, LENGTH = 12
}
_cpuid_address = ORIGIN(cpuid);
INCLUDE cortexm_base.ld

6
cpu/stm32l4/vectors.c

@ -111,6 +111,7 @@ WEAK_DEFAULT void isr_lcd(void);
WEAK_DEFAULT void isr_0(void);
WEAK_DEFAULT void isr_rng(void);
WEAK_DEFAULT void isr_fpu(void);
WEAK_DEFAULT void isr_crs(void);
/* interrupt vector table */
ISR_VECTORS const void *interrupt_vector[] = {
@ -216,5 +217,8 @@ ISR_VECTORS const void *interrupt_vector[] = {
(void*) isr_lcd,
(void*) (0UL),
(void*) isr_rng,
(void*) isr_fpu
(void*) isr_fpu,
#if defined(STM32L432KC)
(void*) isr_crs
#endif
};

Loading…
Cancel
Save