Re: Project Discussion for GSoC 2023

2023-02-21 Thread Viraj Jagadale
Hi Daniel and Gabriel,

Thank you for responding. I don't own an ARTY A7-100T board. As suggested,
I will study the GRETH_GBIT manual at the same time. Can I refer to the
DP83848 or LAN8742A documentation for stm32, both of which support legacy
stack and lwip? If not, could you please recommend a device?

Please share the driver for rtems-libbsd with me as it will be very useful
as a starting point.

Regards,
Viraj.

On Tue, Feb 21, 2023 at 2:00 PM  wrote:

> Hi Viraj,
>
>
>
> We ported the driver for greth to rtems-libbsd in the past but never got
> to submit it (it might need some further refinement). The driver depends
> on the driver manager (drvmgr). Not sure if this is the best approach but
> it is a good starting point and we’d be happy to share it.
>
>
>
> Best regards,
>
> Gabriel
>
>
>
>
>
> *Von:* devel  *Im Auftrag von *Daniel Hellstrom
> *Gesendet:* Montag, 20. Februar 2023 15:59
> *An:* Viraj Jagadale ; devel@rtems.org
> *Cc:* kinsey.mo...@rtems.org; and...@chichak.ca
> *Betreff:* Re: Project Discussion for GSoC 2023
>
>
>
> Hi Viraj,
>
> There is an old GRETH network driver as part of the old network stack that
> would be a good reference.
>
> Note that the old driver supports two IPs (GRETH 10/100, and GRETH_GBIT
> 10/100/1000). The GRETH_GBIT IP is mostly backwards compatible with the
> GRETH, but as some additional functionality to off load the CPU with
> UDP/TCP check-summing, unaligned DMA, and scatter-gather DMA for example.
> One approach could be to begin to focus on the more capable GRETH_GBIT IP
> first, section 14:
>
> https://www.gaisler.com/doc/gr740/GR740-UM-DS-2-5.pdf
>
> or from the IP manual, section XX:
>
> https://www.gaisler.com/products/grlib/grip.pdf
>
> Please keep in mind that the GRETH driver will be used by both SPARC/LEON3
> BSP and RISC-V/NOEL-V BSP in the future.
>
> It sounds as a good approach to look at the interface of the LWIP stack
> towards the Network Device Driver, for example the DEC driver to learn
> however the best would be if there is a MAC device supported both by legacy
> stack and the LWIP? Simultaneously you could study the GRETH_GBIT manual
> with register and DMA interface and the old device driver source code?
>
> If you have a ARTY A7-100T board you could use the RISC-V design to get
> access to the GRETH IP easily get started with. The GRMON eval version
> would also work together with it for a hardware-debugger (no additional
> cost required) which you can connect GDB for source debugging if you wish:
>
> https://www.gaisler.com/index.php/products/processors/noel-v-examples
>
> https://www.gaisler.com/index.php/products/debug-tools/grmon3
>
> Kind Regards,
> Daniel
>
>
>
>
>
>
>
> On 2023-02-13 04:25, Viraj Jagadale wrote:
>
> Dear Community,
>
> I am interested in contributing to RTEMS and will be participating in GSoC
> 2023. I am interested in projects #4595
>  and #4596
>  because I am passionate about
> networking. I'm currently concentrating solely on #4595. I'm aware that
> I'll need to study and comprehend the lwip stack documentation, as well as
> how the Ethernet protocol is implemented and networking services are
> provided for applications. Then I'll have to devise a strategy for
> designing the driver architecture. I'm thinking about reading the RTEMS
> Legacy Networking User Manual and understanding the DEC 21140 example to
> get started. I'm not sure if this is the right approach, and I'll need your
> advice. I am also willing to help with existing bugs and documentation
> updates.
>
>
>
> Regards,
>
> Viraj Jagadale.
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH rtems-source-builder 2/2] 6/rtems-default.bset: Update binutils version to 2.40

2023-02-21 Thread Joel Sherrill
---
 rtems/config/6/rtems-default.bset  |  2 +-
 rtems/config/tools/rtems-binutils-2.40.cfg | 13 +
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 rtems/config/tools/rtems-binutils-2.40.cfg

