[PATCH] Squashed commit of the following:

Robin.Mueller robin.mueller.m at gmail.com
Tue Jan 5 12:20:16 UTC 2021


commit 8bcd2c40ac28bf575d6e012c57e3546799eefb40
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Tue Jan 5 12:16:19 2021 +0100

    deleted old cfg file

commit 2da3db8799018e98d2237ee54b13f163690fbeb2
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Tue Jan 5 12:13:03 2021 +0100

    removed some moved components

commit d63a12b6fde4c6025be5e755bb4fde547f968979
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Tue Jan 5 12:10:37 2021 +0100

    reverted gitignore change

commit 6ac23279ddc8d8cf5b57c38f7c0e994f225f74af
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Tue Jan 5 12:09:31 2021 +0100

    merged changes from upstream

commit a51d8f3c977abb23871dea6926de75a26592db09
Merge: d238213dd6 0cb2f4f4de
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Mon Jan 4 16:04:26 2021 +0100

    Merge branch 'mueller/nucleo-patch' into mueller/nucleo_another_try

commit 0cb2f4f4deb0015f96866bc00869095b2e637437
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Mon Jan 4 16:04:03 2021 +0100

    better help output


commit 4e2645f7586508b0f68e2fb19f888e92d4ac5530
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Mon Jan 4 16:00:46 2021 +0100

    functions made public

commit d238213dd657dcdd4825c8fa3db33422ecb37719
Merge: 3a243aabc1 a6675d388e
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Mon Jan 4 15:52:35 2021 +0100

    Merge branch 'mueller/nucleo-patch' into mueller/nucleo_another_try

commit a6675d388e174ad23ce6d61b3084742c056186be
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Mon Jan 4 15:51:39 2021 +0100

    prepared patch

commit 3a243aabc1cb933a1d1a0ed86eea0c9f54d97f90
Merge: 50a549d493 f867e7b6f4
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Mon Jan 4 15:48:18 2021 +0100

    Merge branch 'master' into mueller/nucleo_another_try

commit 50a549d4938dc2681ec0cf18aa49bd1c74e1d13d
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Mon Jan 4 13:01:31 2021 +0100

    small tweak

commit d920a820d4ad442dfb10ff733cef43b65b4bdea7
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Mon Jan 4 12:59:25 2021 +0100

    reverted stuff and made definitions weak

commit ce36d0583959c146e48b3215b3b9000bd4a9ab66
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Mon Jan 4 11:24:03 2021 +0100

    stm32h7 config

commit 3f460f0073d67f75bdd8ded2c02c0391bef9a131
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Sat Jan 2 18:51:47 2021 +0100

    correct uart chosen

commit b6f27f08107450e832fa2dea30f8e7dae925fd31
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Sat Jan 2 16:39:25 2021 +0100

    trying to load bspopts

commit cb345ef21d4ef442290715ce1e5fce48db91119b
Merge: 93c21c74f9 a299c4feef
Author: Robin Mueller <robin.mueller.m at gmail.com>
Date:   Thu Dec 17 23:10:56 2020 +0100

    Merge remote-tracking branch 'upstream/master' into mueller/added-nucleo-yaml

commit 93c21c74f928796cbc618c7c4aef492244973402
Merge: 51104ac6a5 fe58f6ce4b
Author: Robin Mueller <robin.mueller.m at gmail.com>
Date:   Fri Nov 27 00:00:59 2020 +0100

    Merge remote-tracking branch 'upstream/master' into mueller/added-nucleo-yaml

commit 51104ac6a5b700a65efb3ecca22b3c5df41a80f5
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Thu Nov 26 11:25:22 2020 +0100

    value hardcoded again

commit 2d96d82a84ca4f96a1b17406a0aefe07bb52510e
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Thu Nov 26 11:15:38 2020 +0100

    define not propagated to header

commit 706a4542c3bdc963497d6404602dcf24391dea01
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Wed Nov 25 23:48:36 2020 +0100

    comment moved

commit bd8359bbd7c3d154f401a1ffdf16d90a6e8b34dd
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Wed Nov 25 21:40:19 2020 +0100

    moved config option

commit ede140e783479c09fc82a0008651e07b612dc488
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Wed Nov 25 21:37:31 2020 +0100

    added build dependency

commit 4e5c1404ce9277eaadd1b7e697310fc97206000f
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Wed Nov 25 20:16:45 2020 +0100

    trying to make it externally configurable

commit 4fbd5f99683518c3442612c639b3894036de8b1e
Author: Robin.Mueller <robin.mueller.m at gmail.com>
Date:   Wed Nov 25 19:53:11 2020 +0100

    added nucleo adaption
---

Squached version of the patch

 bsps/arm/stm32h7/console/console-usart3-cfg.c | 21 +++++++++++++++++++
 bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h |  8 +++++++
 bsps/arm/stm32h7/include/stm32h7xx_hal_uart.h |  1 +
 bsps/arm/stm32h7/start/system_stm32h7xx.c     |  6 ++++++
 spec/build/bsps/arm/stm32h7/bspstm32h7.yml    |  2 ++
 spec/build/bsps/arm/stm32h7/opth743nucleo.yml | 13 ++++++++++++
 6 files changed, 51 insertions(+)
 create mode 100644 spec/build/bsps/arm/stm32h7/opth743nucleo.yml

diff --git a/bsps/arm/stm32h7/console/console-usart3-cfg.c b/bsps/arm/stm32h7/console/console-usart3-cfg.c
index b40f6da5aa..dc552610e1 100644
--- a/bsps/arm/stm32h7/console/console-usart3-cfg.c
+++ b/bsps/arm/stm32h7/console/console-usart3-cfg.c
@@ -25,12 +25,32 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifdef __rtems__
+#include <bspopts.h>
+#endif
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #include <stm32h7/hal.h>
 
+#if STM32H743ZI_NUCLEO == 1
+const stm32h7_uart_config stm32h7_usart3_config = {
+  .gpio = {
+    .regs = GPIOD,
+    .config = {
+      .Pin = GPIO_PIN_8 | GPIO_PIN_9,
+      .Mode = GPIO_MODE_AF_PP,
+      .Pull = GPIO_NOPULL,
+      .Speed = GPIO_SPEED_FREQ_LOW,
+      .Alternate = GPIO_AF7_USART3
+    }
+  },
+  .irq = USART3_IRQn,
+  .device_index = 2
+};
+#else
 const stm32h7_uart_config stm32h7_usart3_config = {
   .gpio = {
     .regs = GPIOB,
@@ -45,3 +65,4 @@ const stm32h7_uart_config stm32h7_usart3_config = {
   .irq = USART3_IRQn,
   .device_index = 2
 };
+#endif /*  STM32H743ZI_NUCLEO == 1 */
diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h b/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h
index d423e4f782..7dd73075ba 100644
--- a/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h
+++ b/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h
@@ -21,6 +21,9 @@
 #ifndef __STM32H7xx_HAL_CONF_H
 #define __STM32H7xx_HAL_CONF_H
 
+#ifdef __rtems__
+#include <bspopts.h>
+#endif /* __rtems__ */
 #ifdef __cplusplus
  extern "C" {
 #endif
@@ -103,7 +106,12 @@
   *        (when HSE is used as system clock source, directly or through the PLL).  
   */
 #if !defined  (HSE_VALUE) 
+#if STM32H743ZI_NUCLEO == 1
+// HSE for the STM32H743ZI Nucleo
+#define HSE_VALUE    ((uint32_t)8000000)
+#else
 #define HSE_VALUE    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz : FPGA case fixed to 60MHZ */
+#endif
 #endif /* HSE_VALUE */
 
 #if !defined  (HSE_STARTUP_TIMEOUT)
diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_uart.h b/bsps/arm/stm32h7/include/stm32h7xx_hal_uart.h
index e9fecc4aa0..b171f7dac7 100644
--- a/bsps/arm/stm32h7/include/stm32h7xx_hal_uart.h
+++ b/bsps/arm/stm32h7/include/stm32h7xx_hal_uart.h
@@ -27,6 +27,7 @@ extern "C" {
 
 /* Includes ------------------------------------------------------------------*/
 #include "stm32h7xx_hal_def.h"
+#include "stm32h7xx_hal_dma.h"
 
 /** @addtogroup STM32H7xx_HAL_Driver
   * @{
diff --git a/bsps/arm/stm32h7/start/system_stm32h7xx.c b/bsps/arm/stm32h7/start/system_stm32h7xx.c
index 092d853720..65c5a65ef0 100644
--- a/bsps/arm/stm32h7/start/system_stm32h7xx.c
+++ b/bsps/arm/stm32h7/start/system_stm32h7xx.c
@@ -48,10 +48,16 @@
 #include "stm32h7xx.h"
 #include <math.h>
 #ifdef __rtems__
+#include <bspopts.h>
 #include <bsp/linker-symbols.h>
 #endif /* __rtems__ */
+
 #if !defined  (HSE_VALUE)
+#if STM32H743ZI_NUCLEO
+#define HSE_VALUE    ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */
+#else
 #define HSE_VALUE    ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */
+#endif
 #endif /* HSE_VALUE */
 
 #if !defined  (CSI_VALUE)
diff --git a/spec/build/bsps/arm/stm32h7/bspstm32h7.yml b/spec/build/bsps/arm/stm32h7/bspstm32h7.yml
index 1e54838c66..71a19cdbb9 100644
--- a/spec/build/bsps/arm/stm32h7/bspstm32h7.yml
+++ b/spec/build/bsps/arm/stm32h7/bspstm32h7.yml
@@ -244,6 +244,8 @@ links:
   uid: ../../optconsolebaud
 - role: build-dependency
   uid: ../../optconsoleirq
+- role: build-dependency
+  uid: opth743nucleo
 - role: build-dependency
   uid: ../grp
 - role: build-dependency
diff --git a/spec/build/bsps/arm/stm32h7/opth743nucleo.yml b/spec/build/bsps/arm/stm32h7/opth743nucleo.yml
new file mode 100644
index 0000000000..2c4176bf00
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/opth743nucleo.yml
@@ -0,0 +1,13 @@
+actions:
+- get-boolean: null
+- define-condition: null
+build-type: option
+default: false
+default-by-variant: []
+enabled-by: true
+format: '{}'
+links: []
+name: STM32H743ZI_NUCLEO
+description: |
+  Nucleo board. Use 8 MHz HSE external clock and different pins for the UART console.
+type: build
-- 
2.25.1



More information about the devel mailing list