[PATCH v3 2/2] update README with instructions for stm32 patch

2021-10-24 Thread Robin Mueller
---
 README.md | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/README.md b/README.md
index ebbef12..3653b67 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,16 @@ It is recommended that the user supplies the `lwipopts.h` 
configuration file. Th
 contain template option files to get started. The user can copy and rename 
this files into the
 application and then pass the include path to the build system using the 
`--lwip-opts` option.
 
+# Applying the STM32 patch file
+
+Some STM32 files are problematic due to the used license. Therefore, they are 
applied in form of
+a patch. You need to perform the following steps in order to use the STM32H7 
BSP:
+
+```sh
+wget -O stm32.patch 
https://raw.githubusercontent.com/robamu-org/rtems-stm32-lwip-port-patch/main/stm32-bsp-eth-dhcp-files.patch
+git am stm32.patch
+```
+
 # Building with waf
 
 It is assumed that the path(s) containing the `lwipopts.h` file was stored in 
the environmental
-- 
2.32.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v2] STM32 lwIP addition and CMake support

2021-09-09 Thread Robin Mueller

Hi Shiro,

So you mean, retain the STM32 file unchanged in the source tree and then 
applying the patch? Or copy it from somewhere and then apply the patch?


I thought of that option as well.
The only issue I see here is that I merged the (example) files provided 
by STM32 so that one file can be used for every lwIP API. I managed to 
have the same files for alle three APIs this way, which is the cleaner 
solution in my opinion. But I guess I could just take the base files for 
the Raw API provided by STM32, create the patch to add support for all 
other APIs and add all other tweaks required for RTEMS, and then provide 
that patch somewhere.


Kind Regards
Robin
On 08.09.21 21:05, Shiro wrote:

Hi, Robin,

Would it be possible to retain the STM32 code, but carve out the 
“contaminated” lwIP code into a patch file.  Then RTEMS code base 
remains “clean” and if I, any user, chose to enable lwIP on STM32, I 
could do so by applying that patch.  I’d contaminate my src tree, but 
that’d be my responsibility and in any case, I’d be compliant (target 
is after all an STM32…).


The “patch trick” to manage license contamination has worked well for 
others in the past.


Cheers,
-Shiro

On Sep 8, 2021, at 11:51 AM, Robin Müller > wrote:


Hi,

Unfortunately, there was no other reply to the request.

Easiest solution would be to exclude the STM32 code completely out of 
RTEMS code for now. I can host it as example code in a personal 
repository.
But then I might have to change the architecture of the lwIP code 
again which provided some building blocks to make porting/using it 
easier.


Kind Regards
Robin

On Thu, 5 Aug 2021 at 17:00, Gedare Bloom > wrote:


STM is not going to fix their Ultimate Liberty License at this time.

https://github.com/STMicroelectronics/STM32CubeH7/issues/139#issuecomment-890806010



So, we need to avoid using their example codes.

On Wed, Jun 9, 2021 at 12:16 PM Gedare Bloom mailto:ged...@rtems.org>> wrote:
>
> I joined the Issue. Thanks for working on this.
>
> On Wed, Jun 9, 2021 at 11:30 AM Robin Müller
mailto:robin.muelle...@gmail.com>> wrote:
> >
> > I posted a reply but I think it did not go through. Will post
it now.
> >
> > Kind Regards
> > Robin
> >
> > On Wed, 9 Jun 2021 at 18:31, Robin Müller
mailto:robin.muelle...@gmail.com>> wrote:
> >>
> >> Hi,
> >>
> >> I received a reply from STM32 about the licensing issues.
They requested more specific information about the "vendor device
restrictions" for the HAL code.
> >> The issue is here:
https://github.com/STMicroelectronics/STM32CubeH7/issues/139

> >> Can anyone provide more information about this (maybe even
directly in the issue) ? I can forward it to them as well. Thanks
a lot in advance!
> >>
> >> Kind Regards
> >> Robin
> >>
> >> On Wed, 28 Apr 2021 at 02:45, Chris Johns mailto:chr...@rtems.org>> wrote:
> >>>
> >>> On 28/4/21 2:58 am, Robin Müller wrote:
> >>> > Okay, I can understand that you'd like to have one build
system only. We had the
> >>> > same issue with a former Makefile build system and the
new CMake system and
> >>> > decided to make the former system obsolete> because
maintaining both of them would be too much work
> >>> For RTEMS what we use has been selected for a range of
important reasons and the
> >>> rtems-central repo and the qual work highlights the
importance of those
> >>> decisions. Waf is a python framework for building software
and in rtems.git our
> >>> build system support is written in a clearly defined
portable language with
> >>> power helper libraries. We can run code formatters on our
build system, have
> >>> unit tests and there is even source level debuggers. We
treat the build system
> >>> like any other piece of code we have.
> >>>
> >>> > First thing I  can do is that I split up the patch and
extract the CMake
> >>> > specific files. Concerning a clean solution to allow
users to use CMake without
> >>> > introducing files like CMakeLists.txt,
> >>> > I am not sure right now. Extracting the information
required by CMake would
> >>> > again require scripts to export source files and include
paths.
> >>> > The simplest solution would still be a CMakeLists.txt
file in the root here
> >>> > which simply sets source files and include paths in the
parent scope.
> >>> > which would again be another form of maintenance burden
because it still needs
> >>> > to figure out which port sources to add etc.
> >>>
> >>> What about scons, meson, or a plain Makefile for those who
just want to u

[PATCH] STM32H7 ethernet pin corrections

2021-07-16 Thread Robin Mueller
These patches were submitted a few months ago, but it was found out
that the default-by-family: [] were missing in the GPIO .yml lines. 
This was fixed in this patch.

This patch accounts for different pins for the ETH peripheral
on STM32H7 devices. For example, the Nucleo H743ZI has slightly
different pins than other STM32H7 boards.
---
 bsps/arm/stm32h7/start/stm32h7-hal-eth.c  | 22 ++-
 spec/build/bsps/arm/stm32h7/grp.yml   |  4 
 .../bsps/arm/stm32h7/optethgpiobregs.yml  | 20 +
 .../bsps/arm/stm32h7/optethgpiogregs.yml  | 20 +
 4 files changed, 65 insertions(+), 1 deletion(-)
 create mode 100644 spec/build/bsps/arm/stm32h7/optethgpiobregs.yml
 create mode 100644 spec/build/bsps/arm/stm32h7/optethgpiogregs.yml

diff --git a/bsps/arm/stm32h7/start/stm32h7-hal-eth.c 
b/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
index 46475f4316..b9dac6d7f9 100644
--- a/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
+++ b/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
@@ -31,10 +31,12 @@
 
 #include 
 
+#include 
+
 static const stm32h7_gpio_config gpiog = {
   .regs = GPIOG,
   .config = {
-.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13,
+.Pin = STM32H7_ETH_GPIOG_PINS,
 .Mode = GPIO_MODE_AF_PP,
 .Pull = GPIO_NOPULL,
 .Speed = GPIO_SPEED_FREQ_LOW,
@@ -64,6 +66,21 @@ static const stm32h7_gpio_config gpioa = {
   }
 };
 
+#ifdef STM32H7_ETH_GPIOB_PINS
+
+static const stm32h7_gpio_config gpiob = {
+  .regs = GPIOB,
+  .config = {
+.Pin = STM32H7_ETH_GPIOB_PINS,
+.Mode = GPIO_MODE_AF_PP,
+.Pull = GPIO_NOPULL,
+.Speed = GPIO_SPEED_FREQ_LOW,
+.Alternate = GPIO_AF11_ETH
+  }
+};
+
+#endif
+
 void
 HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
 {
@@ -73,4 +90,7 @@ HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
   stm32h7_gpio_init(&gpiog);
   stm32h7_gpio_init(&gpioc);
   stm32h7_gpio_init(&gpioa);
+#ifdef STM32H7_ETH_GPIOB_PINS
+  stm32h7_gpio_init(&gpiob);
+#endif
 }
diff --git a/spec/build/bsps/arm/stm32h7/grp.yml 
b/spec/build/bsps/arm/stm32h7/grp.yml
index 2147cdec88..a7e7affa05 100644
--- a/spec/build/bsps/arm/stm32h7/grp.yml
+++ b/spec/build/bsps/arm/stm32h7/grp.yml
@@ -83,6 +83,10 @@ links:
   uid: optusart3gpioregs
 - role: build-dependency
   uid: optvariant
+- role: build-dependency
+  uid: optethgpiogregs
+- role: build-dependency
+  uid: optethgpiobregs
 - role: build-dependency
   uid: ../../optconsolebaud
 - role: build-dependency
diff --git a/spec/build/bsps/arm/stm32h7/optethgpiobregs.yml 
b/spec/build/bsps/arm/stm32h7/optethgpiobregs.yml
new file mode 100644
index 00..d9898cbc79
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/optethgpiobregs.yml
@@ -0,0 +1,20 @@
+actions:
+- get-string: null
+- define-unquoted: null
+build-type: option
+default: null
+default-by-family: []
+default-by-variant:
+- value: GPIO_PIN_13
+  variants:
+  - arm/nucleo-h743zi
+enabled-by: true
+format: '{}'
+links: []
+name: STM32H7_ETH_GPIOB_PINS
+description: |
+  GPIO B pins used for the ETH pin configuration.
+type: build
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
diff --git a/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml 
b/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml
new file mode 100644
index 00..6a79082927
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml
@@ -0,0 +1,20 @@
+actions:
+- get-string: null
+- define-unquoted: null
+build-type: option
+default: ( GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 )
+default-by-family: []
+default-by-variant:
+- value: ( GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13 )
+  variants:
+  - arm/nucleo-h743zi
+enabled-by: true
+format: '{}'
+links: []
+name: STM32H7_ETH_GPIOG_PINS
+description: |
+  GPIO G pins used for the ETH pin configuration.
+type: build
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2] setbuilder minor list-host option

2021-07-16 Thread Robin Mueller
This adds a way to print the host triplet
Can be useful for cross-compiling toolchains
---
Change from v1 to v2: Removed "Displaying" in printout on first line.

 source-builder/sb/setbuilder.py | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py
index c8c8fee..63392fe 100644
--- a/source-builder/sb/setbuilder.py
+++ b/source-builder/sb/setbuilder.py
@@ -673,6 +673,16 @@ def list_bset_cfg_files(opts, configs):
 return True
 return False
 
+def list_host(opts):
+if opts.get_arg('--list-host'):
+print('Host operating system information:')
+print('Operating system: %s' % macro_expand(opts.defaults, '%{_os}'))
+print('Number of processors: %s' % macro_expand(opts.defaults, 
'%{_ncpus}'))
+print('Build architecture: %s' % macro_expand(opts.defaults, 
'%{_host_arch}'))
+print('Host triplet: %s' % macro_expand(opts.defaults, '%{_host}'))
+return True
+return False
+
 def run():
 import sys
 ec = 0
@@ -683,6 +693,7 @@ def run():
 '--list-bsets':'List available build sets',
 '--list-configs':  'List available configuration files.',
 '--list-deps': 'List the dependent files.',
+'--list-host': 'List host information and the host 
triplet.',
 '--bset-tar-file': 'Create a build set tar file',
 '--pkg-tar-files': 'Create package tar files',
 '--no-report': 'Do not create a package report.',
@@ -720,7 +731,8 @@ def run():
 deps = []
 else:
 deps = None
-if not list_bset_cfg_files(opts, configs):
+
+if not list_bset_cfg_files(opts, configs) and not list_host(opts):
 prefix = macro_expand(opts.defaults, '%{_prefix}')
 if opts.canadian_cross():
 opts.disable_install()
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH rtems-lwip v2] STM32 lwIP addition

