Re: [PATCH] eng: Add register block specification types

2021-09-13 Thread Chris Johns
On 13/9/21 4:38 pm, Sebastian Huber wrote:
> This approach is not limited to memory mapped register blocks.

I think it is.

I would like to understand how bus types other than "memory" are specified for a
generic device driver that needs to handle bus variability. I am concerned this
is bespoke to a limited range of devices and use cases. If this is the case lets
understand that.

I would be interested to see how the ns16550 driver would be specified and then
generated to match how it is currently used:

https://git.rtems.org/rtems/tree/bsps/shared/dev/serial/ns16550.c

Note, it is selected because it maps to IO instructions and memory mapped IO bus
architectures.

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


Re: [PATCH] eng: Add register block specification types

2021-09-13 Thread Sebastian Huber

On 13/09/2021 10:43, Chris Johns wrote:

On 13/9/21 4:38 pm, Sebastian Huber wrote:

This approach is not limited to memory mapped register blocks.

I think it is.

I would like to understand how bus types other than "memory" are specified for a
generic device driver that needs to handle bus variability. I am concerned this
is bespoke to a limited range of devices and use cases. If this is the case lets
understand that.

I would be interested to see how the ns16550 driver would be specified and then
generated to match how it is currently used:

https://git.rtems.org/rtems/tree/bsps/shared/dev/serial/ns16550.c

Note, it is selected because it maps to IO instructions and memory mapped IO bus
architectures.


The register block specification doesn't aim to solve the above problem. 
The goal is to specify the register blocks of a particular chip, for 
example the GR740. It is disconnected from a bus API or a device driver 
framework.


--
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

RSB

2021-09-13 Thread Joel Sherrill
Hi

If building a bset tar file, does it matter if the installation prefix
is writable?

../source-builder/sb-set-builder --bset-tar-file --log=l-i386.txt
--prefix=/rtems/tools 5/rtems-i386
RTEMS Source Builder - Set Builder, 5 (c7870f6e6199)
error: prefix is not writable: /rtems/tools

It does if you are planning to immediately install but if building for
later installation, I don't think it matters.

Thoughts?

--joel

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


[PATCH RSB v1 0/2] Update newlib for ILP32

2021-09-13 Thread Ryan Long
Hi,

These patches add some of the code that we are waiting for newlib to
pull.

Thanks,
Ryan

Ryan Long (2):
  rtems-gcc-10-newlib-head.cfg: Add newlib patch
  rtems-gcc-head-newlib-head.cfg: Add newlib patch

 rtems/config/tools/rtems-gcc-10-newlib-head.cfg   | 3 +++
 rtems/config/tools/rtems-gcc-head-newlib-head.cfg | 3 +++
 2 files changed, 6 insertions(+)

-- 
1.8.3.1

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


[PATCH RSB v1 1/2] rtems-gcc-10-newlib-head.cfg: Add newlib patch

2021-09-13 Thread Ryan Long
Adds patch to add sanitation to the padding of bits and size_t types for
AArch64 tools builds with newlib. These changes have been made in ARM, but
newlib has yet to pull them. This can be removed once newlib has pulled
the code.

Updates #4510
---
 rtems/config/tools/rtems-gcc-10-newlib-head.cfg | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rtems/config/tools/rtems-gcc-10-newlib-head.cfg 
b/rtems/config/tools/rtems-gcc-10-newlib-head.cfg
index 69c4fb5..c54ac52 100644
--- a/rtems/config/tools/rtems-gcc-10-newlib-head.cfg
+++ b/rtems/config/tools/rtems-gcc-10-newlib-head.cfg
@@ -13,6 +13,9 @@
 %patch add gcc -p1 
https://devel.rtems.org/raw-attachment/ticket/4215/0001-nios2-Remove-custom-instruction-warnings.patch
 %hash sha512 0001-nios2-Remove-custom-instruction-warnings.patch 
afd8a5e6bdcc5b75d5fbbf558bdf56ccac400521a6eec9d88cc95f6be67c481f2dbf8faa0f6ddc1e4ac7c56a84938714d80e46e9cf80ec4b8fcd739986449881
 
++%patch add newlib -p1 
https://devel.rtems.org/raw-attachment/ticket/4510/0001-aarch64-Add-ILP32-ABI-support-in-assembly.patch
++%hash sha512 0001-aarch64-Add-ILP32-ABI-support-in-assembly.patch 
BHRMimj6ztKPHQFxypI8RwPmno96B56eVQGx5dtCtcOb+qICMrQC1fa0jP3JrR8RGJI4y61RoYvpnj6EbTmRKA==
+
 %define newlib_version 4f81149
 %define newlib_external 1
 %define newlib_expand_name sourceware-mirror-newlib-cygwin-%{newlib_version}
-- 
1.8.3.1

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


[PATCH RSB v1 2/2] rtems-gcc-head-newlib-head.cfg: Add newlib patch

2021-09-13 Thread Ryan Long
Adds patch to add sanitation to the padding of bits and size_t types for
AArch64 tools builds with newlib. These changes have been made in ARM, but
newlib has yet to pull them. This can be removed once newlib has pulled
the code.

Updates #4510
---
 rtems/config/tools/rtems-gcc-head-newlib-head.cfg | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rtems/config/tools/rtems-gcc-head-newlib-head.cfg 
b/rtems/config/tools/rtems-gcc-head-newlib-head.cfg
index 4939ca5..fdb04d2 100644
--- a/rtems/config/tools/rtems-gcc-head-newlib-head.cfg
+++ b/rtems/config/tools/rtems-gcc-head-newlib-head.cfg
@@ -13,6 +13,9 @@
 %source set newlib --rsb-file=newlib-%{newlib_version}.tar.gz 
https://codeload.github.com/RTEMS/sourceware-mirror-newlib-cygwin/tar.gz/%{newlib_version}
 %hash sha512 newlib-%{newlib_version}.tar.gz 
9ded46b3077508ef05bbb4bf424777a0baa5aab9c7c0c902fb5529bb73b5b5034c35282e2dbf270cbcd44d84940a20ee270e329db4e4b501046978c18f78a11c
 
+%patch add newlib -p1 
https://devel.rtems.org/raw-attachment/ticket/4510/0001-aarch64-Add-ILP32-ABI-support-in-assembly.patch
+%hash sha512 0001-aarch64-Add-ILP32-ABI-support-in-assembly.patch 
BHRMimj6ztKPHQFxypI8RwPmno96B56eVQGx5dtCtcOb+qICMrQC1fa0jP3JrR8RGJI4y61RoYvpnj6EbTmRKA==
+
 %define with_threads 1
 %define with_plugin 0
 %define with_iconv 1
-- 
1.8.3.1

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


[PATCH v1] pxcdevctl: Adjust for standard

2021-09-13 Thread Ryan Long
psxdevctl is supposed to return the value in errno. Before, it was
returning -1 and setting errno. Changed the tests to reflect these
changes. Added code from RRADE's posix_devctl.c.

Closes #4506
---
 cpukit/libcsupport/src/posix_devctl.c  | 80 ++
 testsuites/psxtests/psxdevctl01/test.c | 69 +++--
 2 files changed, 118 insertions(+), 31 deletions(-)

diff --git a/cpukit/libcsupport/src/posix_devctl.c 
b/cpukit/libcsupport/src/posix_devctl.c
index 3ff9dd9..fd19074 100644
--- a/cpukit/libcsupport/src/posix_devctl.c
+++ b/cpukit/libcsupport/src/posix_devctl.c
@@ -35,6 +35,7 @@
 #include 
 
 #include  
+#include  
 
 int posix_devctl(
   int  fd,
@@ -44,6 +45,15 @@ int posix_devctl(
   int *__restrict  dev_info_ptr
 )
 {
+  int rv = 0;
+
+  /*
+   * posix_devctl() is supposed to return an errno. errno needs to be
+   * preserved in spite of calling methods (e.g., close, fcntl, and ioctl)
+   * that set it.
+   */
+  int errno_copy = errno;
+
   /*
* The POSIX 1003.26 standard allows for library implementations
* that implement posix_devctl() using ioctl(). In this case,
@@ -72,15 +82,69 @@ int posix_devctl(
   }
 
   /*
-   * The FACE Technical Standard Edition 3.0 and newer requires the SOCKCLOSE
-   * ioctl command. This is because the Security Profile does not include
-   * close() and applications need a way to close sockets. Closing sockets is
-   * a minimum requirement so using close() in the implementation meets that
-   * requirement but also lets the application close other file types.
+   *
*/
-  if (dcmd == SOCKCLOSE ) {
-return close(fd);
+  switch (dcmd) {
+
+/*
+ * The FACE Technical Standard Edition 3.0 and newer requires the SOCKCLOSE
+ * ioctl command. This is because the Security Profile does not include
+ * close() and applications need a way to close sockets. Closing sockets is
+ * a minimum requirement so using close() in the implementation meets that
+ * requirement but also lets the application close other file types.
+ */
+case SOCKCLOSE:
+  if (close(fd) != 0) {
+rv= errno;
+errno = errno_copy;
+
+return rv;
+  }
+  break;
+
+/*
+ * The FACE Technical Standard Edition 3.0 and newer requires the
+ * posix_devctl command to support the FIONBIO subcommand.
+ */
+case FIONBIO: {
+  int tmp_flag;
+  int flag;
+
+  if (nbyte != sizeof(int)) {
+return EINVAL;
+  }
+
+  tmp_flag = fcntl(fd, F_GETFL, 0);
+  if (tmp_flag == -1) {
+rv = errno;
+errno = errno_copy;
+
+return rv;
+  }
+
+  flag = *(int *)dev_data_ptr;
+
+  if (flag != 0) {
+tmp_flag |= O_NONBLOCK;
+  } else {
+tmp_flag &= ~O_NONBLOCK;
+  }
+
+  (void) fcntl(fd, F_SETFL, tmp_flag);
+  break;
+}
+
+default:
+  if (ioctl(fd, dcmd, dev_data_ptr) != 0) {
+rv = errno;
+errno = errno_copy;
+
+return rv;
+  }
+  break;
   }
 
-  return ioctl(fd, dcmd, dev_data_ptr);
+  errno = errno_copy;
+
+  return rv;
 }
diff --git a/testsuites/psxtests/psxdevctl01/test.c 
b/testsuites/psxtests/psxdevctl01/test.c
index b45725c..2fe7df1 100644
--- a/testsuites/psxtests/psxdevctl01/test.c
+++ b/testsuites/psxtests/psxdevctl01/test.c
@@ -53,37 +53,16 @@ int main(
   int dev_data;
   void   *dev_data_ptr;
   size_t  nbyte;
-  int dev_info;
 
   TEST_BEGIN();
 
-  puts( "posix_devctl() FIONBIO on stdin return dev_info -- EBADF" );
-  fd = 0;
-  dcmd = FIONBIO;
-  dev_data_ptr = &dev_data;
-  nbyte = sizeof(dev_data);
-  status = posix_devctl( fd, dcmd, dev_data_ptr, nbyte, &dev_info );
-  rtems_test_assert( status == -1 );
-  rtems_test_assert( errno == EBADF );
-  rtems_test_assert( dev_info == 0 );
-
-  puts( "posix_devctl() FIONBIO on stdin NULL dev_info -- EBADF" );
-  fd = 0;
-  dcmd = FIONBIO;
-  dev_data_ptr = NULL;
-  nbyte = 0;
-  status = posix_devctl( fd, dcmd, dev_data_ptr, nbyte, NULL );
-  rtems_test_assert( status == -1 );
-  rtems_test_assert( errno == EBADF );
-
   puts( "posix_devctl() SOCKCLOSE on invalid file descriptor -- EBADF" );
-  fd = 21;
+  fd = -1;
   dcmd = SOCKCLOSE;
   dev_data_ptr = NULL;
   nbyte = 0;
   status = posix_devctl( fd, dcmd, dev_data_ptr, nbyte, NULL );
-  rtems_test_assert( status == -1 );
-  rtems_test_assert( errno == EBADF );
+  rtems_test_assert( status == EBADF );
 
   /*
* Create a file, open it, and close it via posix_devctl().
@@ -102,6 +81,50 @@ int main(
   status = close( fd );
   rtems_test_assert( status == -1 );
   rtems_test_assert( errno == EBADF );
+
+  puts( "posix_devctl() FIONBIO with invalid nbyte -- EINVAL" );
+  fd = 0;
+  dcmd = FIONBIO;
+  dev_data_ptr = NULL;
+  nbyte = 0;
+  status = posix_devctl( fd, dcmd, dev_data_ptr, nbyte, NULL );
+  rtems_test_assert( status == EINVAL );
+
+  puts( "posix_devctl() FIONBIO with invalid file descriptor -- EBADF" );
+  fd 

[PATCH v1] pxcdevctl: Adjust for standard (5 branch)

2021-09-13 Thread Ryan Long
psxdevctl is supposed to return the value in errno. Before, it was
returning -1 and setting errno. Changed the tests to reflect these
changes. Added code from RRADE's posix_devctl.c.

Closes #4505
---
 cpukit/libcsupport/src/posix_devctl.c  | 80 ++
 testsuites/psxtests/psxdevctl01/test.c | 69 +++--
 2 files changed, 118 insertions(+), 31 deletions(-)

diff --git a/cpukit/libcsupport/src/posix_devctl.c 
b/cpukit/libcsupport/src/posix_devctl.c
index 3ff9dd9..d875895 100644
--- a/cpukit/libcsupport/src/posix_devctl.c
+++ b/cpukit/libcsupport/src/posix_devctl.c
@@ -35,6 +35,7 @@
 #include 
 
 #include  
+#include  
 
 int posix_devctl(
   int  fd,
@@ -44,6 +45,15 @@ int posix_devctl(
   int *__restrict  dev_info_ptr
 )
 {
+  int rv = 0;
+
+  /*
+   * posix_devctl() is supposed to return an errno. eerno needs to be
+   * preserved in spite of calling methods (e.g., close, fcntl, and ioctl)
+   * that set it.
+   */
+  int errno_copy = errno;
+
   /*
* The POSIX 1003.26 standard allows for library implementations
* that implement posix_devctl() using ioctl(). In this case,
@@ -72,15 +82,69 @@ int posix_devctl(
   }
 
   /*
-   * The FACE Technical Standard Edition 3.0 and newer requires the SOCKCLOSE
-   * ioctl command. This is because the Security Profile does not include
-   * close() and applications need a way to close sockets. Closing sockets is
-   * a minimum requirement so using close() in the implementation meets that
-   * requirement but also lets the application close other file types.
+   *
*/
-  if (dcmd == SOCKCLOSE ) {
-return close(fd);
+  switch (dcmd) {
+
+/*
+ * The FACE Technical Standard Edition 3.0 and newer requires the SOCKCLOSE
+ * ioctl command. This is because the Security Profile does not include
+ * close() and applications need a way to close sockets. Closing sockets is
+ * a minimum requirement so using close() in the implementation meets that
+ * requirement but also lets the application close other file types.
+ */
+case SOCKCLOSE:
+  if (close(fd) != 0) {
+rv = errno;
+errno = errno_copy;
+
+return rv;
+  }
+  break;
+
+/*
+ * The FACE Technical Standard Edition 3.0 and newer requires the
+ * posix_devctl command to support the FIONBIO subcommand.
+ */
+case FIONBIO: {
+  int tmp_flag;
+  int flag;
+
+  if (nbyte != sizeof(int)) {
+return EINVAL;
+  }
+
+  tmp_flag = fcntl(fd, F_GETFL, 0);
+  if (tmp_flag == -1) {
+rv = errno;
+errno = errno_copy;
+
+return rv;
+  }
+
+  flag = *(int *)dev_data_ptr;
+
+  if (flag != 0) {
+tmp_flag |= O_NONBLOCK;
+  } else {
+tmp_flag &= ~O_NONBLOCK;
+  }
+
+  (void) fcntl(fd, F_SETFL, tmp_flag);
+  break;
+}
+
+default:
+  if (ioctl(fd, dcmd, dev_data_ptr) != 0) {
+rv = errno;
+errno = errno_copy;
+
+return errno;
+  }
+  break;
   }
 
-  return ioctl(fd, dcmd, dev_data_ptr);
+  errno = errno_copy;
+
+  return rv;
 }
diff --git a/testsuites/psxtests/psxdevctl01/test.c 
b/testsuites/psxtests/psxdevctl01/test.c
index b45725c..2fe7df1 100644
--- a/testsuites/psxtests/psxdevctl01/test.c
+++ b/testsuites/psxtests/psxdevctl01/test.c
@@ -53,37 +53,16 @@ int main(
   int dev_data;
   void   *dev_data_ptr;
   size_t  nbyte;
-  int dev_info;
 
   TEST_BEGIN();
 
-  puts( "posix_devctl() FIONBIO on stdin return dev_info -- EBADF" );
-  fd = 0;
-  dcmd = FIONBIO;
-  dev_data_ptr = &dev_data;
-  nbyte = sizeof(dev_data);
-  status = posix_devctl( fd, dcmd, dev_data_ptr, nbyte, &dev_info );
-  rtems_test_assert( status == -1 );
-  rtems_test_assert( errno == EBADF );
-  rtems_test_assert( dev_info == 0 );
-
-  puts( "posix_devctl() FIONBIO on stdin NULL dev_info -- EBADF" );
-  fd = 0;
-  dcmd = FIONBIO;
-  dev_data_ptr = NULL;
-  nbyte = 0;
-  status = posix_devctl( fd, dcmd, dev_data_ptr, nbyte, NULL );
-  rtems_test_assert( status == -1 );
-  rtems_test_assert( errno == EBADF );
-
   puts( "posix_devctl() SOCKCLOSE on invalid file descriptor -- EBADF" );
-  fd = 21;
+  fd = -1;
   dcmd = SOCKCLOSE;
   dev_data_ptr = NULL;
   nbyte = 0;
   status = posix_devctl( fd, dcmd, dev_data_ptr, nbyte, NULL );
-  rtems_test_assert( status == -1 );
-  rtems_test_assert( errno == EBADF );
+  rtems_test_assert( status == EBADF );
 
   /*
* Create a file, open it, and close it via posix_devctl().
@@ -102,6 +81,50 @@ int main(
   status = close( fd );
   rtems_test_assert( status == -1 );
   rtems_test_assert( errno == EBADF );
+
+  puts( "posix_devctl() FIONBIO with invalid nbyte -- EINVAL" );
+  fd = 0;
+  dcmd = FIONBIO;
+  dev_data_ptr = NULL;
+  nbyte = 0;
+  status = posix_devctl( fd, dcmd, dev_data_ptr, nbyte, NULL );
+  rtems_test_assert( status == EINVAL );
+
+  puts( "posix_devctl() FIONBIO with invalid file descriptor -- EBADF" );
+  fd 

The compiler settings for Cortex-M4

2021-09-13 Thread Mr. Andrei Chichak
Hello,

I guess this is mostly a question for Sebastian.

While you were away, a bunch of us figured out that gcc for CM4 is using the 
wrong instruction set for multilib (?). 

Can you take a look at issue #4504 please?   (I’m pretty sure I didn’t express 
that correctly, but I have put all of the commands into the ticket)

Thank you,

Andrei



-
Andrei Chichak

Systems Developer
CBF Systems Inc.
225 College Plaza
8215 112 Street.
EDMONTON, ALBERTA
T6G 2C8
CANADA

Phone: 780-628-2072
Skype: andrei.chichak










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

Re: [PATCH 1/1] v3: Implemention of Condclockwait and Test

2021-09-13 Thread Joel Sherrill
On Wed, Aug 25, 2021 at 7:42 AM Matt Joyce  wrote:
>
> Added implementation of the pthread_cond_clockwait()
> method to cpukit/posix/src/condclockwait.c. Additional
> logic added to condwaitsupp.c to implement the new
> method. Pthread_cond_clockwait() has been added to the
> Issue 8 POSIX Standard.
>
> psxcond03 test added to testsuites/psxtests to test the
> newly added method.
> ---
>  cpukit/include/rtems/posix/condimpl.h |   9 +-
>  cpukit/posix/src/condclockwait.c  |  78 +++
>  cpukit/posix/src/condtimedwait.c  |   3 +-
>  cpukit/posix/src/condwait.c   |   1 +
>  cpukit/posix/src/condwaitsupp.c   | 118 -
>  spec/build/testsuites/psxtests/grp.yml|   2 +
>  spec/build/testsuites/psxtests/psxcond03.yml  |  20 +
>  testsuites/psxtests/Makefile.am   |   9 +
>  testsuites/psxtests/configure.ac  |   1 +
>  testsuites/psxtests/psxcond03/init.c  | 466 ++
>  testsuites/psxtests/psxcond03/psxcond03.doc   |  44 ++
>  testsuites/psxtests/psxcond03/psxcond03.scn   |   3 +
>  testsuites/psxtests/psxcond03/system.h|  61 +++
>  .../psxhdrs/pthread/pthread_cond_clockwait.c  |   2 +-
>  14 files changed, 791 insertions(+), 26 deletions(-)
>  create mode 100644 cpukit/posix/src/condclockwait.c
>  create mode 100644 spec/build/testsuites/psxtests/psxcond03.yml
>  create mode 100644 testsuites/psxtests/psxcond03/init.c
>  create mode 100644 testsuites/psxtests/psxcond03/psxcond03.doc
>  create mode 100644 testsuites/psxtests/psxcond03/psxcond03.scn
>  create mode 100644 testsuites/psxtests/psxcond03/system.h
>
> diff --git a/cpukit/include/rtems/posix/condimpl.h 
> b/cpukit/include/rtems/posix/condimpl.h
> index 66e09bf6d8..aa6e5c420e 100644
> --- a/cpukit/include/rtems/posix/condimpl.h
> +++ b/cpukit/include/rtems/posix/condimpl.h
> @@ -39,6 +39,8 @@ typedef struct {
>
>  #define POSIX_CONDITION_VARIABLES_MAGIC 0x18dfb1feUL
>
> +#define CLOCK_NOT_SPECIFIED 0xdeadbeef
> +
>  /**
>   *  Constant to indicate condition variable does not currently have
>   *  a mutex assigned to it.
> @@ -150,9 +152,10 @@ int _POSIX_Condition_variables_Signal_support(
>   * timed wait version of condition variable wait routines.
>   */
>  int _POSIX_Condition_variables_Wait_support(
> -  pthread_cond_t*cond,
> -  pthread_mutex_t   *mutex,
> -  const struct timespec *abstime
> +  pthread_cond_t*restrict cond,
> +  pthread_mutex_t  *restrict mutex,
> +  clockid_t   clock_id,
> +  const struct timespec   *restrict abstime

Are these lined up properly? They don't look like it in the patch.
>  );
>
>  bool _POSIX_Condition_variables_Auto_initialization(
> diff --git a/cpukit/posix/src/condclockwait.c 
> b/cpukit/posix/src/condclockwait.c
> new file mode 100644
> index 00..c2f071a749
> --- /dev/null
> +++ b/cpukit/posix/src/condclockwait.c
> @@ -0,0 +1,78 @@
> +/**
> + * @file
> + *
> + * @ingroup POSIXAPI
> + *
> + * @brief Waiting on a Condition
> + */
> +
> +/*
> +* Copyright (C) 2021 Matthew Joyce
> +*
> +* 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.
> +*/
> +
> +/* Defining to have access to function prototype in libc/include/pthread.h */
> +#define _GNU_SOURCE
> +
> +#ifdef HAVE_CONFIG_H
> +#include "config.h"
> +#endif
> +
> +#include 
> +#include 
> +
> +/*
> + *  pthread_cond_clockwait() appears in the Issue 8 POSIX Standard
> + */
> +int pthread_cond_clockwait(
> +  pthread_cond_t *restrict cond,
> +  pthread_mutex_t   *restrict mutex,
> +  clockid_tclock_id,
> +  const struct timespec*restrict abstime
> +)
> +{

Re: [PATCH v4] improve the format of error reporting on i386

2021-09-13 Thread Joel Sherrill
On Sun, Sep 12, 2021 at 7:02 PM zack leung  wrote:
>
> Thread id is now a Hex value.
> Updates #4203
> ---
> cpukit/score/cpu/i386/cpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
> index 77b7a7161c..06af57418d 100644
> --- a/cpukit/score/cpu/i386/cpu.c
> +++ b/cpukit/score/cpu/i386/cpu.c
> @@ -215,7 +215,7 @@ void _CPU_Exception_frame_print (const
> CPU_Exception_frame *ctx)
> {
> unsigned int faultAddr = 0;
> printk("--\n");
> - printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
> PRId32 "\n",
> + printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
> PRIx32 "\n",

PC and ID should use  PC 0x%08" PRIx32.

Prefixing with 0x to indicate that the number is hexadecimal. Printing
it with leading zero's and 8 digits wide helps since the address and
thread id are 32-bit (8 nibbles).  A thread id is usually printed like
0x0a010004

Does this patch have all your other changes? I've slept since seeing
this time and thought there were changes..

--joel

> ctx->idtIndex,
> ctx->eip,
> _Thread_Executing->Object.id);
> --
> 2.33.0
> ___
> 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: RSB

2021-09-13 Thread Chris Johns
On 13/9/21 11:20 pm, Joel Sherrill wrote:
> Hi
> 
> If building a bset tar file, does it matter if the installation prefix
> is writable?
> 
> ../source-builder/sb-set-builder --bset-tar-file --log=l-i386.txt
> --prefix=/rtems/tools 5/rtems-i386
> RTEMS Source Builder - Set Builder, 5 (c7870f6e6199)
> error: prefix is not writable: /rtems/tools
> 
> It does if you are planning to immediately install but if building for
> later installation, I don't think it matters.
> 
> Thoughts?

What happens if you add --no-install?

If this does help the question moves to if making a bset is packaging around an
install or is it the only output option?

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


Re: RSB

2021-09-13 Thread Joel Sherrill
On Mon, Sep 13, 2021 at 6:54 PM Chris Johns  wrote:
>
> On 13/9/21 11:20 pm, Joel Sherrill wrote:
> > Hi
> >
> > If building a bset tar file, does it matter if the installation prefix
> > is writable?
> >
> > ../source-builder/sb-set-builder --bset-tar-file --log=l-i386.txt
> > --prefix=/rtems/tools 5/rtems-i386
> > RTEMS Source Builder - Set Builder, 5 (c7870f6e6199)
> > error: prefix is not writable: /rtems/tools
> >
> > It does if you are planning to immediately install but if building for
> > later installation, I don't think it matters.
> >
> > Thoughts?
>
> What happens if you add --no-install?

It skips the test.

>
> If this does help the question moves to if making a bset is packaging around 
> an
> install or is it the only output option?

With a bset-tar, I don't think it did an install anyway. But it's been
a long day. I can
check again tomorrow if you want me to.

Thanks for the quick response.

--joel

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


Re: [PATCH v4] improve the format of error reporting on i386

2021-09-13 Thread zack leung
Gedare told me just to change the ID when I submitted the other I sent you
in discord. Sorry for things bouncing back and forth.

On Mon, 13 Sept 2021 at 23:44, Joel Sherrill  wrote:

> On Sun, Sep 12, 2021 at 7:02 PM zack leung 
> wrote:
> >
> > Thread id is now a Hex value.
> > Updates #4203
> > ---
> > cpukit/score/cpu/i386/cpu.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
> > index 77b7a7161c..06af57418d 100644
> > --- a/cpukit/score/cpu/i386/cpu.c
> > +++ b/cpukit/score/cpu/i386/cpu.c
> > @@ -215,7 +215,7 @@ void _CPU_Exception_frame_print (const
> > CPU_Exception_frame *ctx)
> > {
> > unsigned int faultAddr = 0;
> > printk("--\n");
> > - printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
> > PRId32 "\n",
> > + printk("Exception %" PRIu32 " caught at PC %" PRIx32 " by thread %"
> > PRIx32 "\n",
>
> PC and ID should use  PC 0x%08" PRIx32.
>
> Prefixing with 0x to indicate that the number is hexadecimal. Printing
> it with leading zero's and 8 digits wide helps since the address and
> thread id are 32-bit (8 nibbles).  A thread id is usually printed like
> 0x0a010004
>
> Does this patch have all your other changes? I've slept since seeing
> this time and thought there were changes..
>
> --joel
>
> > ctx->idtIndex,
> > ctx->eip,
> > _Thread_Executing->Object.id);
> > --
> > 2.33.0
> > ___
> > 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: The compiler settings for Cortex-M4

2021-09-13 Thread Sebastian Huber

Hello Andrei,

I modified the flags, could you please check if this fixed the problem?

--
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: [PATCH] c-user: Add "Cache Manager" chapter

2021-09-13 Thread Sebastian Huber

On 10/09/2021 10:49, Sebastian Huber wrote:

The Cache Manager directives are available via .  Document most
of them in the Classic API Guide.

Not documented are the following directive since the API is not yet
stable:

* rtems_cache_coherent_allocate()
* rtems_cache_coherent_free()
* rtems_cache_coherent_add_area()

Not documented are the following directive since the directives are not
implemented on maintained platforms:

* rtems_cache_freeze_data()
* rtems_cache_freeze_instruction()
* rtems_cache_unfreeze_data()
* rtems_cache_unfreeze_instruction()

Close #4513.
---
Here is the updated document for review:

https://ftp.rtems.org/pub/rtems/people/sebh/c-user.pdf


Any objections to add this new chapter?

--
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