Re: Build failure for realview_pbx_a9_qemu_smp BSP

2016-04-14 Thread Sebastian Huber



On 13/04/16 00:29, Darshit Shah wrote:
make[6]: Entering directory 
'/home/thedoctor/Programming/rtems/builds/realview_pbx_a9_qemu_smp/arm-rtems4.12/c/atsamv/testsuites/samples/hello'


Looks you build the atsamv BSP with --enable-smp. What is your configure 
command line?


The realview_pbx_a9_qemu_smp is currently broken due to a problem of the 
clock driver initialization on Qemu.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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


Re: Build failure for realview_pbx_a9_qemu_smp BSP

2016-04-14 Thread Sebastian Huber



On 14/04/16 10:15, Darshit Shah wrote:

On 04/14, Sebastian Huber wrote:



On 13/04/16 00:29, Darshit Shah wrote:
make[6]: Entering directory 
'/home/thedoctor/Programming/rtems/builds/realview_pbx_a9_qemu_smp/arm-rtems4.12/c/atsamv/testsuites/samples/hello'


Looks you build the atsamv BSP with --enable-smp. What is your 
configure command line?


Yes. I am building it with --enable-smp. My configure line is:

./configure \
--target=arm-rtems4.12 \
--prefix="$HOME/Programming/rtems/4.12" \
--enable-maintainer-mode \
--enable-tests \
--enable-smp 


This builds all ARM BSPs. Add 
"--enable-rtemsbsp=realview_pbx_a9_qemu_smp" to build only the 
realview_pbx_a9_qemu_smp BSP. This will save you a lot of time and disk 
space.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

Re: Build failure for realview_pbx_a9_qemu_smp BSP

2016-04-14 Thread Darshit Shah

On 04/14, Sebastian Huber wrote:



On 13/04/16 00:29, Darshit Shah wrote:

make[6]: Entering directory 
'/home/thedoctor/Programming/rtems/builds/realview_pbx_a9_qemu_smp/arm-rtems4.12/c/atsamv/testsuites/samples/hello'


Looks you build the atsamv BSP with --enable-smp. What is your 
configure command line?


Yes. I am building it with --enable-smp. My configure line is:

./configure \
--target=arm-rtems4.12 \
--prefix="$HOME/Programming/rtems/4.12" \
--enable-maintainer-mode \
--enable-tests \
--enable-smp



The realview_pbx_a9_qemu_smp is currently broken due to a problem of 
the clock driver initialization on Qemu.


Aah. Though I wonder why only the tests fail to compile.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



--
Thanking You,
Darshit Shah


signature.asc
Description: PGP signature
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] arm: mx6ulevk: Initial BSP support for i.MX 6UltraLite EVK board.

2016-04-14 Thread Peng Fan
Initial BSP support for i.MX 6UltraLite EVK board.
Add uart driver
Add gpt driver to service tick function

The i.MX 6UltraLite is a high performance, ultra-efficient processor
family featuring an advanced implementation of a single ARM® Cortex®-A7
core, which operates at speeds up to 528 MHz. The i.MX 6UltraLite
applications processor includes an integrated power management module
that reduces the complexity of external power supply and simplifies
power sequencing.

Now, clock management module and pinmux module not added,
so relies the setting in U-Boot.
---
 c/src/lib/libbsp/arm/acinclude.m4  |   2 +
 c/src/lib/libbsp/arm/mx6ulevk/Makefile.am  | 139 +
 c/src/lib/libbsp/arm/mx6ulevk/README   |  28 
 c/src/lib/libbsp/arm/mx6ulevk/bsp_specs|  13 ++
 c/src/lib/libbsp/arm/mx6ulevk/configure.ac |  34 +
 .../libbsp/arm/mx6ulevk/console/console-config.c   |  82 +++
 c/src/lib/libbsp/arm/mx6ulevk/console/imx-uart.c   | 131 
 c/src/lib/libbsp/arm/mx6ulevk/gpt.c| 164 +
 c/src/lib/libbsp/arm/mx6ulevk/include/bsp.h| 121 +++
 c/src/lib/libbsp/arm/mx6ulevk/include/imx6-gpt.h   |  48 ++
 c/src/lib/libbsp/arm/mx6ulevk/include/imx6-uart.h  |  60 
 c/src/lib/libbsp/arm/mx6ulevk/include/irq.h|  38 +
 c/src/lib/libbsp/arm/mx6ulevk/include/tm27.h   |  24 +++
 .../libbsp/arm/mx6ulevk/make/custom/mx6ulevk.cfg   |   9 ++
 c/src/lib/libbsp/arm/mx6ulevk/preinstall.am| 151 +++
 c/src/lib/libbsp/arm/mx6ulevk/startup/bspreset.c   |  24 +++
 c/src/lib/libbsp/arm/mx6ulevk/startup/bspstart.c   |  25 
 .../libbsp/arm/mx6ulevk/startup/bspstarthooks.c|  70 +
 .../libbsp/arm/mx6ulevk/startup/linkcmds.mx6ulevk  |  48 ++
 19 files changed, 1211 insertions(+)
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/Makefile.am
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/README
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/bsp_specs
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/configure.ac
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/console/console-config.c
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/console/imx-uart.c
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/gpt.c
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/include/bsp.h
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/include/imx6-gpt.h
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/include/imx6-uart.h
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/include/irq.h
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/include/tm27.h
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/make/custom/mx6ulevk.cfg
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/preinstall.am
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/startup/bspreset.c
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/startup/bspstart.c
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/startup/bspstarthooks.c
 create mode 100644 c/src/lib/libbsp/arm/mx6ulevk/startup/linkcmds.mx6ulevk

diff --git a/c/src/lib/libbsp/arm/acinclude.m4 
b/c/src/lib/libbsp/arm/acinclude.m4
index f5ca105..c15dc82 100644
--- a/c/src/lib/libbsp/arm/acinclude.m4
+++ b/c/src/lib/libbsp/arm/acinclude.m4
@@ -26,6 +26,8 @@ AC_DEFUN([RTEMS_CHECK_BSPDIR],
 AC_CONFIG_SUBDIRS([lpc24xx]);;
   lpc32xx )
 AC_CONFIG_SUBDIRS([lpc32xx]);;
+  mx6ulevk )
+AC_CONFIG_SUBDIRS([mx6ulevk]);;
   raspberrypi )
 AC_CONFIG_SUBDIRS([raspberrypi]);;
   realview-pbx-a9 )
diff --git a/c/src/lib/libbsp/arm/mx6ulevk/Makefile.am 
b/c/src/lib/libbsp/arm/mx6ulevk/Makefile.am
new file mode 100644
index 000..517b524
--- /dev/null
+++ b/c/src/lib/libbsp/arm/mx6ulevk/Makefile.am
@@ -0,0 +1,139 @@
+##
+#
+# @file
+#
+# @brief Makefile of libBSP for the i.MX 6UltraLite EVK platform (Cortex-A7).
+#
+
+ACLOCAL_AMFLAGS = -I ../../../../aclocal
+
+include $(top_srcdir)/../../../../automake/compile.am
+
+include_bspdir = $(includedir)/bsp
+include_libcpudir = $(includedir)/libcpu
+
+dist_project_lib_DATA = bsp_specs
+
+###
+#  Header #
+###
+
+include_HEADERS = include/bsp.h
+include_HEADERS += ../../shared/include/tm27.h
+
+nodist_include_HEADERS = ../../shared/include/coverhd.h \
+   include/bspopts.h
+
+nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
+
+include_bsp_HEADERS =
+include_bsp_HEADERS += ../../shared/include/utility.h
+include_bsp_HEADERS += ../../shared/include/irq-generic.h
+include_bsp_HEADERS += ../../shared/include/irq-info.h
+include_bsp_HEADERS += ../../shared/include/stackalloc.h
+include_bsp_HEADERS += ../../shared/include/uart-output-char.h
+include_bsp_HEADERS += ../shared/include/arm-a8core-start.h
+include_bsp_HEADERS += ../shared/include/arm-cp15-start.

[PATCH 03/18] Add BSD guard for ino_t in

2016-04-14 Thread Sebastian Huber
Introduce internal type __ino_t.

Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h   |  9 +
 newlib/libc/include/sys/types.h| 10 +++---
 newlib/libc/sys/rtems/include/machine/_types.h |  3 +++
 winsup/cygwin/include/cygwin/types.h   |  8 
 winsup/cygwin/include/machine/_types.h |  4 
 5 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index ebd4943..ad322b1 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -47,6 +47,15 @@ typedef unsigned short __gid_t;
 typedef __pid_t __id_t;
 #endif
 
+#ifndef __machine_ino_t_defined
+#if (defined(__i386__) && (defined(GO32) || defined(__MSDOS__))) || \
+defined(__sparc__) || defined(__SPU__)
+typedef unsigned long __ino_t;
+#else
+typedef unsigned short __ino_t;
+#endif
+#endif
+
 #ifndef __machine_off64_t_defined
 __extension__ typedef long long _off64_t;
 #endif
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index d093578..2bf9eb5 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -139,14 +139,10 @@ typedef   __id_t  id_t;   /* can hold a 
uid_t or pid_t */
 #define_ID_T_DECLARED
 #endif
 
-#ifndef __CYGWIN__
-#if defined(__MS_types__) || defined(__rtems__) || \
-defined(__sparc__) || defined(__SPU__)
-typedefunsigned long   ino_t;
-#else
-typedefunsigned short  ino_t;
+#ifndef _INO_T_DECLARED
+typedef__ino_t ino_t;  /* inode number */
+#define_INO_T_DECLARED
 #endif
-#endif /*__CYGWIN__*/
 
 #ifdef __MS_types__
 typedef unsigned long vm_offset_t;
diff --git a/newlib/libc/sys/rtems/include/machine/_types.h 
b/newlib/libc/sys/rtems/include/machine/_types.h
index f17d281..76a6841 100644
--- a/newlib/libc/sys/rtems/include/machine/_types.h
+++ b/newlib/libc/sys/rtems/include/machine/_types.h
@@ -19,6 +19,9 @@ typedef   __int32_t   _off_t;
 typedef_off_t  _fpos_t;
 #define__machine_fpos_t_defined
 
+typedefunsigned long   __ino_t;
+#define__machine_ino_t_defined
+
 typedef__uint32_t  _mode_t;
 #define__machine_mode_t_defined
 
diff --git a/winsup/cygwin/include/cygwin/types.h 
b/winsup/cygwin/include/cygwin/types.h
index bfffc5d..c785fb2 100644
--- a/winsup/cygwin/include/cygwin/types.h
+++ b/winsup/cygwin/include/cygwin/types.h
@@ -57,14 +57,6 @@ typedef unsigned long fsblkcnt_t;
 typedef unsigned long fsfilcnt_t;
 #endif /* __fsfilcnt_t_defined */
 
-#ifndef __ino_t_defined
-#define __ino_t_defined
-#ifndef __x86_64__
-typedef __uint32_t __ino32_t;
-#endif
-typedef __uint64_t ino_t;
-#endif /*__ino_t_defined*/
-
 #if defined (__INSIDE_CYGWIN__) && !defined (__x86_64__)
 struct __flock32 {
shortl_type;/* F_RDLCK, F_WRLCK, or F_UNLCK */
diff --git a/winsup/cygwin/include/machine/_types.h 
b/winsup/cygwin/include/machine/_types.h
index 1dfe442..861a0fb 100644
--- a/winsup/cygwin/include/machine/_types.h
+++ b/winsup/cygwin/include/machine/_types.h
@@ -9,6 +9,7 @@
 typedef __int16_t  __dev16_t;
 typedef __uint16_t __uid16_t;
 typedef __uint16_t __gid16_t;
+typedef __uint32_t __ino32_t;
 #endif
 
 #define __machine_dev_t_defined
@@ -23,6 +24,9 @@ typedef __uint32_t __gid_t;
 #define __machine_id_t_defined
 typedef __uint32_t __id_t;
 
+#define __machine_ino_t_defined
+typedef __uint64_t __ino_t;
+
 #define __machine_key_t_defined
 typedef long long __key_t;
 
-- 
1.8.4.5

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


[PATCH 07/18] Add BSD guard for clockid_t

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h | 4 +++-
 newlib/libc/include/sys/types.h  | 7 ---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index ead18cb..ba112f5 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -151,7 +151,9 @@ typedef _CLOCK_T_   __clock_t;
 #define_TIME_T_long/* time() */
 typedef_TIME_T___time_t;
 
-#define _CLOCKID_T_unsigned long
+#define_CLOCKID_T_ unsigned long
+typedef_CLOCKID_T_ __clockid_t;
+
 #define _TIMER_T_  unsigned long
 
 typedeflong__suseconds_t;  /* microseconds (signed) */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 2338cf5..f8db419 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -191,9 +191,10 @@ typedef__mode_tmode_t; /* permissions 
*/
 
 typedef unsigned short nlink_t;
 
-#ifndef __clockid_t_defined
-typedef _CLOCKID_T_ clockid_t;
-#define __clockid_t_defined
+#if !defined(__clockid_t_defined) && !defined(_CLOCKID_T_DECLARED)
+typedef__clockid_t clockid_t;
+#define__clockid_t_defined
+#define_CLOCKID_T_DECLARED
 #endif
 
 #ifndef __timer_t_defined
-- 
1.8.4.5

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


[PATCH 02/18] Provide POSIX defined id_t in

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h   | 4 
 newlib/libc/include/sys/types.h| 5 +
 winsup/cygwin/include/cygwin/types.h   | 6 --
 winsup/cygwin/include/machine/_types.h | 3 +++
 4 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 762dfed..ebd4943 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -43,6 +43,10 @@ typedef unsigned short __uid_t;
 typedef unsigned short __gid_t;
 #endif
 
+#ifndef __machine_id_t_defined
+typedef __pid_t __id_t;
+#endif
+
 #ifndef __machine_off64_t_defined
 __extension__ typedef long long _off64_t;
 #endif
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 316ee9a..d093578 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -134,6 +134,11 @@ typedefchar *  caddr_t;
 #define __caddr_t_defined
 #endif
 
+#ifndef _ID_T_DECLARED
+typedef__id_t  id_t;   /* can hold a uid_t or pid_t */
+#define_ID_T_DECLARED
+#endif
+
 #ifndef __CYGWIN__
 #if defined(__MS_types__) || defined(__rtems__) || \
 defined(__sparc__) || defined(__SPU__)
diff --git a/winsup/cygwin/include/cygwin/types.h 
b/winsup/cygwin/include/cygwin/types.h
index f9ed4b6..bfffc5d 100644
--- a/winsup/cygwin/include/cygwin/types.h
+++ b/winsup/cygwin/include/cygwin/types.h
@@ -65,12 +65,6 @@ typedef __uint32_t __ino32_t;
 typedef __uint64_t ino_t;
 #endif /*__ino_t_defined*/
 
-/* Generic ID type, must match at least pid_t, uid_t and gid_t in size. */
-#ifndef __id_t_defined
-#define __id_t_defined
-typedef __uint32_t id_t;
-#endif /* __id_t_defined */
-
 #if defined (__INSIDE_CYGWIN__) && !defined (__x86_64__)
 struct __flock32 {
shortl_type;/* F_RDLCK, F_WRLCK, or F_UNLCK */
diff --git a/winsup/cygwin/include/machine/_types.h 
b/winsup/cygwin/include/machine/_types.h
index 50e704b..1dfe442 100644
--- a/winsup/cygwin/include/machine/_types.h
+++ b/winsup/cygwin/include/machine/_types.h
@@ -20,6 +20,9 @@ typedef __uint32_t __uid_t;
 #define __machine_gid_t_defined
 typedef __uint32_t __gid_t;
 
+#define __machine_id_t_defined
+typedef __uint32_t __id_t;
+
 #define __machine_key_t_defined
 typedef long long __key_t;
 
-- 
1.8.4.5

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


[PATCH 06/18] Add BSD guard for time_t

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_timespec.h| 3 ++-
 newlib/libc/include/sys/_timeval.h | 3 ++-
 newlib/libc/include/sys/_types.h   | 4 +++-
 newlib/libc/include/sys/timeb.h| 7 ---
 newlib/libc/include/sys/types.h| 7 ---
 newlib/libc/sys/sparc64/sys/_timeval.h | 7 ---
 6 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/newlib/libc/include/sys/_timespec.h 
b/newlib/libc/include/sys/_timespec.h
index 4a7aabc..7609e4a 100644
--- a/newlib/libc/include/sys/_timespec.h
+++ b/newlib/libc/include/sys/_timespec.h
@@ -36,9 +36,10 @@
 
 #include 
 
-#ifndef __time_t_defined
+#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
 typedef_TIME_T_time_t;
 #define__time_t_defined
+#define_TIME_T_DECLARED
 #endif
 
 struct timespec {
diff --git a/newlib/libc/include/sys/_timeval.h 
b/newlib/libc/include/sys/_timeval.h
index d813d1f..676a0b8 100644
--- a/newlib/libc/include/sys/_timeval.h
+++ b/newlib/libc/include/sys/_timeval.h
@@ -36,9 +36,10 @@ typedef  __suseconds_t   suseconds_t;
 #define_SUSECONDS_T_DECLARED
 #endif
 
-#ifndef __time_t_defined
+#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
 typedef_TIME_T_time_t;
 #define__time_t_defined
+#define_TIME_T_DECLARED
 #endif
 
 /* This define is also used outside of Newlib, e.g. in MinGW-w64 */
diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 0f5cb9d..ead18cb 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -148,7 +148,9 @@ typedef void *_iconv_t;
 #define_CLOCK_T_   unsigned long   /* clock() */
 typedef_CLOCK_T_   __clock_t;
 
-#define_TIME_T_long/* time() */
+#define_TIME_T_long/* time() */
+typedef_TIME_T___time_t;
+
 #define _CLOCKID_T_unsigned long
 #define _TIMER_T_  unsigned long
 
diff --git a/newlib/libc/include/sys/timeb.h b/newlib/libc/include/sys/timeb.h
index 2647830..793b481 100644
--- a/newlib/libc/include/sys/timeb.h
+++ b/newlib/libc/include/sys/timeb.h
@@ -17,9 +17,10 @@ extern "C" {
 #include <_ansi.h>
 #include 
 
-#ifndef __time_t_defined
-typedef _TIME_T_ time_t;
-#define __time_t_defined
+#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
+typedef_TIME_T_time_t;
+#define__time_t_defined
+#define_TIME_T_DECLARED
 #endif
 
 struct timeb
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index f17821b..2338cf5 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -102,9 +102,10 @@ typedef_CLOCK_T_   clock_t;
 #define_CLOCK_T_DECLARED
 #endif
 
-#ifndef __time_t_defined
-typedef _TIME_T_ time_t;
-#define __time_t_defined
+#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
+typedef_TIME_T_time_t;
+#define__time_t_defined
+#define_TIME_T_DECLARED
 #endif
 
 #ifndef __daddr_t_defined
diff --git a/newlib/libc/sys/sparc64/sys/_timeval.h 
b/newlib/libc/sys/sparc64/sys/_timeval.h
index fbe9ce6..b0aaeda 100644
--- a/newlib/libc/sys/sparc64/sys/_timeval.h
+++ b/newlib/libc/sys/sparc64/sys/_timeval.h
@@ -3,9 +3,10 @@
 
 #include 
 
-#ifndef __time_t_defined
-typedef _TIME_T_time_t;
-#define __time_t_defined
+#if !defined(__time_t_defined) && !defined(_TIME_T_DECLARED)
+typedef_TIME_T_time_t;
+#define__time_t_defined
+#define_TIME_T_DECLARED
 #endif
 
 #ifdef __cplusplus
-- 
1.8.4.5

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


[PATCH 16/18] Include in

2016-04-14 Thread Sebastian Huber
Include  in  if __BSD_VISIBLE for BSD
compatibility.  This is in line with glibc .

Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/types.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index f02f170..57b74ef 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -62,6 +62,7 @@ typedef   quad_t *qaddr_t;
 # include 
 
 #if __BSD_VISIBLE
+#include 
 #include 
 #  define  physadr physadr_t
 #  define  quadquad_t
-- 
1.8.4.5

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


[PATCH 01/18] Use __machine_*_t_defined for internal types

2016-04-14 Thread Sebastian Huber
Newlib defines defaults for internal types via  and uses
 to let targets define their own type if necessary.

Previously for example

#ifndef __dev_t_defined
typedef short __dev_t;
#endif

However, the __*_t_defined pattern conflicts with the glibc type guard
pattern for user types, e.g. dev_t in this example.  Introduce a
__machine_*_t_defined pattern for internal types (defined by
, used by ).  For example

#ifndef __machine_dev_t_defined
typedef short __dev_t;
#endif

Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h   | 38 --
 newlib/libc/machine/aarch64/machine/_types.h   |  2 +-
 newlib/libc/machine/spu/machine/_types.h   | 10 +++
 newlib/libc/stdlib/local.h |  2 +-
 newlib/libc/sys/rtems/include/machine/_types.h | 38 ++
 winsup/cygwin/include/machine/_types.h |  8 +++---
 6 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index c12eca3..762dfed 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -2,8 +2,18 @@
 
 /* This file defines various typedefs needed by the system calls that support
the C library.  Basically, they're just the POSIX versions with an '_'
-   prepended.  This file lives in the `sys' directory so targets can provide
-   their own if desired (or they can put target dependant conditionals here).
+   prepended.  Targets shall use  to define their own
+   internal types if desired.
+
+   There are three define patterns used for type definitions.  Lets assume
+   xyz_t is a user type.
+
+   The internal type definition uses __machine_xyz_t_defined.  It is defined by
+to disable a default definition in . It
+   must not be used in other files.
+
+   User type definitions are guarded by __xyz_t_defined in glibc and
+   _XYZ_T_DECLARED in BSD compatible systems.
 */
 
 #ifndef_SYS__TYPES_H
@@ -12,7 +22,7 @@
 #include 
 #include 
 
-#ifndef __off_t_defined
+#ifndef __machine_off_t_defined
 typedef long _off_t;
 #endif
 
@@ -22,18 +32,18 @@ typedef signed char __pid_t;
 typedef int __pid_t;
 #endif
 
-#ifndef __dev_t_defined
+#ifndef __machine_dev_t_defined
 typedef short __dev_t;
 #endif
 
-#ifndef __uid_t_defined
+#ifndef __machine_uid_t_defined
 typedef unsigned short __uid_t;
 #endif
-#ifndef __gid_t_defined
+#ifndef __machine_gid_t_defined
 typedef unsigned short __gid_t;
 #endif
 
-#ifndef __off64_t_defined
+#ifndef __machine_off64_t_defined
 __extension__ typedef long long _off64_t;
 #endif
 
@@ -45,7 +55,7 @@ typedef _off_t __off_t;
 
 typedef _off64_t __loff_t;
 
-#ifndef __key_t_defined
+#ifndef __machine_key_t_defined
 typedef long __key_t;
 #endif
 
@@ -53,18 +63,18 @@ typedef long __key_t;
  * We need fpos_t for the following, but it doesn't have a leading "_",
  * so we use _fpos_t instead.
  */
-#ifndef __fpos_t_defined
+#ifndef __machine_fpos_t_defined
 typedef long _fpos_t;  /* XXX must match off_t in  */
/* (and must be `long' for now) */
 #endif
 
 #ifdef __LARGE64_FILES
-#ifndef __fpos64_t_defined
+#ifndef __machine_fpos64_t_defined
 typedef _off64_t _fpos64_t;
 #endif
 #endif
 
-#ifndef __ssize_t_defined
+#ifndef __machine_ssize_t_defined
 #ifdef __SIZE_TYPE__
 /* If __SIZE_TYPE__ is defined (gcc) we define ssize_t based on size_t.
We simply change "unsigned" to "signed" for this single definition
@@ -84,7 +94,7 @@ typedef long _ssize_t;
 #define __need_wint_t
 #include 
 
-#ifndef __mbstate_t_defined
+#ifndef __machine_mbstate_t_defined
 /* Conversion state information.  */
 typedef struct
 {
@@ -97,11 +107,11 @@ typedef struct
 } _mbstate_t;
 #endif
 
-#ifndef __flock_t_defined
+#ifndef __machine_flock_t_defined
 typedef _LOCK_RECURSIVE_T _flock_t;
 #endif
 
-#ifndef __iconv_t_defined
+#ifndef __machine_iconv_t_defined
 /* Iconv descriptor type */
 typedef void *_iconv_t;
 #endif
diff --git a/newlib/libc/machine/aarch64/machine/_types.h 
b/newlib/libc/machine/aarch64/machine/_types.h
index 7df9f8d..c846741 100644
--- a/newlib/libc/machine/aarch64/machine/_types.h
+++ b/newlib/libc/machine/aarch64/machine/_types.h
@@ -31,7 +31,7 @@
 
 #include 
 
-#define __ssize_t_defined
+#define __machine_ssize_t_defined
 typedef long signed int _ssize_t;
 
 #endif /* _MACHINE__TYPES_H */
diff --git a/newlib/libc/machine/spu/machine/_types.h 
b/newlib/libc/machine/spu/machine/_types.h
index d58c617..edff175 100644
--- a/newlib/libc/machine/spu/machine/_types.h
+++ b/newlib/libc/machine/spu/machine/_types.h
@@ -39,22 +39,22 @@
 /*
  * fpos_t large enough for either 32 or 64 bit ppc glibc fpos_t.
  */
-#define __fpos_t_defined
+#define __machine_fpos_t_defined
 typedef struct {
   char __pos[16];
 } _fpos_t;
 
 #ifdef __LARGE64_FILES
-#define __fpos64_t_defined
+#define __machine_fpos64_t_defined
 typedef _fpos_t _fpos64_t;
 #endif
 
-#define __dev_

[PATCH 15/18] Add __va_list to

2016-04-14 Thread Sebastian Huber
Add __va_list to  for BSD compatibility.  In FreeBSD this
typedef is provided by the various architecture-specific
 in a copy and paste manner.

Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 03e1ba3..73f1de6 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -177,4 +177,10 @@ typedefunsigned short  __nlink_t;
 typedeflong__suseconds_t;  /* microseconds (signed) */
 typedefunsigned long   __useconds_t;   /* microseconds (unsigned) */
 
+#ifdef __GNUCLIKE_BUILTIN_VARARGS
+typedef__builtin_va_list   __va_list;
+#else
+typedefchar *  __va_list;
+#endif /* __GNUCLIKE_BUILTIN_VARARGS */
+
 #endif /* _SYS__TYPES_H */
-- 
1.8.4.5

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


[PATCH 18/18] Provide FNONBLOCK for BSD compatiblity

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_default_fcntl.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/newlib/libc/include/sys/_default_fcntl.h 
b/newlib/libc/include/sys/_default_fcntl.h
index 3be8f8d..ede90c4 100644
--- a/newlib/libc/include/sys/_default_fcntl.h
+++ b/newlib/libc/include/sys/_default_fcntl.h
@@ -99,6 +99,10 @@ extern "C" {
 
 #endif /* __MISC_VISIBLE */
 
+#if __BSD_VISIBLE
+#defineFNONBLOCK   _FNONBLOCK
+#endif /* __BSD_VISIBLE */
+
 /* XXX close on exec request; must match UF_EXCLOSE in user.h */
 #defineFD_CLOEXEC  1   /* posix */
 
-- 
1.8.4.5

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


[PATCH 12/18] Add BSD guard for nlink_t

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h | 1 +
 newlib/libc/include/sys/types.h  | 5 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index a1a12f2..61fc1c5 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -173,6 +173,7 @@ typedef _CLOCKID_T_ __clockid_t;
 #define_TIMER_T_   unsigned long
 typedef_TIMER_T_   __timer_t;
 
+typedefunsigned short  __nlink_t;
 typedeflong__suseconds_t;  /* microseconds (signed) */
 
 #endif /* _SYS__TYPES_H */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 6d9865c..3e803c3 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -205,7 +205,10 @@ typedef__mode_tmode_t; /* permissions 
*/
 #define_MODE_T_DECLARED
 #endif
 
-typedef unsigned short nlink_t;
+#ifndef _NLINK_T_DECLARED
+typedef__nlink_t   nlink_t;/* link count */
+#define_NLINK_T_DECLARED
+#endif
 
 #if !defined(__clockid_t_defined) && !defined(_CLOCKID_T_DECLARED)
 typedef__clockid_t clockid_t;
-- 
1.8.4.5

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


[PATCH 05/18] Add BSD guard for clock_t

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h | 4 +++-
 newlib/libc/include/sys/times.h  | 7 ---
 newlib/libc/include/sys/types.h  | 7 ---
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index af32bcb..0f5cb9d 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -145,7 +145,9 @@ typedef _LOCK_RECURSIVE_T _flock_t;
 typedef void *_iconv_t;
 #endif
 
-#define_CLOCK_T_   unsigned long   /* clock() */
+#define_CLOCK_T_   unsigned long   /* clock() */
+typedef_CLOCK_T_   __clock_t;
+
 #define_TIME_T_long/* time() */
 #define _CLOCKID_T_unsigned long
 #define _TIMER_T_  unsigned long
diff --git a/newlib/libc/include/sys/times.h b/newlib/libc/include/sys/times.h
index dc072f4..b1f1dc6 100644
--- a/newlib/libc/include/sys/times.h
+++ b/newlib/libc/include/sys/times.h
@@ -7,9 +7,10 @@ extern "C" {
 #include <_ansi.h>
 #include 
 
-#ifndef __clock_t_defined
-typedef _CLOCK_T_ clock_t;
-#define __clock_t_defined
+#if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED)
+typedef_CLOCK_T_   clock_t;
+#define__clock_t_defined
+#define_CLOCK_T_DECLARED
 #endif
 
 /*  Get Process Times, P1003.1b-1993, p. 92 */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index e48c2f2..f17821b 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -96,9 +96,10 @@ typedef  unsigned intuint;   /* System V 
compatibility */
 typedefunsigned long   ulong;  /* System V compatibility */
 #endif
 
-#ifndef __clock_t_defined
-typedef _CLOCK_T_ clock_t;
-#define __clock_t_defined
+#if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED)
+typedef_CLOCK_T_   clock_t;
+#define__clock_t_defined
+#define_CLOCK_T_DECLARED
 #endif
 
 #ifndef __time_t_defined
-- 
1.8.4.5

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


[PATCH 17/18] Provide __size_t via

2016-04-14 Thread Sebastian Huber
Various FreeBSD source and header files need a typedef __size_t via
.  Unfortunately the GCC provided  uses

#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
  || defined(__DragonFly__) \
  || defined(__FreeBSD_kernel__)
/* __size_t is a typedef on FreeBSD 5, must not trash it. */
#elif defined (__VMS__)
/* __size_t is also a typedef on VMS.  */
#else
#define __size_t
#endif

and therefore defines __size_t on Newlib targets which would trash a
__size_t typedef.  Include  before  in
 and undefine __size_t in  as a workaround.

Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h | 15 +++
 newlib/libc/include/sys/types.h  |  3 +--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 73f1de6..6ea9bff 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -119,6 +119,21 @@ typedef _off64_t _fpos64_t;
 #endif
 #endif
 
+/* Defined by GCC provided  */
+#undef __size_t
+
+#ifndef __machine_size_t_defined
+#ifdef __SIZE_TYPE__
+typedef __SIZE_TYPE__ __size_t;
+#else
+#if defined(__INT_MAX__) && __INT_MAX__ == 2147483647
+typedef int __size_t;
+#else
+typedef long __size_t;
+#endif
+#endif
+#endif
+
 #ifndef __machine_ssize_t_defined
 #ifdef __SIZE_TYPE__
 /* If __SIZE_TYPE__ is defined (gcc) we define ssize_t based on size_t.
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 57b74ef..3391753 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -56,11 +56,10 @@ typedef quad_t *qaddr_t;
 #ifndef __need_inttypes
 
 #define _SYS_TYPES_H
+#include 
 #include 
 #include 
 
-# include 
-
 #if __BSD_VISIBLE
 #include 
 #include 
-- 
1.8.4.5

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


[PATCH 08/18] Add BSD guard for timer_t

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h | 3 ++-
 newlib/libc/include/sys/types.h  | 7 ---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index ba112f5..16fbc13 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -154,7 +154,8 @@ typedef _TIME_T___time_t;
 #define_CLOCKID_T_ unsigned long
 typedef_CLOCKID_T_ __clockid_t;
 
-#define _TIMER_T_  unsigned long
+#define_TIMER_T_   unsigned long
+typedef_TIMER_T_   __timer_t;
 
 typedeflong__suseconds_t;  /* microseconds (signed) */
 
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index f8db419..d0627fd 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -197,9 +197,10 @@ typedef__clockid_t clockid_t;
 #define_CLOCKID_T_DECLARED
 #endif
 
-#ifndef __timer_t_defined
-typedef _TIMER_T_ timer_t;
-#define __timer_t_defined
+#if !defined(__timer_t_defined) && !defined(_TIMER_T_DECLARED)
+typedef__timer_t   timer_t;
+#define__timer_t_defined
+#define_TIMER_T_DECLARED
 #endif
 
 typedef unsigned long useconds_t;
-- 
1.8.4.5

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


[PATCH 04/18] Define mode_t via __mode_t

2016-04-14 Thread Sebastian Huber
Use __uint32_t to avoid the use of GCC-specific _ST_INT32.

Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h   | 16 +
 newlib/libc/include/sys/types.h| 50 --
 newlib/libc/sys/rtems/include/machine/_types.h |  2 +-
 winsup/cygwin/include/cygwin/types.h   |  4 ---
 winsup/cygwin/include/machine/_types.h |  3 ++
 5 files changed, 26 insertions(+), 49 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index ad322b1..af32bcb 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -56,6 +56,22 @@ typedef unsigned short __ino_t;
 #endif
 #endif
 
+#ifndef __machine_mode_t_defined
+#if defined(__i386__) && (defined(GO32) || defined(__MSDOS__))
+typedef int __mode_t;
+#else
+#if defined(__sparc__) && !defined(__sparc_v9__)
+#ifdef __svr4__
+typedef unsigned long __mode_t;
+#else
+typedef unsigned short __mode_t;
+#endif
+#else
+typedef __uint32_t __mode_t;
+#endif
+#endif
+#endif
+
 #ifndef __machine_off64_t_defined
 __extension__ typedef long long _off64_t;
 #endif
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 2bf9eb5..e48c2f2 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -59,27 +59,8 @@ typedef  quad_t *qaddr_t;
 #include 
 #include 
 
-#ifdef __i386__
-#if defined (GO32) || defined (__MSDOS__)
-#define __MS_types__
-#endif
-#endif
-
 # include 
 
-/* To ensure the stat struct's layout doesn't change when sizeof(int), etc.
-   changes, we assume sizeof short and long never change and have all types
-   used to define struct stat use them and not int where possible.
-   Where not possible, _ST_INTxx are used.  It would be preferable to not have
-   such assumptions, but until the extra fluff is necessary, it's avoided.
-   No 64 bit targets use stat yet.  What to do about them is postponed
-   until necessary.  */
-#ifdef __GNUC__
-#define _ST_INT32 __attribute__ ((__mode__ (__SI__)))
-#else
-#define _ST_INT32
-#endif
-
 #if __BSD_VISIBLE
 #include 
 #  define  physadr physadr_t
@@ -144,7 +125,8 @@ typedef __ino_t ino_t;  /* inode number 
*/
 #define_INO_T_DECLARED
 #endif
 
-#ifdef __MS_types__
+#if defined(__i386__) && (defined(GO32) || defined(__MSDOS__))
+typedefchar *  addr_t;
 typedef unsigned long vm_offset_t;
 typedef unsigned long vm_size_t;
 
@@ -159,7 +141,7 @@ typedef unsigned int u_int32_t;
 typedef long long int64_t;
 typedef unsigned long long u_int64_t;
 typedef int32_t register_t;
-#endif /* __MS_types__ */
+#endif /* __i386__ && (GO32 || __MSDOS__) */
 
 /*
  * All these should be machine specific - right now they are all broken.
@@ -190,10 +172,6 @@ typedef__pid_t pid_t;  /* process id */
 #define_PID_T_DECLARED
 #endif
 
-#if defined(__rtems__)
-typedef _mode_t mode_t;
-#endif
-
 #ifndef _KEY_T_DECLARED
 typedef__key_t key_t;  /* IPC key */
 #define_KEY_T_DECLARED
@@ -204,29 +182,13 @@ typedef _ssize_t ssize_t;
 #define_SSIZE_T_DECLARED
 #endif
 
-#if !defined(__CYGWIN__) && !defined(__rtems__)
-#ifdef __MS_types__
-typedefchar *  addr_t;
-typedef int mode_t;
-#else
-#if defined (__sparc__) && !defined (__sparc_v9__)
-#ifdef __svr4__
-typedef unsigned long mode_t;
-#else
-typedef unsigned short mode_t;
+#ifndef _MODE_T_DECLARED
+typedef__mode_tmode_t; /* permissions */
+#define_MODE_T_DECLARED
 #endif
-#else
-typedef unsigned int mode_t _ST_INT32;
-#endif
-#endif /* ! __MS_types__ */
-#endif /*__CYGWIN__*/
 
 typedef unsigned short nlink_t;
 
-#undef __MS_types__
-#undef _ST_INT32
-
-
 #ifndef __clockid_t_defined
 typedef _CLOCKID_T_ clockid_t;
 #define __clockid_t_defined
diff --git a/newlib/libc/sys/rtems/include/machine/_types.h 
b/newlib/libc/sys/rtems/include/machine/_types.h
index 76a6841..15de3ce 100644
--- a/newlib/libc/sys/rtems/include/machine/_types.h
+++ b/newlib/libc/sys/rtems/include/machine/_types.h
@@ -22,7 +22,7 @@ typedef   _off_t  _fpos_t;
 typedefunsigned long   __ino_t;
 #define__machine_ino_t_defined
 
-typedef__uint32_t  _mode_t;
+typedef__uint32_t  __mode_t;
 #define__machine_mode_t_defined
 
 #endif /* _MACHINE__TYPES_H */
diff --git a/winsup/cygwin/include/cygwin/types.h 
b/winsup/cygwin/include/cygwin/types.h
index c785fb2..2a9580e 100644
--- a/winsup/cygwin/include/cygwin/types.h
+++ b/winsup/cygwin/include/cygwin/types.h
@@ -104,10 +104,6 @@ typedef __int32_t register_t;
 typedef char *addr_t;
 #endif
 
-#ifndef __mode_t_defined
-#define __mode_t_defined
-typedef unsigned mode_t;
-#endif
 #endif /*__BIT_TYPES_DEFINED*/
 
 #if !defined(__INSIDE_CYGWIN__) || !defined(__cplusplus)
diff --git a/winsup/cygwin/include/machine/_types.h 
b/winsup/cygwin/include/machine/_types.h
index 861a0fb..20

[PATCH 13/18] Add BSD guard for useconds_t

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h | 1 +
 newlib/libc/include/sys/types.h  | 5 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 61fc1c5..03e1ba3 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -175,5 +175,6 @@ typedef _TIMER_T_   __timer_t;
 
 typedefunsigned short  __nlink_t;
 typedeflong__suseconds_t;  /* microseconds (signed) */
+typedefunsigned long   __useconds_t;   /* microseconds (unsigned) */
 
 #endif /* _SYS__TYPES_H */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 3e803c3..f02f170 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -222,7 +222,10 @@ typedef__timer_t   timer_t;
 #define_TIMER_T_DECLARED
 #endif
 
-typedef unsigned long useconds_t;
+#ifndef _USECONDS_T_DECLARED
+typedef__useconds_tuseconds_t; /* microseconds (unsigned) */
+#define_USECONDS_T_DECLARED
+#endif
 
 #ifndef _SUSECONDS_T_DECLARED
 typedef__suseconds_t   suseconds_t;
-- 
1.8.4.5

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


[PATCH 09/18] Provide POSIX defined blkcnt_t in

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h   | 4 
 newlib/libc/include/sys/stat.h | 2 +-
 newlib/libc/include/sys/types.h| 5 +
 newlib/libc/sys/rtems/include/machine/_types.h | 4 +++-
 winsup/cygwin/include/cygwin/types.h   | 6 --
 winsup/cygwin/include/machine/_types.h | 4 
 6 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 16fbc13..c9a6678 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -22,6 +22,10 @@
 #include 
 #include 
 
+#ifndef __machine_blkcnt_t_defined
+typedef long __blkcnt_t;
+#endif
+
 #ifndef __machine_off_t_defined
 typedef long _off_t;
 #endif
diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h
index a995e83..a75c1c2 100644
--- a/newlib/libc/include/sys/stat.h
+++ b/newlib/libc/include/sys/stat.h
@@ -54,7 +54,7 @@ structstat
   time_t   st_ctime;
   long st_spare3;
   long st_blksize;
-  long st_blocks;
+  blkcnt_t st_blocks;
   long st_spare4[2];
 #endif
 #endif
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index d0627fd..ac8252e 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -96,6 +96,11 @@ typedef  unsigned intuint;   /* System V 
compatibility */
 typedefunsigned long   ulong;  /* System V compatibility */
 #endif
 
+#ifndef _BLKCNT_T_DECLARED
+typedef__blkcnt_t  blkcnt_t;
+#define_BLKCNT_T_DECLARED
+#endif
+
 #if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED)
 typedef_CLOCK_T_   clock_t;
 #define__clock_t_defined
diff --git a/newlib/libc/sys/rtems/include/machine/_types.h 
b/newlib/libc/sys/rtems/include/machine/_types.h
index 15de3ce..3dbcb3d 100644
--- a/newlib/libc/sys/rtems/include/machine/_types.h
+++ b/newlib/libc/sys/rtems/include/machine/_types.h
@@ -4,7 +4,9 @@
 #include 
 
 typedef__int32_t   blksize_t;
-typedef__int32_t   blkcnt_t;
+
+typedef__int32_t   __blkcnt_t;
+#define__machine_blkcnt_t_defined
 
 typedef__uint64_t  __dev_t;
 #define__machine_dev_t_defined
diff --git a/winsup/cygwin/include/cygwin/types.h 
b/winsup/cygwin/include/cygwin/types.h
index 2a9580e..b7c3e23 100644
--- a/winsup/cygwin/include/cygwin/types.h
+++ b/winsup/cygwin/include/cygwin/types.h
@@ -39,12 +39,6 @@ typedef __loff_t loff_t;
 typedef __int32_t blksize_t;
 #endif /*__blksize_t_defined*/
 
-#ifndef __blkcnt_t_defined
-#define __blkcnt_t_defined
-typedef __int32_t __blkcnt32_t;
-typedef __int64_t blkcnt_t;
-#endif /*__blkcnt_t_defined*/
-
 #ifndef __fsblkcnt_t_defined
 #define __fsblkcnt_t_defined
 /* Keep as is.  32 bit on i386, 64 bit on x86_64. */
diff --git a/winsup/cygwin/include/machine/_types.h 
b/winsup/cygwin/include/machine/_types.h
index 20e5ae5..d354cea 100644
--- a/winsup/cygwin/include/machine/_types.h
+++ b/winsup/cygwin/include/machine/_types.h
@@ -6,12 +6,16 @@
 #include 
 
 #if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB)
+typedef __int32_t __blkcnt32_t;
 typedef __int16_t  __dev16_t;
 typedef __uint16_t __uid16_t;
 typedef __uint16_t __gid16_t;
 typedef __uint32_t __ino32_t;
 #endif
 
+#define __machine_blkcnt_t_defined
+typedef __uint64_t __blkcnt_t;
+
 #define __machine_dev_t_defined
 typedef __uint32_t __dev_t;
 
-- 
1.8.4.5

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


[PATCH 10/18] Provide POSIX defined blksize_t in

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h   | 4 
 newlib/libc/include/sys/stat.h | 2 +-
 newlib/libc/include/sys/types.h| 5 +
 newlib/libc/sys/rtems/include/machine/_types.h | 5 +++--
 winsup/cygwin/include/cygwin/types.h   | 5 -
 winsup/cygwin/include/machine/_types.h | 3 +++
 6 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index c9a6678..16929fb 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -26,6 +26,10 @@
 typedef long __blkcnt_t;
 #endif
 
+#ifndef __machine_blksize_t_defined
+typedef long __blksize_t;
+#endif
+
 #ifndef __machine_off_t_defined
 typedef long _off_t;
 #endif
diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h
index a75c1c2..94a90c0 100644
--- a/newlib/libc/include/sys/stat.h
+++ b/newlib/libc/include/sys/stat.h
@@ -53,7 +53,7 @@ structstat
   long st_spare2;
   time_t   st_ctime;
   long st_spare3;
-  long st_blksize;
+  blksize_tst_blksize;
   blkcnt_t st_blocks;
   long st_spare4[2];
 #endif
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index ac8252e..24d90cd 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -101,6 +101,11 @@ typedef__blkcnt_t  blkcnt_t;
 #define_BLKCNT_T_DECLARED
 #endif
 
+#ifndef _BLKSIZE_T_DECLARED
+typedef__blksize_t blksize_t;
+#define_BLKSIZE_T_DECLARED
+#endif
+
 #if !defined(__clock_t_defined) && !defined(_CLOCK_T_DECLARED)
 typedef_CLOCK_T_   clock_t;
 #define__clock_t_defined
diff --git a/newlib/libc/sys/rtems/include/machine/_types.h 
b/newlib/libc/sys/rtems/include/machine/_types.h
index 3dbcb3d..ed09206 100644
--- a/newlib/libc/sys/rtems/include/machine/_types.h
+++ b/newlib/libc/sys/rtems/include/machine/_types.h
@@ -3,11 +3,12 @@
 
 #include 
 
-typedef__int32_t   blksize_t;
-
 typedef__int32_t   __blkcnt_t;
 #define__machine_blkcnt_t_defined
 
+typedef__int32_t   __blksize_t;
+#define__machine_blksize_t_defined
+
 typedef__uint64_t  __dev_t;
 #define__machine_dev_t_defined
 
diff --git a/winsup/cygwin/include/cygwin/types.h 
b/winsup/cygwin/include/cygwin/types.h
index b7c3e23..9e13d04 100644
--- a/winsup/cygwin/include/cygwin/types.h
+++ b/winsup/cygwin/include/cygwin/types.h
@@ -34,11 +34,6 @@ typedef struct timespec timestruc_t;
 
 typedef __loff_t loff_t;
 
-#ifndef __blksize_t_defined
-#define __blksize_t_defined
-typedef __int32_t blksize_t;
-#endif /*__blksize_t_defined*/
-
 #ifndef __fsblkcnt_t_defined
 #define __fsblkcnt_t_defined
 /* Keep as is.  32 bit on i386, 64 bit on x86_64. */
diff --git a/winsup/cygwin/include/machine/_types.h 
b/winsup/cygwin/include/machine/_types.h
index d354cea..970a61d 100644
--- a/winsup/cygwin/include/machine/_types.h
+++ b/winsup/cygwin/include/machine/_types.h
@@ -16,6 +16,9 @@ typedef __uint32_t __ino32_t;
 #define __machine_blkcnt_t_defined
 typedef __uint64_t __blkcnt_t;
 
+#define __machine_blksize_t_defined
+typedef __int32_t __blksize_t;
+
 #define __machine_dev_t_defined
 typedef __uint32_t __dev_t;
 
-- 
1.8.4.5

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


[PATCH 11/18] Provide POSIX defined fsblkcnt_t and fsfilcnt_t

2016-04-14 Thread Sebastian Huber
Signed-off-by: Sebastian Huber 
---
 newlib/libc/include/sys/_types.h   |  8 
 newlib/libc/include/sys/types.h|  6 ++
 winsup/cygwin/include/cygwin/types.h   | 12 
 winsup/cygwin/include/machine/_types.h |  8 
 4 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/newlib/libc/include/sys/_types.h b/newlib/libc/include/sys/_types.h
index 16929fb..a1a12f2 100644
--- a/newlib/libc/include/sys/_types.h
+++ b/newlib/libc/include/sys/_types.h
@@ -30,6 +30,14 @@ typedef long __blkcnt_t;
 typedef long __blksize_t;
 #endif
 
+#ifndef __machine_fsblkcnt_t_defined
+typedef __uint64_t __fsblkcnt_t;
+#endif
+
+#ifndef __machine_fsfilcnt_t_defined
+typedef __uint32_t __fsfilcnt_t;
+#endif
+
 #ifndef __machine_off_t_defined
 typedef long _off_t;
 #endif
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 24d90cd..6d9865c 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -127,6 +127,12 @@ typedefchar *  caddr_t;
 #define __caddr_t_defined
 #endif
 
+#ifndef _FSBLKCNT_T_DECLARED   /* for statvfs() */
+typedef__fsblkcnt_tfsblkcnt_t;
+typedef__fsfilcnt_tfsfilcnt_t;
+#define_FSBLKCNT_T_DECLARED
+#endif
+
 #ifndef _ID_T_DECLARED
 typedef__id_t  id_t;   /* can hold a uid_t or pid_t */
 #define_ID_T_DECLARED
diff --git a/winsup/cygwin/include/cygwin/types.h 
b/winsup/cygwin/include/cygwin/types.h
index 9e13d04..faf08bd 100644
--- a/winsup/cygwin/include/cygwin/types.h
+++ b/winsup/cygwin/include/cygwin/types.h
@@ -34,18 +34,6 @@ typedef struct timespec timestruc_t;
 
 typedef __loff_t loff_t;
 
-#ifndef __fsblkcnt_t_defined
-#define __fsblkcnt_t_defined
-/* Keep as is.  32 bit on i386, 64 bit on x86_64. */
-typedef unsigned long fsblkcnt_t;
-#endif /* __fsblkcnt_t_defined */
-
-#ifndef __fsfilcnt_t_defined
-#define __fsfilcnt_t_defined
-/* Keep as is.  32 bit on i386, 64 bit on x86_64. */
-typedef unsigned long fsfilcnt_t;
-#endif /* __fsfilcnt_t_defined */
-
 #if defined (__INSIDE_CYGWIN__) && !defined (__x86_64__)
 struct __flock32 {
shortl_type;/* F_RDLCK, F_WRLCK, or F_UNLCK */
diff --git a/winsup/cygwin/include/machine/_types.h 
b/winsup/cygwin/include/machine/_types.h
index 970a61d..575c3c0 100644
--- a/winsup/cygwin/include/machine/_types.h
+++ b/winsup/cygwin/include/machine/_types.h
@@ -22,6 +22,14 @@ typedef __int32_t __blksize_t;
 #define __machine_dev_t_defined
 typedef __uint32_t __dev_t;
 
+#define __machine_fsblkcnt_t_defined
+/* Keep as is.  32 bit on i386, 64 bit on x86_64. */
+typedef unsigned long fsblkcnt_t;
+
+#define __machine_fsfilcnt_t_defined
+/* Keep as is.  32 bit on i386, 64 bit on x86_64. */
+typedef unsigned long fsfilcnt_t;
+
 #define __machine_uid_t_defined
 typedef __uint32_t __uid_t;
 
-- 
1.8.4.5

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


[PATCH 14/18] Add BSD guards for fixed-size integer types

2016-04-14 Thread Sebastian Huber
From: Christian Mauderer 

Signed-off-by: Christian Mauderer 
---
 newlib/libc/include/sys/_stdint.h | 39 +++
 1 file changed, 35 insertions(+), 4 deletions(-)

diff --git a/newlib/libc/include/sys/_stdint.h 
b/newlib/libc/include/sys/_stdint.h
index add1860..a7fe1e4 100644
--- a/newlib/libc/include/sys/_stdint.h
+++ b/newlib/libc/include/sys/_stdint.h
@@ -16,31 +16,62 @@ extern "C" {
 #endif
 
 #ifdef ___int8_t_defined
+#ifndef _INT8_T_DECLARED
 typedef __int8_t int8_t ;
+#define _INT8_T_DECLARED
+#endif
+#ifndef _UINT8_T_DECLARED
 typedef __uint8_t uint8_t ;
-#define __int8_t_defined 1
+#define _UINT8_T_DECLARED
 #endif
+#define __int8_t_defined 1
+#endif /* ___int8_t_defined */
 
 #ifdef ___int16_t_defined
+#ifndef _INT16_T_DECLARED
 typedef __int16_t int16_t ;
+#define _INT16_T_DECLARED
+#endif
+#ifndef _UINT16_T_DECLARED
 typedef __uint16_t uint16_t ;
-#define __int16_t_defined 1
+#define _UINT16_T_DECLARED
 #endif
+#define __int16_t_defined 1
+#endif /* ___int16_t_defined */
 
 #ifdef ___int32_t_defined
+#ifndef _INT32_T_DECLARED
 typedef __int32_t int32_t ;
+#define _INT32_T_DECLARED
+#endif
+#ifndef _UINT32_T_DECLARED
 typedef __uint32_t uint32_t ;
-#define __int32_t_defined 1
+#define _UINT32_T_DECLARED
 #endif
+#define __int32_t_defined 1
+#endif /* ___int32_t_defined */
 
 #ifdef ___int64_t_defined
+#ifndef _INT64_T_DECLARED
 typedef __int64_t int64_t ;
+#define _INT64_T_DECLARED
+#endif
+#ifndef _UINT64_T_DECLARED
 typedef __uint64_t uint64_t ;
-#define __int64_t_defined 1
+#define _UINT64_T_DECLARED
 #endif
+#define __int64_t_defined 1
+#endif /* ___int64_t_defined */
 
+#ifndef INTPTR_T_DECLARED
 typedef __intptr_t intptr_t;
+#define _INTPTR_T_DECLARED
+#endif
+
+#ifndef _UINTPTR_T_DECLARED
 typedef __uintptr_t uintptr_t;
+#define _UINTPTR_T_DECLARED
+#endif
 
 #ifdef __cplusplus
 }
-- 
1.8.4.5

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


PWM driver tested in RTEMS with RGB

2016-04-14 Thread punit vara
Hi all !

I had successfully merged the TI Starter Ware Code with RTEMS. Then I tried
to test it with sample application with RGB. As a result I was able to glow
the LED with that code but unfortunately, LED was only glowing constantly.
It did not blink (at all !!!) according to duty cycle and frequency.
Yesterday I written my own functions similarly as Worth Burruss suggested
me. But they are not exactly same as he told. Those functions are

1. To initialize PWM
2. To Enable PWM
3. To Disable PWM
4. Pinmux for PWM module

I have used some Ti Starter Ware clock config functions along with my own
written functions and successfully able to test PWM driver on RGB LED.
Video is uploaded on youtube and please find the link as below.

https://www.youtube.com/watch?v=KsdtgVj-ZxU

Please let me know if is there any problems with video.

Application description :

PWM 2nd module is used with 100 Hz frequency, 20% Duty cycle on  EHRPWM A
pin and 50 % Duty cycle on EHRPWM B pin. More precise description is
written below video on youtube.

Martin, you told there are problem with some functions it would be better
if you can share so that I can troubleshoot which TI Starter Ware code
should I edit. Any comments and suggestions from community members are most
welcome.  I will soon share the code after suggestions or comments.

Thank you,
Punit Vara
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] cpukit: pppd: fix compile warning

2016-04-14 Thread Gedare Bloom
I applied it as-is, just leave it off for the future

On Wed, Apr 13, 2016 at 1:30 AM, Peng Fan  wrote:
> Hi,
>
> On Tue, Apr 05, 2016 at 10:23:00AM -0400, Gedare Bloom wrote:
>>This should be fine. I don't know, does pppd have an active maintainer?
>
> Just kindly ping, will this be merged?
>
>>
>>On Tue, Apr 5, 2016 at 8:45 AM, Peng Fan  wrote:
>>> rcsid is defined, but not used. So discard it.
>>>
>>> Signed-off-by: Peng Fan 
>
> Do I need to drop the signoff and send out V2?
>
> Thanks,
> Peng.
>
>>> ---
>>>  cpukit/pppd/auth.c  | 4 
>>>  cpukit/pppd/ccp.c   | 4 
>>>  cpukit/pppd/chap.c  | 4 
>>>  cpukit/pppd/demand.c| 4 
>>>  cpukit/pppd/fsm.c   | 4 
>>>  cpukit/pppd/ipcp.c  | 4 
>>>  cpukit/pppd/lcp.c   | 4 
>>>  cpukit/pppd/magic.c | 4 
>>>  cpukit/pppd/options.c   | 4 
>>>  cpukit/pppd/rtemsmain.c | 4 
>>>  cpukit/pppd/sys-rtems.c | 5 -
>>>  cpukit/pppd/upap.c  | 4 
>>>  cpukit/pppd/utils.c | 4 
>>>  13 files changed, 53 deletions(-)
>>>
>>> diff --git a/cpukit/pppd/auth.c b/cpukit/pppd/auth.c
>>> index fb84f1e..9df1d32 100644
>>> --- a/cpukit/pppd/auth.c
>>> +++ b/cpukit/pppd/auth.c
>>> @@ -32,8 +32,6 @@
>>>   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
>>>   */
>>>
>>> -#define RCSID  "$Id$"
>>> -
>>>  #include 
>>>  #include 
>>>  #include 
>>> @@ -75,8 +73,6 @@
>>>  #endif
>>>  #include "pathnames.h"
>>>
>>> -static const char rcsid[] = RCSID;
>>> -
>>>  /* The name by which the peer authenticated itself to us. */
>>>  char peer_authname[MAXNAMELEN];
>>>
>>> diff --git a/cpukit/pppd/ccp.c b/cpukit/pppd/ccp.c
>>> index d80df27..6ada96c 100644
>>> --- a/cpukit/pppd/ccp.c
>>> +++ b/cpukit/pppd/ccp.c
>>> @@ -25,8 +25,6 @@
>>>   * OR MODIFICATIONS.
>>>   */
>>>
>>> -#define RCSID  "$Id$"
>>> -
>>>  #include 
>>>  #include 
>>>
>>> @@ -35,8 +33,6 @@
>>>  #include "ccp.h"
>>>  #include 
>>>
>>> -static const char rcsid[] = RCSID;
>>> -
>>>  /*
>>>   * Command-line options.
>>>   */
>>> diff --git a/cpukit/pppd/chap.c b/cpukit/pppd/chap.c
>>> index 3fe766f..55f1896 100644
>>> --- a/cpukit/pppd/chap.c
>>> +++ b/cpukit/pppd/chap.c
>>> @@ -33,8 +33,6 @@
>>>   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
>>>   */
>>>
>>> -#define RCSID  "$Id$"
>>> -
>>>  /*
>>>   * TODO:
>>>   */
>>> @@ -52,8 +50,6 @@
>>>  #include "chap_ms.h"
>>>  #endif
>>>
>>> -static const char rcsid[] = RCSID;
>>> -
>>>  /*
>>>   * Command-line options.
>>>   */
>>> diff --git a/cpukit/pppd/demand.c b/cpukit/pppd/demand.c
>>> index a094a15..a5c13f7 100644
>>> --- a/cpukit/pppd/demand.c
>>> +++ b/cpukit/pppd/demand.c
>>> @@ -17,8 +17,6 @@
>>>   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
>>>   */
>>>
>>> -#define RCSID  "$Id$";
>>> -
>>>  #include 
>>>  #include 
>>>  #include 
>>> @@ -43,8 +41,6 @@
>>>  #include "ipcp.h"
>>>  #include "lcp.h"
>>>
>>> -static const char rcsid[] = RCSID;
>>> -
>>>  static unsigned char *frame;
>>>  static int framelen;
>>>  static int framemax;
>>> diff --git a/cpukit/pppd/fsm.c b/cpukit/pppd/fsm.c
>>> index ce06401..4ff17d8 100644
>>> --- a/cpukit/pppd/fsm.c
>>> +++ b/cpukit/pppd/fsm.c
>>> @@ -17,8 +17,6 @@
>>>   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
>>>   */
>>>
>>> -#define RCSID  "$Id$"
>>> -
>>>  /*
>>>   * TODO:
>>>   * Randomize fsm id on link/init.
>>> @@ -32,8 +30,6 @@
>>>  #include "pppd.h"
>>>  #include "fsm.h"
>>>
>>> -static const char rcsid[] = RCSID;
>>> -
>>>  static void fsm_timeout(void *);
>>>  static void fsm_rconfreq(fsm *, u_char, u_char *, int);
>>>  static void fsm_rconfack(fsm *, int, u_char *, int);
>>> diff --git a/cpukit/pppd/ipcp.c b/cpukit/pppd/ipcp.c
>>> index fd23ddd..a9a8f24 100644
>>> --- a/cpukit/pppd/ipcp.c
>>> +++ b/cpukit/pppd/ipcp.c
>>> @@ -17,8 +17,6 @@
>>>   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
>>>   */
>>>
>>> -#define RCSID  "$Id$"
>>> -
>>>  /*
>>>   * TODO:
>>>   */
>>> @@ -40,8 +38,6 @@
>>>
>>>  #include 
>>>
>>> -static const char rcsid[] = RCSID;
>>> -
>>>  /* global vars */
>>>  ipcp_options ipcp_wantoptions[NUM_PPP];/* Options that we want to 
>>> request */
>>>  ipcp_options ipcp_gotoptions[NUM_PPP]; /* Options that peer ack'd */
>>> diff --git a/cpukit/pppd/lcp.c b/cpukit/pppd/lcp.c
>>> index 9da1326..e09e8fb 100644
>>> --- a/cpukit/pppd/lcp.c
>>> +++ b/cpukit/pppd/lcp.c
>>> @@ -17,8 +17,6 @@
>>>   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
>>>   */
>>>
>>> -#define RCSID  "$Id$";
>>> -
>>>  /*
>>>   * TODO:
>>>   */
>>> @@ -33,8 +31,6 @@
>>>  #include "chap.h"
>>>  #include "magic.h"
>>>
>>> -static const char rcsid[] = RCSID;
>>> -
>>>  /*
>>>   * LCP-related command-line options.
>>>   */
>>> diff --git a/cpukit/pppd/magic.c b/cpukit/pppd/magic.c
>>> index 3d297e5..46add2f 100644
>>> --- a/cpukit/pppd/magic.c
>>> +++ b/cpukit/pppd/magic.c
>>> @@ -17,8 +17,6 @@
>>>   * WARRANTIES OF MER

Re: PWM driver tested in RTEMS with RGB

2016-04-14 Thread Martin Galvan
On Thu, Apr 14, 2016 at 1:34 PM, punit vara  wrote:
> Hi all !
>
> I had successfully merged the TI Starter Ware Code with RTEMS.

That's great. Could you show us the resulting directory structure
(perhaps with a diffstat), as well as the changes to Makefile.am?

> Then I tried
> to test it with sample application with RGB. As a result I was able to glow
> the LED with that code but unfortunately, LED was only glowing constantly.
> It did not blink (at all !!!) according to duty cycle and frequency.

Odd. Could you post your test program (or preferably a link to it)?
Perhaps we can look into some of the APIs and see what's wrong.

> Yesterday I written my own functions similarly as Worth Burruss suggested
> me. But they are not exactly same as he told. Those functions are
>
> 1. To initialize PWM
> 2. To Enable PWM
> 3. To Disable PWM
> 4. Pinmux for PWM module
>
> I have used some Ti Starter Ware clock config functions along with my own
> written functions and successfully able to test PWM driver on RGB LED. Video
> is uploaded on youtube and please find the link as below.

So if I understand correctly, you were able to make this work by
writing your own code to access the PWM instead of the StarterWare
API? I'd like to see that code as well so we can compare it to
StarterWare's.

> https://www.youtube.com/watch?v=KsdtgVj-ZxU
>
> Please let me know if is there any problems with video.

Looks good!

> Martin, you told there are problem with some functions it would be better if
> you can share so that I can troubleshoot which TI Starter Ware code should I
> edit. Any comments and suggestions from community members are most welcome.
> I will soon share the code after suggestions or comments.

I just ran a diff between our sources and the SW version we downloaded
back then, found here:

http://software-dl-1.ti.com/dsps/forms/self_cert_export.html?prod_no=AM335X_StarterWare_02_00_01_01_Setup.bin&ref_url=http://software-dl.ti.com/dsps/dsps_public_sw/am_bu/starterware/latest/

(You need to register a free account to download it).

>From what I saw, most of the changes we did were removing unused code
and fixing mostly cosmetic issues. I'm attaching the diff file so you
can take a look at it. I think one of the most important differences
are the changes in utils/delay.c; Sysdelay was replaced by usleep.
Don't ask me why though, that was a long time ago and it wasn't me who
did it :)

I also saw that SW has a git repository, which seemingly has quite a
few differences from the version we were using. Those seem to be
mostly related to FatFS though.

If I were you, I'd give the old SW code + our patch a shot, then if it
works I'd try to replicate some of the changes on the SW git.

Unfortunately, Marcos and I won't be able to test your progress
because we don't have our BBBs available anymore. We can still review
your code though, and I think Ben has a BBB if you want additional
testing.

On a related note, it would be better if you posted your progress on a
single thread so it's easier to keep track of. No need to open a new
one for each milestone.
Only in starterware-ti: AM335X_SoftwareManifest.pdf
Only in starterware-ti: AM335X_StarterWare_02_00_01_01_Setup.bin
Only in starterware-ti: binary
Only in starterware-ti: bootloader
Only in starterware-ti: build
Only in starterware-ti: docs
diff -ruw starterware-ti/drivers/cppi41dma.c 
starterware-taller/drivers/cppi41dma.c
--- starterware-ti/drivers/cppi41dma.c  2013-07-11 18:22:51.0 -0300
+++ starterware-taller/drivers/cppi41dma.c  2015-09-01 16:36:10.840799357 
-0300
@@ -52,7 +52,6 @@
 #include "cache.h"
 #endif
 #include "uartStdio.h"
-#include "consoleUtils.h"
 /*
 ** STATIC FUNCTIONs
 **/
@@ -2023,10 +2022,10 @@
 pend2 = HWREG(USB_OTGBASE + CPDMA_PEND_2_REGISTER);
 pend3 = HWREG(USB_OTGBASE + CPDMA_PEND_3_REGISTER);
 
-ConsoleUtilsPrintf("\t\t%s: %s = %x\n\n", __FUNCTION__, " pend0 ", pend0);
-ConsoleUtilsPrintf("\t\t%s: %s = %x\n\n", __FUNCTION__, " pend1 ", pend1);
-ConsoleUtilsPrintf("\t\t%s: %s = %x\n\n", __FUNCTION__, " pend2 ", pend2);
-ConsoleUtilsPrintf("\t\t%s: %s = %x\n\n", __FUNCTION__, " pend3 ", pend3);
+pend0 = pend0;
+pend1 = pend1;
+pend2 = pend2;
+pend3 = pend3;
 
 }
 
Only in starterware-ti/drivers: cpsw.c
diff -ruw starterware-ti/drivers/dcan.c starterware-taller/drivers/dcan.c
--- starterware-ti/drivers/dcan.c   2013-07-11 18:22:51.0 -0300
+++ starterware-taller/drivers/dcan.c   2015-09-01 16:36:10.840799357 -0300
@@ -1394,6 +1394,35 @@
(extId & DCAN_IFMSK_MXTD));
 }
 
+
+/**
+ * \brief   This API will get the data length code.
+ *
+ * \param   baseAdd Base Address of the DCAN Module Registers.
+ * \param   dlc Data length code.
+ * \param   regN

Re: Error while building arm/realview_pbx_a9_qemu BSP

2016-04-14 Thread Deval Shah
On Wed, Apr 6, 2016 at 10:34 PM, Gedare Bloom  wrote:

> On Wed, Apr 6, 2016 at 10:10 AM, Deval Shah  wrote:
> >
> >
> > On Wed, Apr 6, 2016 at 7:13 PM, Sebastian Huber
> >  wrote:
> >>
> >>
> >>
> >> On 06/04/16 15:39, Deval Shah wrote:
> >>>
> >>> I am building this using RTEMS 4.12 and latest master branch pulled
> from
> >>> github.
> >>
> >>
> >> I don't know how reliably and fast the github updates are.
> >> Any suggestions about that then ?
> Use git.rtems.org

Yes, this helped. Thank you. Now I am able to build rtems-libbsd for
arm/realview_pbx_a9_qemu BSP.
How can I test it now ?
Is there any other thing to build or explore to get familiarised with the
system before I start GSoC project ?
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Error while building arm/realview_pbx_a9_qemu BSP

2016-04-14 Thread Joel Sherrill
On Thu, Apr 14, 2016 at 3:56 PM, Deval Shah  wrote:

>
>
> On Wed, Apr 6, 2016 at 10:34 PM, Gedare Bloom  wrote:
>
>> On Wed, Apr 6, 2016 at 10:10 AM, Deval Shah 
>> wrote:
>> >
>> >
>> > On Wed, Apr 6, 2016 at 7:13 PM, Sebastian Huber
>> >  wrote:
>> >>
>> >>
>> >>
>> >> On 06/04/16 15:39, Deval Shah wrote:
>> >>>
>> >>> I am building this using RTEMS 4.12 and latest master branch pulled
>> from
>> >>> github.
>> >>
>> >>
>> >> I don't know how reliably and fast the github updates are.
>> >> Any suggestions about that then ?
>> Use git.rtems.org
>
> Yes, this helped. Thank you. Now I am able to build rtems-libbsd for
> arm/realview_pbx_a9_qemu BSP.
> How can I test it now ?
>

The rtems-testing git repo has a sim-scripts directory with scripts to help
you invoke qemu on
particular RTEMS executables. You definitely should ensure you can run
hello and ticker
as a next step.


> Is there any other thing to build or explore to get familiarised with the
> system before I start GSoC project ?
>
>
Once you get ticker running on qemu with this BSP, you should make sure you
can run ticker
on a Pi and rtems-libbsd on the Realview/Qemu combination. That will keep
you moving
in the right direction.

rtems-libbsd has the USB stack and Ethernet stack. So being able to run
that code anywhere is good.
Similarly, you will need to know how to execute applications on the Pi.

--joel


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