diff --git a/rtems/config/6/rtems-default.bset 
b/rtems/config/6/rtems-default.bset
index a76efe6..ff9f9f5 100644
--- a/rtems/config/6/rtems-default.bset
+++ b/rtems/config/6/rtems-default.bset
@@ -13,7 +13,7 @@
 %defineifnot with_rtems_expatdevel/expat-2.4.8-1
 %defineifnot with_rtems_gmp  devel/gmp-6.2.1
 %defineifnot with_rtems_gdb  tools/rtems-gdb-13.1
-%defineifnot with_rtems_binutils tools/rtems-binutils-2.38
+%defineifnot with_rtems_binutils tools/rtems-binutils-2.40
 %defineifnot with_rtems_gcc  tools/rtems-gcc-12-newlib-head
 %defineifnot with_rtems_toolstools/rtems-tools-6
 
diff --git a/rtems/config/tools/rtems-binutils-2.40.cfg 
b/rtems/config/tools/rtems-binutils-2.40.cfg
new file mode 100644
index 000..87f634b
--- /dev/null
+++ b/rtems/config/tools/rtems-binutils-2.40.cfg
@@ -0,0 +1,13 @@
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define binutils_version 2.40
+#%define binutils_external 1
+
+%hash sha512 binutils-%{binutils_version}.tar.bz2 \
+
MCVjYpRRhDKcmUcw9g2EkyklR+Dl3l9J1XSQ2NmxoKGDk79/cJNLpQYe4gAexMv18gbTEN+VEqf7NiWjYuNY+Q==
+
+%define with_deterministic_archives 1
+%define with_64_bit_bfd 1
+
+%include %{_configdir}/binutils-2-1.cfg
-- 
2.24.4

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


[PATCH rtems-source-builder 1/2] Update to gdb 13.1 for rtems 6

2023-02-21 Thread Joel Sherrill
---
 rtems/config/6/rtems-default.bset |  2 +-
 rtems/config/tools/rtems-gdb-13.1.cfg | 16 
 2 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 rtems/config/tools/rtems-gdb-13.1.cfg

diff --git a/rtems/config/6/rtems-default.bset 
b/rtems/config/6/rtems-default.bset
index a0601aa..a76efe6 100644
--- a/rtems/config/6/rtems-default.bset
+++ b/rtems/config/6/rtems-default.bset
@@ -12,7 +12,7 @@
 %defineifnot with_rtems_dtc  devel/dtc-1.6.1-1
 %defineifnot with_rtems_expatdevel/expat-2.4.8-1
 %defineifnot with_rtems_gmp  devel/gmp-6.2.1
-%defineifnot with_rtems_gdb  tools/rtems-gdb-12.1
+%defineifnot with_rtems_gdb  tools/rtems-gdb-13.1
 %defineifnot with_rtems_binutils tools/rtems-binutils-2.38
 %defineifnot with_rtems_gcc  tools/rtems-gcc-12-newlib-head
 %defineifnot with_rtems_toolstools/rtems-tools-6
diff --git a/rtems/config/tools/rtems-gdb-13.1.cfg 
b/rtems/config/tools/rtems-gdb-13.1.cfg
new file mode 100644
index 000..4a6a1c7
--- /dev/null
+++ b/rtems/config/tools/rtems-gdb-13.1.cfg
@@ -0,0 +1,16 @@
+#
+# GDB 12.1
+#
+
+%include %{_configdir}/checks.cfg
+%include %{_configdir}/base.cfg
+
+%define gdb_version 13.1
+%define gdb_src_ext xz
+%hash sha512 gdb-%{gdb_version}.tar.xz \
+   
5lBU/7wDV+7tSxfh7cXvRapzyd3zsSEGUePYWVduJ8HSeyZoAP4mMo7aWIV0VczYYy9AAM/F9j+QhUCWKQGHyg==
+
+#%patch add gdb --rsb-file=gdb-readline8.2.patch 
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=1add37b567a7dee39d99f37b37802034c3fce9c4
+#%hash sha512 gdb-readline8.2.patch 
E/nGalfBBfn0rl/pi1SGIuKD11x0qREZBp3ajaFbl/nGMZUIm31M/1z0FsG76K7IjvE5pPsl2JqESt+LBN9lZA==
+
+%include %{_configdir}/gdb-common-1.cfg
-- 
2.24.4

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