2021-04-28 Thread Robin Mueller
This patch adds the STM32H7 / NUCLEO-H743ZI lwIP port.
It also improves the architecture to make integration
of new BSPs easier. The patch continues the wscript file to
allow installing the lwIP support similar to how a RTEMS
BSP is installed.

https://github.com/rmspacefish/rtems-stm32-lwip is a self-contained
repository to test the lwIP integration for the arm/stm32h7
and arm/nucleo-h743zi BSP. The repository README specifies
how to build the RTEMS lwIP support and install it at a specified
prefix location.

The STM32 port includes the LAN driver (lan8742.c), the
primary port functions in ethernetif.c and some application code
taken from CubeH7, which can serve as a starting point for
implementations and was also tailored to RTEMS.

The common source file were refactored to be more generic and independent
of the used BSP.

This patch includes corrections from the code review by Gedare Bloom.

Please note that any merges need to be held off until some licensing issues
with STM concerning the SLA0044 license on example files are resolved.
---
 .gitignore|   6 +
 .gitmodules   |   1 +
 README.md |  32 +
 lwip-to-rtems.py  |   0
 lwip.py   | 182 -
 .../drivers/{eth_lwip.c => rtems_lwip.c}  | 187 +++--
 .../drivers/{eth_lwip.h => rtems_lwip.h}  |  92 ++-
 .../{eth_lwip_default.h => rtems_lwip_conf.h} |  30 +-
 lwip/ports/drivers/stm32h7/app_dhcp.c | 208 +
 lwip/ports/drivers/stm32h7/app_ethernet.c | 191 +
 lwip/ports/drivers/stm32h7/ethernetif.c   | 748 ++
 .../stm32h7/include/rtems_lwip/app_dhcp.h |  51 ++
 .../stm32h7/include/rtems_lwip/app_ethernet.h |  64 ++
 .../stm32h7/include/rtems_lwip/ethernetif.h   |  59 ++
 lwip/ports/drivers/stm32h7/lan8742.c  | 664 
 lwip/ports/drivers/stm32h7/lan8742.h  | 448 +++
 lwip/ports/drivers/stm32h7/port_conf.h|  44 ++
 .../stm32h7/template/lwipopts_template.h  | 292 +++
 .../include/rtems_lwip}/tms570_netif.h|  31 +
 .../ports/drivers/{ => tms570}/phy_dp83848h.c |   0
 .../ports/drivers/{ => tms570}/phy_dp83848h.h |   0
 .../tms570/template/lwipopts_template.h   |  75 ++
 lwip/ports/drivers/{ => tms570}/ti_drv_emac.h |   0
 lwip/ports/drivers/{ => tms570}/ti_drv_mdio.h |   0
 lwip/ports/drivers/{ => tms570}/tms570_emac.h |   0
 .../ports/drivers/{ => tms570}/tms570_netif.c |  11 +-
 lwip/ports/os/rtems/arch/cc.h |   3 +
 lwip/ports/os/rtems/arch/sys_arch.c   |  31 +-
 lwip/ports/os/rtems/arch/sys_arch.h   |  18 +-
 lwip/ports/os/rtems/defaults/lwipopts.h   |  37 +
 lwip/src/include/lwip/sys.h   |   1 -
 lwip/{ports/os => test}/lwipopts.h|   0
 wscript   |   2 +
 33 files changed, 3348 insertions(+), 160 deletions(-)
 create mode 100644 README.md
 mode change 100755 => 100644 lwip-to-rtems.py
 rename lwip/ports/drivers/{eth_lwip.c => rtems_lwip.c} (56%)
 rename lwip/ports/drivers/{eth_lwip.h => rtems_lwip.h} (55%)
 rename lwip/ports/drivers/{eth_lwip_default.h => rtems_lwip_conf.h} (68%)
 create mode 100644 lwip/ports/drivers/stm32h7/app_dhcp.c
 create mode 100644 lwip/ports/drivers/stm32h7/app_ethernet.c
 create mode 100644 lwip/ports/drivers/stm32h7/ethernetif.c
 create mode 100644 lwip/ports/drivers/stm32h7/include/rtems_lwip/app_dhcp.h
 create mode 100644 lwip/ports/drivers/stm32h7/include/rtems_lwip/app_ethernet.h
 create mode 100644 lwip/ports/drivers/stm32h7/include/rtems_lwip/ethernetif.h
 create mode 100644 lwip/ports/drivers/stm32h7/lan8742.c
 create mode 100644 lwip/ports/drivers/stm32h7/lan8742.h
 create mode 100644 lwip/ports/drivers/stm32h7/port_conf.h
 create mode 100644 lwip/ports/drivers/stm32h7/template/lwipopts_template.h
 rename lwip/ports/drivers/{ => tms570/include/rtems_lwip}/tms570_netif.h (74%)
 rename lwip/ports/drivers/{ => tms570}/phy_dp83848h.c (100%)
 rename lwip/ports/drivers/{ => tms570}/phy_dp83848h.h (100%)
 create mode 100644 lwip/ports/drivers/tms570/template/lwipopts_template.h
 rename lwip/ports/drivers/{ => tms570}/ti_drv_emac.h (100%)
 rename lwip/ports/drivers/{ => tms570}/ti_drv_mdio.h (100%)
 rename lwip/ports/drivers/{ => tms570}/tms570_emac.h (100%)
 rename lwip/ports/drivers/{ => tms570}/tms570_netif.c (99%)
 create mode 100644 lwip/ports/os/rtems/defaults/lwipopts.h
 rename lwip/{ports/os => test}/lwipopts.h (100%)

diff --git a/.gitignore b/.gitignore
index 618d791..91a3a03 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,10 @@
+# Python
 __pycache__
+
+# Waf
 .lock-waf*
 .waf*
+/*.pyc
+
+# Builds
 build/
diff --git a/.gitmodules b/.gitmodules
index 4ea46da..a98aac6 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,3 +4,4 @@
 [submodule "rtems_waf"]
path = rtems_waf
url = git://git.rtems.org/rtems_waf.git
+
diff --git a/R

[PATCH] CMake support for the STM32 lwIP addition

2021-04-27 Thread Robin Mueller
This patch adds full CMake support for the lwIP support.
It can be easily extended to other architectures as well.

More information can also be found in the README, which also specifies
how to build with CMake. The waf build system still needs to be adapted
to perform the same function.
---
 CMakeLists.txt| 76 +++
 README.md |  9 +++
 cmake/PortSelect.cmake| 12 +++
 lwip/CMakeLists.txt   |  2 +
 lwip/ports/CMakeLists.txt |  2 +
 lwip/ports/drivers/CMakeLists.txt | 20 +
 lwip/ports/drivers/stm32h7/CMakeLists.txt | 14 
 .../drivers/stm32h7/include/CMakeLists.txt|  7 ++
 lwip/ports/drivers/tms570/CMakeLists.txt  |  4 +
 lwip/ports/os/CMakeLists.txt  |  1 +
 lwip/ports/os/rtems/CMakeLists.txt|  9 +++
 lwip/ports/os/rtems/arch/CMakeLists.txt   |  4 +
 lwip/src/CMakeLists.txt   |  4 +
 lwip/src/api/CMakeLists.txt   | 11 +++
 lwip/src/core/CMakeLists.txt  | 28 +++
 lwip/src/core/ipv4/CMakeLists.txt | 10 +++
 lwip/src/core/ipv6/CMakeLists.txt | 11 +++
 lwip/src/include/CMakeLists.txt   |  7 ++
 lwip/src/netif/CMakeLists.txt | 10 +++
 19 files changed, 241 insertions(+)
 create mode 100644 CMakeLists.txt
 create mode 100644 cmake/PortSelect.cmake
 create mode 100644 lwip/CMakeLists.txt
 create mode 100644 lwip/ports/CMakeLists.txt
 create mode 100644 lwip/ports/drivers/CMakeLists.txt
 create mode 100644 lwip/ports/drivers/stm32h7/CMakeLists.txt
 create mode 100644 lwip/ports/drivers/stm32h7/include/CMakeLists.txt
 create mode 100644 lwip/ports/drivers/tms570/CMakeLists.txt
 create mode 100644 lwip/ports/os/CMakeLists.txt
 create mode 100644 lwip/ports/os/rtems/CMakeLists.txt
 create mode 100644 lwip/ports/os/rtems/arch/CMakeLists.txt
 create mode 100644 lwip/src/CMakeLists.txt
 create mode 100644 lwip/src/api/CMakeLists.txt
 create mode 100644 lwip/src/core/CMakeLists.txt
 create mode 100644 lwip/src/core/ipv4/CMakeLists.txt
 create mode 100644 lwip/src/core/ipv6/CMakeLists.txt
 create mode 100644 lwip/src/include/CMakeLists.txt
 create mode 100644 lwip/src/netif/CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 000..59cc7e9
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,76 @@
+#
+# CMake support for RTEMS lwIP
+#
+# Author: R.Mueller
+#
+cmake_minimum_required(VERSION 3.13)
+
+#
+# lwIP options
+#
+
+option(LWIP_GENERATE_SECTIONS "Generate function and data sections" ON)
+if(LWIP_GENERATE_SECTIONS)
+option(LWIP_REMOVE_UNUSED_CODE "Remove unused sections" ON)
+endif()
+
+option(LWIP_ADD_IPV6 "Compile IPv6 sourcces" ON)
+
+#
+# Port select
+#
+
+if(NOT RTEMS_BSP)
+message(
+FATAL_ERROR "RTEMS BSP variable not set. "
+"Please make sure to pass it with -DRTEMS_BSP="
+   )
+endif()
+
+set(LWIP_CMAKE_CONFIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+include("${LWIP_CMAKE_CONFIG_DIR}/PortSelect.cmake")
+
+rtems_lwip_port_select(${RTEMS_BSP})
+
+set(LIB_LWIP_NAME lwip)
+add_library(${LIB_LWIP_NAME})
+
+add_subdirectory(lwip)
+
+# The user needs to supply the lwipopts.h file. The user can do this by 
supplying the
+# path of this file in the LWIP_CONFIG_PATH variable
+if(NOT LWIP_CONFIG_PATH)
+   message(WARNING "lwIP configuration include path LWIP_CONFIG_PATH not 
set!")
+endif()
+
+if(IS_ABSOLUTE ${LWIP_CONFIG_PATH})
+   set(LWIP_CONFIG_PATH_ABS "${LWIP_CONFIG_PATH}")
+else()
+   get_filename_component(LWIP_CONFIG_PATH_ABS
+   ${LWIP_CONFIG_PATH} REALPATH BASE_DIR ${CMAKE_SOURCE_DIR}
+   )
+endif()
+
+if(CMAKE_VERBOSE)
+   message(STATUS "lwIP configuration path: ${LWIP_CONFIG_PATH}")
+endif()
+
+target_include_directories(${LIB_LWIP_NAME} PRIVATE
+   ${LWIP_CONFIG_PATH_ABS}
+)
+
+# Remove unused sections
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+if(LWIP_GENERATE_SECTIONS)
+target_compile_options(${LIB_LWIP_NAME} PRIVATE
+"-ffunction-sections"
+"-fdata-sections"
+)
+endif()
+
+if(LWIP_REMOVE_UNUSED_CODE)
+target_link_options(${LIB_LWIP_NAME} PRIVATE
+"Wl,--gc-sections"
+)
+endif()
+endif()
diff --git a/README.md b/README.md
index e789219..e4b0060 100644
--- a/README.md
+++ b/README.md
@@ -19,5 +19,14 @@ and then pass the include path to the build system

[PATCH] STM32 lwIP addition

2021-04-27 Thread Robin Mueller
This patch adds the STM32H7 / NUCLEO-H743ZI lwIP port.
It also improves the architecture to make integration
of new BSPs easier.

https://github.com/rmspacefish/rtems-stm32-lwip is a self-contained
repository to test the lwIP integration for the arm/stm32h7
and arm/nucleo-h743zi BSP.

The STM32 port includes the LAN driver (lan8742.c), the
primary port functions in ethernetif.c and some application code
taken from CubeH7, which can serve as a starting point for
implementations and was also tailored to RTEMS.

The common source file were refactored to be more generic and independent
of the used BSP.
---
 .gitignore|  10 +
 .gitmodules   |   1 +
 README.md |  23 +
 lwip-to-rtems.py  |   0
 .../drivers/{eth_lwip.c => rtems_lwip.c}  | 181 +++--
 .../drivers/{eth_lwip.h => rtems_lwip.h}  |  79 +-
 .../{eth_lwip_default.h => rtems_lwip_conf.h} |  30 +-
 lwip/ports/drivers/stm32h7/app_dhcp.c | 217 +
 lwip/ports/drivers/stm32h7/app_ethernet.c | 187 +
 lwip/ports/drivers/stm32h7/ethernetif.c   | 758 ++
 .../stm32h7/include/lwip_port/app_dhcp.h  |  38 +
 .../stm32h7/include/lwip_port/app_ethernet.h  |  56 ++
 .../stm32h7/include/lwip_port/ethernetif.h|  56 ++
 lwip/ports/drivers/stm32h7/lan8742.c  | 664 +++
 lwip/ports/drivers/stm32h7/lan8742.h  | 448 +++
 .../stm32h7/template/lwipopts_template.h  | 289 +++
 .../ports/drivers/{ => tms570}/phy_dp83848h.c |   0
 .../ports/drivers/{ => tms570}/phy_dp83848h.h |   0
 .../tms570/template/lwipopts_template.h   |  75 ++
 lwip/ports/drivers/{ => tms570}/ti_drv_emac.h |   0
 lwip/ports/drivers/{ => tms570}/ti_drv_mdio.h |   0
 lwip/ports/drivers/{ => tms570}/tms570_emac.h |   0
 .../ports/drivers/{ => tms570}/tms570_netif.c |  11 +-
 .../ports/drivers/{ => tms570}/tms570_netif.h |  31 +
 lwip/ports/os/rtems/arch/cc.h |   3 +
 lwip/ports/os/rtems/arch/sys_arch.c   |  32 +-
 lwip/ports/os/rtems/arch/sys_arch.h   |  18 +-
 lwip/src/include/lwip/sys.h   |   1 -
 lwip/{ports/os => test}/lwipopts.h|   0
 waf   |   0
 30 files changed, 3078 insertions(+), 130 deletions(-)
 create mode 100644 README.md
 mode change 100755 => 100644 lwip-to-rtems.py
 rename lwip/ports/drivers/{eth_lwip.c => rtems_lwip.c} (57%)
 rename lwip/ports/drivers/{eth_lwip.h => rtems_lwip.h} (56%)
 rename lwip/ports/drivers/{eth_lwip_default.h => rtems_lwip_conf.h} (68%)
 create mode 100644 lwip/ports/drivers/stm32h7/app_dhcp.c
 create mode 100644 lwip/ports/drivers/stm32h7/app_ethernet.c
 create mode 100644 lwip/ports/drivers/stm32h7/ethernetif.c
 create mode 100644 lwip/ports/drivers/stm32h7/include/lwip_port/app_dhcp.h
 create mode 100644 lwip/ports/drivers/stm32h7/include/lwip_port/app_ethernet.h
 create mode 100644 lwip/ports/drivers/stm32h7/include/lwip_port/ethernetif.h
 create mode 100644 lwip/ports/drivers/stm32h7/lan8742.c
 create mode 100644 lwip/ports/drivers/stm32h7/lan8742.h
 create mode 100644 lwip/ports/drivers/stm32h7/template/lwipopts_template.h
 rename lwip/ports/drivers/{ => tms570}/phy_dp83848h.c (100%)
 rename lwip/ports/drivers/{ => tms570}/phy_dp83848h.h (100%)
 create mode 100644 lwip/ports/drivers/tms570/template/lwipopts_template.h
 rename lwip/ports/drivers/{ => tms570}/ti_drv_emac.h (100%)
 rename lwip/ports/drivers/{ => tms570}/ti_drv_mdio.h (100%)
 rename lwip/ports/drivers/{ => tms570}/tms570_emac.h (100%)
 rename lwip/ports/drivers/{ => tms570}/tms570_netif.c (99%)
 rename lwip/ports/drivers/{ => tms570}/tms570_netif.h (74%)
 rename lwip/{ports/os => test}/lwipopts.h (100%)
 mode change 100755 => 100644 waf

diff --git a/.gitignore b/.gitignore
index 618d791..31a00bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,14 @@
+# Eclipse files
+/.cproject
+/.project
+/.settings
+
+# Python
 __pycache__
+
+# Waf
 .lock-waf*
 .waf*
+
+# Builds
 build/
diff --git a/.gitmodules b/.gitmodules
index 4ea46da..a98aac6 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,3 +4,4 @@
 [submodule "rtems_waf"]
path = rtems_waf
url = git://git.rtems.org/rtems_waf.git
+
diff --git a/README.md b/README.md
new file mode 100644
index 000..e789219
--- /dev/null
+++ b/README.md
@@ -0,0 +1,23 @@
+RTEMS lwIP Repository
+==
+
+This repository contains the RTEMS lwIP support and all available ports.
+Currently, the following RTEMS BSPs are supported:
+
+ - All `arm/tms*` BSPs.
+ - The `arm/stm32h7` and the `arm/nucleo-h743zi` BSP. An example application 
can be 
+   found [here](https://github.com/rmspacefish/rtems-stm32-lwip).
+ 
+# Using this repository
+
+The repository contains the lwIP sources, the OS port for RTEMS and port files
+belonging to a RTEMS BSP.
+
+The user still needs to supply the `lwipopts.h` configuration file. The port 
folders contain

[PATCH v2] STM32 lwIP addition and CMake support

2021-04-26 Thread Robin Mueller
This patch adds CMake support to RTEMS lwIP.
It also improves the architecture to make integration
of new BSPs easier.

https://github.com/rmspacefish/rtems-stm32-lwip is a self-contained
repository to test the lwIP integration for the arm/stm32h7
and arm/nucleo-h743zi BSP.

The STM32 port includes the LAN driver (lan8742.c), the
primary port functions in ethernetif.c and some application code
taken from CubeH7, which can serve as a starting point for
implementations and was also tailored to RTEMS.

The common source file were refactored to be more generic and independent
of the used BSP.

More information can also be found in the README, which also specifies
how to build with CMake. The waf build system still needs to be adapted
to perform the same function.
---
 .gitignore|  10 +
 .gitmodules   |   1 +
 CMakeLists.txt|  76 ++
 README.md |  32 +
 cmake/PortSelect.cmake|  12 +
 lwip-to-rtems.py  |   0
 lwip/CMakeLists.txt   |   2 +
 lwip/ports/CMakeLists.txt |   2 +
 lwip/ports/drivers/CMakeLists.txt |  20 +
 .../drivers/{eth_lwip.c => rtems_lwip.c}  | 181 +++--
 .../drivers/{eth_lwip.h => rtems_lwip.h}  |  79 +-
 .../{eth_lwip_default.h => rtems_lwip_conf.h} |  30 +-
 lwip/ports/drivers/stm32h7/CMakeLists.txt |  14 +
 lwip/ports/drivers/stm32h7/app_dhcp.c | 217 +
 lwip/ports/drivers/stm32h7/app_ethernet.c | 187 +
 lwip/ports/drivers/stm32h7/ethernetif.c   | 758 ++
 .../drivers/stm32h7/include/CMakeLists.txt|   7 +
 .../stm32h7/include/lwip_port/app_dhcp.h  |  38 +
 .../stm32h7/include/lwip_port/app_ethernet.h  |  56 ++
 .../stm32h7/include/lwip_port/ethernetif.h|  56 ++
 lwip/ports/drivers/stm32h7/lan8742.c  | 664 +++
 lwip/ports/drivers/stm32h7/lan8742.h  | 448 +++
 .../stm32h7/template/lwipopts_template.h  | 289 +++
 lwip/ports/drivers/tms570/CMakeLists.txt  |   4 +
 .../ports/drivers/{ => tms570}/phy_dp83848h.c |   0
 .../ports/drivers/{ => tms570}/phy_dp83848h.h |   0
 .../tms570/template/lwipopts_template.h   |  75 ++
 lwip/ports/drivers/{ => tms570}/ti_drv_emac.h |   0
 lwip/ports/drivers/{ => tms570}/ti_drv_mdio.h |   0
 lwip/ports/drivers/{ => tms570}/tms570_emac.h |   0
 .../ports/drivers/{ => tms570}/tms570_netif.c |  11 +-
 .../ports/drivers/{ => tms570}/tms570_netif.h |  31 +
 lwip/ports/os/CMakeLists.txt  |   1 +
 lwip/ports/os/rtems/CMakeLists.txt|   9 +
 lwip/ports/os/rtems/arch/CMakeLists.txt   |   4 +
 lwip/ports/os/rtems/arch/cc.h |   3 +
 lwip/ports/os/rtems/arch/sys_arch.c   |  32 +-
 lwip/ports/os/rtems/arch/sys_arch.h   |  18 +-
 lwip/src/CMakeLists.txt   |   4 +
 lwip/src/api/CMakeLists.txt   |  11 +
 lwip/src/core/CMakeLists.txt  |  28 +
 lwip/src/core/ipv4/CMakeLists.txt |  10 +
 lwip/src/core/ipv6/CMakeLists.txt |  11 +
 lwip/src/include/CMakeLists.txt   |   7 +
 lwip/src/include/lwip/sys.h   |   1 -
 lwip/src/netif/CMakeLists.txt |  10 +
 lwip/{ports/os => test}/lwipopts.h|   0
 waf   |   0
 48 files changed, 3319 insertions(+), 130 deletions(-)
 create mode 100644 CMakeLists.txt
 create mode 100644 README.md
 create mode 100644 cmake/PortSelect.cmake
 mode change 100755 => 100644 lwip-to-rtems.py
 create mode 100644 lwip/CMakeLists.txt
 create mode 100644 lwip/ports/CMakeLists.txt
 create mode 100644 lwip/ports/drivers/CMakeLists.txt
 rename lwip/ports/drivers/{eth_lwip.c => rtems_lwip.c} (57%)
 rename lwip/ports/drivers/{eth_lwip.h => rtems_lwip.h} (56%)
 rename lwip/ports/drivers/{eth_lwip_default.h => rtems_lwip_conf.h} (68%)
 create mode 100644 lwip/ports/drivers/stm32h7/CMakeLists.txt
 create mode 100644 lwip/ports/drivers/stm32h7/app_dhcp.c
 create mode 100644 lwip/ports/drivers/stm32h7/app_ethernet.c
 create mode 100644 lwip/ports/drivers/stm32h7/ethernetif.c
 create mode 100644 lwip/ports/drivers/stm32h7/include/CMakeLists.txt
 create mode 100644 lwip/ports/drivers/stm32h7/include/lwip_port/app_dhcp.h
 create mode 100644 lwip/ports/drivers/stm32h7/include/lwip_port/app_ethernet.h
 create mode 100644 lwip/ports/drivers/stm32h7/include/lwip_port/ethernetif.h
 create mode 100644 lwip/ports/drivers/stm32h7/lan8742.c
 create mode 100644 lwip/ports/drivers/stm32h7/lan8742.h
 create mode 100644 lwip/ports/drivers/stm32h7/template/lwipopts_template.h
 create mode 100644 lwip/ports/drivers/tms570/CMakeLists.txt
 rename lwip/ports/drivers/{ => tms570}/phy_dp83848h.c (100%)
 rename lwip/ports/drivers/{ => tms570}/phy_dp83848h.h (100%)
 create mode 100644 lwip/ports/drivers/tms570/template/lwipopt

[PATCH] Implementation for STM32 HAL_GetTick using RTEMS

2021-04-26 Thread Robin Mueller
Uses configured millisecond per ticks
---
 bsps/arm/stm32h7/start/bspstart.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bsps/arm/stm32h7/start/bspstart.c 
b/bsps/arm/stm32h7/start/bspstart.c
index 7ae39f1410..75af44352f 100644
--- a/bsps/arm/stm32h7/start/bspstart.c
+++ b/bsps/arm/stm32h7/start/bspstart.c
@@ -35,8 +35,7 @@
 /* Get number of milliseconds elapsed since startup */
 uint32_t HAL_GetTick(void)
 {
-  uint64_t temp = rtems_clock_get_uptime_nanoseconds() / (1000 * 1000);
-  return temp;
+  return rtems_clock_get_ticks_since_boot() * 
rtems_configuration_get_milliseconds_per_tick();
 }
 
 uint32_t stm32h7_systick_frequency(void)
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 3/3] merge error fixes

