Guruprasad pattar | 4 Apr 2005 07:54
Picon
Favicon

Redboot/Ecos Port for RM9K

Is there a Redboot/Ecos port available for RM9K MIPS
base processor from PMC-Sierra. 

TIA
Guruprasad

		
__________________________________ 
Yahoo! Messenger 
Show us what our next emoticon should look like. Join the fun. 
http://www.advision.webevents.yahoo.com/emoticontest

Gary Thomas | 5 Apr 2005 17:11
Favicon

CDL values

I'd like to have a CDL variable, flavor data, whose value
is specified as a single character.  I've not found any way
to write this, other than using the ASCII HEX equivalent.

If I write this:
  cdl_option XYZ {
    flavor data
    default_value 'a'
  }
I always get a syntax error.

Ideas?  Is this possible?

n.b. this is used in some C code where I'd like to say
  a = ch - XYZ;
instead of
  a = ch = 'a';

Thanks

--

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

GONZALEZ Laurent | 5 Apr 2005 17:31

Re: CDL values

On Tue, 05 Apr 2005 09:11:52 -0600
Gary Thomas <gary <at> mlbassoc.com> wrote:

> I'd like to have a CDL variable, flavor data, whose value
> is specified as a single character.  I've not found any way
> to write this, other than using the ASCII HEX equivalent.
> 
> If I write this:
>   cdl_option XYZ {
>     flavor data
>     default_value 'a'
>   }
> I always get a syntax error.
> 
> Ideas?  Is this possible?
> 
> n.b. this is used in some C code where I'd like to say
>   a = ch - XYZ;
> instead of
>   a = ch = 'a';
> 

This is a bit ugly, but the following should do the job:

  cdl_option XYZ {
    flavor data
    default_value \"a\"
	define_format "'%s'"
  }

(Continue reading)

Bart Veer | 5 Apr 2005 17:48
Favicon

Re: CDL values

>>>>> "Gary" == Gary Thomas <gary <at> mlbassoc.com> writes:

    Gary> I'd like to have a CDL variable, flavor data, whose value
    Gary> is specified as a single character.  I've not found any way
    Gary> to write this, other than using the ASCII HEX equivalent.

    Gary> If I write this:
    Gary>   cdl_option XYZ {
    Gary>     flavor data
    Gary>     default_value 'a'
    Gary>   }
    Gary> I always get a syntax error.

    Gary> Ideas?  Is this possible?

Sure, but not that way. In CDL as in Tcl everything is really a
string, there is no concept of individual chars. Instead you should be
able to do something like (untested):

  cdl_option XYZ {
      flavor		data
      default_value	{ "'a'" }
      legal_values {
          "'a'" "'b'" "'c'" "'d'" "'e'" "'f'" "'g'" "'h'" "'i'" 
          "'j'" "'k'" "'l'" "'m'" "'n'" "'o'" "'p'" "'q'" "'r'" 
          "'s'" "'t'" "'u'" "'v'" "'w'" "'x'" "'y'" "'z'"
      }
  }

The outer braces stop the Tcl interpreter from handling the quotes, so
(Continue reading)

Gary Thomas | 5 Apr 2005 20:49
Favicon

Re: CDL values

On Tue, 2005-04-05 at 16:48 +0100, Bart Veer wrote:
> >>>>> "Gary" == Gary Thomas <gary <at> mlbassoc.com> writes:
> 
>     Gary> I'd like to have a CDL variable, flavor data, whose value
>     Gary> is specified as a single character.  I've not found any way
>     Gary> to write this, other than using the ASCII HEX equivalent.
> 
>     Gary> If I write this:
>     Gary>   cdl_option XYZ {
>     Gary>     flavor data
>     Gary>     default_value 'a'
>     Gary>   }
>     Gary> I always get a syntax error.
> 
>     Gary> Ideas?  Is this possible?
> 
> Sure, but not that way. In CDL as in Tcl everything is really a
> string, there is no concept of individual chars. Instead you should be
> able to do something like (untested):
> 
>   cdl_option XYZ {
>       flavor		data
>       default_value	{ "'a'" }
>       legal_values {
>           "'a'" "'b'" "'c'" "'d'" "'e'" "'f'" "'g'" "'h'" "'i'" 
>           "'j'" "'k'" "'l'" "'m'" "'n'" "'o'" "'p'" "'q'" "'r'" 
>           "'s'" "'t'" "'u'" "'v'" "'w'" "'x'" "'y'" "'z'"
>       }
>   }
> 
(Continue reading)

Raghu | 8 Apr 2005 07:44
Picon
Favicon

Running Two Threads

Hi All, 

I wanted a minimal command line interface in eCOS. So
I took the "Redboot" parser and command interface and
implemented some commands. I have a IXP425 based
board.

When I use the call "cyg_user_start" within which I
have all my command line processing, the application
works fine. 

But within "cyg_user_start" if I spawn a thread and 
due the command line processing within this thread, it
does not give any o/p on the console and the thread
seems to be suspended. 

But I have spawn a "dummy" thread, the dummy thread
runs fine. 

The "cyg_io_read" & "cyg_io_write" are documented to
be "blocking calls" but I tried with setting the
option, CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING in
ecos.ecc and also "cyg_io_set_config" but with no
significance. 

Any clues please ? TIA.
Regards,
Raghu

RedBoot> go
(Continue reading)

Raghu | 8 Apr 2005 12:41
Picon
Favicon

cyg_io_read blocking

Hi, 
Sample code of "cyg_io_read", "cyg_io_write" that
blocks when a thread is spawned, but if called from a 
functions dosent.

void cyg_user_start( void )
{
    cyg_thread_create( 4, serial_thread_handler, ...
                     );
    cyg_thread_resume( handle );
}

void serial_thread_handler( cyg_addrword_t data )
{
     cyg_io_lookup( &hdl );
     for( ; ; ){
          cyg_io_read( hdl, &ch, &len );
          cyg_io_write( hdl, &ch, &len );
     }
}

But if "serial_thread_handler" is directly called from
"cyg_user_start" as a function call, there is no
issues.

Regards,
Raghu.

		
__________________________________ 
(Continue reading)

Bart Veer | 8 Apr 2005 14:33
Favicon

Re: cyg_io_read blocking

>>>>> "Raghu" == Raghu  <raghu_dk <at> yahoo.com> writes:

    Raghu> Sample code of "cyg_io_read", "cyg_io_write" that blocks
    Raghu> when a thread is spawned, but if called from a functions
    Raghu> dosent.

    Raghu> void cyg_user_start( void )
    Raghu> {
    Raghu>     cyg_thread_create( 4, serial_thread_handler, ...
    Raghu>                      );
    Raghu>     cyg_thread_resume( handle );
    Raghu> }

    Raghu> void serial_thread_handler( cyg_addrword_t data )
    Raghu> {
    Raghu>      cyg_io_lookup( &hdl );
    Raghu>      for( ; ; ){
    Raghu>           cyg_io_read( hdl, &ch, &len );
    Raghu>           cyg_io_write( hdl, &ch, &len );
    Raghu>      }
    Raghu> }

    Raghu> But if "serial_thread_handler" is directly called from
    Raghu> "cyg_user_start" as a function call, there is no
    Raghu> issues.

cyg_user_start() is run during system startup, before the scheduler is
started or interrupts are enabled. There is no way for the system to
block at this time. Blocking involves transferring control to another
thread, possibly the idle thread, and that cannot happen if the
(Continue reading)

Gary Thomas | 8 Apr 2005 14:44
Favicon

Re: cyg_io_read blocking

On Fri, 2005-04-08 at 13:33 +0100, Bart Veer wrote:
> >>>>> "Raghu" == Raghu  <raghu_dk <at> yahoo.com> writes:
> 
>     Raghu> Sample code of "cyg_io_read", "cyg_io_write" that blocks
>     Raghu> when a thread is spawned, but if called from a functions
>     Raghu> dosent.
> 
>     Raghu> void cyg_user_start( void )
>     Raghu> {
>     Raghu>     cyg_thread_create( 4, serial_thread_handler, ...
>     Raghu>                      );
>     Raghu>     cyg_thread_resume( handle );
>     Raghu> }
> 
>     Raghu> void serial_thread_handler( cyg_addrword_t data )
>     Raghu> {
>     Raghu>      cyg_io_lookup( &hdl );
>     Raghu>      for( ; ; ){
>     Raghu>           cyg_io_read( hdl, &ch, &len );
>     Raghu>           cyg_io_write( hdl, &ch, &len );
>     Raghu>      }
>     Raghu> }
> 
>     Raghu> But if "serial_thread_handler" is directly called from
>     Raghu> "cyg_user_start" as a function call, there is no
>     Raghu> issues.
> 
> cyg_user_start() is run during system startup, before the scheduler is
> started or interrupts are enabled. There is no way for the system to
> block at this time. Blocking involves transferring control to another
(Continue reading)

Errin Bechtel | 13 Apr 2005 13:47
Picon
Favicon

m68k patches

Here are chagnes I made to the hal/m68k files to get
it to compile.  I have a mcf5282 port working that I
will submit as soon as I can.  

Index: ChangeLog
===================================================================
RCS file:
/cvs/ecos/ecos/packages/hal/m68k/mcf52xx/var/current/ChangeLog,v
retrieving revision 1.2
diff -u -r1.2 ChangeLog
--- ChangeLog	22 Apr 2004 15:26:39 -0000	1.2
+++ ChangeLog	13 Apr 2005 11:31:39 -0000
 <at>  <at>  -1,3 +1,8  <at>  <at> 
+2005-04-13  Errin Bechtel <errin_bechtel <at> yahoo.com>
+	 * include/var_arch.h
+	 Fixed HAL_GET_GDB_REGISTERS and
HAL_SET_GDB_REGISTERS, replaced nml_ctxt with normal
to
+	 match struct.
+	 
 2004-04-22  Jani Monoses <jani <at> iv.ro>

 	 * cdl/hal_m68k_mcf52xx.cdl :
Index: include/var_arch.h
===================================================================
RCS file:
/cvs/ecos/ecos/packages/hal/m68k/mcf52xx/var/current/include/var_arch.h,v
retrieving revision 1.1
diff -u -r1.1 var_arch.h
--- include/var_arch.h	29 May 2002 18:28:16 -0000	1.1
(Continue reading)


Gmane