RE: [PATCH v1 0/1] Update rtems-llvm to version 11.1.0

2023-02-21 Thread Jan.Sommer
Hello everyone,

I tried to build a riscv BSP with the information from Hesham. Thanks again.
It now compiles the files, but produces a lot of warnings and fails to link in 
the end.

The warnings are of this type
../../../cpukit/score/cpu/riscv/riscv-exception-handler.S:48:10: warning: 
unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'relax' or 'norelax'
   .option arch, +zicsr
   ^
And in the end the linker cannot find the " _RISCV_Exception_handler", so I 
guess the warning prevents those symbols from being built. My best guess is 
that it is related to this llvm issue: https://reviews.llvm.org/D141666 which 
is actively worked on as of this month and we probably have to wait for this to 
become part of llvm.

Out of curiosity, I tried the same with the Zedboard BSP. There, linking passed 
and I got to this point for base_sp.exe:
*** BEGIN OF TEST OH ***
*** TEST VERSION: 6.0.0.c0fad60c59bf14b9d1a4eb3d76f872e2cf43e7b8
*** TEST STATE: (null)
*** TEST BUILD:
*** TEST TOOLS: Clang 11.1.0 (https://git.rtems.org/rtems-source-builder 
64df106288cf6c4289a9c78850a82bfb2b41caa2)
Creating and starting an application task

*** FATAL ***
fatal source: 0 (INTERNAL_ERROR_CORE)
fatal code: 31 (INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT)
RTEMS version: 6.0.0.c0fad60c59bf14b9d1a4eb3d76f872e2cf43e7b8
RTEMS tools: Clang 11.1.0 (https://git.rtems.org/rtems-source-builder 
64df106288cf6c4289a9c78850a82bfb2b41caa2)
executing thread is NULL

So, let's say it's something. Now at least I have a system to debug. I will 
also have a look how to make the process more accessible. At the moment things 
are just crowbarred into the build system to make it work.

Coming back to the patch: If there are no objections I would like to push the 
commit for llvm11.
Chances are that further updates are to come as I progress.

Best regards,

Jan

