[PATCH v2 0/1] Document the new build system

2020-07-10 Thread Sebastian Huber
This patch set adds an updated documetation of the new build system.
You can have a look at the generated documents here:

https://ftp.rtems.org/pub/rtems/people/sebh/eng.pdf

This second version of the patch addesses some review comments from
Gedare Bloom.

Sebastian Huber (1):
  eng: Add build system chapter

 eng/build-system.rst | 488 +++
 eng/index.rst|   1 +
 images/eng/bld-bsp.dot   |  33 +++
 images/eng/bld-bsp.pdf   | Bin 0 -> 15044 bytes
 images/eng/bld-bsp.png   | Bin 0 -> 32435 bytes
 images/eng/bld-bsp2.dot  |  42 
 images/eng/bld-bsp2.pdf  | Bin 0 -> 16314 bytes
 images/eng/bld-bsp2.png  | Bin 0 -> 33936 bytes
 images/eng/bld-deps.dot  |  59 +
 images/eng/bld-deps.pdf  | Bin 0 -> 18559 bytes
 images/eng/bld-deps.png  | Bin 0 -> 18098 bytes
 images/eng/bld-deps2.dot |  52 +
 images/eng/bld-deps2.pdf | Bin 0 -> 18241 bytes
 images/eng/bld-deps2.png | Bin 0 -> 40695 bytes
 14 files changed, 675 insertions(+)
 create mode 100644 eng/build-system.rst
 create mode 100644 images/eng/bld-bsp.dot
 create mode 100644 images/eng/bld-bsp.pdf
 create mode 100644 images/eng/bld-bsp.png
 create mode 100644 images/eng/bld-bsp2.dot
 create mode 100644 images/eng/bld-bsp2.pdf
 create mode 100644 images/eng/bld-bsp2.png
 create mode 100644 images/eng/bld-deps.dot
 create mode 100644 images/eng/bld-deps.pdf
 create mode 100644 images/eng/bld-deps.png
 create mode 100644 images/eng/bld-deps2.dot
 create mode 100644 images/eng/bld-deps2.pdf
 create mode 100644 images/eng/bld-deps2.png

-- 
2.26.2

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


[PATCH v2 1/1] eng: Add build system chapter

2020-07-10 Thread Sebastian Huber
Update #3818.
---
 eng/build-system.rst | 488 +++
 eng/index.rst|   1 +
 images/eng/bld-bsp.dot   |  33 +++
 images/eng/bld-bsp.pdf   | Bin 0 -> 15044 bytes
 images/eng/bld-bsp.png   | Bin 0 -> 32435 bytes
 images/eng/bld-bsp2.dot  |  42 
 images/eng/bld-bsp2.pdf  | Bin 0 -> 16314 bytes
 images/eng/bld-bsp2.png  | Bin 0 -> 33936 bytes
 images/eng/bld-deps.dot  |  59 +
 images/eng/bld-deps.pdf  | Bin 0 -> 18559 bytes
 images/eng/bld-deps.png  | Bin 0 -> 18098 bytes
 images/eng/bld-deps2.dot |  52 +
 images/eng/bld-deps2.pdf | Bin 0 -> 18241 bytes
 images/eng/bld-deps2.png | Bin 0 -> 40695 bytes
 14 files changed, 675 insertions(+)
 create mode 100644 eng/build-system.rst
 create mode 100644 images/eng/bld-bsp.dot
 create mode 100644 images/eng/bld-bsp.pdf
 create mode 100644 images/eng/bld-bsp.png
 create mode 100644 images/eng/bld-bsp2.dot
 create mode 100644 images/eng/bld-bsp2.pdf
 create mode 100644 images/eng/bld-bsp2.png
 create mode 100644 images/eng/bld-deps.dot
 create mode 100644 images/eng/bld-deps.pdf
 create mode 100644 images/eng/bld-deps.png
 create mode 100644 images/eng/bld-deps2.dot
 create mode 100644 images/eng/bld-deps2.pdf
 create mode 100644 images/eng/bld-deps2.png

