<div dir="ltr"><div dir="ltr">Hi Robin,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 5, 2021 at 5:20 AM Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com">robin.mueller.m@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">commit 8bcd2c40ac28bf575d6e012c57e3546799eefb40<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Tue Jan 5 12:16:19 2021 +0100<br>
<br>
deleted old cfg file<br>
<br>
commit 2da3db8799018e98d2237ee54b13f163690fbeb2<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Tue Jan 5 12:13:03 2021 +0100<br>
<br>
removed some moved components<br>
<br>
commit d63a12b6fde4c6025be5e755bb4fde547f968979<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Tue Jan 5 12:10:37 2021 +0100<br>
<br>
reverted gitignore change<br>
<br>
commit 6ac23279ddc8d8cf5b57c38f7c0e994f225f74af<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Tue Jan 5 12:09:31 2021 +0100<br>
<br>
merged changes from upstream<br>
<br>
commit a51d8f3c977abb23871dea6926de75a26592db09<br>
Merge: d238213dd6 0cb2f4f4de<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Mon Jan 4 16:04:26 2021 +0100<br>
<br>
Merge branch 'mueller/nucleo-patch' into mueller/nucleo_another_try<br>
<br>
commit 0cb2f4f4deb0015f96866bc00869095b2e637437<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Mon Jan 4 16:04:03 2021 +0100<br>
<br>
better help output<br>
<br>
<br>
commit 4e2645f7586508b0f68e2fb19f888e92d4ac5530<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Mon Jan 4 16:00:46 2021 +0100<br>
<br>
functions made public<br>
<br>
commit d238213dd657dcdd4825c8fa3db33422ecb37719<br>
Merge: 3a243aabc1 a6675d388e<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Mon Jan 4 15:52:35 2021 +0100<br>
<br>
Merge branch 'mueller/nucleo-patch' into mueller/nucleo_another_try<br>
<br>
commit a6675d388e174ad23ce6d61b3084742c056186be<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Mon Jan 4 15:51:39 2021 +0100<br>
<br>
prepared patch<br>
<br>
commit 3a243aabc1cb933a1d1a0ed86eea0c9f54d97f90<br>
Merge: 50a549d493 f867e7b6f4<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Mon Jan 4 15:48:18 2021 +0100<br>
<br>
Merge branch 'master' into mueller/nucleo_another_try<br>
<br>
commit 50a549d4938dc2681ec0cf18aa49bd1c74e1d13d<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Mon Jan 4 13:01:31 2021 +0100<br>
<br>
small tweak<br>
<br>
commit d920a820d4ad442dfb10ff733cef43b65b4bdea7<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Mon Jan 4 12:59:25 2021 +0100<br>
<br>
reverted stuff and made definitions weak<br>
<br>
commit ce36d0583959c146e48b3215b3b9000bd4a9ab66<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Mon Jan 4 11:24:03 2021 +0100<br>
<br>
stm32h7 config<br>
<br>
commit 3f460f0073d67f75bdd8ded2c02c0391bef9a131<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Sat Jan 2 18:51:47 2021 +0100<br>
<br>
correct uart chosen<br>
<br>
commit b6f27f08107450e832fa2dea30f8e7dae925fd31<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Sat Jan 2 16:39:25 2021 +0100<br>
<br>
trying to load bspopts<br>
<br>
commit cb345ef21d4ef442290715ce1e5fce48db91119b<br>
Merge: 93c21c74f9 a299c4feef<br>
Author: Robin Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Thu Dec 17 23:10:56 2020 +0100<br>
<br>
Merge remote-tracking branch 'upstream/master' into mueller/added-nucleo-yaml<br>
<br>
commit 93c21c74f928796cbc618c7c4aef492244973402<br>
Merge: 51104ac6a5 fe58f6ce4b<br>
Author: Robin Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Fri Nov 27 00:00:59 2020 +0100<br>
<br>
Merge remote-tracking branch 'upstream/master' into mueller/added-nucleo-yaml<br>
<br>
commit 51104ac6a5b700a65efb3ecca22b3c5df41a80f5<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Thu Nov 26 11:25:22 2020 +0100<br>
<br>
value hardcoded again<br>
<br>
commit 2d96d82a84ca4f96a1b17406a0aefe07bb52510e<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Thu Nov 26 11:15:38 2020 +0100<br>
<br>
define not propagated to header<br>
<br>
commit 706a4542c3bdc963497d6404602dcf24391dea01<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Wed Nov 25 23:48:36 2020 +0100<br>
<br>
comment moved<br>
<br>
commit bd8359bbd7c3d154f401a1ffdf16d90a6e8b34dd<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Wed Nov 25 21:40:19 2020 +0100<br>
<br>
moved config option<br>
<br>
commit ede140e783479c09fc82a0008651e07b612dc488<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Wed Nov 25 21:37:31 2020 +0100<br>
<br>
added build dependency<br>
<br>
commit 4e5c1404ce9277eaadd1b7e697310fc97206000f<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Wed Nov 25 20:16:45 2020 +0100<br>
<br>
trying to make it externally configurable<br>
<br>
commit 4fbd5f99683518c3442612c639b3894036de8b1e<br>
Author: Robin.Mueller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>><br>
Date: Wed Nov 25 19:53:11 2020 +0100<br>
<br>
added nucleo adaption<br>
---<br>
<br>
Squached version of the patch<br>
<br></blockquote><div><div><br></div><div>Can you please reword your commit message to provide a useful single message? <a href="https://devel.rtems.org/wiki/Developer/Git#GitCommits">https://devel.rtems.org/wiki/Developer/Git#GitCommits</a></div><div><br></div><div>We don't need all the intermediate commit messages/states of your code.</div><div> <br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
bsps/arm/stm32h7/console/console-usart3-cfg.c | 21 +++++++++++++++++++<br>
bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h | 8 +++++++<br>
bsps/arm/stm32h7/include/stm32h7xx_hal_uart.h | 1 +<br>
bsps/arm/stm32h7/start/system_stm32h7xx.c | 6 ++++++<br>
spec/build/bsps/arm/stm32h7/bspstm32h7.yml | 2 ++<br>
spec/build/bsps/arm/stm32h7/opth743nucleo.yml | 13 ++++++++++++<br>
6 files changed, 51 insertions(+)<br>
create mode 100644 spec/build/bsps/arm/stm32h7/opth743nucleo.yml<br>
<br>
diff --git a/bsps/arm/stm32h7/console/console-usart3-cfg.c b/bsps/arm/stm32h7/console/console-usart3-cfg.c<br>
index b40f6da5aa..dc552610e1 100644<br>
--- a/bsps/arm/stm32h7/console/console-usart3-cfg.c<br>
+++ b/bsps/arm/stm32h7/console/console-usart3-cfg.c<br>
@@ -25,12 +25,32 @@<br>
* POSSIBILITY OF SUCH DAMAGE.<br>
*/<br>
<br>
+#ifdef __rtems__<br>
+#include <bspopts.h><br>
+#endif<br>
+<br>
#ifdef HAVE_CONFIG_H<br>
#include "config.h"<br>
#endif<br>
<br>
#include <stm32h7/hal.h><br>
<br>
+#if STM32H743ZI_NUCLEO == 1<br>
+const stm32h7_uart_config stm32h7_usart3_config = {<br>
+ .gpio = {<br>
+ .regs = GPIOD,<br>
+ .config = {<br>
+ .Pin = GPIO_PIN_8 | GPIO_PIN_9,<br>
+ .Mode = GPIO_MODE_AF_PP,<br>
+ .Pull = GPIO_NOPULL,<br>
+ .Speed = GPIO_SPEED_FREQ_LOW,<br>
+ .Alternate = GPIO_AF7_USART3<br>
+ }<br>
+ },<br>
+ .irq = USART3_IRQn,<br>
+ .device_index = 2<br>
+};<br>
+#else<br>
const stm32h7_uart_config stm32h7_usart3_config = {<br>
.gpio = {<br>
.regs = GPIOB,<br>
@@ -45,3 +65,4 @@ const stm32h7_uart_config stm32h7_usart3_config = {<br>
.irq = USART3_IRQn,<br>
.device_index = 2<br>
};<br>
+#endif /* STM32H743ZI_NUCLEO == 1 */<br>
diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h b/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h<br>
index d423e4f782..7dd73075ba 100644<br>
--- a/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h<br>
+++ b/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h<br>
@@ -21,6 +21,9 @@<br>
#ifndef __STM32H7xx_HAL_CONF_H<br>
#define __STM32H7xx_HAL_CONF_H<br>
<br>
+#ifdef __rtems__<br>
+#include <bspopts.h><br>
+#endif /* __rtems__ */<br>
#ifdef __cplusplus<br>
extern "C" {<br>
#endif<br>
@@ -103,7 +106,12 @@<br>
* (when HSE is used as system clock source, directly or through the PLL). <br>
*/<br>
#if !defined (HSE_VALUE) </blockquote><div> </div><div>Is this code copied from the upstream? Or did you write this adaptation? If it is modified, probably it should be wrapped with the ifdef __rtems__ part?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+#if STM32H743ZI_NUCLEO == 1<br>
+// HSE for the STM32H743ZI Nucleo<br></blockquote><div>prefer /* */ comments</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+#define HSE_VALUE ((uint32_t)8000000)<br>
+#else<br>
#define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz : FPGA case fixed to 60MHZ */<br></blockquote><div>Keep line lengths below 80 characters. Can move the comment above the define, or just keep the tail end (FPGA is 60 MHz).</div><div><br></div><div>Unless the code is copied from 3rd party, then keep its original formatting for easier updates. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+#endif<br>
#endif /* HSE_VALUE */<br>
<br>
#if !defined (HSE_STARTUP_TIMEOUT)<br>
diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_uart.h b/bsps/arm/stm32h7/include/stm32h7xx_hal_uart.h<br>
index e9fecc4aa0..b171f7dac7 100644<br>
--- a/bsps/arm/stm32h7/include/stm32h7xx_hal_uart.h<br>
+++ b/bsps/arm/stm32h7/include/stm32h7xx_hal_uart.h<br>
@@ -27,6 +27,7 @@ extern "C" {<br>
<br>
/* Includes ------------------------------------------------------------------*/<br>
#include "stm32h7xx_hal_def.h"<br>
+#include "stm32h7xx_hal_dma.h"<br>
<br>
/** @addtogroup STM32H7xx_HAL_Driver<br>
* @{<br>
diff --git a/bsps/arm/stm32h7/start/system_stm32h7xx.c b/bsps/arm/stm32h7/start/system_stm32h7xx.c<br>
index 092d853720..65c5a65ef0 100644<br>
--- a/bsps/arm/stm32h7/start/system_stm32h7xx.c<br>
+++ b/bsps/arm/stm32h7/start/system_stm32h7xx.c<br>
@@ -48,10 +48,16 @@<br>
#include "stm32h7xx.h"<br>
#include <math.h><br>
#ifdef __rtems__<br>
+#include <bspopts.h><br>
#include <bsp/linker-symbols.h><br>
#endif /* __rtems__ */<br>
+<br>
#if !defined (HSE_VALUE)<br></blockquote><div>Does this actually get picked up, now that you have the same check and define in hal_conf?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+#if STM32H743ZI_NUCLEO<br></blockquote><div>use == 1 to be consistent?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+#define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */<br>
+#else<br>
#define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */<br>
+#endif<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
#endif /* HSE_VALUE */<br>
<br>
#if !defined (CSI_VALUE)<br>
diff --git a/spec/build/bsps/arm/stm32h7/bspstm32h7.yml b/spec/build/bsps/arm/stm32h7/bspstm32h7.yml<br>
index 1e54838c66..71a19cdbb9 100644<br>
--- a/spec/build/bsps/arm/stm32h7/bspstm32h7.yml<br>
+++ b/spec/build/bsps/arm/stm32h7/bspstm32h7.yml<br>
@@ -244,6 +244,8 @@ links:<br>
uid: ../../optconsolebaud<br>
- role: build-dependency<br>
uid: ../../optconsoleirq<br>
+- role: build-dependency<br>
+ uid: opth743nucleo<br>
- role: build-dependency<br>
uid: ../grp<br>
- role: build-dependency<br>
diff --git a/spec/build/bsps/arm/stm32h7/opth743nucleo.yml b/spec/build/bsps/arm/stm32h7/opth743nucleo.yml<br>
new file mode 100644<br>
index 0000000000..2c4176bf00<br>
--- /dev/null<br>
+++ b/spec/build/bsps/arm/stm32h7/opth743nucleo.yml<br>
@@ -0,0 +1,13 @@<br>
+actions:<br>
+- get-boolean: null<br>
+- define-condition: null<br>
+build-type: option<br>
+default: false<br>
+default-by-variant: []<br>
+enabled-by: true<br>
+format: '{}'<br>
+links: []<br>
+name: STM32H743ZI_NUCLEO<br>
+description: |<br>
+ Nucleo board. Use 8 MHz HSE external clock and different pins for the UART console.<br>
+type: build<br>
-- <br>
2.25.1<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div>