> -Original Message-
> From: Hesham Almatary 
> Sent: Mittwoch, 15. Februar 2023 11:17
> To: Sommer, Jan 
> Cc: j...@rtems.org; devel@rtems.org
> Subject: Re: [PATCH v1 0/1] Update rtems-llvm to version 11.1.0
> 
> On Wed, 15 Feb 2023 at 09:22,  wrote:
> >
> >
> >
> > > -Original Message-
> > > From: Hesham Almatary 
> > > Sent: Montag, 13. Februar 2023 16:19
> > > To: Sommer, Jan 
> > > Cc: j...@rtems.org; devel@rtems.org
> > > Subject: Re: [PATCH v1 0/1] Update rtems-llvm to version 11.1.0
> > >
> > > On Mon, 13 Feb 2023 at 12:12,  wrote:
> > > >
> > > > > -Original Message-
> > > > > From: Joel Sherrill 
> > > > > Sent: Freitag, 10. Februar 2023 15:21
> > > > > To: Sommer, Jan 
> > > > > Cc: devel@rtems.org
> > > > > Subject: Re: [PATCH v1 0/1] Update rtems-llvm to version 11.1.0
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Feb 10, 2023 at 3:16 AM Jan Sommer  > > > >  > wrote:
> > > > >
> > > > >
> > > > >   Hello,
> > > > >
> > > > >   I couldn't get the rtems-llvm buildset to work.
> > > > >   As it was building llvm8 which is not that modern, I just tried 
> > > > > to
> build
> > > > >   a more recent version with the scripts.
> > > > >   It works with llvm11. Are there any objections to updating?
> > > > >
> > > > >
> > > > >
> > > > > Nope. Please feel free to add this.
> > > > >
> > > > >
> > > > >   And should we keep the rtems-llvm-8.cfg or should I remove
> > > > > this with
> > > > >   this patch?
> > > > >
> > > > >
> > > > >
> > > > >  My main concern is if the architectures that built with llvm 8
> > > > > still build with llvm 11. I think that's only SPARC and RISC-V.
> > > > > Are there
> > > others?
> > > > >
> > > Why not the latest LLVM (especially to pick up the latest RISC-V
> > > fixes/support). I am not sure how mature the RISC-V support is in
> > > LLVM 8, if it was supported at all.
> > >
> >
> > Yes, that is also my goal. I got llvm11 building with only small changes to 
> > the
> buildset and wanted to go from there.
> > In the meantime I also managed to build llvm up to 14 locally. Once I have
> all the bits and pieces working to some degree I will probably consolidate to 
> a
> more recent version.
> >
> Seems like a good plan.
> 
> > > > > I guess that points to me not knowing the list of architectures
> > > > > that are expected to work. I wonder where we would keep this
> information.
> > > > > Any thoughts?
> > > > >
> > > >
> > > > Thanks for the information.
> > > > I tried to build those to check if they still work and failed, but
> > > > given that the
> > > information I could find is sparse I could very well be the problem.
> > > > What I did is:
> > > > - Build the gcc toolchains for sparc and riscv (as far as I
> > > > understand we need the binutils and libc from that)
> > > I haven't tried doing that for RISC-V. I used to build newlib
> > > manually, and not rely on GCC/binutils.
> > >
> >
> > Ah, I see. Just for clarification you also cross-built newlib with clang?
> >
> Yes, besides compiler-rt (LLVM's version of libgcc). But you don't need to go
> 

AW: Project Discussion for GSoC 2023

2023-02-21 Thread Gabriel.Moyano
Hi Viraj,

We ported the driver for greth to rtems-libbsd in the past but never got to 
submit it (it might need some further refinement). The driver depends on the 
driver manager (drvmgr). Not sure if this is the best approach but it is a good 
starting point and we’d be happy to share it.

Best regards,
Gabriel


Von: devel  Im Auftrag von Daniel Hellstrom
Gesendet: Montag, 20. Februar 2023 15:59
An: Viraj Jagadale ; devel@rtems.org
Cc: kinsey.mo...@rtems.org; and...@chichak.ca
Betreff: Re: Project Discussion for GSoC 2023


Hi Viraj,

There is an old GRETH network driver as part of the old network stack that 
would be a good reference.

Note that the old driver supports two IPs (GRETH 10/100, and GRETH_GBIT 
10/100/1000). The GRETH_GBIT IP is mostly backwards compatible with the GRETH, 
but as some additional functionality to off load the CPU with UDP/TCP 
check-summing, unaligned DMA, and scatter-gather DMA for example. One approach 
could be to begin to focus on the more capable GRETH_GBIT IP first, section 14:

https://www.gaisler.com/doc/gr740/GR740-UM-DS-2-5.pdf

or from the IP manual, section XX:

https://www.gaisler.com/products/grlib/grip.pdf

Please keep in mind that the GRETH driver will be used by both SPARC/LEON3 BSP 
and RISC-V/NOEL-V BSP in the future.

It sounds as a good approach to look at the interface of the LWIP stack towards 
the Network Device Driver, for example the DEC driver to learn however the best 
would be if there is a MAC device supported both by legacy stack and the LWIP? 
Simultaneously you could study the GRETH_GBIT manual with register and DMA 
interface and the old device driver source code?

If you have a ARTY A7-100T board you could use the RISC-V design to get access 
to the GRETH IP easily get started with. The GRMON eval version would also work 
together with it for a hardware-debugger (no additional cost required) which 
you can connect GDB for source debugging if you wish:

https://www.gaisler.com/index.php/products/processors/noel-v-examples

https://www.gaisler.com/index.php/products/debug-tools/grmon3

Kind Regards,
Daniel






On 2023-02-13 04:25, Viraj Jagadale wrote:
Dear Community,
I am interested in contributing to RTEMS and will be participating in GSoC 
2023. I am interested in projects #4595 
and #4596 because I am passionate about 
networking. I'm currently concentrating solely on #4595. I'm aware that I'll 
need to study and comprehend the lwip stack documentation, as well as how the 
Ethernet protocol is implemented and networking services are provided for 
applications. Then I'll have to devise a strategy for designing the driver 
architecture. I'm thinking about reading the RTEMS Legacy Networking User 
Manual and understanding the DEC 21140 example to get started. I'm not sure if 
this is the right approach, and I'll need your advice. I am also willing to 
help with existing bugs and documentation updates.

Regards,
Viraj Jagadale.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel