public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Re: Help enquiring thread info  in ecos
       [not found] <20031009143048.66729.qmail@web13002.mail.yahoo.com>
@ 2003-10-09 14:41 ` Gary Thomas
  2003-10-09 15:28   ` rich
  2003-10-09 16:41   ` Hadi Dewan
  0 siblings, 2 replies; 5+ messages in thread
From: Gary Thomas @ 2003-10-09 14:41 UTC (permalink / raw)
  To: Hadi Dewan; +Cc: eCos Discussion

Note: please copy replies to the eCos mailing list so that
all may benefit.  Private email is only available with a
support contract.

On Thu, 2003-10-09 at 08:30, Hadi Dewan wrote:
> Hi Gary,
> Thanks for an quick response. Right now I am just
> using "configtool" and "ecosconfig" to create an
> configuration file. I dont think RedBoot is hooked
> into those tools. Following are the steps I do to
> create ecos library and an application program.
> 
> 1. mkdir /tmp/ecos_work 
> 2. cd ecos_work 
> 3. ecosconfig new leon 
> 4. ecosconfig tree 
> 5. make 
> 
> I have attached the configuration file with this
> email. As you can see the GDB_STUB is  faded out. 
> To compile an application. I do the following
> sparc-elf-gcc twoThread.c -o twoThread.out
> -L./install/lib -I./install/include -Ttarget.ld
> -nostdlib 
> 
> 
> Using insight software I can connect to the target and
> set breakpoint/single step. Only with "info thread" I
> get error. If gdb is disable nothing will work. But it
> doesnt look at way. 
> 
> 
> Please let me know if I need to compile redboot to go
> around it. And also have a quick look at the attached
> file using "configtool". 
>    Thanks you 
>               Hadi 

More importantly, how was the debug environment on your
processor built?  In other words, the device has something
in FLASH/ROM - this may be RedBoot or simply GDB stubs.
This is what has to be built with the thread support present
since when Insight (or GDB) is talking to the target, it's
talking to the GDB support (in RedBoot or stubs) and not
directly to your application.


-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Re: Help enquiring thread info  in ecos
  2003-10-09 14:41 ` [ECOS] Re: Help enquiring thread info in ecos Gary Thomas
@ 2003-10-09 15:28   ` rich
  2003-10-10  6:12     ` Eric de Jong
  2003-10-09 16:41   ` Hadi Dewan
  1 sibling, 1 reply; 5+ messages in thread
From: rich @ 2003-10-09 15:28 UTC (permalink / raw)
  To: Hadi Dewan; +Cc: eCos Discussion

On Thursday 09 October 2003 07:41, Gary Thomas wrote:
> Note: please copy replies to the eCos mailing list so that
> all may benefit.  Private email is only available with a
> support contract.

We ran into a similar need.  We wrote a very small document on the C++ 
interface which is what eCos is written in.

http://www.navosha.com/e_reference.html

We never got any feedback any nobody expressed any interest in this document 
so it's unsupported.  The C++ documentation for the interface, for the thread 
especially, is NOT COMPLETE.  It's also not guarenteed to remain the same.  
It will give you a starting point however, but I suggest that you actually 
look at the code.

kapi.cxx will give you an idea how C is used to interface C++.  If you modify 
the C++ classes to include new member variables you will have modify the 
corresponding C structure since the two are unconnected at the code level.  
For example a C++ class might look like:

class A
{
  int i,
  int j,
  int k;

  A ();
  ~A();
};

and a *completely seperate C struct* is used to access this, which would look 
like

typedef struct
{
  int i;
  int j;
  int k;
} class_A;

if you added a new member variable to "class A" you must add the same variable 
in the same relative location in the C structure "class_A".  If you don't do 
this, (if memory serves) your OS will crash.

Hope that helps.  If it doesn't, read the source.

> On Thu, 2003-10-09 at 08:30, Hadi Dewan wrote:
> > Hi Gary,
> > Thanks for an quick response. Right now I am just
> > using "configtool" and "ecosconfig" to create an
> > configuration file. I dont think RedBoot is hooked
> > into those tools. Following are the steps I do to
> > create ecos library and an application program.
> >
> > 1. mkdir /tmp/ecos_work
> > 2. cd ecos_work
> > 3. ecosconfig new leon
> > 4. ecosconfig tree
> > 5. make
> >
> > I have attached the configuration file with this
> > email. As you can see the GDB_STUB is  faded out.
> > To compile an application. I do the following
> > sparc-elf-gcc twoThread.c -o twoThread.out
> > -L./install/lib -I./install/include -Ttarget.ld
> > -nostdlib
> >
> >
> > Using insight software I can connect to the target and
> > set breakpoint/single step. Only with "info thread" I
> > get error. If gdb is disable nothing will work. But it
> > doesnt look at way.
> >
> >
> > Please let me know if I need to compile redboot to go
> > around it. And also have a quick look at the attached
> > file using "configtool".
> >    Thanks you
> >               Hadi
>
> More importantly, how was the debug environment on your
> processor built?  In other words, the device has something
> in FLASH/ROM - this may be RedBoot or simply GDB stubs.
> This is what has to be built with the thread support present
> since when Insight (or GDB) is talking to the target, it's
> talking to the GDB support (in RedBoot or stubs) and not
> directly to your application.


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] Re: Help enquiring thread info  in ecos
  2003-10-09 14:41 ` [ECOS] Re: Help enquiring thread info in ecos Gary Thomas
  2003-10-09 15:28   ` rich
@ 2003-10-09 16:41   ` Hadi Dewan
  2003-10-09 16:44     ` Gary Thomas
  1 sibling, 1 reply; 5+ messages in thread
From: Hadi Dewan @ 2003-10-09 16:41 UTC (permalink / raw)
  To: Gary Thomas; +Cc: eCos Discussion


Gary,
I think I understand my problem better. I was running
a simulator called "tsim" which simulates a sparc
target.  I can run my program on the RAM of the "tsim"

I startup the simulatar("tsim") using a gdb flag on a
linux machine

(linux) tsim -gdb 
TSIM/LEON SPARC simulator, version 1.2.4 (professional
version)

using 64-bit time
serial port A on stdin/stdout
allocated 4096 K RAM memory, in 1 bank(s)
allocated 2048 K ROM memory
icache: 1 * 4 kbytes, 16 bytes/line (4 kbytes total)
dcache: 1 * 4 kbytes, 16 bytes/line (4 kbytes total)
gdb interface: using port 1234


The simulator  start to listen on port 1234 for any
gdb request. Using insight I can connect to the
simulator and load my application program into memory.


My application program is build only with
"sparc-elf-gcc", this means I am not packaging all the
OS code into this application code. 

I think I need to use "mkprom" or "redBoot" to include
all the all the debug capabilities. 

Please let me know if this make sense. 
        Hadi 
ps : I have to read up on redBoot.



--- Gary Thomas <gary@mlbassoc.com> wrote:
> Note: please copy replies to the eCos mailing list
> so that
> all may benefit.  Private email is only available
> with a
> support contract.
> 
> On Thu, 2003-10-09 at 08:30, Hadi Dewan wrote:
> > Hi Gary,
> > Thanks for an quick response. Right now I am just
> > using "configtool" and "ecosconfig" to create an
> > configuration file. I dont think RedBoot is hooked
> > into those tools. Following are the steps I do to
> > create ecos library and an application program.
> > 
> > 1. mkdir /tmp/ecos_work 
> > 2. cd ecos_work 
> > 3. ecosconfig new leon 
> > 4. ecosconfig tree 
> > 5. make 
> > 
> > I have attached the configuration file with this
> > email. As you can see the GDB_STUB is  faded out. 
> > To compile an application. I do the following
> > sparc-elf-gcc twoThread.c -o twoThread.out
> > -L./install/lib -I./install/include -Ttarget.ld
> > -nostdlib 
> > 
> > 
> > Using insight software I can connect to the target
> and
> > set breakpoint/single step. Only with "info
> thread" I
> > get error. If gdb is disable nothing will work.
> But it
> > doesnt look at way. 
> > 
> > 
> > Please let me know if I need to compile redboot to
> go
> > around it. And also have a quick look at the
> attached
> > file using "configtool". 
> >    Thanks you 
> >               Hadi 
> 
> More importantly, how was the debug environment on
> your
> processor built?  In other words, the device has
> something
> in FLASH/ROM - this may be RedBoot or simply GDB
> stubs.
> This is what has to be built with the thread support
> present
> since when Insight (or GDB) is talking to the
> target, it's
> talking to the GDB support (in RedBoot or stubs) and
> not
> directly to your application.
> 
> 
> -- 
> Gary Thomas <gary@mlbassoc.com>
> MLB Associates
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Re: Help enquiring thread info  in ecos
  2003-10-09 16:41   ` Hadi Dewan
@ 2003-10-09 16:44     ` Gary Thomas
  0 siblings, 0 replies; 5+ messages in thread
From: Gary Thomas @ 2003-10-09 16:44 UTC (permalink / raw)
  To: Hadi Dewan; +Cc: eCos Discussion

On Thu, 2003-10-09 at 10:32, Hadi Dewan wrote:
> Gary,
> I think I understand my problem better. I was running
> a simulator called "tsim" which simulates a sparc
> target.  I can run my program on the RAM of the "tsim"
> 
> I startup the simulatar("tsim") using a gdb flag on a
> linux machine
> 
> (linux) tsim -gdb 
> TSIM/LEON SPARC simulator, version 1.2.4 (professional
> version)
> 
> using 64-bit time
> serial port A on stdin/stdout
> allocated 4096 K RAM memory, in 1 bank(s)
> allocated 2048 K ROM memory
> icache: 1 * 4 kbytes, 16 bytes/line (4 kbytes total)
> dcache: 1 * 4 kbytes, 16 bytes/line (4 kbytes total)
> gdb interface: using port 1234
> 
> 
> The simulator  start to listen on port 1234 for any
> gdb request. Using insight I can connect to the
> simulator and load my application program into memory.
> 
> 
> My application program is build only with
> "sparc-elf-gcc", this means I am not packaging all the
> OS code into this application code. 

Anytime you build an eCos application, it includes the 
eCos kernel as well as your application code.

> 
> I think I need to use "mkprom" or "redBoot" to include
> all the all the debug capabilities. 
> 
> Please let me know if this make sense. 
>         Hadi 
> ps : I have to read up on redBoot.
> 

Actually, you'll have to either add the thread support into
the simulator, or include GDB stubs in your application.

> 
> 
> --- Gary Thomas <gary@mlbassoc.com> wrote:
> > Note: please copy replies to the eCos mailing list
> > so that
> > all may benefit.  Private email is only available
> > with a
> > support contract.
> > 
> > On Thu, 2003-10-09 at 08:30, Hadi Dewan wrote:
> > > Hi Gary,
> > > Thanks for an quick response. Right now I am just
> > > using "configtool" and "ecosconfig" to create an
> > > configuration file. I dont think RedBoot is hooked
> > > into those tools. Following are the steps I do to
> > > create ecos library and an application program.
> > > 
> > > 1. mkdir /tmp/ecos_work 
> > > 2. cd ecos_work 
> > > 3. ecosconfig new leon 
> > > 4. ecosconfig tree 
> > > 5. make 
> > > 
> > > I have attached the configuration file with this
> > > email. As you can see the GDB_STUB is  faded out. 
> > > To compile an application. I do the following
> > > sparc-elf-gcc twoThread.c -o twoThread.out
> > > -L./install/lib -I./install/include -Ttarget.ld
> > > -nostdlib 
> > > 
> > > 
> > > Using insight software I can connect to the target
> > and
> > > set breakpoint/single step. Only with "info
> > thread" I
> > > get error. If gdb is disable nothing will work.
> > But it
> > > doesnt look at way. 
> > > 
> > > 
> > > Please let me know if I need to compile redboot to
> > go
> > > around it. And also have a quick look at the
> > attached
> > > file using "configtool". 
> > >    Thanks you 
> > >               Hadi 
> > 
> > More importantly, how was the debug environment on
> > your
> > processor built?  In other words, the device has
> > something
> > in FLASH/ROM - this may be RedBoot or simply GDB
> > stubs.
> > This is what has to be built with the thread support
> > present
> > since when Insight (or GDB) is talking to the
> > target, it's
> > talking to the GDB support (in RedBoot or stubs) and
> > not
> > directly to your application.
> > 
> > 
> > -- 
> > Gary Thomas <gary@mlbassoc.com>
> > MLB Associates
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Re: Help enquiring thread info  in ecos
  2003-10-09 15:28   ` rich
@ 2003-10-10  6:12     ` Eric de Jong
  0 siblings, 0 replies; 5+ messages in thread
From: Eric de Jong @ 2003-10-10  6:12 UTC (permalink / raw)
  To: Ecos-Discuss

Nice addition for the manual! Thanks.

Eric.


rich wrote:
-----------
 We ran into a similar need.  We wrote a very small document on the C++
interface which is what eCos is written in.
http://www.navosha.com/e_reference.html


We never got any feedback any nobody expressed any interest in this document
so it's unsupported.  The C++ documentation for the interface, for the thread
especially, is NOT COMPLETE.  It's also not guarenteed to remain the same.
It will give you a starting point however, but I suggest that you actually
look at the code.



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-10  6:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20031009143048.66729.qmail@web13002.mail.yahoo.com>
2003-10-09 14:41 ` [ECOS] Re: Help enquiring thread info in ecos Gary Thomas
2003-10-09 15:28   ` rich
2003-10-10  6:12     ` Eric de Jong
2003-10-09 16:41   ` Hadi Dewan
2003-10-09 16:44     ` Gary Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).