This is an automated email from the ASF dual-hosted git repository. jerzy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit ea85e7382fd99ddf735d58e8c529af2a5ecc19e3 Author: Jerzy Kasenberg <jerzy.kasenb...@codecoup.pl> AuthorDate: Fri Mar 20 11:48:29 2020 +0100 stm32: Add system memory address definition STM32 MCUs have embedded bootloader that can be used during boot when BOOT pin(s) are in certain state. Bootloader code is at various location in different MCUs. This adds definition STM32_SYSTEM_MEMORY that hold start address of system memory to each mcu. Addresses are taken from AN2602 application note rev. 42. --- hw/mcu/stm/stm32f0xx/include/mcu/mcu.h | 21 +++++++++++++++++++++ hw/mcu/stm/stm32f1xx/include/mcu/mcu.h | 13 +++++++++++++ hw/mcu/stm/stm32f3xx/include/mcu/mcu.h | 13 +++++++++++++ hw/mcu/stm/stm32f4xx/include/mcu/mcu.h | 21 +++++++++++++++++++++ hw/mcu/stm/stm32f7xx/include/mcu/mcu.h | 8 ++++++++ hw/mcu/stm/stm32l0xx/include/mcu/mcu.h | 12 ++++++++++++ hw/mcu/stm/stm32l1xx/include/mcu/mcu.h | 10 ++++++++++ hw/mcu/stm/stm32l4xx/include/mcu/mcu.h | 15 +++++++++++++++ hw/mcu/stm/stm32wbxx/include/mcu/mcu.h | 5 +++++ 9 files changed, 118 insertions(+) diff --git a/hw/mcu/stm/stm32f0xx/include/mcu/mcu.h b/hw/mcu/stm/stm32f0xx/include/mcu/mcu.h index 2ac5e96..df0e947 100644 --- a/hw/mcu/stm/stm32f0xx/include/mcu/mcu.h +++ b/hw/mcu/stm/stm32f0xx/include/mcu/mcu.h @@ -28,6 +28,27 @@ extern "C" { #define SVC_IRQ_NUMBER SVC_IRQn +#if defined(STM32F030x6) || defined(STM32F030x8) || \ + defined(STM32F031x6) || \ + defined(STM32F038xx) || \ + defined(STM32F051x8) || \ + defined(STM32F058xx) +#define STM32_SYSTEM_MEMORY 0x1FFFEC00 +#elif defined(STM32F030xC) || \ + defined(STM32F091xC) || \ + defined(STM32F098xx) +#define STM32_SYSTEM_MEMORY 0x1FFFD800 +#elif defined(STM32F042x6) || \ + defined(STM32F048xx) || \ + defined(STM32F070x6) +#define STM32_SYSTEM_MEMORY 0x1FFFC400 +#elif defined(STM32F070xB) || \ + defined(STM32F071xB) || \ + defined(STM32F072xB) || \ + defined(STM32F078xx) +#define STM32_SYSTEM_MEMORY 0x1FFFC800 +#endif + #ifdef __cplusplus } #endif diff --git a/hw/mcu/stm/stm32f1xx/include/mcu/mcu.h b/hw/mcu/stm/stm32f1xx/include/mcu/mcu.h index 3f707ac..c3c4128 100644 --- a/hw/mcu/stm/stm32f1xx/include/mcu/mcu.h +++ b/hw/mcu/stm/stm32f1xx/include/mcu/mcu.h @@ -28,6 +28,19 @@ extern "C" { #define SVC_IRQ_NUMBER SVCall_IRQn +#if defined(STM32F100xB) || defined(STM32F100xE) || \ + defined(STM32F101x6) || defined(STM32F101xB) || defined(STM32F101xE) || \ + defined(STM32F102x6) || defined(STM32F102xB) || \ + defined(STM32F103x6) || defined(STM32F103xB) || defined(STM32F103xE) +#define STM32_SYSTEM_MEMORY 0x1FFFF000 +#elif defined(STM32F105xC) || \ + defined(STM32F107xC) +#define STM32_SYSTEM_MEMORY 0x1FFFB000 +#elif defined(STM32F101xG) || \ + defined(STM32F103xG) +#define STM32_SYSTEM_MEMORY 0x1FFFE000 +#endif + #ifdef __cplusplus } #endif diff --git a/hw/mcu/stm/stm32f3xx/include/mcu/mcu.h b/hw/mcu/stm/stm32f3xx/include/mcu/mcu.h index f68848c..fdf2f02 100644 --- a/hw/mcu/stm/stm32f3xx/include/mcu/mcu.h +++ b/hw/mcu/stm/stm32f3xx/include/mcu/mcu.h @@ -26,6 +26,19 @@ extern "C" { #endif +#if defined(STM32F301x8) || \ + defined(STM32F302x8) || defined(STM32F302xC) || defined(STM32F302xE) || \ + defined(STM32F303xC) || defined(STM32F303xE) || defined(STM32F303x8) || \ + defined(STM32F318xx) || \ + defined(STM32F328xx) || \ + defined(STM32F334x8) || \ + defined(STM32F358xx) || \ + defined(STM32F373xC) || \ + defined(STM32F378xx) || \ + defined(STM32F398xx) +#define STM32_SYSTEM_MEMORY 0x1FFFD800 +#endif + #ifdef __cplusplus } #endif diff --git a/hw/mcu/stm/stm32f4xx/include/mcu/mcu.h b/hw/mcu/stm/stm32f4xx/include/mcu/mcu.h index f68848c..3a71c63 100644 --- a/hw/mcu/stm/stm32f4xx/include/mcu/mcu.h +++ b/hw/mcu/stm/stm32f4xx/include/mcu/mcu.h @@ -26,6 +26,27 @@ extern "C" { #endif +#if defined(STM32F401xC) || defined(STM32F401xE) || \ + defined(STM32F405xx) || \ + defined(STM32F407xx) || \ + defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F410Tx) || \ + defined(STM32F411xE) || \ + defined(STM32F412Cx) || defined(STM32F412Rx) || defined(STM32F412Vx) || defined(STM32F412Zx) || \ + defined(STM32F415xx) || \ + defined(STM32F417xx) || \ + defined(STM32F427xx) || \ + defined(STM32F429xx) || \ + defined(STM32F437xx) || \ + defined(STM32F439xx) || \ + defined(STM32F446xx) || \ + defined(STM32F469xx) || \ + defined(STM32F479xx) +#define STM32_SYSTEM_MEMORY 0x1FFF0000 +#elif defined(STM32F413xx) || \ + defined(STM32F423xx) +#define STM32_SYSTEM_MEMORY 0x1FF00000 +#endif + #ifdef __cplusplus } #endif diff --git a/hw/mcu/stm/stm32f7xx/include/mcu/mcu.h b/hw/mcu/stm/stm32f7xx/include/mcu/mcu.h index d844326..705ad87 100644 --- a/hw/mcu/stm/stm32f7xx/include/mcu/mcu.h +++ b/hw/mcu/stm/stm32f7xx/include/mcu/mcu.h @@ -26,6 +26,14 @@ extern "C" { #endif +#if defined(STM32F722xx) || defined(STM32F723xx) || \ + defined(STM32F732xx) || defined(STM32F733xx) || \ + defined(STM32F745xx) || defined(STM32F746xx) || \ + defined(STM32F756xx) || \ + defined(STM32F767xx) || defined(STM32F769xx) || \ + defined(STM32F777xx) || defined(STM32F779xx) +#define STM32_SYSTEM_MEMORY 0x1FF00000 +#endif #ifdef __cplusplus } diff --git a/hw/mcu/stm/stm32l0xx/include/mcu/mcu.h b/hw/mcu/stm/stm32l0xx/include/mcu/mcu.h index f468816..6c42936 100644 --- a/hw/mcu/stm/stm32l0xx/include/mcu/mcu.h +++ b/hw/mcu/stm/stm32l0xx/include/mcu/mcu.h @@ -26,6 +26,18 @@ extern "C" { #define SVC_IRQ_NUMBER SVC_IRQn +#if defined(STM32L010x4) || defined(STM32L010x6) || defined(STM32L010x8) || defined(STM32L010xB) || \ + defined(STM32L011xx) || \ + defined(STM32L021xx) || \ + defined(STM32L031xx) || \ + defined(STM32L041xx) || \ + defined(STM32L051xx) || defined(STM32L052xx) || defined(STM32L053xx) || \ + defined(STM32L061xx) || defined(STM32L062xx) || defined(STM32L063xx) || \ + defined(STM32L071xx) || defined(STM32L072xx) || defined(STM32L073xx) || \ + defined(STM32L081xx) || defined(STM32L082xx) || defined(STM32L083xx) +#define STM32_SYSTEM_MEMORY 0x1FF00000 +#endif + /* * Defines for naming GPIOs. */ diff --git a/hw/mcu/stm/stm32l1xx/include/mcu/mcu.h b/hw/mcu/stm/stm32l1xx/include/mcu/mcu.h index 2ac5e96..c556e5a 100644 --- a/hw/mcu/stm/stm32l1xx/include/mcu/mcu.h +++ b/hw/mcu/stm/stm32l1xx/include/mcu/mcu.h @@ -28,6 +28,16 @@ extern "C" { #define SVC_IRQ_NUMBER SVC_IRQn +#if defined(STM32L100xB) || defined(STM32L100xBA) || defined(STM32L100xC) || \ + defined(STM32L151xB) || defined(STM32L151xBA) || defined(STM32L151xC) || defined(STM32L151xCA) || \ + defined(STM32L151xD) || defined(STM32L151xDX) || defined(STM32L151xE) || \ + defined(STM32L152xB) || defined(STM32L152xBA) || defined(STM32L152xC) || defined(STM32L152xCA) || \ + defined(STM32L152xD) || defined(STM32L152xDX) || defined(STM32L152xE) || \ + defined(STM32L162xC) || defined(STM32L162xCA) || defined(STM32L162xD) || defined(STM32L162xDX) || \ + defined(STM32L162xE) +#define STM32_SYSTEM_MEMORY 0x1FF00000 +#endif + #ifdef __cplusplus } #endif diff --git a/hw/mcu/stm/stm32l4xx/include/mcu/mcu.h b/hw/mcu/stm/stm32l4xx/include/mcu/mcu.h index 2ac5e96..73af9a1 100644 --- a/hw/mcu/stm/stm32l4xx/include/mcu/mcu.h +++ b/hw/mcu/stm/stm32l4xx/include/mcu/mcu.h @@ -28,6 +28,21 @@ extern "C" { #define SVC_IRQ_NUMBER SVC_IRQn +#if defined(STM32L412xx) || \ + defined(STM32L422xx) || \ + defined(STM32L431xx) || defined(STM32L432xx) || defined(STM32L433xx) || \ + defined(STM32L442xx) || defined(STM32L443xx) || \ + defined(STM32L451xx) || defined(STM32L452xx) || \ + defined(STM32L462xx) || \ + defined(STM32L471xx) || defined(STM32L475xx) || defined(STM32L476xx) || \ + defined(STM32L485xx) || defined(STM32L486xx) || \ + defined(STM32L496xx) || \ + defined(STM32L4A6xx) || \ + defined(STM32L4R5xx) || defined(STM32L4R7xx) || defined(STM32L4R9xx) || \ + defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx) +#define STM32_SYSTEM_MEMORY 0x1FFF0000 +#endif + #ifdef __cplusplus } #endif diff --git a/hw/mcu/stm/stm32wbxx/include/mcu/mcu.h b/hw/mcu/stm/stm32wbxx/include/mcu/mcu.h index 2ac5e96..67825cc 100644 --- a/hw/mcu/stm/stm32wbxx/include/mcu/mcu.h +++ b/hw/mcu/stm/stm32wbxx/include/mcu/mcu.h @@ -28,6 +28,11 @@ extern "C" { #define SVC_IRQ_NUMBER SVC_IRQn +#if defined(STM32WB50xx) || \ + defined(STM32WB55xx) +#define STM32_SYSTEM_MEMORY 0x1FFF0000 +#endif + #ifdef __cplusplus } #endif