diff --git a/eng/build-system.rst b/eng/build-system.rst
new file mode 100644
index 000..b3a049d
--- /dev/null
+++ b/eng/build-system.rst
@@ -0,0 +1,488 @@
+.. SPDX-License-Identifier: CC-BY-SA-4.0
+
+.. Copyright (C) 2019, 2020 embedded brains GmbH 
(http://www.embedded-brains.de)
+
+.. _BuildSystem:
+
+Build System
+
+
+The purpose of the build system is to produce and install artefacts from the
+RTEMS sources such as static libraries, start files, linker command files,
+configuration header files, header files, test programs, package description
+files, and third-party build system support files.
+
+Goals
+=
+
+The build system should meet the following goals:
+
+* The install location of artefacts should be the same as in previous build
+  systems
+
+* Easy build configuration of BSPs through configuration options
+
+* Enable the BSP build configuration to be placed in a version control system
+  (e.g. no local paths)
+
+* Fast builds (also on Windows)
+
+* Easy to maintain, e.g. add/remove a BSP, add/change/remove configuration
+  options, add/remove a library, add/remove an object to/from a library,
+  add/remove tests
+
+* Reusable build specifications (e.g. generate documentation for BSP options 
for
+  the user manual)
+
+* Validation of built artefacts (e.g. ensure that the objects are built as
+  specified using the DWARF debug information)
+
+* Support building of BSPs external to the project
+
+* Customization of the build (e.g. build only a subset of the RTEMS functions)
+
+* Support alternative compilers such as clang instead of GCC
+
+* Ability to unit test the build system
+
+* Version control system friendly change sets (e.g. most changes are line based
+  in text files)
+
+Configurable things which depend on the host computer environment such as paths
+to tools are intended to be passed as command line options to the ``waf``
+command line tool.  Configurable things which define what is built and how the
+artefacts are configured are intended to be placed in configuration files that
+can be configuration controlled.  The ``waf`` build script file called
+``wscript`` should know nothing about the layout of the sources.  What is built
+and how it is built should be completely defined by the user configuration and
+the build specification items.
+
+Overview
+
+
+For an overview of the build system, see the *BSP Build System* chapter of the
+`RTEMS User Manual `_.
+
+Commands
+
+
+This section explains how the :ref:`SpecTypeBuildItemType` items determine what
+the following ``waf`` commands do.
+
+BSP List
+
+
+In the ``./waf bsp_list`` command, the BSP list is generated from the
+:ref:`SpecTypeBuildBSPItemType` items.
+
+BSP Defaults
+
+
+In the ``./waf bsp_defaults`` command, the BSP defaults are generated from the
+:ref:`SpecTypeBuildBSPItemType` and :ref:`SpecTypeBuildOptionItemType` items.
+Build specification items contribute to the command through the
+``do_defaults()`` method in the ``wscript``.
+
+Configure
+-
+
+In the ``./waf configure`` command, the build specification items contribute to
+the command through the ``prepare_configure()`` and ``do_configure()`` methods
+in the ``wscript``.
+
+Build, Clean, and Install
+-
+
+In the ``./waf``, ``./waf clean``, and ``./waf install`` commands, the build
+specification items contribute to the commands through the ``prepare_build()``
+and ``do_build()`` methods in the ``wscript``.
+
+UID Naming Conventions
+==
+
+Use the following patterns for :ref:`UID names `:
+
+abi
+Use the name ``abi`` for the GCC-specific ABI flags item of a B

Re: [PATCH v2 1/1] eng: Add build system chapter

2020-07-10 Thread Gedare Bloom
Looks good, thanks. The only comment I have is the the text on the dot
graphs is hard to read. Maybe increase their fontsize attribute
http://www.graphviz.org/doc/info/attrs.html#d:fontsize

On Fri, Jul 10, 2020 at 7:48 AM Sebastian Huber
 wrote:
>
> Update #3818.
> ---
>  eng/build-system.rst | 488 +++
>  eng/index.rst|   1 +
>  images/eng/bld-bsp.dot   |  33 +++
>  images/eng/bld-bsp.pdf   | Bin 0 -> 15044 bytes
>  images/eng/bld-bsp.png   | Bin 0 -> 32435 bytes
>  images/eng/bld-bsp2.dot  |  42 
>  images/eng/bld-bsp2.pdf  | Bin 0 -> 16314 bytes
>  images/eng/bld-bsp2.png  | Bin 0 -> 33936 bytes
>  images/eng/bld-deps.dot  |  59 +
>  images/eng/bld-deps.pdf  | Bin 0 -> 18559 bytes
>  images/eng/bld-deps.png  | Bin 0 -> 18098 bytes
>  images/eng/bld-deps2.dot |  52 +
>  images/eng/bld-deps2.pdf | Bin 0 -> 18241 bytes
>  images/eng/bld-deps2.png | Bin 0 -> 40695 bytes
>  14 files changed, 675 insertions(+)
>  create mode 100644 eng/build-system.rst
>  create mode 100644 images/eng/bld-bsp.dot
>  create mode 100644 images/eng/bld-bsp.pdf
>  create mode 100644 images/eng/bld-bsp.png
>  create mode 100644 images/eng/bld-bsp2.dot
>  create mode 100644 images/eng/bld-bsp2.pdf
>  create mode 100644 images/eng/bld-bsp2.png
>  create mode 100644 images/eng/bld-deps.dot
>  create mode 100644 images/eng/bld-deps.pdf
>  create mode 100644 images/eng/bld-deps.png
>  create mode 100644 images/eng/bld-deps2.dot
>  create mode 100644 images/eng/bld-deps2.pdf
>  create mode 100644 images/eng/bld-deps2.png
>
> diff --git a/eng/build-system.rst b/eng/build-system.rst
> new file mode 100644
> index 000..b3a049d
> --- /dev/null
> +++ b/eng/build-system.rst
> @@ -0,0 +1,488 @@
> +.. SPDX-License-Identifier: CC-BY-SA-4.0
> +
> +.. Copyright (C) 2019, 2020 embedded brains GmbH 
> (http://www.embedded-brains.de)
> +
> +.. _BuildSystem:
> +
> +Build System
> +
> +
> +The purpose of the build system is to produce and install artefacts from the
> +RTEMS sources such as static libraries, start files, linker command files,
> +configuration header files, header files, test programs, package description
> +files, and third-party build system support files.
> +
> +Goals
> +=
> +
> +The build system should meet the following goals:
> +
> +* The install location of artefacts should be the same as in previous build
> +  systems
> +
> +* Easy build configuration of BSPs through configuration options
> +
> +* Enable the BSP build configuration to be placed in a version control system
> +  (e.g. no local paths)
> +
> +* Fast builds (also on Windows)
> +
> +* Easy to maintain, e.g. add/remove a BSP, add/change/remove configuration
> +  options, add/remove a library, add/remove an object to/from a library,
> +  add/remove tests
> +
> +* Reusable build specifications (e.g. generate documentation for BSP options 
> for
> +  the user manual)
> +
> +* Validation of built artefacts (e.g. ensure that the objects are built as
> +  specified using the DWARF debug information)
> +
> +* Support building of BSPs external to the project
> +
> +* Customization of the build (e.g. build only a subset of the RTEMS 
> functions)
> +
> +* Support alternative compilers such as clang instead of GCC
> +
> +* Ability to unit test the build system
> +
> +* Version control system friendly change sets (e.g. most changes are line 
> based
> +  in text files)
> +
> +Configurable things which depend on the host computer environment such as 
> paths
> +to tools are intended to be passed as command line options to the ``waf``
> +command line tool.  Configurable things which define what is built and how 
> the
> +artefacts are configured are intended to be placed in configuration files 
> that
> +can be configuration controlled.  The ``waf`` build script file called
> +``wscript`` should know nothing about the layout of the sources.  What is 
> built
> +and how it is built should be completely defined by the user configuration 
> and
> +the build specification items.
> +
> +Overview
> +
> +
> +For an overview of the build system, see the *BSP Build System* chapter of 
> the
> +`RTEMS User Manual `_.
> +
> +Commands
> +
> +
> +This section explains how the :ref:`SpecTypeBuildItemType` items determine 
> what
> +the following ``waf`` commands do.
> +
> +BSP List
> +
> +
> +In the ``./waf bsp_list`` command, the BSP list is generated from the
> +:ref:`SpecTypeBuildBSPItemType` items.
> +
> +BSP Defaults
> +
> +
> +In the ``./waf bsp_defaults`` command, the BSP defaults are generated from 
> the
> +:ref:`SpecTypeBuildBSPItemType` and :ref:`SpecTypeBuildOptionItemType` items.
> +Build specification items contribute to the command through the
> +``do_defaults()`` method in the ``wscript``.
> +
> +Configure
> +-
> +
> +In the ``./waf configure`` command, the build specification items contribute 
> to
> +the

Re: [PATCH v2 1/1] eng: Add build system chapter

2020-07-10 Thread Sebastian Huber

On 10/07/2020 16:36, Gedare Bloom wrote:


Looks good, thanks. The only comment I have is the the text on the dot
graphs is hard to read. Maybe increase their fontsize attribute
http://www.graphviz.org/doc/info/attrs.html#d:fontsize
Thanks for the review. I changed node shape of the graphs and set the 
font to "Sans serif". Maybe this is better to read now.

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


Adding Test for Confstr() to LIBBSD

2020-07-10 Thread Eshan Dhawan
Hello everyone,
I was planning to add test for Confstr() to RTEMS-Libbsd.
In which testsuite the test cases will be added?

I had sent a patch to port confstr to libbsd earlier
Link to the patch :
https://lists.rtems.org/pipermail/devel/2020-June/060235.html

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

Re: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5

2020-07-10 Thread Mritunjay Sharma
Apologies for the delay in response,
It’s an important update that I want to give to my mentors that my current 
development laptop showed some problems yesterday and which worsened today.

I have submitted my laptop for repair. The good thing is that I have the backup 
of the work done till day and I have arranged a spare laptop as well which will 
be available tomorrow.

Configuring and setting up my laptop for the development may take a couple of 
days and so I will like to request you all to kindly pardon my inactivity for 
the next 2 days.

I hope to be back active on Monday with everything set up on the new laptop.

Thanks
Mritunjay

Get Outlook for iOS

From: jan.som...@dlr.de 
Sent: Thursday, July 9, 2020 12:43:30 PM
To: ged...@rtems.org ; mritunjaysharma...@gmail.com 

Cc: rtems-de...@rtems.org 
Subject: RE: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5



> -Original Message-
> From: devel [mailto:devel-boun...@rtems.org] On Behalf Of Gedare Bloom
> Sent: Wednesday, July 8, 2020 9:45 PM
> To: Mritunjay Sharma
> Cc: RTEMS Devel
> Subject: Re: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5
>
> On Wed, Jul 8, 2020 at 12:33 PM Mritunjay Sharma
>  wrote:
> >
> > [UPDATE]: I tried to build the EPICS 7 with RTEMS 5 for pc386 with Heinz's
> https://github.com/hjunkes/epicsBaseOwnPlayground
> > while switching to Branch "7". The previous errors are gone but I am facing
> the following error:
> >
> > "../posix/rtems_init.c:38:10: fatal error: rtems/bsd/bsd.h: No such file or
> directory
> >  #include 
> >   ^
>
> This error indicates it is looking for an installed rtems-libbsd. My
> guess is you need to build/install the rtems-libbsd to get this
> playground to work.
>

I did not read everything in this thread, so maybe I misunderstand something.
If you want to build rtems-libbsd for a pc-based BSP, please be aware of the 
following:
- It should build fine if you use the 5-freebsd-12 branch.
- With master branch is should build if you set the option "dev_nic_e1000" to 
off in your buildset.ini. It should compile, but depending on your network 
adapter there might be problems to actually use the network devices.

Finishing a patchset for the master branch to fix that is on my todo list, but 
I haven't come around to do it yet.

> > compilation terminated.
> >
> /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
> RULES_BUILD:234: recipe for target 'rtems_init.o' failed
> > make[4]: *** [rtems_init.o] Error 1
> > make[4]: Leaving directory
> '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
> libcom/RTEMS/O.RTEMS-pc386'
> >
> /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
> RULES_ARCHS:58: recipe for target 'install.RTEMS-pc386' failed
> > make[3]: *** [install.RTEMS-pc386] Error 2
> > make[3]: Leaving directory
> '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
> libcom/RTEMS'
> >
> /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
> RULES_DIRS:84: recipe for target 'RTEMS.install' failed
> > make[2]: *** [RTEMS.install] Error 2
> > make[2]: Leaving directory
> '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
> libcom'
> > ../configure/RULES_DIRS:84: recipe for target 'libcom.install' failed
> > make[1]: *** [libcom.install] Error 2
> > make[1]: Leaving directory
> '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules'
> > configure/RULES_DIRS:84: recipe for target 'modules.install' failed
> > make: *** [modules.install] Error 2"
> >
> > Today's update is that I tried to fix the above error however I still have 
> > not
> been able to clear it.
> > If anyone has idea, please do tell what can be done.
> >
> > Thanks
> > Mritunjay
> >
> > On Wed, Jul 8, 2020 at 1:12 AM Mritunjay Sharma
>  wrote:
> >>
> >>
> >>
> >> 
> >> From: Heinz Junkes 
> >> Sent: Wednesday, July 8, 2020 1:05 AM
> >> To: Mritunjay Sharma
> >> Cc: Gedare Bloom; Joel Sherrill; Chris Johns; RTEMS Devel
> >> Subject: Re: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5
> >>
> >> I’m away from my keyboard. If you use the epics Adaption to rtems from
> my github “playground?” and bsp’s with —enable-networks should compile.
> >> Heinz
> >>
> >> FHI, Heinz Junkes
> >>
> >> Thank you Heinz, I was doing the same. I went to your GitHub and am
> experimenting with "playground" right now.
> >>
> >> Thanks,
> >> Mritunjay
> >>
> >> On 7. Jul 2020, at 18:14, Mritunjay Sharma
>  wrote:
> >>
> >>
> >> [UPDATE]: I tried building EPICS with RTEMS5 for pc-386 and pc-386-qemu.
> >> Everything worked fine while building the pc-386 with  RTEMS5.
> >>
> >> After this when I entered epics-base and made the following change:
> >>
> >> epics-base/os/CONFIG_SITE.Common.RTEMS
> >> RTEMS_VERSION = 5
> >> RTEMS_BASE =
> /home/mritunjay/development/rtems_dev/$(RTEMS_VERSION)
> >>
> >> As an experiment, I ran the ma

Re: [PATCH v2 1/1] eng: Add build system chapter

2020-07-10 Thread Gedare Bloom
On Fri, Jul 10, 2020 at 11:02 AM Sebastian Huber
 wrote:
>
> On 10/07/2020 16:36, Gedare Bloom wrote:
>
> > Looks good, thanks. The only comment I have is the the text on the dot
> > graphs is hard to read. Maybe increase their fontsize attribute
> > http://www.graphviz.org/doc/info/attrs.html#d:fontsize
> Thanks for the review. I changed node shape of the graphs and set the
> font to "Sans serif". Maybe this is better to read now.

Yes, it is much better now. Thanks!
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5

2020-07-10 Thread Gedare Bloom
On Fri, Jul 10, 2020 at 12:14 PM Mritunjay Sharma
 wrote:
>
> Apologies for the delay in response,
> It’s an important update that I want to give to my mentors that my current 
> development laptop showed some problems yesterday and which worsened today.
>
> I have submitted my laptop for repair. The good thing is that I have the 
> backup of the work done till day and I have arranged a spare laptop as well 
> which will be available tomorrow.
>
> Configuring and setting up my laptop for the development may take a couple of 
> days and so I will like to request you all to kindly pardon my inactivity for 
> the next 2 days.
>

Meanwhile, you may also think about reading/writing some more
documentation, or planning out your next steps.

> I hope to be back active on Monday with everything set up on the new laptop.
>
> Thanks
> Mritunjay
>
> Get Outlook for iOS
> 
> From: jan.som...@dlr.de 
> Sent: Thursday, July 9, 2020 12:43:30 PM
> To: ged...@rtems.org ; mritunjaysharma...@gmail.com 
> 
> Cc: rtems-de...@rtems.org 
> Subject: RE: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5
>
>
>
> > -Original Message-
> > From: devel [mailto:devel-boun...@rtems.org] On Behalf Of Gedare Bloom
> > Sent: Wednesday, July 8, 2020 9:45 PM
> > To: Mritunjay Sharma
> > Cc: RTEMS Devel
> > Subject: Re: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5
> >
> > On Wed, Jul 8, 2020 at 12:33 PM Mritunjay Sharma
> >  wrote:
> > >
> > > [UPDATE]: I tried to build the EPICS 7 with RTEMS 5 for pc386 with Heinz's
> > https://github.com/hjunkes/epicsBaseOwnPlayground
> > > while switching to Branch "7". The previous errors are gone but I am 
> > > facing
> > the following error:
> > >
> > > "../posix/rtems_init.c:38:10: fatal error: rtems/bsd/bsd.h: No such file 
> > > or
> > directory
> > >  #include 
> > >   ^
> >
> > This error indicates it is looking for an installed rtems-libbsd. My
> > guess is you need to build/install the rtems-libbsd to get this
> > playground to work.
> >
>
> I did not read everything in this thread, so maybe I misunderstand something.
> If you want to build rtems-libbsd for a pc-based BSP, please be aware of the 
> following:
> - It should build fine if you use the 5-freebsd-12 branch.
> - With master branch is should build if you set the option "dev_nic_e1000" to 
> off in your buildset.ini. It should compile, but depending on your network 
> adapter there might be problems to actually use the network devices.
>
> Finishing a patchset for the master branch to fix that is on my todo list, 
> but I haven't come around to do it yet.
>
> > > compilation terminated.
> > >
> > /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
> > RULES_BUILD:234: recipe for target 'rtems_init.o' failed
> > > make[4]: *** [rtems_init.o] Error 1
> > > make[4]: Leaving directory
> > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
> > libcom/RTEMS/O.RTEMS-pc386'
> > >
> > /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
> > RULES_ARCHS:58: recipe for target 'install.RTEMS-pc386' failed
> > > make[3]: *** [install.RTEMS-pc386] Error 2
> > > make[3]: Leaving directory
> > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
> > libcom/RTEMS'
> > >
> > /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
> > RULES_DIRS:84: recipe for target 'RTEMS.install' failed
> > > make[2]: *** [RTEMS.install] Error 2
> > > make[2]: Leaving directory
> > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
> > libcom'
> > > ../configure/RULES_DIRS:84: recipe for target 'libcom.install' failed
> > > make[1]: *** [libcom.install] Error 2
> > > make[1]: Leaving directory
> > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules'
> > > configure/RULES_DIRS:84: recipe for target 'modules.install' failed
> > > make: *** [modules.install] Error 2"
> > >
> > > Today's update is that I tried to fix the above error however I still 
> > > have not
> > been able to clear it.
> > > If anyone has idea, please do tell what can be done.
> > >
> > > Thanks
> > > Mritunjay
> > >
> > > On Wed, Jul 8, 2020 at 1:12 AM Mritunjay Sharma
> >  wrote:
> > >>
> > >>
> > >>
> > >> 
> > >> From: Heinz Junkes 
> > >> Sent: Wednesday, July 8, 2020 1:05 AM
> > >> To: Mritunjay Sharma
> > >> Cc: Gedare Bloom; Joel Sherrill; Chris Johns; RTEMS Devel
> > >> Subject: Re: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5
> > >>
> > >> I’m away from my keyboard. If you use the epics Adaption to rtems from
> > my github “playground?” and bsp’s with —enable-networks should compile.
> > >> Heinz
> > >>
> > >> FHI, Heinz Junkes
> > >>
> > >> Thank you Heinz, I was doing the same. I went to your GitHub and am
> > experimenting with "playground" right now.
> > >>
> > >> Thanks,
> > >> Mritunjay
> > >>
> > >> On 7. Jul 2020, at 18:14, Mritunjay Sharma
> >  wrote:
> > >>
> > >>
>

Re: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5

2020-07-10 Thread Joel Sherrill
Wading in late but I thought I saw something that was contradictory:

Build BSP with --enable-networking
Code needs rtems-libbsd

If the code needs rtems-libbsd, then you MUST build fill with
--disable-networking.

If EPICS code needs rtems-libbsd, that limits the number of BSPs that can
be used but you need to always use libbsd.

--joel

On Fri, Jul 10, 2020 at 3:37 PM Gedare Bloom  wrote:

> On Fri, Jul 10, 2020 at 12:14 PM Mritunjay Sharma
>  wrote:
> >
> > Apologies for the delay in response,
> > It’s an important update that I want to give to my mentors that my
> current development laptop showed some problems yesterday and which
> worsened today.
> >
> > I have submitted my laptop for repair. The good thing is that I have the
> backup of the work done till day and I have arranged a spare laptop as well
> which will be available tomorrow.
> >
> > Configuring and setting up my laptop for the development may take a
> couple of days and so I will like to request you all to kindly pardon my
> inactivity for the next 2 days.
> >
>
> Meanwhile, you may also think about reading/writing some more
> documentation, or planning out your next steps.
>
> > I hope to be back active on Monday with everything set up on the new
> laptop.
> >
> > Thanks
> > Mritunjay
> >
> > Get Outlook for iOS
> > 
> > From: jan.som...@dlr.de 
> > Sent: Thursday, July 9, 2020 12:43:30 PM
> > To: ged...@rtems.org ; mritunjaysharma...@gmail.com <
> mritunjaysharma...@gmail.com>
> > Cc: rtems-de...@rtems.org 
> > Subject: RE: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5
> >
> >
> >
> > > -Original Message-
> > > From: devel [mailto:devel-boun...@rtems.org] On Behalf Of Gedare Bloom
> > > Sent: Wednesday, July 8, 2020 9:45 PM
> > > To: Mritunjay Sharma
> > > Cc: RTEMS Devel
> > > Subject: Re: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5
> > >
> > > On Wed, Jul 8, 2020 at 12:33 PM Mritunjay Sharma
> > >  wrote:
> > > >
> > > > [UPDATE]: I tried to build the EPICS 7 with RTEMS 5 for pc386 with
> Heinz's
> > > https://github.com/hjunkes/epicsBaseOwnPlayground
> > > > while switching to Branch "7". The previous errors are gone but I am
> facing
> > > the following error:
> > > >
> > > > "../posix/rtems_init.c:38:10: fatal error: rtems/bsd/bsd.h: No such
> file or
> > > directory
> > > >  #include 
> > > >   ^
> > >
> > > This error indicates it is looking for an installed rtems-libbsd. My
> > > guess is you need to build/install the rtems-libbsd to get this
> > > playground to work.
> > >
> >
> > I did not read everything in this thread, so maybe I misunderstand
> something.
> > If you want to build rtems-libbsd for a pc-based BSP, please be aware of
> the following:
> > - It should build fine if you use the 5-freebsd-12 branch.
> > - With master branch is should build if you set the option
> "dev_nic_e1000" to off in your buildset.ini. It should compile, but
> depending on your network adapter there might be problems to actually use
> the network devices.
> >
> > Finishing a patchset for the master branch to fix that is on my todo
> list, but I haven't come around to do it yet.
> >
> > > > compilation terminated.
> > > >
> > > /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
> > > RULES_BUILD:234: recipe for target 'rtems_init.o' failed
> > > > make[4]: *** [rtems_init.o] Error 1
> > > > make[4]: Leaving directory
> > > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
> > > libcom/RTEMS/O.RTEMS-pc386'
> > > >
> > > /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
> > > RULES_ARCHS:58: recipe for target 'install.RTEMS-pc386' failed
> > > > make[3]: *** [install.RTEMS-pc386] Error 2
> > > > make[3]: Leaving directory
> > > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
> > > libcom/RTEMS'
> > > >
> > > /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
> > > RULES_DIRS:84: recipe for target 'RTEMS.install' failed
> > > > make[2]: *** [RTEMS.install] Error 2
> > > > make[2]: Leaving directory
> > > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
> > > libcom'
> > > > ../configure/RULES_DIRS:84: recipe for target 'libcom.install' failed
> > > > make[1]: *** [libcom.install] Error 2
> > > > make[1]: Leaving directory
> > > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules'
> > > > configure/RULES_DIRS:84: recipe for target 'modules.install' failed
> > > > make: *** [modules.install] Error 2"
> > > >
> > > > Today's update is that I tried to fix the above error however I
> still have not
> > > been able to clear it.
> > > > If anyone has idea, please do tell what can be done.
> > > >
> > > > Thanks
> > > > Mritunjay
> > > >
> > > > On Wed, Jul 8, 2020 at 1:12 AM Mritunjay Sharma
> > >  wrote:
> > > >>
> > > >>
> > > >>
> > > >> 
> > > >> From: Heinz Junkes 
> > > >> Sent: Wednesday, July 8, 2020 1:05 AM
> > > 

Re: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5

2020-07-10 Thread Joel Sherrill
On Fri, Jul 10, 2020 at 5:14 PM Joel Sherrill  wrote:

> Wading in late but I thought I saw something that was contradictory:
>
> Build BSP with --enable-networking
> Code needs rtems-libbsd
>
> If the code needs rtems-libbsd, then you MUST build fill with
> --disable-networking.
>
> If EPICS code needs rtems-libbsd, that limits the number of BSPs that can
> be used but you need to always use libbsd.
>

Including  means it can't be built with the old network
stack as best I can tell:

 find rtems rtems-libbsd/ tools/5/sparc-rtems5/include/ -name termios.h
rtems-libbsd/freebsd-org/include/termios.h
rtems-libbsd/freebsd-org/sys/sys/termios.h
tools/5/sparc-rtems5/include/machine/termios.h
tools/5/sparc-rtems5/include/termios.h

Can sys/termios.h be changed to ? That would allow EPICS to
compile with both TCPIP stacks.

>
> --joel
>
> On Fri, Jul 10, 2020 at 3:37 PM Gedare Bloom  wrote:
>
>> On Fri, Jul 10, 2020 at 12:14 PM Mritunjay Sharma
>>  wrote:
>> >
>> > Apologies for the delay in response,
>> > It’s an important update that I want to give to my mentors that my
>> current development laptop showed some problems yesterday and which
>> worsened today.
>> >
>> > I have submitted my laptop for repair. The good thing is that I have
>> the backup of the work done till day and I have arranged a spare laptop as
>> well which will be available tomorrow.
>> >
>> > Configuring and setting up my laptop for the development may take a
>> couple of days and so I will like to request you all to kindly pardon my
>> inactivity for the next 2 days.
>> >
>>
>> Meanwhile, you may also think about reading/writing some more
>> documentation, or planning out your next steps.
>>
>> > I hope to be back active on Monday with everything set up on the new
>> laptop.
>> >
>> > Thanks
>> > Mritunjay
>> >
>> > Get Outlook for iOS
>> > 
>> > From: jan.som...@dlr.de 
>> > Sent: Thursday, July 9, 2020 12:43:30 PM
>> > To: ged...@rtems.org ; mritunjaysharma...@gmail.com <
>> mritunjaysharma...@gmail.com>
>> > Cc: rtems-de...@rtems.org 
>> > Subject: RE: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5
>> >
>> >
>> >
>> > > -Original Message-
>> > > From: devel [mailto:devel-boun...@rtems.org] On Behalf Of Gedare
>> Bloom
>> > > Sent: Wednesday, July 8, 2020 9:45 PM
>> > > To: Mritunjay Sharma
>> > > Cc: RTEMS Devel
>> > > Subject: Re: [GSoC 2020: Daily Update]: Building EPICS with RTEMS5
>> > >
>> > > On Wed, Jul 8, 2020 at 12:33 PM Mritunjay Sharma
>> > >  wrote:
>> > > >
>> > > > [UPDATE]: I tried to build the EPICS 7 with RTEMS 5 for pc386 with
>> Heinz's
>> > > https://github.com/hjunkes/epicsBaseOwnPlayground
>> > > > while switching to Branch "7". The previous errors are gone but I
>> am facing
>> > > the following error:
>> > > >
>> > > > "../posix/rtems_init.c:38:10: fatal error: rtems/bsd/bsd.h: No such
>> file or
>> > > directory
>> > > >  #include 
>> > > >   ^
>> > >
>> > > This error indicates it is looking for an installed rtems-libbsd. My
>> > > guess is you need to build/install the rtems-libbsd to get this
>> > > playground to work.
>> > >
>> >
>> > I did not read everything in this thread, so maybe I misunderstand
>> something.
>> > If you want to build rtems-libbsd for a pc-based BSP, please be aware
>> of the following:
>> > - It should build fine if you use the 5-freebsd-12 branch.
>> > - With master branch is should build if you set the option
>> "dev_nic_e1000" to off in your buildset.ini. It should compile, but
>> depending on your network adapter there might be problems to actually use
>> the network devices.
>> >
>> > Finishing a patchset for the master branch to fix that is on my todo
>> list, but I haven't come around to do it yet.
>> >
>> > > > compilation terminated.
>> > > >
>> > > /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
>> > > RULES_BUILD:234: recipe for target 'rtems_init.o' failed
>> > > > make[4]: *** [rtems_init.o] Error 1
>> > > > make[4]: Leaving directory
>> > > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
>> > > libcom/RTEMS/O.RTEMS-pc386'
>> > > >
>> > > /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
>> > > RULES_ARCHS:58: recipe for target 'install.RTEMS-pc386' failed
>> > > > make[3]: *** [install.RTEMS-pc386] Error 2
>> > > > make[3]: Leaving directory
>> > > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
>> > > libcom/RTEMS'
>> > > >
>> > > /home/mritunjay/development/EPICS/epicsBaseOwnPlayground/configure/
>> > > RULES_DIRS:84: recipe for target 'RTEMS.install' failed
>> > > > make[2]: *** [RTEMS.install] Error 2
>> > > > make[2]: Leaving directory
>> > > '/home/mritunjay/development/EPICS/epicsBaseOwnPlayground/modules/
>> > > libcom'
>> > > > ../configure/RULES_DIRS:84: recipe for target 'libcom.install'
>> failed
>> > > > make[1]: *** [libcom.install] Error 2
>> > > > make[1]: Leaving directory
>> > > '/home/mritunjay/development/EPI

Adding File descriptors to RTEMS

2020-07-10 Thread Eshan Dhawan
Hello everyone,
As a part of my GSOC project I will be adding file descriptors
List of some missing methods :
https://docs.google.com/document/d/1n-JOFUbFn6V1kViAGWsEGbVHL9MxlMyKP0BbZhEA1Rs/edit

Where will be the functions be added?
Also what would be a good starting point :)
-- 
Thanks
- Eshan
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] Tests for pthread_getcpuclockid method. Ticket:3891

2020-07-10 Thread Eshan dhawan
The test wont run as there are no support by clock_gettime

Signed-off-by: Eshan dhawan 
---
 testsuites/psxtests/Makefile.am   |   9 +
 testsuites/psxtests/configure.ac  |   1 +
 testsuites/psxtests/psxgetcpuclockid01/init.c | 204 ++
 .../psxgetcpuclockid01/psxgetcpuclockid01.doc |  23 ++
 .../psxgetcpuclockid01/psxgetcpuclockid01.scn |   4 +
 5 files changed, 241 insertions(+)
 create mode 100644 testsuites/psxtests/psxgetcpuclockid01/init.c
 create mode 100644 
testsuites/psxtests/psxgetcpuclockid01/psxgetcpuclockid01.doc
 create mode 100644 
testsuites/psxtests/psxgetcpuclockid01/psxgetcpuclockid01.scn

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 1f9e4233ec..7924bbea5d 100755
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -462,6 +462,15 @@ psxgetattrnp01_CPPFLAGS = $(AM_CPPFLAGS) 
$(TEST_FLAGS_psxgetattrnp01) \
$(support_includes) -I$(top_srcdir)/include
 endif
 
+if TEST_psxgetcpuclockid01
+psx_tests += psxgetcpuclockid01
+psx_screens += psxgetcpuclockid01/psxgetcpuclockid01.scn
+psx_docs += psxgetcpuclockid01/psxgetcpuclockid01.doc
+psxgetcpuclockid01_SOURCES = psxgetcpuclockid01/init.c
+psxgetcpuclockid01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxgetcpuclockid01) \
+   $(support_includes)
+endif
+
 if TEST_psxgetrusage01
 psx_tests += psxgetrusage01
 psx_screens += psxgetrusage01/psxgetrusage01.scn
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index 139787cccb..c509086abc 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -91,6 +91,7 @@ RTEMS_TEST_CHECK([psxfile01])
 RTEMS_TEST_CHECK([psxfile02])
 RTEMS_TEST_CHECK([psxfilelock01])
 RTEMS_TEST_CHECK([psxgetattrnp01])
+RTEMS_TEST_CHECK([psxgetcpuclockid01])
 RTEMS_TEST_CHECK([psxgetrusage01])
 RTEMS_TEST_CHECK([psxglobalcon01])
 RTEMS_TEST_CHECK([psxglobalcon02])
diff --git a/testsuites/psxtests/psxgetcpuclockid01/init.c 
b/testsuites/psxtests/psxgetcpuclockid01/init.c
new file mode 100644
index 00..4977a11290
--- /dev/null
+++ b/testsuites/psxtests/psxgetcpuclockid01/init.c
@@ -0,0 +1,204 @@
+/*
+ *  @file
+ *  @brief Test suite for getcpuclockid methods
+ */
+
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2020 embedded brains GmbH, Eshan Dhawan
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "tmacros.h"
+#include "test_support.h"
+
+const char rtems_test_name[] = "PSXGETCPUCLOCKID 1";
+
+/* Forward declaration to avoid warnings */
+void *POSIX_Init (void * argument);
+void *test_pthread(void *);
+
+static char buffer[512];
+
+static const T_action actions[] = {
+  T_report_hash_sha256,
+  T_check_task_context,
+  T_check_file_descriptors,
+  T_check_rtems_barriers,
+  T_check_rtems_extensions,
+  T_check_rtems_message_queues,
+  T_check_rtems_partitions,
+  T_check_rtems_periods,
+  T_check_rtems_regions,
+  T_check_rtems_semaphores,
+  T_check_rtems_tasks,
+  T_check_rtems_timers,
+  T_check_posix_keys
+};
+
+static const T_config config = {
+  .name = "psxgetcpuclockid1",
+  .buf = buffer,
+  .buf_size = sizeof(buffer),
+  .putchar = rtems_put_char,
+  .verbosity = T_VERBOSE,
+  .now = T_now_clock,
+  .action_count = T_ARRAY_SIZE(actions),
+  .actions = actions
+};
+
+/* test_pthread function begins */
+void *test_pthread(void *arg)
+{
+  int i;
+  /*do something*/
+  for( i = 0; i < 20; i++ );
+
+  pthread_exit(0);
+  return NULL;
+}
+
+/* init test function begins */

Re: [PATCH] Fix for Beaglebone BSP PWM bug

2020-07-10 Thread Chris Johns
On 5/7/20 8:43 pm, James Fitzsimons wrote:
> 
> I hope that patch is ok, that was my first time using git send-email.
> 

It looks OK to me but I would like Christian to approve it.

> This patch fixes a bug in the Beaglebone BSP where the register offsets for 
> the
> PWM outputs on header pins P9_14 and P9_16 are incorrectly calculated.
> 
> I'm about to start work on adding the QEP driver to the beaglebone BSP. Is 
> this
> list where should I ask questions on BSP changes (coding style, API design 
> etc),
> or should I do that on the users list?

Nice and thanks.

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


Need help in understanding some of the existing code in RTEMS

2020-07-10 Thread Richi Dubey
Hi,

I noticed that we have defined all the scheduler non entry-point functions
in https://git.rtems.org/rtems/tree/cpukit/score/src/scheduleredfsmp.c as
static inline, which makes them invisible inside the doxygen comments (
https://docs.rtems.org/doxygen/branches/master/scheduleredfsmp_8c.html).

Is there any reason why we choose to do so?

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