Re: [PATCH v3 2/2] libtests/ofw01: Added a test for RTEMS OFW

2020-12-17 Thread Niteesh G. S.
ping.


On Fri, Dec 4, 2020 at 1:41 PM G S Niteesh Babu 
wrote:

> This commit adds a basic test that tests all the implemented
> RTEMS OFW functions.
> ---
>  spec/build/testsuites/libtests/grp.yml   |   2 +
>  spec/build/testsuites/libtests/ofw01.yml |  21 +++
>  testsuites/libtests/ofw01/init.c | 197 +++
>  testsuites/libtests/ofw01/ofw01.doc  |  29 
>  testsuites/libtests/ofw01/ofw01.scn  |   2 +
>  testsuites/libtests/ofw01/some.c |  72 +
>  testsuites/libtests/ofw01/some.dts   |  76 +
>  testsuites/libtests/ofw01/some.h |  15 ++
>  8 files changed, 414 insertions(+)
>  create mode 100644 spec/build/testsuites/libtests/ofw01.yml
>  create mode 100644 testsuites/libtests/ofw01/init.c
>  create mode 100644 testsuites/libtests/ofw01/ofw01.doc
>  create mode 100644 testsuites/libtests/ofw01/ofw01.scn
>  create mode 100644 testsuites/libtests/ofw01/some.c
>  create mode 100644 testsuites/libtests/ofw01/some.dts
>  create mode 100644 testsuites/libtests/ofw01/some.h
>
> diff --git a/spec/build/testsuites/libtests/grp.yml
> b/spec/build/testsuites/libtests/grp.yml
> index aff46c9f8f..82c2288e2f 100644
> --- a/spec/build/testsuites/libtests/grp.yml
> +++ b/spec/build/testsuites/libtests/grp.yml
> @@ -316,6 +316,8 @@ links:
>uid: write
>  - role: build-dependency
>uid: writev
> +- role: build-dependency
> +  uid: ofw01
>  type: build
>  use-after:
>  - rtemstest
> diff --git a/spec/build/testsuites/libtests/ofw01.yml
> b/spec/build/testsuites/libtests/ofw01.yml
> new file mode 100644
> index 00..8517c58bad
> --- /dev/null
> +++ b/spec/build/testsuites/libtests/ofw01.yml
> @@ -0,0 +1,21 @@
> +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> +build-type: test-program
> +cflags: []
> +copyrights:
> +- Copyright (C) 2020 Niteesh G S
> +cppflags: []
> +cxxflags: []
> +enabled-by: true
> +features: c cprogram
> +includes: []
> +ldflags:
> +- -Wl,--wrap=bsp_fdt_get
> +links: []
> +source:
> +- testsuites/libtests/ofw01/init.c
> +- testsuites/libtests/ofw01/some.c
> +stlib: []
> +target: testsuites/libtests/ofw01.exe
> +type: build
> +use-after: []
> +use-before: []
> diff --git a/testsuites/libtests/ofw01/init.c
> b/testsuites/libtests/ofw01/init.c
> new file mode 100644
> index 00..105c52c50e
> --- /dev/null
> +++ b/testsuites/libtests/ofw01/init.c
> @@ -0,0 +1,197 @@
> +/* SPDX-License-Identifier: BSD-2-Clause */
> +
> +/*
> + * Copyright (C) <2020> Niteesh G S 
> + *
> + * 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 "some.h"
> +
> +#define BUF_SIZE 100
> +
> +const char rtems_test_name[] = "OFW 01";
> +static const void *test_bin = NULL;
> +
> +const void *__wrap_bsp_fdt_get(void);
> +const void *__real_bsp_fdt_get(void);
> +
> +const void *__wrap_bsp_fdt_get(void)
> +{
> +  if (test_bin != NULL) {
> +return test_bin;
> +  }
> +
> +  return __real_bsp_fdt_get();
> +}
> +
> +static void Init(rtems_task_argument arg)
> +{
> +  int rv;
> +  phandle_t d;
> +  phandle_t l;
> +  phandle_t t;
> +  phandle_t c;
> +  phandle_t a;
> +  phandle_t b;
> +  phandle_t q;
> +  phandle_t root;
> +  phandle_t temp;
> +  uint32_t *arr;
> +  char buf[BUF_SIZE];
> +  char *bufp;
> +  ssize_t buf_len;
> +  rtems_ofw_memory_area reg;
> +  rtems_ofw_memory_area regs[2];
> +  rtems_vector_number intr;
> +  rtems_vector_number intrs[2];
> +  TEST_BEGIN();
> +  buf_len = sizeof(buf);
> +
> +  /*
> +   * Reinitializing the OFW API to use the test

MSYS2 build: header file missing

2020-12-17 Thread Robin Müller
Hi,

The RSB was updasted because there were some issues with GMP and I tested
whether this also fixed my MSYS2 build process for the RTEMS tools.

I now get a header file missing error when building newlib:


Making all in arm

In file included from
../../../../../../../../../../gnu-mirror-gcc-1cdad8b/newlib/libm/machine/arm/../../math/s_floor.c:65,

 from
../../../../../../../../../../gnu-mirror-gcc-1cdad8b/newlib/libm/machine/arm/s_floor.c:39:

../../../../../../../../../../gnu-mirror-gcc-1cdad8b/newlib/libm/machine/arm/../../../../newlib/libm/common/fdlibm.h:18:10:
fatal error: math_config.h: No such file or directory

   18 | #include "math_config.h"


I attached the tail of the RSB report. I will also try to build with
jobs=none, but did anyone have this issue before?

Kind Regards
Robin
Making all in arm

make[9]: Entering directory 
'/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/build/arm-rtems6/eb/thumb/armv7-r+fp/hard/newlib/libm/machine/arm'

/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/build/./gcc/xgcc
 
-B/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/build/./gcc/
 -nostdinc 
-B/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/build/arm-rtems6/eb/thumb/armv7-r+fp/hard/newlib/
 -isystem 
/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/build/arm-rtems6/eb/thumb/armv7-r+fp/hard/newlib/targ-include
 -isystem 
/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/gnu-mirror-gcc-1cdad8b/newlib/libc/include
 -B/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/arm-rtems6/bin/ 
-B/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/arm-rtems6/lib/ 
-isystem 
/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/arm-rtems6/include 
-isystem 
/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/arm-rtems6/sys-include 
 -mbig-endian -mthumb -march=armv7-r+fp -mfloat-abi=hard 
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" 
-DPACKAGE_VERSION=\"4.0.0\" -DPACKAGE_STRING=\"newlib\ 4.0.0\" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. 
-I../../../../../../../../../../gnu-mirror-gcc-1cdad8b/newlib/libm/machine/arm 
-I 
../../../../../../../../../../gnu-mirror-gcc-1cdad8b/newlib/libm/machine/arm/../../../../newlib/libm/common
 -fno-builtin -ffunction-sections -fdata-sections  -D_COMPILING_NEWLIB 
-DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED 
-DGETREENT_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP 
-DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC -D_NO_GETLOGIN -D_NO_GETPWENT 
-D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN 
-D_NO_POSIX_SPAWN -DHAVE_INIT_FINI  -g -O2  -mbig-endian -mthumb 
-march=armv7-r+fp -mfloat-abi=hard -c -o lib_a-e_sqrt.o `test -f 'e_sqrt.c' || 
echo 
'../../../../../../../../../../gnu-mirror-gcc-1cdad8b/newlib/libm/machine/arm/'`e_sqrt.c

/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/build/./gcc/xgcc
 
-B/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/build/./gcc/
 -nostdinc 
-B/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/build/arm-rtems6/eb/thumb/armv7-r+fp/hard/newlib/
 -isystem 
/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/build/arm-rtems6/eb/thumb/armv7-r+fp/hard/newlib/targ-include
 -isystem 
/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/gnu-mirror-gcc-1cdad8b/newlib/libc/include
 -B/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/arm-rtems6/bin/ 
-B/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/arm-rtems6/lib/ 
-isystem 
/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/arm-rtems6/include 
-isystem 
/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/arm-rtems6/sys-include 
 -mbig-endian -mthumb -march=armv7-r+fp -mfloat-abi=hard 
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" 
-DPACKAGE_VERSION=\"4.0.0\" -DPACKAGE_STRING=\"newlib\ 4.0.0\" 
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. 
-I../../../../../../../../../../gnu-mirror-gcc-1cdad8b/newlib/libm/machine/arm 
-I 
../../../../../../../../../../gnu-mirror-gcc-1cdad8b/newlib/libm/machine/arm/../../../../newlib/libm/common
 -fno-builtin -ffunction-sections -fdata-sections  -D_COMPILING_NEWLIB 
-DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED 
-DGETREENT_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP 
-DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC -D_NO_GETLOGIN -D_NO_GETPWENT 
-D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN 
-D_NO_POSIX_SPAWN -DHAVE_INIT_FINI  -g -O2  -mbig-endian -mthumb 
-march=armv7-r+fp -mfloat-abi=hard -c -o lib_a-ef_sqrt.o `test -f 'ef_sqrt.c' 
|| echo 
'../../../../../../../../../../gnu-mirror-gcc-1cdad8b/newlib/libm/machine/arm/'`ef_sqrt.c

/c/Users/Robin/Documents/RTEMS/rtems-tools/src/rsb/rtems/build/arg1n6xwm1/build/./gcc/xgcc
 
-

Re: [rtems-docs commit] c-user: Generate Timer Manager documentation

2020-12-17 Thread Sebastian Huber

On 16/12/2020 00:30, Chris Johns wrote:


I am with Gedare and prefer we all engage in a solution to cross-links in the
documentation. Maybe that can be a separate topic from the links here and we
separate the issue into cross-links and these links. I am sure these links may
appear in places outside of the documentation.

I suggest we provide a bug page link.

I can change the link as soon as we have a bug page link.

The regeneration link is much harder.
Could it be explained in words and we avoid a link 

   For information on updating and regenerating please refer to the
   How To section of the Software Engineering Manual. The Software
   Engineering Manual is provided as a part of a release. For development
   sources please refer to the online development documentation at
   https://docs.rtems.org.

For a user this is more work compared to just going to:

https://docs.rtems.org/branches/master/eng/req/howto.html

This URL has a clear and generic structure. I don't understand why this link 
should change. What is the benefit and need to change this structure? There are 
probably links outside the RTEMS Project which refer to the documents on 
docs.rtems.org. Anyway, if you want to change the text, I change it.

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/

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

Re: Report on failing tests with thread stack protection and their resolution.

2020-12-17 Thread Sebastian Huber

Hello,

On 03/12/2020 01:53, Utkarsh Rai wrote:

+rtems_status_code _Memory_protection_Disable( void )
+{
+  uint32_t access_flags;
+
+  access_flags = translate_flags(  RTEMS_READ_WRITE );
+
+  _Thread_Iterate( set_memory_flags, &access_flags );
+
+  return RTEMS_SUCCESSFUL;
 }
using _Thread_Iterate() for this is quite bad in terms of performance 
and it may also lead to unpredictable behaviour.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/

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

Re: [rtems-docs commit] c-user: Generate Timer Manager documentation

2020-12-17 Thread Chris Johns
On 18/12/20 1:49 am, Sebastian Huber wrote:
> On 16/12/2020 00:30, Chris Johns wrote:
>> I am with Gedare and prefer we all engage in a solution to cross-links in the
>> documentation. Maybe that can be a separate topic from the links here and we
>> separate the issue into cross-links and these links. I am sure these links 
>> may
>> appear in places outside of the documentation.
>>
>> I suggest we provide a bug page link.
> I can change the link as soon as we have a bug page link.
>> The regeneration link is much harder.
>> Could it be explained in words and we avoid a link 
>>
>>    For information on updating and regenerating please refer to the
>>    How To section of the Software Engineering Manual. The Software
>>    Engineering Manual is provided as a part of a release. For development
>>    sources please refer to the online development documentation at
>>    https://docs.rtems.org.
> For a user this is more work compared to just going to:
> 
> https://docs.rtems.org/branches/master/eng/req/howto.html
> 
> This URL has a clear and generic structure. I don't understand why this link
> should change. What is the benefit and need to change this structure? There 
> are
> probably links outside the RTEMS Project which refer to the documents on
> docs.rtems.org. Anyway, if you want to change the text, I change it.

Consider RTEMS 5, it has no generated source and now we do. What went before is
now replaced. The project changes and evolves. I cannot provide you with a
reason on how to why it might change but I know if it does this link in a
released RTEMS 6 (7,8,9..) breaks.

The link is not suitable. I am asking for an agreed solution on now we change 
this.

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

Re: Report on failing tests with thread stack protection and their resolution.

2020-12-17 Thread Utkarsh Rai
On Thu, Dec 17, 2020 at 8:23 PM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> Hello,
>
> On 03/12/2020 01:53, Utkarsh Rai wrote:
> > +rtems_status_code _Memory_protection_Disable( void )
> > +{
> > +  uint32_t access_flags;
> > +
> > +  access_flags = translate_flags(  RTEMS_READ_WRITE );
> > +
> > +  _Thread_Iterate( set_memory_flags, &access_flags );
> > +
> > +  return RTEMS_SUCCESSFUL;
> >  }
> using _Thread_Iterate() for this is quite bad in terms of performance
> and it may also lead to unpredictable behaviour.
>

Yes,  this is wrong. Simply disabling the protection for just 'the_thread'
should be sufficient in our case.


>
> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.hu...@embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: MSYS2 build: header file missing

2020-12-17 Thread Sebastian Huber

Hello Robin,

my experience over the years with MSYS2 is that building GCC is always 
painful and a waste of time. What works quite reliably is building the 
RTEMS tools with a i686-w64-mingw32 cross-compiler on Linux. Most 
distributions include a standard package for this.


Since all parts of RTEMS build now with waf I think it is possible to 
build RTEMS applications on Windows without having to install 
MSYS2/MinGW. It should work with only a Python installation, but I 
haven't tested this yet.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/

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