2021-04-24 Thread Robin Mueller
A function was defined twice due to a merge error. 
This patch fixes this.
---
 lwip/ports/drivers/rtems_lwip.c | 30 --
 1 file changed, 30 deletions(-)

diff --git a/lwip/ports/drivers/rtems_lwip.c b/lwip/ports/drivers/rtems_lwip.c
index a106616..7e2771c 100644
--- a/lwip/ports/drivers/rtems_lwip.c
+++ b/lwip/ports/drivers/rtems_lwip.c
@@ -196,36 +196,6 @@ rtems_lwip_get_hwaddr_str(struct netif *netif, uint8_t 
*mac_str)
   mac_str[outindex] = 0;
 }
 
-void
-rtems_lwip_determine_static_ipv4_address(ip4_addr_t* ip_addr, ip4_addr_t* 
netmask,
-ip4_addr_t* gw_addr) {
-#if STATIC_IP_ADDRESS == 1
-
-#if CALCULATE_ETH_IP_ADDR == 1
-  IP_ADDR4(ip_addr, IP_ADDR0, IP_ADDR1, IP_ADDR2, IP_ADDR3);
-#else
-  ip_addr->addr = htonl(ETH_IP_ADDR);
-#endif
-
-#if CALCULATE_ETH_NETMASK == 1
-  IP_ADDR4(net_mask, NETMASK_ADDR0, NETMASK_ADDR1, NETMASK_ADDR2, 
NETMASK_ADDR3);
-#else
-  net_mask->addr = htonl(ETH_NETMASK);
-#endif
-
-#if CALCULATE_GW_ADDRESS == 1
-  IP_ADDR4(gw_addr, GW_ADDR0, GW_ADDR1, GW_ADDR2, GW_ADDR3);
-#else
-  gw_addr->addr = htonl(ETH_GW);
-#endif
-
-#else
-  ip_addr_set_zero_ip4(ip_addr);
-  ip_addr_set_zero_ip4(netmask);
-  ip_addr_set_zero_ip4(gw_addr);
-#endif /* STATIC_IP_ADDRESS == 0 */
-}
-
 void
 rtems_lwip_convert_ip_to_decimal_str(ip_addr_t ip, uint8_t *ip_str)
 {
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 2/3] Consistent library name used now

2021-04-24 Thread Robin Mueller
Important fix for CMake build system
---
 CMakeLists.txt| 10 +-
 lwip/src/api/CMakeLists.txt   |  2 +-
 lwip/src/core/CMakeLists.txt  |  2 +-
 lwip/src/core/ipv4/CMakeLists.txt |  2 +-
 lwip/src/core/ipv6/CMakeLists.txt |  2 +-
 lwip/src/netif/CMakeLists.txt |  2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e1ef8f0..59cc7e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,8 +32,8 @@ include("${LWIP_CMAKE_CONFIG_DIR}/PortSelect.cmake")
 
 rtems_lwip_port_select(${RTEMS_BSP})
 
-set(LWIP_LIB_NAME lwip)
-add_library(${LWIP_LIB_NAME})
+set(LIB_LWIP_NAME lwip)
+add_library(${LIB_LWIP_NAME})
 
 add_subdirectory(lwip)
 
@@ -55,21 +55,21 @@ if(CMAKE_VERBOSE)
message(STATUS "lwIP configuration path: ${LWIP_CONFIG_PATH}")
 endif()
 
