summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Gardas <karel@functional.vision>2022-05-16 15:18:37 +0200
committerKarel Gardas <karel@functional.vision>2022-06-01 11:20:59 +0200
commit250254ff8f91ad6696da5c853bacf29fd56e92f9 (patch)
treecd763b68f897f9811efad7713e92b269865e1c2e
parentbsps/stm32h7: include CMSIS Cortex-M4 header when required by configuration (diff)
downloadrtems-250254ff8f91ad6696da5c853bacf29fd56e92f9.tar.bz2
bsps/stm32h7: add configuration and enable build of stm32h757i-eval-m4 BSP
This is minimalist configuration for the stm32h757i-eval-m4 BSP provided here. The only general enhancement worth mention is a flash origin address configuration which is needed for simplification as M4 core boots from second flash bank which starts at 0x8100000 by default. The boot address of the core may be changed by using STM32CubeProgrammer. If done so then also BSP configuration needs to be changed accordingly. As the BSP variant is running on M4 core, there is also more configuration changes required here. E.g. boot core and ABI (compilation flags) in comparison with stm32h757i-eval BSP. On the other hand, C code is shared completely with this BSP variant. Sponsored-By: Precidata
-rw-r--r--spec/build/bsps/arm/stm32h7/abi.yml9
-rw-r--r--spec/build/bsps/arm/stm32h7/bspstm32h757i-eval-m4.yml24
-rw-r--r--spec/build/bsps/arm/stm32h7/grp.yml2
-rw-r--r--spec/build/bsps/arm/stm32h7/linkcmdsmemory.yml2
-rw-r--r--spec/build/bsps/arm/stm32h7/optbootcore.yml3
-rw-r--r--spec/build/bsps/arm/stm32h7/optlinkcmds.yml1
-rw-r--r--spec/build/bsps/arm/stm32h7/optmemflashorigin.yml19
-rw-r--r--spec/build/bsps/arm/stm32h7/optmemflashsz.yml6
-rw-r--r--spec/build/bsps/arm/stm32h7/optpwrsupply.yml1
-rw-r--r--spec/build/bsps/arm/stm32h7/optusart1gpioregs.yml1
-rw-r--r--spec/build/bsps/arm/stm32h7/optvariant.yml1
11 files changed, 66 insertions, 3 deletions
diff --git a/spec/build/bsps/arm/stm32h7/abi.yml b/spec/build/bsps/arm/stm32h7/abi.yml
index 697220b1b1..dd751cb72e 100644
--- a/spec/build/bsps/arm/stm32h7/abi.yml
+++ b/spec/build/bsps/arm/stm32h7/abi.yml
@@ -8,7 +8,14 @@ default:
- -mcpu=cortex-m7
- -mfpu=fpv5-d16
- -mfloat-abi=hard
-default-by-variant: []
+default-by-variant:
+- value:
+ - -mthumb
+ - -mcpu=cortex-m4
+ - -mfpu=fpv4-sp-d16
+ - -mfloat-abi=hard
+ variants:
+ - arm/stm32h757i-eval-m4
enabled-by: true
links: []
name: ABI_FLAGS
diff --git a/spec/build/bsps/arm/stm32h7/bspstm32h757i-eval-m4.yml b/spec/build/bsps/arm/stm32h7/bspstm32h757i-eval-m4.yml
new file mode 100644
index 0000000000..4850396281
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/bspstm32h757i-eval-m4.yml
@@ -0,0 +1,24 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+arch: arm
+bsp: stm32h757i-eval-m4
+build-type: bsp
+cflags: []
+copyrights:
+- Copyright (C) 2022 Karel Gardas <karel@functional.vision>
+cppflags: []
+enabled-by: true
+family: stm32h7
+includes: []
+install: []
+links:
+- role: build-dependency
+ uid: grp
+- role: build-dependency
+ uid: tststm32h757i-eval
+source:
+- bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h7-config-clk.c
+- bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h7-config-osc.c
+- bsps/arm/stm32h7/boards/stm/stm32h757i-eval/stm32h7-config-per.c
+- bsps/arm/stm32h7/boards/stm/stm32h757i-eval/system_stm32h7xx.c
+- bsps/shared/cache/nocache.c
+type: build
diff --git a/spec/build/bsps/arm/stm32h7/grp.yml b/spec/build/bsps/arm/stm32h7/grp.yml
index 6e7036b6aa..c056a2034b 100644
--- a/spec/build/bsps/arm/stm32h7/grp.yml
+++ b/spec/build/bsps/arm/stm32h7/grp.yml
@@ -52,6 +52,8 @@ links:
- role: build-dependency
uid: optmemflashlatency
- role: build-dependency
+ uid: optmemflashorigin
+- role: build-dependency
uid: optmemitcmsz
- role: build-dependency
uid: optmemnandsz
diff --git a/spec/build/bsps/arm/stm32h7/linkcmdsmemory.yml b/spec/build/bsps/arm/stm32h7/linkcmdsmemory.yml
index 7ff7f3da5e..78f0308832 100644
--- a/spec/build/bsps/arm/stm32h7/linkcmdsmemory.yml
+++ b/spec/build/bsps/arm/stm32h7/linkcmdsmemory.yml
@@ -3,7 +3,7 @@ content: |
MEMORY {
NULL : ORIGIN = 0x00000000, LENGTH = ${STM32H7_MEMORY_NULL_SIZE:#010x}
ITCM : ORIGIN = ${STM32H7_MEMORY_NULL_SIZE:#010x}, LENGTH = ${STM32H7_MEMORY_ITCM_SIZE:#010x}
- FLASH : ORIGIN = 0x08000000, LENGTH = ${STM32H7_MEMORY_FLASH_SIZE:#010x}
+ FLASH : ORIGIN = ${STM32H7_MEMORY_FLASH_ORIGIN:#010x}, LENGTH = ${STM32H7_MEMORY_FLASH_SIZE:#010x}
DTCM : ORIGIN = 0x20000000, LENGTH = ${STM32H7_MEMORY_DTCM_SIZE:#010x}
SRAM_AXI : ORIGIN = 0x24000000, LENGTH = ${STM32H7_MEMORY_SRAM_AXI_SIZE:#010x}
SRAM_1 : ORIGIN = 0x30000000, LENGTH = ${STM32H7_MEMORY_SRAM_1_SIZE:#010x}
diff --git a/spec/build/bsps/arm/stm32h7/optbootcore.yml b/spec/build/bsps/arm/stm32h7/optbootcore.yml
index 53ffb496cc..e6f52e8631 100644
--- a/spec/build/bsps/arm/stm32h7/optbootcore.yml
+++ b/spec/build/bsps/arm/stm32h7/optbootcore.yml
@@ -11,6 +11,9 @@ default-by-variant:
- value: CORE_CM7
variants:
- arm/stm32h757i-eval
+- value: CORE_CM4
+ variants:
+ - arm/stm32h757i-eval-m4
enabled-by: true
format: '{}'
links: []
diff --git a/spec/build/bsps/arm/stm32h7/optlinkcmds.yml b/spec/build/bsps/arm/stm32h7/optlinkcmds.yml
index 43af9c8613..c3c76f9496 100644
--- a/spec/build/bsps/arm/stm32h7/optlinkcmds.yml
+++ b/spec/build/bsps/arm/stm32h7/optlinkcmds.yml
@@ -8,6 +8,7 @@ default-by-variant:
variants:
- arm/stm32h7b3i-dk
- arm/stm32h757i-eval
+ - arm/stm32h757i-eval-m4
enabled-by: true
format: '{}'
links: []
diff --git a/spec/build/bsps/arm/stm32h7/optmemflashorigin.yml b/spec/build/bsps/arm/stm32h7/optmemflashorigin.yml
new file mode 100644
index 0000000000..f36a7da8b9
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/optmemflashorigin.yml
@@ -0,0 +1,19 @@
+actions:
+- get-integer: null
+- env-assign: null
+build-type: option
+default: 0x8000000
+default-by-variant:
+- value: 0x8100000
+ variants:
+ - arm/stm32h757i-eval-m4
+enabled-by: true
+format: '{:#010x}'
+links: []
+name: STM32H7_MEMORY_FLASH_ORIGIN
+description: |
+ Origin address of the internal flash.
+type: build
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
diff --git a/spec/build/bsps/arm/stm32h7/optmemflashsz.yml b/spec/build/bsps/arm/stm32h7/optmemflashsz.yml
index 627543f9a8..5bb89abb33 100644
--- a/spec/build/bsps/arm/stm32h7/optmemflashsz.yml
+++ b/spec/build/bsps/arm/stm32h7/optmemflashsz.yml
@@ -3,7 +3,11 @@ actions:
- env-assign: null
build-type: option
default: 0x200000
-default-by-variant: []
+default-by-variant:
+default-by-variant:
+- value: 0x100000
+ variants:
+ - arm/stm32h757i-eval-m4
enabled-by: true
format: '{:#010x}'
links: []
diff --git a/spec/build/bsps/arm/stm32h7/optpwrsupply.yml b/spec/build/bsps/arm/stm32h7/optpwrsupply.yml
index 76888fc1ca..c974654366 100644
--- a/spec/build/bsps/arm/stm32h7/optpwrsupply.yml
+++ b/spec/build/bsps/arm/stm32h7/optpwrsupply.yml
@@ -8,6 +8,7 @@ default-by-variant:
variants:
- arm/stm32h7b3i-dk
- arm/stm32h757i-eval
+ - arm/stm32h757i-eval-m4
enabled-by: true
format: '{}'
links: []
diff --git a/spec/build/bsps/arm/stm32h7/optusart1gpioregs.yml b/spec/build/bsps/arm/stm32h7/optusart1gpioregs.yml
index e389efe6a9..233a5ac813 100644
--- a/spec/build/bsps/arm/stm32h7/optusart1gpioregs.yml
+++ b/spec/build/bsps/arm/stm32h7/optusart1gpioregs.yml
@@ -10,6 +10,7 @@ default-by-variant:
- value: GPIOB
variants:
- arm/stm32h757i-eval
+ - arm/stm32h757i-eval-m4
enabled-by: true
format: '{}'
links: []
diff --git a/spec/build/bsps/arm/stm32h7/optvariant.yml b/spec/build/bsps/arm/stm32h7/optvariant.yml
index fd77d26f7f..ade5d5931d 100644
--- a/spec/build/bsps/arm/stm32h7/optvariant.yml
+++ b/spec/build/bsps/arm/stm32h7/optvariant.yml
@@ -20,6 +20,7 @@ default-by-variant:
- value: STM32H757xx
variants:
- arm/stm32h757i-eval
+ - arm/stm32h757i-eval-m4
enabled-by: true
format: '{}'
links: []