Browse Source

stm32: Define FLASH_BASE and PERIPH_BASE for all families

FLASH_BASE was already defined for some and PERIPH_BASE for all but one,
but this makes these available for all families. Note that the value is
identical for all familes (I doublechecked the more exotic ones such
STM32H7), but it is still useful to have these defines to make code more
readable and so that libopencm3 users can write portable code without
having to check that these are identical on all STM32 families.
pull/1330/head
Matthijs Kooijman 4 years ago
parent
commit
fe52fcdb1a
  1. 1
      include/libopencm3/stm32/f2/memorymap.h
  2. 1
      include/libopencm3/stm32/f3/memorymap.h
  3. 1
      include/libopencm3/stm32/f4/memorymap.h
  4. 1
      include/libopencm3/stm32/f7/memorymap.h
  5. 1
      include/libopencm3/stm32/g0/memorymap.h
  6. 2
      include/libopencm3/stm32/g4/memorymap.h
  7. 1
      include/libopencm3/stm32/h7/memorymap.h
  8. 1
      include/libopencm3/stm32/l0/memorymap.h
  9. 1
      include/libopencm3/stm32/l1/memorymap.h
  10. 1
      include/libopencm3/stm32/l4/memorymap.h

1
include/libopencm3/stm32/f2/memorymap.h

@ -25,6 +25,7 @@
/* --- STM32F20x specific peripheral definitions --------------------------- */ /* --- STM32F20x specific peripheral definitions --------------------------- */
/* Memory map for all busses */ /* Memory map for all busses */
#define FLASH_BASE (0x08000000U)
#define PERIPH_BASE (0x40000000U) #define PERIPH_BASE (0x40000000U)
#define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000) #define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000)
#define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000) #define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000)

1
include/libopencm3/stm32/f3/memorymap.h

@ -27,6 +27,7 @@
/* --- STM32F3 specific peripheral definitions ----------------------------- */ /* --- STM32F3 specific peripheral definitions ----------------------------- */
/* Memory map for all busses */ /* Memory map for all busses */
#define FLASH_BASE (0x08000000U)
#define PERIPH_BASE (0x40000000U) #define PERIPH_BASE (0x40000000U)
#define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000) #define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000)
#define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000) #define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000)

1
include/libopencm3/stm32/f4/memorymap.h

@ -25,6 +25,7 @@
/* --- STM32F4 specific peripheral definitions ----------------------------- */ /* --- STM32F4 specific peripheral definitions ----------------------------- */
/* Memory map for all busses */ /* Memory map for all busses */
#define FLASH_BASE (0x08000000U)
#define PERIPH_BASE (0x40000000U) #define PERIPH_BASE (0x40000000U)
#define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000) #define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000)
#define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000) #define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000)

1
include/libopencm3/stm32/f7/memorymap.h

@ -23,6 +23,7 @@
/* --- STM32F7 specific peripheral definitions ----------------------------- */ /* --- STM32F7 specific peripheral definitions ----------------------------- */
/* Memory map for all busses */ /* Memory map for all busses */
#define FLASH_BASE (0x08000000U)
#define PERIPH_BASE (0x40000000U) #define PERIPH_BASE (0x40000000U)
#define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000) #define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000)
#define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000) #define PERIPH_BASE_APB2 (PERIPH_BASE + 0x10000)

1
include/libopencm3/stm32/g0/memorymap.h

@ -20,6 +20,7 @@
#include <libopencm3/cm3/memorymap.h> #include <libopencm3/cm3/memorymap.h>
#define FLASH_BASE (0x08000000U)
#define PERIPH_BASE (0x40000000U) #define PERIPH_BASE (0x40000000U)
#define IOPORT_BASE (0x50000000U) #define IOPORT_BASE (0x50000000U)
#define INFO_BASE (0x1fff7500U) #define INFO_BASE (0x1fff7500U)

2
include/libopencm3/stm32/g4/memorymap.h

@ -20,6 +20,8 @@
#include <libopencm3/cm3/memorymap.h> #include <libopencm3/cm3/memorymap.h>
#define FLASH_BASE (0x08000000U)
#define PERIPH_BASE (0x40000000U)
#define INFO_BASE (0x1fff0000U) #define INFO_BASE (0x1fff0000U)
#define PERIPH_BASE_APB1 (0x40000000U) #define PERIPH_BASE_APB1 (0x40000000U)
#define PERIPH_BASE_APB2 (0x40010000U) #define PERIPH_BASE_APB2 (0x40010000U)

1
include/libopencm3/stm32/h7/memorymap.h

@ -23,6 +23,7 @@
/* --- STM32H7 specific peripheral definitions ----------------------------- */ /* --- STM32H7 specific peripheral definitions ----------------------------- */
/* Memory map for all busses */ /* Memory map for all busses */
#define FLASH_BASE 0x08000000U
#define PERIPH_BASE 0x40000000U #define PERIPH_BASE 0x40000000U
#define PERIPH_BASE_APB1 0x40000000U #define PERIPH_BASE_APB1 0x40000000U
#define PERIPH_BASE_APB2 0x40010000U #define PERIPH_BASE_APB2 0x40010000U

1
include/libopencm3/stm32/l0/memorymap.h

@ -23,6 +23,7 @@
/* --- STM32 specific peripheral definitions ------------------------------- */ /* --- STM32 specific peripheral definitions ------------------------------- */
/* Memory map for all busses */ /* Memory map for all busses */
#define FLASH_BASE (0x08000000U)
#define PERIPH_BASE (0x40000000U) #define PERIPH_BASE (0x40000000U)
#define IOPORT_BASE (0x50000000U) #define IOPORT_BASE (0x50000000U)
#define INFO_BASE (0x1ff80000U) #define INFO_BASE (0x1ff80000U)

1
include/libopencm3/stm32/l1/memorymap.h

@ -26,6 +26,7 @@
/* --- STM32 specific peripheral definitions ------------------------------- */ /* --- STM32 specific peripheral definitions ------------------------------- */
/* Memory map for all busses */ /* Memory map for all busses */
#define FLASH_BASE (0x08000000U)
#define PERIPH_BASE (0x40000000U) #define PERIPH_BASE (0x40000000U)
#define INFO_BASE (0x1ff00000U) #define INFO_BASE (0x1ff00000U)
#define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000) #define PERIPH_BASE_APB1 (PERIPH_BASE + 0x00000)

1
include/libopencm3/stm32/l4/memorymap.h

@ -23,6 +23,7 @@
/* --- STM32 specific peripheral definitions ------------------------------- */ /* --- STM32 specific peripheral definitions ------------------------------- */
/* Memory map for all busses */ /* Memory map for all busses */
#define FLASH_BASE (0x08000000U)
#define PERIPH_BASE (0x40000000U) #define PERIPH_BASE (0x40000000U)
#define FMC1_BANK_BASE (0x60000000U) #define FMC1_BANK_BASE (0x60000000U)
#define FMC3_BANK_BASE (0x80000000U) #define FMC3_BANK_BASE (0x80000000U)

Loading…
Cancel
Save