-target_include_directories(${LWIP_LIB_NAME} PRIVATE
+target_include_directories(${LIB_LWIP_NAME} PRIVATE
${LWIP_CONFIG_PATH_ABS}
 )
 
 # Remove unused sections
 if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
 if(LWIP_GENERATE_SECTIONS)
-target_compile_options(${LWIP_LIB_NAME} PRIVATE
+target_compile_options(${LIB_LWIP_NAME} PRIVATE
 "-ffunction-sections"
 "-fdata-sections"
 )
 endif()
 
 if(LWIP_REMOVE_UNUSED_CODE)
-target_link_options(${LWIP_LIB_NAME} PRIVATE
+target_link_options(${LIB_LWIP_NAME} PRIVATE
 "Wl,--gc-sections"
 )
 endif()
diff --git a/lwip/src/api/CMakeLists.txt b/lwip/src/api/CMakeLists.txt
index 9b2e34c..7150ade 100644
--- a/lwip/src/api/CMakeLists.txt
+++ b/lwip/src/api/CMakeLists.txt
@@ -1,4 +1,4 @@
-target_sources(${LWIP_LIB_NAME} PRIVATE
+target_sources(${LIB_LWIP_NAME} PRIVATE
api_lib.c
api_msg.c
err.c
diff --git a/lwip/src/core/CMakeLists.txt b/lwip/src/core/CMakeLists.txt
index 4e879ea..f7f17a7 100644
--- a/lwip/src/core/CMakeLists.txt
+++ b/lwip/src/core/CMakeLists.txt
@@ -1,4 +1,4 @@
-target_sources(${LWIP_LIB_NAME} PRIVATE
+target_sources(${LIB_LWIP_NAME} PRIVATE
altcp_alloc.c
altcp_tcp.c
altcp.c
diff --git a/lwip/src/core/ipv4/CMakeLists.txt 
b/lwip/src/core/ipv4/CMakeLists.txt
index e0f9e58..a47fa5d 100644
--- a/lwip/src/core/ipv4/CMakeLists.txt
+++ b/lwip/src/core/ipv4/CMakeLists.txt
@@ -1,4 +1,4 @@
-target_sources(${LWIP_LIB_NAME} PRIVATE
+target_sources(${LIB_LWIP_NAME} PRIVATE
autoip.c
dhcp.c
etharp.c
diff --git a/lwip/src/core/ipv6/CMakeLists.txt 
b/lwip/src/core/ipv6/CMakeLists.txt
index fce0b11..391a05b 100644
--- a/lwip/src/core/ipv6/CMakeLists.txt
+++ b/lwip/src/core/ipv6/CMakeLists.txt
@@ -1,4 +1,4 @@
-target_sources(${LWIP_LIB_NAME} PRIVATE
+target_sources(${LIB_LWIP_NAME} PRIVATE
ethip6.c
dhcp6.c
icmp6.c
diff --git a/lwip/src/netif/CMakeLists.txt b/lwip/src/netif/CMakeLists.txt
index 7c233ae..47f7242 100644
--- a/lwip/src/netif/CMakeLists.txt
+++ b/lwip/src/netif/CMakeLists.txt
@@ -1,4 +1,4 @@
-target_sources(${LWIP_LIB_NAME} PRIVATE
+target_sources(${LIB_LWIP_NAME} PRIVATE
bridgeif_fdb.c
bridgeif.c
ethernet.c
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] STM32 lwIP addition and CMake support

2021-04-24 Thread Robin Mueller
This patch adds CMake support to RTEMS lwIP.
It also improves the architecture to make integration
of new BSPs easier.

https://github.com/rmspacefish/rtems-stm32-lwip is a self-contained
repository to test the lwIP integration for the arm/stm32h7
and arm/nucleo-h743zi BSP.

The STM32 port includes the LAN driver (lan8742.c), the
primary port functions in ethernetif.c and some application code
taken from CubeH7, which can serve as a starting point for
implementations and was also tailored to RTEMS.

The common source file were refactored to be more generic and independent
of the used BSP.

More information can also be found in the README, which also specifies
how to build with CMake. The waf build system still needs to be adapted
to perform the same function.
---
 .gitignore|  10 +
 .gitmodules   |   1 +
 CMakeLists.txt|  76 ++
 README.md |  32 +
 cmake/PortSelect.cmake|  12 +
 lwip-to-rtems.py  |   0
 lwip/CMakeLists.txt   |   2 +
 lwip/ports/CMakeLists.txt |   2 +
 lwip/ports/drivers/CMakeLists.txt |  20 +
 .../drivers/{eth_lwip.c => rtems_lwip.c}  | 212 +++--
 .../drivers/{eth_lwip.h => rtems_lwip.h}  |  79 +-
 .../{eth_lwip_default.h => rtems_lwip_conf.h} |  30 +-
 lwip/ports/drivers/stm32h7/CMakeLists.txt |  14 +
 lwip/ports/drivers/stm32h7/app_dhcp.c | 217 +
 lwip/ports/drivers/stm32h7/app_ethernet.c | 187 +
 lwip/ports/drivers/stm32h7/ethernetif.c   | 758 ++
 .../drivers/stm32h7/include/CMakeLists.txt|   7 +
 .../stm32h7/include/lwip_port/app_dhcp.h  |  38 +
 .../stm32h7/include/lwip_port/app_ethernet.h  |  56 ++
 .../stm32h7/include/lwip_port/ethernetif.h|  56 ++
 lwip/ports/drivers/stm32h7/lan8742.c  | 664 +++
 lwip/ports/drivers/stm32h7/lan8742.h  | 448 +++
 .../stm32h7/template/lwipopts_template.h  | 289 +++
 lwip/ports/drivers/tms570/CMakeLists.txt  |   4 +
 .../ports/drivers/{ => tms570}/phy_dp83848h.c |   0
 .../ports/drivers/{ => tms570}/phy_dp83848h.h |   0
 .../tms570/template/lwipopts_template.h   |  75 ++
 lwip/ports/drivers/{ => tms570}/ti_drv_emac.h |   0
 lwip/ports/drivers/{ => tms570}/ti_drv_mdio.h |   0
 lwip/ports/drivers/{ => tms570}/tms570_emac.h |   0
 .../ports/drivers/{ => tms570}/tms570_netif.c |  11 +-
 .../ports/drivers/{ => tms570}/tms570_netif.h |  31 +
 lwip/ports/os/CMakeLists.txt  |   1 +
 lwip/ports/os/rtems/CMakeLists.txt|   9 +
 lwip/ports/os/rtems/arch/CMakeLists.txt   |   4 +
 lwip/ports/os/rtems/arch/cc.h |   3 +
 lwip/ports/os/rtems/arch/sys_arch.c   |  32 +-
 lwip/ports/os/rtems/arch/sys_arch.h   |  18 +-
 lwip/src/CMakeLists.txt   |   4 +
 lwip/src/api/CMakeLists.txt   |  11 +
 lwip/src/core/CMakeLists.txt  |  28 +
 lwip/src/core/ipv4/CMakeLists.txt |  10 +
 lwip/src/core/ipv6/CMakeLists.txt |  11 +
 lwip/src/include/CMakeLists.txt   |   7 +
 lwip/src/include/lwip/sys.h   |   1 -
 lwip/src/netif/CMakeLists.txt |  10 +
 lwip/{ports/os => test}/lwipopts.h|   0
 waf   |   0
 48 files changed, 3350 insertions(+), 130 deletions(-)
 create mode 100644 CMakeLists.txt
 create mode 100644 README.md
 create mode 100644 cmake/PortSelect.cmake
 mode change 100755 => 100644 lwip-to-rtems.py
 create mode 100644 lwip/CMakeLists.txt
 create mode 100644 lwip/ports/CMakeLists.txt
 create mode 100644 lwip/ports/drivers/CMakeLists.txt
 rename lwip/ports/drivers/{eth_lwip.c => rtems_lwip.c} (51%)
 rename lwip/ports/drivers/{eth_lwip.h => rtems_lwip.h} (56%)
 rename lwip/ports/drivers/{eth_lwip_default.h => rtems_lwip_conf.h} (68%)
 create mode 100644 lwip/ports/drivers/stm32h7/CMakeLists.txt
 create mode 100644 lwip/ports/drivers/stm32h7/app_dhcp.c
 create mode 100644 lwip/ports/drivers/stm32h7/app_ethernet.c
 create mode 100644 lwip/ports/drivers/stm32h7/ethernetif.c
 create mode 100644 lwip/ports/drivers/stm32h7/include/CMakeLists.txt
 create mode 100644 lwip/ports/drivers/stm32h7/include/lwip_port/app_dhcp.h
 create mode 100644 lwip/ports/drivers/stm32h7/include/lwip_port/app_ethernet.h
 create mode 100644 lwip/ports/drivers/stm32h7/include/lwip_port/ethernetif.h
 create mode 100644 lwip/ports/drivers/stm32h7/lan8742.c
 create mode 100644 lwip/ports/drivers/stm32h7/lan8742.h
 create mode 100644 lwip/ports/drivers/stm32h7/template/lwipopts_template.h
 create mode 100644 lwip/ports/drivers/tms570/CMakeLists.txt
 rename lwip/ports/drivers/{ => tms570}/phy_dp83848h.c (100%)
 rename lwip/ports/drivers/{ => tms570}/phy_dp83848h.h (100%)
 create mode 100644 lwip/ports/drivers/tms570/template/lwipopt

[PATCH] Nucleo UART3 (console) pins correction

2021-04-23 Thread Robin Mueller
Now using default pins
---
 spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml | 5 +
 spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml | 5 +
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml 
b/spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml
index dd236421c8..87aad00ee0 100644
--- a/spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml
+++ b/spec/build/bsps/arm/stm32h7/optusart3gpiopins.yml
@@ -3,10 +3,7 @@ actions:
 - define-unquoted: null
 build-type: option
 default: ( GPIO_PIN_8 | GPIO_PIN_9 )
-default-by-variant:
-- value: ( GPIO_PIN_9 | GPIO_PIN_10 )
-  variants:
-  - arm/nucleo-h743zi
+default-by-variant: []
 enabled-by: true
 format: '{}'
 links: []
diff --git a/spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml 
b/spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml
index fa3e05b3ba..7168a00111 100644
--- a/spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml
+++ b/spec/build/bsps/arm/stm32h7/optusart3gpioregs.yml
@@ -3,10 +3,7 @@ actions:
 - define-unquoted: null
 build-type: option
 default: GPIOD
-default-by-variant:
-- value: GPIOB
-  variants:
-  - arm/nucleo-h743zi
+default-by-variant: []
 enabled-by: true
 format: '{}'
 links: []
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 2/2] added GPIOB option for STM32 ETH config

2021-04-23 Thread Robin Mueller
Follow-up patch to avoid checks against the BSP name.
Separate option to only define the pins for nucleo-h743zi BSP

---
 bsps/arm/stm32h7/start/stm32h7-hal-eth.c  |  8 ++--
 spec/build/bsps/arm/stm32h7/grp.yml   |  2 ++
 .../bsps/arm/stm32h7/optethgpiobregs.yml  | 19 +++
 .../bsps/arm/stm32h7/optethgpiogregs.yml  |  2 +-
 4 files changed, 28 insertions(+), 3 deletions(-)
 create mode 100644 spec/build/bsps/arm/stm32h7/optethgpiobregs.yml

diff --git a/bsps/arm/stm32h7/start/stm32h7-hal-eth.c 
b/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
index 0a128e4e5a..b9dac6d7f9 100644
--- a/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
+++ b/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
@@ -66,10 +66,12 @@ static const stm32h7_gpio_config gpioa = {
   }
 };
 
+#ifdef STM32H7_ETH_GPIOB_PINS
+
 static const stm32h7_gpio_config gpiob = {
   .regs = GPIOB,
   .config = {
-.Pin = GPIO_PIN_13,
+.Pin = STM32H7_ETH_GPIOB_PINS,
 .Mode = GPIO_MODE_AF_PP,
 .Pull = GPIO_NOPULL,
 .Speed = GPIO_SPEED_FREQ_LOW,
@@ -77,6 +79,8 @@ static const stm32h7_gpio_config gpiob = {
   }
 };
 
+#endif
+
 void
 HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
 {
@@ -86,7 +90,7 @@ HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
   stm32h7_gpio_init(&gpiog);
   stm32h7_gpio_init(&gpioc);
   stm32h7_gpio_init(&gpioa);
-#if RTEMS_BSP == nucleo-h743zi
+#ifdef STM32H7_ETH_GPIOB_PINS
   stm32h7_gpio_init(&gpiob);
 #endif
 }
diff --git a/spec/build/bsps/arm/stm32h7/grp.yml 
b/spec/build/bsps/arm/stm32h7/grp.yml
index 9e35cb49ac..a7e7affa05 100644
--- a/spec/build/bsps/arm/stm32h7/grp.yml
+++ b/spec/build/bsps/arm/stm32h7/grp.yml
@@ -85,6 +85,8 @@ links:
   uid: optvariant
 - role: build-dependency
   uid: optethgpiogregs
+- role: build-dependency
+  uid: optethgpiobregs
 - role: build-dependency
   uid: ../../optconsolebaud
 - role: build-dependency
diff --git a/spec/build/bsps/arm/stm32h7/optethgpiobregs.yml 
b/spec/build/bsps/arm/stm32h7/optethgpiobregs.yml
new file mode 100644
index 00..fcd720f186
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/optethgpiobregs.yml
@@ -0,0 +1,19 @@
+actions:
+- get-string: null
+- define-unquoted: null
+build-type: option
+default: null
+default-by-variant:
+- value: GPIO_PIN_13
+  variants:
+  - arm/nucleo-h743zi
+enabled-by: true
+format: '{}'
+links: []
+name: STM32H7_ETH_GPIOB_PINS
+description: |
+  GPIO B pins used for the ETH pin configuration.
+type: build
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
diff --git a/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml 
b/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml
index b76e19eb36..a6c0acbb7d 100644
--- a/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml
+++ b/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml
@@ -12,7 +12,7 @@ format: '{}'
 links: []
 name: STM32H7_ETH_GPIOG_PINS
 description: |
-  GPIO pins used for the ETH pin configuration.
+  GPIO G pins used for the ETH pin configuration.
 type: build
 SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
 copyrights:
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] Correct NUCLEO-H743ZI Ethernet Pins

2021-04-22 Thread Robin Mueller
The nucleo BSP has different pins for the Ethernet configuration.
This patch adds support for this.
 
---
 bsps/arm/stm32h7/start/stm32h7-hal-eth.c  | 18 +-
 spec/build/bsps/arm/stm32h7/grp.yml   |  2 ++
 .../bsps/arm/stm32h7/optethgpiogregs.yml  | 19 +++
 3 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 spec/build/bsps/arm/stm32h7/optethgpiogregs.yml

diff --git a/bsps/arm/stm32h7/start/stm32h7-hal-eth.c 
b/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
index 46475f4316..0a128e4e5a 100644
--- a/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
+++ b/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
@@ -31,10 +31,12 @@
 
 #include 
 
+#include 
+
 static const stm32h7_gpio_config gpiog = {
   .regs = GPIOG,
   .config = {
-.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13,
+.Pin = STM32H7_ETH_GPIOG_PINS,
 .Mode = GPIO_MODE_AF_PP,
 .Pull = GPIO_NOPULL,
 .Speed = GPIO_SPEED_FREQ_LOW,
@@ -64,6 +66,17 @@ static const stm32h7_gpio_config gpioa = {
   }
 };
 
+static const stm32h7_gpio_config gpiob = {
+  .regs = GPIOB,
+  .config = {
+.Pin = GPIO_PIN_13,
+.Mode = GPIO_MODE_AF_PP,
+.Pull = GPIO_NOPULL,
+.Speed = GPIO_SPEED_FREQ_LOW,
+.Alternate = GPIO_AF11_ETH
+  }
+};
+
 void
 HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
 {
@@ -73,4 +86,7 @@ HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
   stm32h7_gpio_init(&gpiog);
   stm32h7_gpio_init(&gpioc);
   stm32h7_gpio_init(&gpioa);
+#if RTEMS_BSP == nucleo-h743zi
+  stm32h7_gpio_init(&gpiob);
+#endif
 }
diff --git a/spec/build/bsps/arm/stm32h7/grp.yml 
b/spec/build/bsps/arm/stm32h7/grp.yml
index 2147cdec88..9e35cb49ac 100644
--- a/spec/build/bsps/arm/stm32h7/grp.yml
+++ b/spec/build/bsps/arm/stm32h7/grp.yml
@@ -83,6 +83,8 @@ links:
   uid: optusart3gpioregs
 - role: build-dependency
   uid: optvariant
+- role: build-dependency
+  uid: optethgpiogregs
 - role: build-dependency
   uid: ../../optconsolebaud
 - role: build-dependency
diff --git a/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml 
b/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml
new file mode 100644
index 00..b76e19eb36
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml
@@ -0,0 +1,19 @@
+actions:
+- get-string: null
+- define-unquoted: null
+build-type: option
+default: ( GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 )
+default-by-variant:
+- value: ( GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13 )
+  variants:
+  - arm/nucleo-h743zi
+enabled-by: true
+format: '{}'
+links: []
+name: STM32H7_ETH_GPIOG_PINS
+description: |
+  GPIO pins used for the ETH pin configuration.
+type: build
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] Implementation for STM32 HAL_GetTick using RTEMS

2021-04-22 Thread Robin Mueller
Accounts for the tick base not being 1ms now.
Perform division first to reduce chance of arithmetic overflow.
---
 bsps/arm/stm32h7/start/bspstart.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bsps/arm/stm32h7/start/bspstart.c 
b/bsps/arm/stm32h7/start/bspstart.c
index 7ae39f1410..536325293d 100644
--- a/bsps/arm/stm32h7/start/bspstart.c
+++ b/bsps/arm/stm32h7/start/bspstart.c
@@ -35,8 +35,7 @@
 /* Get number of milliseconds elapsed since startup */
 uint32_t HAL_GetTick(void)
 {
-  uint64_t temp = rtems_clock_get_uptime_nanoseconds() / (1000 * 1000);
-  return temp;
+  return (rtems_clock_get_ticks_since_boot() / 
rtems_clock_get_ticks_per_second()) * 1000;
 }
 
 uint32_t stm32h7_systick_frequency(void)
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] Patch attempt two to avoid nameclash of PAGESIZE define

2021-04-21 Thread Robin Mueller
This commit excludes the PAGESIZE legacy define
because there is a nameclash with a define of the same name
coming from the RTEMS header limits.h.
---
 .../stm32h7/include/Legacy/stm32_hal_legacy.h | 172 +-
 1 file changed, 88 insertions(+), 84 deletions(-)

diff --git a/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h 
b/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
index c311c1618e..804a4c87da 100644
--- a/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
+++ b/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
@@ -31,7 +31,7 @@
 /* Exported constants 
*/
 
 /** @defgroup HAL_AES_Aliased_Defines HAL CRYP Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define AES_FLAG_RDERR  CRYP_FLAG_RDERR
@@ -45,7 +45,7 @@
   */
 
 /** @defgroup HAL_ADC_Aliased_Defines HAL ADC Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define ADC_RESOLUTION12b   ADC_RESOLUTION_12B
@@ -105,7 +105,7 @@
   */
 
 /** @defgroup HAL_CEC_Aliased_Defines HAL CEC Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -116,7 +116,7 @@
   */
 
 /** @defgroup HAL_COMP_Aliased_Defines HAL COMP Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define COMP_WINDOWMODE_DISABLED   COMP_WINDOWMODE_DISABLE
@@ -208,7 +208,7 @@
   */
 
 /** @defgroup HAL_CORTEX_Aliased_Defines HAL CORTEX Aliased Defines maintained 
for legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define __HAL_CORTEX_SYSTICKCLK_CONFIG HAL_SYSTICK_CLKSourceConfig
@@ -217,7 +217,7 @@
   */
 
 /** @defgroup HAL_CRC_Aliased_Defines HAL CRC Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -229,7 +229,7 @@
   */
 
 /** @defgroup HAL_DAC_Aliased_Defines HAL DAC Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -258,7 +258,7 @@
   */
 
 /** @defgroup HAL_DMA_Aliased_Defines HAL DMA Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define HAL_REMAPDMA_ADC_DMA_CH2DMA_REMAP_ADC_DMA_CH2
@@ -392,7 +392,7 @@
   */
 
 /** @defgroup HAL_FLASH_Aliased_Defines HAL FLASH Aliased Defines maintained 
for legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -420,7 +420,11 @@
 #define TYPEPROGRAMDATA_FASTBYTE  FLASH_TYPEPROGRAMDATA_FASTBYTE
 #define TYPEPROGRAMDATA_FASTHALFWORD  FLASH_TYPEPROGRAMDATA_FASTHALFWORD
 #define TYPEPROGRAMDATA_FASTWORD  FLASH_TYPEPROGRAMDATA_FASTWORD
+#ifndef __rtems__
+/* Commented out for the RTEMS BSP because there can be nameclashes with 
another
+similar defininition in limits.h */
 #define PAGESIZE  FLASH_PAGE_SIZE
+#endif /* __rtems__ */
 #define TYPEPROGRAM_FASTBYTE  FLASH_TYPEPROGRAM_BYTE
 #define TYPEPROGRAM_FASTHALFWORD  FLASH_TYPEPROGRAM_HALFWORD
 #define TYPEPROGRAM_FASTWORD  FLASH_TYPEPROGRAM_WORD
@@ -490,7 +494,7 @@
   */
 
 /** @defgroup HAL_JPEG_Aliased_Macros HAL JPEG Aliased Macros maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -508,7 +512,7 @@
   */
 
 /** @defgroup HAL_SYSCFG_Aliased_Defines HAL SYSCFG Aliased Defines maintained 
for legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -534,7 +538,7 @@
 
 
 /** @defgroup LL_FMC_Aliased_Defines LL FMC Aliased Defines maintained for 
compatibility purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #if defined(STM32L4) || defined(STM32F7) || defined(STM32H7) || 
defined(STM32G4)
@@ -553,7 +557,7 @@
   */
 
 /** @defgroup LL_FSMC_Aliased_Defines LL FSMC Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -564,7 +568,7 @@
   */
 
 /** @defgroup HAL_GPIO_Aliased_Macros HAL GPIO Aliased Macros maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define GET_GPIO_SOURCE   GPIO_GET_INDEX
@@ -631,7 +635,7 @@
   */
 
 /** @defgroup HAL_HRTIM_Aliased_Macros HAL HRTIM Aliased Macros maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define HRTIM_TIMDELAYEDPROTECTION_DISABLED   
HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_DISABLED
@@ -836,7 +840,7 @@
   */
 
 /** @defgroup HAL_I2C_Aliased_Defines HAL I2C

[PATCH] Patch to avoid nameclash of PAGESIZE define

2021-04-20 Thread Robin Mueller
This commit excludes the PAGESIZE legacy define
because there is a nameclash with a define of the same name
coming from the RTEMS header limits.h.

All other changes come from loading the file from a Unix system.
---
 .../stm32h7/include/Legacy/stm32_hal_legacy.h | 172 +-
 1 file changed, 88 insertions(+), 84 deletions(-)

diff --git a/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h 
b/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
index c311c1618e..804a4c87da 100644
--- a/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
+++ b/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
@@ -31,7 +31,7 @@
 /* Exported constants 
*/
 
 /** @defgroup HAL_AES_Aliased_Defines HAL CRYP Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define AES_FLAG_RDERR  CRYP_FLAG_RDERR
@@ -45,7 +45,7 @@
   */
 
 /** @defgroup HAL_ADC_Aliased_Defines HAL ADC Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define ADC_RESOLUTION12b   ADC_RESOLUTION_12B
@@ -105,7 +105,7 @@
   */
 
 /** @defgroup HAL_CEC_Aliased_Defines HAL CEC Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -116,7 +116,7 @@
   */
 
 /** @defgroup HAL_COMP_Aliased_Defines HAL COMP Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define COMP_WINDOWMODE_DISABLED   COMP_WINDOWMODE_DISABLE
@@ -208,7 +208,7 @@
   */
 
 /** @defgroup HAL_CORTEX_Aliased_Defines HAL CORTEX Aliased Defines maintained 
for legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define __HAL_CORTEX_SYSTICKCLK_CONFIG HAL_SYSTICK_CLKSourceConfig
@@ -217,7 +217,7 @@
   */
 
 /** @defgroup HAL_CRC_Aliased_Defines HAL CRC Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -229,7 +229,7 @@
   */
 
 /** @defgroup HAL_DAC_Aliased_Defines HAL DAC Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -258,7 +258,7 @@
   */
 
 /** @defgroup HAL_DMA_Aliased_Defines HAL DMA Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define HAL_REMAPDMA_ADC_DMA_CH2DMA_REMAP_ADC_DMA_CH2
@@ -392,7 +392,7 @@
   */
 
 /** @defgroup HAL_FLASH_Aliased_Defines HAL FLASH Aliased Defines maintained 
for legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -420,7 +420,11 @@
 #define TYPEPROGRAMDATA_FASTBYTE  FLASH_TYPEPROGRAMDATA_FASTBYTE
 #define TYPEPROGRAMDATA_FASTHALFWORD  FLASH_TYPEPROGRAMDATA_FASTHALFWORD
 #define TYPEPROGRAMDATA_FASTWORD  FLASH_TYPEPROGRAMDATA_FASTWORD
+#ifndef __rtems__
+/* Commented out for the RTEMS BSP because there can be nameclashes with 
another
+similar defininition in limits.h */
 #define PAGESIZE  FLASH_PAGE_SIZE
+#endif /* __rtems__ */
 #define TYPEPROGRAM_FASTBYTE  FLASH_TYPEPROGRAM_BYTE
 #define TYPEPROGRAM_FASTHALFWORD  FLASH_TYPEPROGRAM_HALFWORD
 #define TYPEPROGRAM_FASTWORD  FLASH_TYPEPROGRAM_WORD
@@ -490,7 +494,7 @@
   */
 
 /** @defgroup HAL_JPEG_Aliased_Macros HAL JPEG Aliased Macros maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -508,7 +512,7 @@
   */
 
 /** @defgroup HAL_SYSCFG_Aliased_Defines HAL SYSCFG Aliased Defines maintained 
for legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -534,7 +538,7 @@
 
 
 /** @defgroup LL_FMC_Aliased_Defines LL FMC Aliased Defines maintained for 
compatibility purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #if defined(STM32L4) || defined(STM32F7) || defined(STM32H7) || 
defined(STM32G4)
@@ -553,7 +557,7 @@
   */
 
 /** @defgroup LL_FSMC_Aliased_Defines LL FSMC Aliased Defines maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 
@@ -564,7 +568,7 @@
   */
 
 /** @defgroup HAL_GPIO_Aliased_Macros HAL GPIO Aliased Macros maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define GET_GPIO_SOURCE   GPIO_GET_INDEX
@@ -631,7 +635,7 @@
   */
 
 /** @defgroup HAL_HRTIM_Aliased_Macros HAL HRTIM Aliased Macros maintained for 
legacy purpose
-  * @ingroup RTEMSBSPsARMSTM32H7
+  * @ingroup RTEMSBSPsARMSTM32H7
   * @{
   */
 #define HRTIM_TIMDELAYEDPROTECTION_DISABLED   
HRTIM_TIMER_A_B_C_DELAYEDPROTECTION_DISABLED
@@ -836,

[PATCH] Updated tick implementation for HAL_GetTick

2021-04-20 Thread Robin Mueller
This now uses rtems_clock_get_uptime_nanoseconds
to calculate the uptime ticks in milliseconds.
---
 bsps/arm/stm32h7/start/bspstart.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bsps/arm/stm32h7/start/bspstart.c 
b/bsps/arm/stm32h7/start/bspstart.c
index 2fc8133cca..7ae39f1410 100644
--- a/bsps/arm/stm32h7/start/bspstart.c
+++ b/bsps/arm/stm32h7/start/bspstart.c
@@ -32,9 +32,11 @@
 
 #include 
 
+/* Get number of milliseconds elapsed since startup */
 uint32_t HAL_GetTick(void)
 {
-  return 0;
+  uint64_t temp = rtems_clock_get_uptime_nanoseconds() / (1000 * 1000);
+  return temp;
 }
 
 uint32_t stm32h7_systick_frequency(void)
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] Fixes for TMS570 BSP

2021-04-19 Thread Robin Mueller
When compiling the lwIP port for the TMS570, there
were issues with the BSP. Headers are expected in a folder
named ti_herc which did not exist. This fixes the issue.

Furthermore, there were multiple warnings about define redefinitions.
This was fixed as well.
---
 bsps/arm/tms570/include/bsp/irq.h  | 6 +++---
 spec/build/bsps/arm/tms570/obj.yml | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bsps/arm/tms570/include/bsp/irq.h 
b/bsps/arm/tms570/include/bsp/irq.h
index c37ebadbc4..0b6ea1e6fd 100644
--- a/bsps/arm/tms570/include/bsp/irq.h
+++ b/bsps/arm/tms570/include/bsp/irq.h
@@ -34,7 +34,7 @@
 
 #define BSP_INTERRUPT_VECTOR_MIN 0U
 #define TMS570_IRQ_ESM_HIGH 0
-#define TMS570_IRQ_RESERVED 1
+#define TMS570_IRQ_RESERVED_0 1
 #define TMS570_IRQ_TIMER_0 2
 #define TMS570_IRQ_TIMER_1 3
 #define TMS570_IRQ_TIMER_2 4
@@ -50,7 +50,7 @@
 #define TMS570_IRQ_ADC1_EVENT 14
 #define TMS570_IRQ_ADC1_GROUP_1 15
 #define TMS570_IRQ_CAN1_HIGH 16
-#define TMS570_IRQ_RESERVED 17
+#define TMS570_IRQ_RESERVED_1 17
 #define TMS570_IRQ_FLEXRAY_HIGH 18
 #define TMS570_IRQ_CRC_1 19
 #define TMS570_IRQ_ESM_LOW 20
@@ -63,7 +63,7 @@
 #define TMS570_IRQ_SCI_LEVEL_1 27
 #define TMS570_IRQ_ADC1_GROUP_2 28
 #define TMS570_IRQ_CAN1_LOW 29
-#define TMS570_IRQ_RESERVED
+#define TMS570_IRQ_RESERVED_2 30
 #define TMS570_IRQ_ADC1_MAG 31
 #define TMS570_IRQ_FLEXRAY_LOW 32
 #define TMS570_IRQ_DMA_FTCA 33
diff --git a/spec/build/bsps/arm/tms570/obj.yml 
b/spec/build/bsps/arm/tms570/obj.yml
index 7932299c1d..36f99a700e 100644
--- a/spec/build/bsps/arm/tms570/obj.yml
+++ b/spec/build/bsps/arm/tms570/obj.yml
@@ -29,7 +29,7 @@ install:
   - bsps/arm/tms570/include/bsp/tms570_selftest_parity.h
   - bsps/arm/tms570/include/bsp/tms570lc4357-pins.h
   - bsps/arm/tms570/include/bsp/tms570ls3137zwt-pins.h
-- destination: ${BSP_INCLUDEDIR}/bsp/ti/herc
+- destination: ${BSP_INCLUDEDIR}/bsp/ti_herc
   source:
   - bsps/arm/tms570/include/bsp/ti_herc/reg_adc.h
   - bsps/arm/tms570/include/bsp/ti_herc/reg_ccmsr.h
-- 
2.29.2.windows.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] updated HAL_GetTick function

2021-04-19 Thread Robin Mueller
diff --git a/bsps/arm/stm32h7/start/bspstart.c 
b/bsps/arm/stm32h7/start/bspstart.c
index 2fc8133cca..e6e995a50c 100644
--- a/bsps/arm/stm32h7/start/bspstart.c
+++ b/bsps/arm/stm32h7/start/bspstart.c
@@ -32,9 +32,10 @@
 
 #include 
 
+/* Get number of milliseconds elapsed since startup */
 uint32_t HAL_GetTick(void)
 {
-  return 0;
+  return (rtems_clock_get_ticks_since_boot() * 1000) / 
rtems_clock_get_ticks_per_second();
 }
 
 uint32_t stm32h7_systick_frequency(void)
-- 
2.29.2.windows.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] STM32H743ZI Nucleo and basic lwIP support

2021-03-29 Thread Robin Mueller
clashes with 
another 
+similar defininition in limits.h */
+//#define PAGESIZE  FLASH_PAGE_SIZE
 #define TYPEPROGRAM_FASTBYTE  FLASH_TYPEPROGRAM_BYTE
 #define TYPEPROGRAM_FASTHALFWORD  FLASH_TYPEPROGRAM_HALFWORD
 #define TYPEPROGRAM_FASTWORD  FLASH_TYPEPROGRAM_WORD
diff --git a/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h 
b/bsps/arm/stm32h7/include/stm32h7xx_hal_conf.h
index d423e4f782..b608188b4f 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 
+#endif /* __rtems__ */
 #ifdef __cplusplus
  extern "C" {
 #endif
@@ -103,7 +106,13 @@
   *(when HSE is used as system clock source, directly or through the 
PLL).  
   */
 #if !defined  (HSE_VALUE) 
-#define HSE_VALUE((uint32_t)2500) /*!< Value of the External 
oscillator in Hz : FPGA case fixed to 60MHZ */
+  #if STM32H743ZI_NUCLEO == 1
+/*!< External oscillator clock for the STM32H743ZI Nucleo */
+#define HSE_VALUE((uint32_t)800)
+  #else
+/*!< Value of the External oscillator in Hz : FPGA case fixed to 60MHZ */
+#define HSE_VALUE((uint32_t)2500)
+  #endif /* STM32H743ZI_NUCLEO == 1 */
 #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/bspstart.c 
b/bsps/arm/stm32h7/start/bspstart.c
index 2fc8133cca..d942fbdcb3 100644
--- a/bsps/arm/stm32h7/start/bspstart.c
+++ b/bsps/arm/stm32h7/start/bspstart.c
@@ -34,7 +34,7 @@
 
 uint32_t HAL_GetTick(void)
 {
-  return 0;
+  return rtems_clock_get_ticks_since_boot();
 }
 
 uint32_t stm32h7_systick_frequency(void)
diff --git a/bsps/arm/stm32h7/start/stm32h7-hal-eth.c 
b/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
index 46475f4316..36363f84a5 100644
--- a/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
+++ b/bsps/arm/stm32h7/start/stm32h7-hal-eth.c
@@ -64,8 +64,7 @@ static const stm32h7_gpio_config gpioa = {
   }
 };
 
-void
-HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
+void HAL_ETH_MspInit(ETH_HandleTypeDef *heth)
 {
   stm32h7_clk_enable(STM32H7_MODULE_ETH1MAC);
   stm32h7_clk_enable(STM32H7_MODULE_ETH1TX);
diff --git a/spec/build/bsps/arm/stm32h7/bspstm32h7.yml 
b/spec/build/bsps/arm/stm32h7/bspstm32h7.yml
index 80e13472c8..89b5a3c00d 100644
--- a/spec/build/bsps/arm/stm32h7/bspstm32h7.yml
+++ b/spec/build/bsps/arm/stm32h7/bspstm32h7.yml
@@ -247,6 +247,10 @@ links:
   uid: ../../optconsolebaud
 - role: build-dependency
   uid: ../../optconsoleirq
+- role: build-dependency
+  uid: opth743nucleo
+- role: build-dependency
+  uid: optlwip
 - 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 00..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
diff --git a/spec/build/bsps/arm/stm32h7/optlwip.yml 
b/spec/build/bsps/arm/stm32h7/optlwip.yml
new file mode 100644
index 00..04613a3bb6
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/optlwip.yml
@@ -0,0 +1,24 @@
+actions:
+- get-boolean: null
+- env-assign: null
+- define-condition: null
+build-type: option
+default: false
+default-by-variant: []
+enabled-by: true
+format: '{}'
+links: []
+name: STM32H7_ADD_LWIP
+description: |
+  This changes the code to allow lwIP to work properly based on the STM32 lwIP 
example.
+  The user must take care of the following steps in the application:
+   1. The lwIP DMA descriptors have to be placed into the .bsp_no_cache 
section instead
+  of custom sections
+   2. The sections need to be aligned to 32 bytes (0x20) boundaries
+  This can be achieved by appending
+__attribute__((section(.bsp_no_cache),__aligned__(0x20)));
+  to the descriptor definitions.
+type: build
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 Robin Mueller
-- 
2.23.0.windows.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 2/2] This adds a way to print the host triplet

2021-02-24 Thread Robin Mueller
Can be useful for cross-compiling toolchains
---
 source-builder/sb/setbuilder.py | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py
index b0e2b23..e480ad5 100644
--- a/source-builder/sb/setbuilder.py
+++ b/source-builder/sb/setbuilder.py
@@ -673,6 +673,16 @@ def list_bset_cfg_files(opts, configs):
 return True
 return False
 
+def list_host(opts):
+if opts.get_arg('--list-host'):
+print('Displaying host operating system information: ')
+print('Operating system: %s' % macro_expand(opts.defaults, '%{_os}'))
+print('Number of processors: %s' % macro_expand(opts.defaults, 
'%{_ncpus}'))
+print('Build architecture: %s' % macro_expand(opts.defaults, 
'%{_host_arch}'))
+print('Host triplet: %s' % macro_expand(opts.defaults, '%{_host}'))
+return True
+return False
+
 def run():
 import sys
 ec = 0
@@ -683,6 +693,7 @@ def run():
 '--list-bsets':'List available build sets',
 '--list-configs':  'List available configuration files.',
 '--list-deps': 'List the dependent files.',
+'--list-host': 'List host information and the host 
triplet.',
 '--bset-tar-file': 'Create a build set tar file',
 '--pkg-tar-files': 'Create package tar files',
 '--no-report': 'Do not create a package report.',
@@ -718,7 +729,8 @@ def run():
 deps = []
 else:
 deps = None
-if not list_bset_cfg_files(opts, configs):
+
+if not list_bset_cfg_files(opts, configs) and not list_host(opts):
 prefix = macro_expand(opts.defaults, '%{_prefix}')
 if opts.canadian_cross():
 opts.disable_install()
-- 
2.23.0.windows.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] Basic lwIP for STM32H7 BSP

2021-02-02 Thread Robin Mueller
ASH_PAGE_SIZE
 #define TYPEPROGRAM_FASTBYTE  FLASH_TYPEPROGRAM_BYTE
 #define TYPEPROGRAM_FASTHALFWORD  FLASH_TYPEPROGRAM_HALFWORD
 #define TYPEPROGRAM_FASTWORD  FLASH_TYPEPROGRAM_WORD
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/bspstart.c 
b/bsps/arm/stm32h7/start/bspstart.c
index 2fc8133cca..d942fbdcb3 100644
--- a/bsps/arm/stm32h7/start/bspstart.c
+++ b/bsps/arm/stm32h7/start/bspstart.c
@@ -34,7 +34,7 @@
 
 uint32_t HAL_GetTick(void)
 {
-  return 0;
+  return rtems_clock_get_ticks_since_boot();
 }
 
 uint32_t stm32h7_systick_frequency(void)
diff --git a/spec/build/bsps/arm/stm32h7/bspstm32h7.yml 
b/spec/build/bsps/arm/stm32h7/bspstm32h7.yml
index 1e54838c66..0d6a059ba9 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: optlwip
 - role: build-dependency
   uid: ../grp
 - role: build-dependency
diff --git a/spec/build/bsps/arm/stm32h7/optlwip.yml 
b/spec/build/bsps/arm/stm32h7/optlwip.yml
new file mode 100644
index 00..caf38d3663
--- /dev/null
+++ b/spec/build/bsps/arm/stm32h7/optlwip.yml
@@ -0,0 +1,21 @@
+actions:
+- get-boolean: null
+- env-assign: null
+- define-condition: null
+build-type: option
+default: false
+default-by-variant: []
+enabled-by: true
+format: '{}'
+links: []
+name: STM32H7_ADD_LWIP
+description: |
+  This changes the code to allow lwIP to work properly, based on the
+  STM32 lwIP example. The lwIP DMA descriptors will be placed inside
+  SRAM3, similarly to the linker script provided by STM. The user
+  still needs to set the lwIP heap memory location, configure the MPU
+  properly and do the configuration of the hardware and other peripherals.
+type: build
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020 Robin Mueller
-- 
2.29.2.windows.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] STM32H7 BSP: Commented out legacy define which causes nameclashes

2021-01-28 Thread Robin Mueller
---

I had a warning related to nameclash of defines for the arm/stm32h7 BSP.
More specifically, the define PAGESIZE which is defined in stm32_hal_legacy.h
as well as in limits.h (which is located in arm-rtems6/include)

I solved the problem for now by commenting out the define in stm32_hal_legacy.h

The BSP still built without issues. I searched the stm32h7 BSP folder in the 
sources
to check whether the legacy define is actually used somewhere and it is not.

 bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h 
b/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
index c311c1618e..c4fa5d7151 100644
--- a/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
+++ b/bsps/arm/stm32h7/include/Legacy/stm32_hal_legacy.h
@@ -420,7 +420,9 @@
 #define TYPEPROGRAMDATA_FASTBYTE  FLASH_TYPEPROGRAMDATA_FASTBYTE
 #define TYPEPROGRAMDATA_FASTHALFWORD  FLASH_TYPEPROGRAMDATA_FASTHALFWORD
 #define TYPEPROGRAMDATA_FASTWORD  FLASH_TYPEPROGRAMDATA_FASTWORD
-#define PAGESIZE  FLASH_PAGE_SIZE
+/* Commented out for the RTEMS BSP because there can be nameclashes with 
another 
+similar defininition in limits.h */
+//#define PAGESIZE  FLASH_PAGE_SIZE
 #define TYPEPROGRAM_FASTBYTE  FLASH_TYPEPROGRAM_BYTE
 #define TYPEPROGRAM_FASTHALFWORD  FLASH_TYPEPROGRAM_HALFWORD
 #define TYPEPROGRAM_FASTWORD  FLASH_TYPEPROGRAM_WORD
-- 
2.29.2.windows.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] STM32H7 doc update

2021-01-13 Thread Robin Mueller
---

Added doc for board variation, added some  fixes
from code review. (typo and line width formatting)

 user/bsps/arm/stm32h7.rst | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/user/bsps/arm/stm32h7.rst b/user/bsps/arm/stm32h7.rst
index 3eee511..e1b9d8c 100644
--- a/user/bsps/arm/stm32h7.rst
+++ b/user/bsps/arm/stm32h7.rst
@@ -11,16 +11,32 @@ This BSP supports the
 The BSP is known to run on these boards:
 
 * `STM32H743I-EVAL 2 
`_
+* `STM32H743ZI-Nucleo 
`_
 
 Clock Driver
 
 
-The clock driver uses the `ARMv7-M Systick` module.
+The clock driver uses the `ARMv7-M Systick` module. The HSE (external 
+oscillator) value can also be different for different evaluation or custom 
+boards, so it is recommended to check the default values of the BSP.
 
 Console Driver
 --
 
 The console driver supports the on-chip UART and USART modules.
+Different board variations use different GPIO pins and blocks for the default 
+communication UART and it is recommended to check whether the default 
+configuration provided is valid in the BSP.
+
+To specify that the BSP should be built for the STM32H743ZI-Nucleo board,
+users can supply ``STM32H743ZI_NUCLEO == True`` to ``config.ini`` when 
+building the BSP.
+
+Alternatively, users can supply the configuration structs defined in ``hal.h``
+in the applicaton for other boards. For the console driver, the 
+``stm32h7_usartX_config`` structs are used to configure the GPIO pins and 
other 
+parameters. The default implementations can be found in 
+``bsps/arm/stm32ht/console`` in the RTEMS sources.
 
 Network Interface Driver
 
-- 
2.23.0.windows.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] command correction to perform tests

2020-12-02 Thread Robin Mueller
---
The old command seems to be incosistent with the rest of the quick
start guide. I was able to run tests for both RTEMS5 (released build)
and RTEMS 6 ( git clone) with the following commands.
 user/start/bsp-test.rst | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/user/start/bsp-test.rst b/user/start/bsp-test.rst
index 9243f5d..af6194a 100644
--- a/user/start/bsp-test.rst
+++ b/user/start/bsp-test.rst
@@ -9,19 +9,19 @@ Test a Board Support Package (BSP)
 ==
 
 You built a BSP with tests in the previous section.  We built the
-``sparc/erc32`` BSP in :file:`$HOME/quick-start/src/rtems`.
+``sparc/erc32`` BSP in 
:file:`$HOME/quick-start/rtems/${RTEMS_VERSION}/sparc-rtems${RTEMS_VERSION}/erc32`.
 
 You should run the RTEMS test suite on your target hardware.  The RTEMS Project
 provides some support to do this, see the :ref:`Testing ` chapter for
 the details.
 
 On the ``sparc/erc32`` BSP we selected for this quick start chapter this is
-easy.  Just run this command:
+easy.  Just run this command and replace sparc-rtems:
 
 .. code-block:: none
 
-cd $HOME/quick-start/src/rtems
-rtems-test --rtems-bsp=erc32-sis build/sparc/erc32
+cd 
$HOME/quick-start/rtems/${RTEMS_VERSION}/sparc-rtems${RTEMS_VERSION}/erc32
+rtems-test --rtems-bsp=erc32-sis tests
 
 This command should output something like this (omitted lines are denoted by
 ...).  In this output the base directory :file:`$HOME/quick-start` was replaced
-- 
2.29.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] quick start variable version number

2020-12-02 Thread Robin Mueller
---
 user/start/sources.rst | 10 --
 user/start/tools.rst   | 19 +--
 2 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/user/start/sources.rst b/user/start/sources.rst
index 8c40aa0..836cab9 100644
--- a/user/start/sources.rst
+++ b/user/start/sources.rst
@@ -9,11 +9,14 @@
 Obtain the Sources
 ==
 
+The chosen RTEMS version (5 for a released build, 6 for the git clone) will be 
+replaced by $RTEMS_VERSION for some parts of the Quick Start.
 You have considered and chosen a suitable installation prefix in the previous
-section.  We have chosen :file:`$HOME/quick-start/rtems/5` as the installation
+section.  We have chosen :file:`$HOME/quick-start/rtems/$RTEMS_VERSION` as the 
installation
 prefix. We will show how to use a released version of RTEMS and then as an
 alternative we will show you using the :ref:`RSB Git repository
-`. Consider using a Git clone if you wish to make
+` master which uses RTEMS version 6. 
+Consider using a Git clone if you wish to make
 contributions to the RTEMS Project.
 
 You need the RTEMS Source Builder (RSB) to work with RTEMS and we prefer you
@@ -86,6 +89,9 @@ You can clone the Git repository to get all versions of RTEMS 
including the
 development head.  Release branches in Git are kept stable however they may
 differ from a release's source archive.
 
+The master branch by default uses RTEMS version 6 and does not 
+contain the version 5 `rtems-sparc` build set.
+
 .. code-block:: none
 
 mkdir -p $HOME/quick-start/src
diff --git a/user/start/tools.rst b/user/start/tools.rst
index baa2387..7f4a122 100644
--- a/user/start/tools.rst
+++ b/user/start/tools.rst
@@ -12,20 +12,27 @@ Install the Tool Suite
 
 You have chosen an installation prefix, the BSP to build, the tool's
 architecure and prepared the source for the RSB in the previous sections.  We
-have chosen :file:`$HOME/quick-start/rtems/5` as the installation prefix, the
-``erc32`` BSP and the SPARC architecture name of ``sparc-rtems5``, and unpacked
-the RSB source in :file:`$HOME/quick-start/src`.
+have chosen :file:`$HOME/quick-start/rtems/$RTEMS_VERSION` as the installation 
prefix, the
+``erc32`` BSP and the SPARC architecture name of ``sparc-rtems5`` 
(``sparc-rtems6`` for the git clone), 
+and unpacked the RSB source in :file:`$HOME/quick-start/src`.
 
 The tool suite for RTEMS and the RTEMS sources are tightly coupled.  For
 example, do not use a RTEMS version 5 tool suite with RTEMS version 4.11
 sources and vice versa.
 
-Build and install the tool suite:
+The available build sets can be displayed with:
+
+.. code-block:: none
+
+cd $HOME/quick-start/src/rsb/rtems
+../source-builder/sb-set-builder --list-bsets
+   
+Build and install the tool suite for the SPARC architecture and RTEMS version:
 
 .. code-block:: none
 
 cd $HOME/quick-start/src/rsb/rtems
-../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/5 
5/rtems-sparc
+../source-builder/sb-set-builder 
--prefix=$HOME/quick-start/rtems/$RTEMS_VERSION $RTEMS_VERSION/rtems-sparc
 
 This command should output something like this (omitted lines are denoted by
 ...). The build host appears as part of the name of the package being
@@ -51,7 +58,7 @@ built. The name you see may vary depending on the host you 
are using:
 Build Set: Time 0:21:35.626294
 
 Once the build has successfully completed you can check if the cross C compiler
-works with the following command:
+works with the following command (replace 5 with 6 for RTEMS 6):
 
 .. code-block:: none
 
-- 
2.29.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] doc improvements

2020-12-02 Thread Robin Mueller
---
 user/start/sources.rst | 9 +
 user/start/tools.rst   | 9 -
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/user/start/sources.rst b/user/start/sources.rst
index 8c40aa0..fddc439 100644
--- a/user/start/sources.rst
+++ b/user/start/sources.rst
@@ -86,12 +86,21 @@ You can clone the Git repository to get all versions of 
RTEMS including the
 development head.  Release branches in Git are kept stable however they may
 differ from a release's source archive.
 
+For this Quick Start guide, we will switch to the RTEMS 5 branches because the 
+master branch does not contain the version 5 `rtems-sparc` build set.
+If you wich to build with the master branch instead, it is recommended to
+replace the version number 5 with version 6 everywhere it is used in the Quick 
Start guide.
+
 .. code-block:: none
 
 mkdir -p $HOME/quick-start/src
 cd $HOME/quick-start/src
 git clone git://git.rtems.org/rtems-source-builder.git rsb
+git checkout origin/5
+git checkout -b 5
 git clone git://git.rtems.org/rtems.git
+git checkout origin/5
+git checkout -b 5
 
 The :file:`rsb` repository clone contains the :ref:`RTEMS Source Builder (RSB)
 `.  We clone it into :file:`rsb` to get shorter paths during the tool
diff --git a/user/start/tools.rst b/user/start/tools.rst
index baa2387..e0fe10d 100644
--- a/user/start/tools.rst
+++ b/user/start/tools.rst
@@ -20,7 +20,14 @@ The tool suite for RTEMS and the RTEMS sources are tightly 
coupled.  For
 example, do not use a RTEMS version 5 tool suite with RTEMS version 4.11
 sources and vice versa.
 
-Build and install the tool suite:
+The available build sets can be displayed with:
+
+.. code-block:: none
+
+cd $HOME/quick-start/src/rsb/rtems
+../source-builder/sb-set-builder --list-bsets
+   
+Build and install the version 5 tool suite for the SPARC architecture:
 
 .. code-block:: none
 
-- 
2.29.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] updated python section

2020-12-02 Thread Robin Mueller
---
 user/hosts/windows.rst | 12 
 1 file changed, 12 insertions(+)

diff --git a/user/hosts/windows.rst b/user/hosts/windows.rst
index fac1366..ca8026d 100644
--- a/user/hosts/windows.rst
+++ b/user/hosts/windows.rst
@@ -126,6 +126,18 @@ Python2 package. The MSYS Python is version 3 and the RSB 
can support version 2
 and 3 of Python and it helps handle some of the long paths building GCC can
 generate.
 
+If the following error occurs during a build process
+
+.. code-block:: none
+
+  LookupError: unknown encoding: cp65001
+  
+it is recommended to run the following command:
+
+.. code-block:: none
+
+  export PYTHONIOENCODING=UTF-8
+
 .. _microsoft-windows-installation:
 
 MSYS2
-- 
2.29.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel