Re: GSoC 2015 RPi USB Support

2015-07-17 Thread Sebastian Huber



On 16/07/15 20:39, Yurii Shevtsov wrote:

Which qemu build are you using? And what qemu args for xilinx zynq?


See README file in the BSP directory.

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

4.11 Branch Cut

2015-07-17 Thread Joel Sherrill

Hi

The 4.11 branch is now cut on the main rtems git repository.

4.11 branches should be cut on the other repositories in the
new future.

Please test and report.

--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherr...@oarcorp.comOn-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available(256) 722-9985
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 2/2] bsp/tms570 Use bitfields instead of hard-coded values

2015-07-17 Thread Premysl Houdek
Signed-off-by: Premysl Houdek 
---
 c/src/lib/libbsp/arm/tms570/clock/clock.c  | 31 +++-
 .../lib/libbsp/arm/tms570/console/printk-support.c |  4 +--
 c/src/lib/libbsp/arm/tms570/console/tms570-sci.c   | 34 --
 c/src/lib/libbsp/arm/tms570/pom/tms570-pom.c   | 15 +-
 4 files changed, 52 insertions(+), 32 deletions(-)

diff --git a/c/src/lib/libbsp/arm/tms570/clock/clock.c 
b/c/src/lib/libbsp/arm/tms570/clock/clock.c
index 1d887af..45da093 100644
--- a/c/src/lib/libbsp/arm/tms570/clock/clock.c
+++ b/c/src/lib/libbsp/arm/tms570/clock/clock.c
@@ -85,23 +85,39 @@ static void 
tms570_clock_driver_support_initialize_hardware( void )
   /* Hardware specific initialize */
   TMS570_RTI.GCTRL = 0;
   TMS570_RTI.CNT[0].CPUCx = tc_prescaler - 1;
-  TMS570_RTI.TBCTRL = 2;
+  TMS570_RTI.TBCTRL = TMS570_RTI_TBCTRL_INC;
   TMS570_RTI.CAPCTRL = 0;
   TMS570_RTI.COMPCTRL = 0;
   /* set counter to zero */
   TMS570_RTI.CNT[0].UCx = 0;
   TMS570_RTI.CNT[0].FRCx = 0;
   /* clear interrupts*/
-  TMS570_RTI.CLEARINTENA = 0x00070f0f;
-  TMS570_RTI.INTFLAG = 0x0007000f;
+  TMS570_RTI.CLEARINTENA = TMS570_RTI_CLEARINTENA_CLEAROVL1INT |
+   TMS570_RTI_CLEARINTENA_CLEAROVL0INT |
+   TMS570_RTI_CLEARINTENA_CLEARTBINT |
+   TMS570_RTI_CLEARINTENA_CLEARDMA3 |
+   TMS570_RTI_CLEARINTENA_CLEARDMA2 |
+   TMS570_RTI_CLEARINTENA_CLEARDMA1 |
+   TMS570_RTI_CLEARINTENA_CLEARDMA0 |
+   TMS570_RTI_CLEARINTENA_CLEARINT3 |
+   TMS570_RTI_CLEARINTENA_CLEARINT2 |
+   TMS570_RTI_CLEARINTENA_CLEARINT1 |
+   TMS570_RTI_CLEARINTENA_CLEARINT0;
+  TMS570_RTI.INTFLAG = TMS570_RTI_INTFLAG_OVL1INT |
+   TMS570_RTI_INTFLAG_OVL0INT |
+   TMS570_RTI_INTFLAG_TBINT |
+   TMS570_RTI_INTFLAG_INT3 |
+   TMS570_RTI_INTFLAG_INT2 |
+   TMS570_RTI_INTFLAG_INT1 |
+   TMS570_RTI_INTFLAG_INT0;
   /* set timer */
   TMS570_RTI.CMP[0].COMPx = TMS570_RTI.CNT[0].FRCx + tc_increments_per_tick;
   TMS570_RTI.COMP0CLR = TMS570_RTI.CMP[0].COMPx + tc_increments_per_tick / 2;
   TMS570_RTI.CMP[0].UDCPx = tc_increments_per_tick;
   /* enable interupt */
-  TMS570_RTI.SETINTENA = 0x1;
+  TMS570_RTI.SETINTENA = TMS570_RTI_SETINTENA_SETINT0;
   /* enable timer */
-  TMS570_RTI.GCTRL = 1;
+  TMS570_RTI.GCTRL = TMS570_RTI_GCTRL_CNT0EN;
   /* set timecounter */
   tms570_rti_tc.tc_get_timecount = tms570_rti_get_timecount;
   tms570_rti_tc.tc_counter_mask = 0x;
@@ -117,7 +133,7 @@ static void 
tms570_clock_driver_support_initialize_hardware( void )
  */
 static void tms570_clock_driver_support_at_tick( void )
 {
-  TMS570_RTI.INTFLAG = 0x0001;
+  TMS570_RTI.INTFLAG = TMS570_RTI_INTFLAG_INT0;
 }
 
 /**
@@ -156,7 +172,8 @@ static void tms570_clock_driver_support_install_isr(
 static void tms570_clock_driver_support_shutdown_hardware( void )
 {
   /* turn off the timer interrupts */
-  TMS570_RTI.CLEARINTENA = 0x2;
+  TMS570_RTI.CLEARINTENA = TMS570_RTI_CLEARINTENA_CLEAROVL0INT |
+   TMS570_RTI_CLEARINTENA_CLEARINT0;  
 }
 
 #define Clock_driver_support_initialize_hardware \
diff --git a/c/src/lib/libbsp/arm/tms570/console/printk-support.c 
b/c/src/lib/libbsp/arm/tms570/console/printk-support.c
index ed33d98..77e4f1a 100644
--- a/c/src/lib/libbsp/arm/tms570/console/printk-support.c
+++ b/c/src/lib/libbsp/arm/tms570/console/printk-support.c
@@ -41,7 +41,7 @@ static void tms570_putc(char ch)
   rtems_interrupt_level level;
 
   rtems_interrupt_disable(level);
-  while ( ( driver_context_table[0].regs->FLR & 0x100 ) == 0) {
+  while ( ( driver_context_table[0].regs->FLR & TMS570_SCI_FLR_TXRDY ) == 0) {
 rtems_interrupt_flash(level);
   }
   driver_context_table[0].regs->TD = ch;
@@ -74,7 +74,7 @@ static void tms570_uart_output(char c)
  */
 static int tms570_uart_input( void )
 {
-  if ( driver_context_table[0].regs->FLR & (1<<9) ) {
+  if ( driver_context_table[0].regs->FLR & TMS570_SCI_FLR_RXRDY ) {
   return driver_context_table[0].regs->RD;
   } else {
   return -1;
diff --git a/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c 
b/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
index 44b53f5..54c1b69 100644
--- a/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
+++ b/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
@@ -155,7 +155,7 @@ static int tms570_sci_read_received_chars(
  */
 static void tms570_sci_enable_interrupts(tms570_sci_context * ctx)
 {
-  ctx->regs->SETINT = (1<<9);
+  ctx->regs->SETINT = TMS570_SCI_SETINT_SET_RX_INT;
 }
 
 /**
@@ -169,7 +169,7 @@ static void tms570_sci_enable_interrupts(tms570_sci_context 
* ctx)
  */
 static void tms570_sci_disable_interrupts(tms570_sci_context * ctx)
 {
-  ctx->regs->CLEARINT = (1<

Re: [PATCH 2/2] bsp/tms570 Use bitfields instead of hard-coded values

2015-07-17 Thread Joel Sherrill

I am about to leave for a week. If these are OK, they need to
be committed to the master and 4.11 branch please.

On 7/17/2015 10:04 AM, Premysl Houdek wrote:

Signed-off-by: Premysl Houdek 
---
  c/src/lib/libbsp/arm/tms570/clock/clock.c  | 31 +++-
  .../lib/libbsp/arm/tms570/console/printk-support.c |  4 +--
  c/src/lib/libbsp/arm/tms570/console/tms570-sci.c   | 34 --
  c/src/lib/libbsp/arm/tms570/pom/tms570-pom.c   | 15 +-
  4 files changed, 52 insertions(+), 32 deletions(-)

diff --git a/c/src/lib/libbsp/arm/tms570/clock/clock.c 
b/c/src/lib/libbsp/arm/tms570/clock/clock.c
index 1d887af..45da093 100644
--- a/c/src/lib/libbsp/arm/tms570/clock/clock.c
+++ b/c/src/lib/libbsp/arm/tms570/clock/clock.c
@@ -85,23 +85,39 @@ static void 
tms570_clock_driver_support_initialize_hardware( void )
/* Hardware specific initialize */
TMS570_RTI.GCTRL = 0;
TMS570_RTI.CNT[0].CPUCx = tc_prescaler - 1;
-  TMS570_RTI.TBCTRL = 2;
+  TMS570_RTI.TBCTRL = TMS570_RTI_TBCTRL_INC;
TMS570_RTI.CAPCTRL = 0;
TMS570_RTI.COMPCTRL = 0;
/* set counter to zero */
TMS570_RTI.CNT[0].UCx = 0;
TMS570_RTI.CNT[0].FRCx = 0;
/* clear interrupts*/
-  TMS570_RTI.CLEARINTENA = 0x00070f0f;
-  TMS570_RTI.INTFLAG = 0x0007000f;
+  TMS570_RTI.CLEARINTENA = TMS570_RTI_CLEARINTENA_CLEAROVL1INT |
+   TMS570_RTI_CLEARINTENA_CLEAROVL0INT |
+   TMS570_RTI_CLEARINTENA_CLEARTBINT |
+   TMS570_RTI_CLEARINTENA_CLEARDMA3 |
+   TMS570_RTI_CLEARINTENA_CLEARDMA2 |
+   TMS570_RTI_CLEARINTENA_CLEARDMA1 |
+   TMS570_RTI_CLEARINTENA_CLEARDMA0 |
+   TMS570_RTI_CLEARINTENA_CLEARINT3 |
+   TMS570_RTI_CLEARINTENA_CLEARINT2 |
+   TMS570_RTI_CLEARINTENA_CLEARINT1 |
+   TMS570_RTI_CLEARINTENA_CLEARINT0;
+  TMS570_RTI.INTFLAG = TMS570_RTI_INTFLAG_OVL1INT |
+   TMS570_RTI_INTFLAG_OVL0INT |
+   TMS570_RTI_INTFLAG_TBINT |
+   TMS570_RTI_INTFLAG_INT3 |
+   TMS570_RTI_INTFLAG_INT2 |
+   TMS570_RTI_INTFLAG_INT1 |
+   TMS570_RTI_INTFLAG_INT0;
/* set timer */
TMS570_RTI.CMP[0].COMPx = TMS570_RTI.CNT[0].FRCx + tc_increments_per_tick;
TMS570_RTI.COMP0CLR = TMS570_RTI.CMP[0].COMPx + tc_increments_per_tick / 2;
TMS570_RTI.CMP[0].UDCPx = tc_increments_per_tick;
/* enable interupt */
-  TMS570_RTI.SETINTENA = 0x1;
+  TMS570_RTI.SETINTENA = TMS570_RTI_SETINTENA_SETINT0;
/* enable timer */
-  TMS570_RTI.GCTRL = 1;
+  TMS570_RTI.GCTRL = TMS570_RTI_GCTRL_CNT0EN;
/* set timecounter */
tms570_rti_tc.tc_get_timecount = tms570_rti_get_timecount;
tms570_rti_tc.tc_counter_mask = 0x;
@@ -117,7 +133,7 @@ static void 
tms570_clock_driver_support_initialize_hardware( void )
   */
  static void tms570_clock_driver_support_at_tick( void )
  {
-  TMS570_RTI.INTFLAG = 0x0001;
+  TMS570_RTI.INTFLAG = TMS570_RTI_INTFLAG_INT0;
  }

  /**
@@ -156,7 +172,8 @@ static void tms570_clock_driver_support_install_isr(
  static void tms570_clock_driver_support_shutdown_hardware( void )
  {
/* turn off the timer interrupts */
-  TMS570_RTI.CLEARINTENA = 0x2;
+  TMS570_RTI.CLEARINTENA = TMS570_RTI_CLEARINTENA_CLEAROVL0INT |
+   TMS570_RTI_CLEARINTENA_CLEARINT0;
  }

  #define Clock_driver_support_initialize_hardware \
diff --git a/c/src/lib/libbsp/arm/tms570/console/printk-support.c 
b/c/src/lib/libbsp/arm/tms570/console/printk-support.c
index ed33d98..77e4f1a 100644
--- a/c/src/lib/libbsp/arm/tms570/console/printk-support.c
+++ b/c/src/lib/libbsp/arm/tms570/console/printk-support.c
@@ -41,7 +41,7 @@ static void tms570_putc(char ch)
rtems_interrupt_level level;

rtems_interrupt_disable(level);
-  while ( ( driver_context_table[0].regs->FLR & 0x100 ) == 0) {
+  while ( ( driver_context_table[0].regs->FLR & TMS570_SCI_FLR_TXRDY ) == 0) {
  rtems_interrupt_flash(level);
}
driver_context_table[0].regs->TD = ch;
@@ -74,7 +74,7 @@ static void tms570_uart_output(char c)
   */
  static int tms570_uart_input( void )
  {
-  if ( driver_context_table[0].regs->FLR & (1<<9) ) {
+  if ( driver_context_table[0].regs->FLR & TMS570_SCI_FLR_RXRDY ) {
return driver_context_table[0].regs->RD;
} else {
return -1;
diff --git a/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c 
b/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
index 44b53f5..54c1b69 100644
--- a/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
+++ b/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c
@@ -155,7 +155,7 @@ static int tms570_sci_read_received_chars(
   */
  static void tms570_sci_enable_interrupts(tms570_sci_context * ctx)
  {
-  ctx->regs->SETINT = (1<<9);
+  ctx->regs->SETINT = TMS570_SCI_SETINT_SET_RX_INT;

Re: [PATCH 2/2] bsp/tms570 Use bitfields instead of hard-coded values

2015-07-17 Thread Pavel Pisa
Hello Joel,

I have been with Premek when he tested these on the target.

[PATCH 1/2] bsp/tms570: skipped 32bit field definitions and corrected single 
bit fields
   This one clean header files. There has been unnecessary defines
   of whole registers as fields and mistake in single bit definitions.
   I am not happy that this slipped, we have discused and planned use
   of BSP_BIT32 long time ago but we have found mistake during attempt
   to clean BSP a little more and get rid of hardcoded values.

   Patch is huge so it blocks on list moderator approval.
   If you do not have it received then I or Premek send it offlist
   gzipped.
   

[PATCH 2/2] bsp/tms570 Use bitfields instead of hard-coded values
   This makes already implemented code much more readable.

If these patches can make to common base it would be nice.

Best wishes,

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


Re: [PATCH 2/2] bsp/tms570 Use bitfields instead of hard-coded values

2015-07-17 Thread Joel Sherrill


On July 17, 2015 12:22:14 PM CDT, Pavel Pisa  wrote:
>Hello Joel,
>
>I have been with Premek when he tested these on the target.
>
>[PATCH 1/2] bsp/tms570: skipped 32bit field definitions and corrected
>single bit fields
>   This one clean header files. There has been unnecessary defines
>   of whole registers as fields and mistake in single bit definitions.
>   I am not happy that this slipped, we have discused and planned use
>   of BSP_BIT32 long time ago but we have found mistake during attempt
>   to clean BSP a little more and get rid of hardcoded values.
>
>   Patch is huge so it blocks on list moderator approval.
>   If you do not have it received then I or Premek send it offlist
>   gzipped.
>  

Please cc Gedare if you need to send it privately. I wasn't concerned about the 
quality of the patch. Only that I was leaving the office and will be in the UK 
next week so wasn't in a position to apply it.  :)

So whoever can apply it can. 


>
>[PATCH 2/2] bsp/tms570 Use bitfields instead of hard-coded values
>   This makes already implemented code much more readable.
>
>If these patches can make to common base it would be nice.
>
>Best wishes,
>
> Pavel

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


Seeking Projects

2015-07-17 Thread Deval Shah
Hello,

I am currently perusing electronics engineering (currently in final year)
from BITS-Pilani University. I love embedded systems and system
programming.
I want to contribute to opensource community and for that I am looking for
projects related to real time embedded systems.

skills: C programming, Computer architecture, bash scripting, Python, basic
understanding of Linux kernel.

In addition I have a Raspberry PI B+ board. So project related to it will
be more helpful for me to practice learn stuff.

Thank you for your help and support.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [rtems-source-builder commit] rtems4.11: OpenMP support for ARM, PowerPC, SPARC

2015-07-17 Thread Chris Johns
On 18/07/2015 1:20 am, Joel Sherril wrote:
> diff --git a/rtems/config/4.11/rtems-arm.bset 
> b/rtems/config/4.11/rtems-arm.bset
> index 1e06796..c0bd04a 100644
> --- a/rtems/config/4.11/rtems-arm.bset
> +++ b/rtems/config/4.11/rtems-arm.bset
> @@ -17,6 +17,11 @@
>  %define enable_obsolete 1
>  
>  #
> +# Enable OpenMP support
> +#
> +%define with_libgomp
> +

I think this forces the option to be always on. Should a user be able to
disable the option with --without-libgomp ?

I made a recent change to the --with-/--without- logic and so I am not
sure how this interacts with the older gcc-common logic. I never updated it.

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


Re: Seeking Projects

2015-07-17 Thread Gedare Bloom
Welcome! Please have a look at our Open Projects [1] page, and you may also
like to see what is being done under the GSoC [2] and SOCIS [3] programs.
We have a handful of projects that are improving support for the RPi.

Do you have any particular goal, or are you just looking for something to
do?

[1] https://devel.rtems.org/wiki/Developer/OpenProjects
[2] https://devel.rtems.org/wiki/GSoC/2015
[3] https://devel.rtems.org/wiki/SOCIS/2015

Gedare

On Fri, Jul 17, 2015 at 1:52 PM, Deval Shah  wrote:

> Hello,
>
> I am currently perusing electronics engineering (currently in final year)
> from BITS-Pilani University. I love embedded systems and system
> programming.
> I want to contribute to opensource community and for that I am looking for
> projects related to real time embedded systems.
>
> skills: C programming, Computer architecture, bash scripting, Python,
> basic understanding of Linux kernel.
>
> In addition I have a Raspberry PI B+ board. So project related to it will
> be more helpful for me to practice learn stuff.
>
> Thank you for your help and support.
>
>
> ___
> 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