Re: [PATCH rtems-lwip v4 0/7] lwIP port for STM32F4 BSP
On Fri, Sep 9, 2022, 10:40 PM Kinsey Moore wrote: > I think this may also be waiting on the RTEMS patches to go in based on > the prerequisite comment. > Ok. Monday we can work this out. On 9/9/2022 22:00, Joel Sherrill wrote: > > I'd like to see another ack. Chris? Andrei? Christian? Poke them on > discord please. > > On Fri, Sep 9, 2022, 9:05 PM Kinsey Moore > wrote: > >> This addresses all my issues with the patch, looks good! >> >> >> Kinsey >> >> On 9/9/2022 18:13, Duc Doan wrote: >> > This patch set aims to port RTEMS lwIP for STM32F4 BSP. It also contains >> > generic drivers for STM32 chips in general. It is tested with a TCP echo >> > server application on STM32F407 Discovery Board. >> > >> > Prerequisite: this patch set requires my STM32F4 patches to be applied >> > because it uses STM32 HAL. >> > >> > v2: >> > - Changes the arch and BSP check to use rtems.arch and rtems.bsp >> > - Updates #4714: replace os.walk by ant_glob >> > - Group STM32F4 BSP-specific files together >> > >> > v3: >> > - Make BSP check exact >> > - Add ORIGIN.stm32 and COPYING.stm32 >> > - Imported files under stm32/ are now generated by STM32CubeIDE under >> > RTOS mode >> > - Remove unused lwip.c >> > >> > v4: >> > - Fix improper code addition >> > - Fix aarch64 BSP list in lwip.py >> > - Remove unused lwip.h >> > >> > Duc Doan (7): >> >lwip.py: Change arch and bsp check method >> >lwip.py: Use ant_glob instead of os.walk() >> >Add STM32 Ethernet source >> >rtemslwip: Add STM32F4 lwipopts.h and netstart.c >> >RTEMS port of lwIP for STM32 and STM32F4 BSP >> >lwip.py: Add STM32 lwIP port to build >> >stm32: Convert to Unix line endings >> > >> > COPYING.stm32| 28 + >> > ORIGIN.stm32 | 2 + >> > lwip.py | 69 ++- >> > rtemslwip/stm32f4/lwipopts.h | 147 + >> > rtemslwip/stm32f4/netstart.c | 73 +++ >> > rtemslwip/stm32f4/stm32f4_lwip.c | 39 ++ >> > rtemslwip/stm32f4/stm32f4_lwip.h | 34 ++ >> > stm32/driver/dp83848.c | 664 + >> > stm32/driver/dp83848.h | 436 ++ >> > stm32/ethernetif.c | 986 +++ >> > stm32/ethernetif.h | 54 ++ >> > 11 files changed, 2508 insertions(+), 24 deletions(-) >> > create mode 100644 COPYING.stm32 >> > create mode 100644 ORIGIN.stm32 >> > create mode 100644 rtemslwip/stm32f4/lwipopts.h >> > create mode 100644 rtemslwip/stm32f4/netstart.c >> > create mode 100644 rtemslwip/stm32f4/stm32f4_lwip.c >> > create mode 100644 rtemslwip/stm32f4/stm32f4_lwip.h >> > create mode 100644 stm32/driver/dp83848.c >> > create mode 100644 stm32/driver/dp83848.h >> > create mode 100644 stm32/ethernetif.c >> > create mode 100644 stm32/ethernetif.h >> > >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel >> > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH rtems-lwip] lwip.py: Allow lwIP to build against stale install
On 10/9/2022 12:07 pm, Kinsey Moore wrote: This removes the default BSP include path from environment variables so that rtems-lwip can build even when there's a stale version with outdated headers installed in the BSP. I am not following what this does and what problem you are attempting to solve? I am not comfortable seeing rtems_waf being overridden like this. Chris --- lwip.py | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/lwip.py b/lwip.py index 84eef2c..3d9cb29 100644 --- a/lwip.py +++ b/lwip.py @@ -99,6 +99,9 @@ def build(bld): drv_incl = [] arch_lib_path = rtems.arch_bsp_lib_path(bld.env.RTEMS_VERSION, bld.env.RTEMS_ARCH_BSP) +bsp_incl = os.path.relpath( +os.path.join(bld.env.PREFIX, arch_lib_path, 'include') +) with open('file-import.json', 'r') as cf: files = json.load(cf) for f in files['files-to-import']: @@ -155,6 +158,7 @@ def build(bld): lwip_obj_incl.extend(drv_incl) lwip_obj_incl.extend(bsd_compat_incl) lwip_obj_incl.extend(common_includes) +lwip_obj_incl.append(bsp_incl) bld(features='c', target='lwip_obj', @@ -166,9 +170,7 @@ def build(bld): drv_obj_incl = [] drv_obj_incl.extend(drv_incl) drv_obj_incl.extend(common_includes) -drv_obj_incl.append(os.path.relpath( -os.path.join(bld.env.PREFIX, arch_lib_path, 'include') -)) +drv_obj_incl.append(bsp_incl) bld(features='c', target='driver_obj', @@ -203,9 +205,7 @@ def build(bld): test_app_incl.extend(drv_incl) test_app_incl.extend(common_includes) test_app_incl.append('rtemslwip/test/') -test_app_incl.append( -os.path.relpath(os.path.join(arch_lib_path, 'include')) -) +test_app_incl.append(bsp_incl) bld.program(features='c', target='networking01.exe', source='rtemslwip/test/networking01/sample_app.c', @@ -235,8 +235,18 @@ def add_flags(flags, new_flags): flags.append(flag) +def strip_bsp_include(bsp_include_path, current_flags): +# this does not handle quted strings; maybe needed +for bsp_path in bsp_include_path: +current_flags = [flag for flag in current_flags if flag != bsp_path] +return current_flags + + def bsp_configure(conf, arch_bsp): conf.env.LIB += ['m'] section_flags = ["-fdata-sections", "-ffunction-sections"] add_flags(conf.env.CFLAGS, section_flags) add_flags(conf.env.CXXFLAGS, section_flags) +conf.env.CFLAGS = strip_bsp_include(conf.env.IFLAGS, conf.env.CFLAGS) +conf.env.CXXFLAGS = strip_bsp_include(conf.env.IFLAGS, conf.env.CXXFLAGS) +conf.env.LINKFLAGS = strip_bsp_include(conf.env.IFLAGS, conf.env.LINKFLAGS) ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH rtems-lwip v3 0/7] lwIP port for STM32F4 BSP
The build systems changes look good. Thanks Chris On 9/9/2022 2:34 am, Duc Doan wrote: This patch set aims to port RTEMS lwIP for STM32F4 BSP. It also contains generic drivers for STM32 chips in general. It is tested with a TCP echo server application on STM32F407 Discovery Board. Prerequisite: this patch set requires my STM32F4 patches to be applied because it uses STM32 HAL. v2: - Changes the arch and BSP check to use rtems.arch and rtems.bsp - Updates #4714: replace os.walk by ant_glob - Group STM32F4 BSP-specific files together v3: - Make BSP check exact - Add ORIGIN.stm32 and COPYING.stm32 - Imported files under stm32/ are now generated by STM32CubeIDE under RTOS mode - Remove unused lwip.c Duc Doan (7): lwip.py: Change arch and bsp check method lwip.py: Use ant_glob instead of os.walk() Add STM32 Ethernet source rtemslwip: Add STM32F4 lwipopts.h and netstart.c RTEMS port of lwIP for STM32 and STM32F4 BSP lwip.py: Add STM32 lwIP port to build stm32: Convert to Unix line endings COPYING.stm32| 28 + ORIGIN.stm32 | 2 + lwip.py | 66 ++- rtemslwip/stm32f4/lwipopts.h | 147 + rtemslwip/stm32f4/netstart.c | 74 +++ rtemslwip/stm32f4/stm32f4_lwip.c | 14 + rtemslwip/stm32f4/stm32f4_lwip.h | 9 + stm32/driver/dp83848.c | 664 + stm32/driver/dp83848.h | 436 ++ stm32/ethernetif.c | 985 +++ stm32/ethernetif.h | 53 ++ stm32/lwip.h | 78 +++ 12 files changed, 2532 insertions(+), 24 deletions(-) create mode 100644 COPYING.stm32 create mode 100644 ORIGIN.stm32 create mode 100644 rtemslwip/stm32f4/lwipopts.h create mode 100644 rtemslwip/stm32f4/netstart.c create mode 100644 rtemslwip/stm32f4/stm32f4_lwip.c create mode 100644 rtemslwip/stm32f4/stm32f4_lwip.h create mode 100644 stm32/driver/dp83848.c create mode 100644 stm32/driver/dp83848.h create mode 100644 stm32/ethernetif.c create mode 100644 stm32/ethernetif.h create mode 100644 stm32/lwip.h ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel