public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] eCos and C++
@ 2009-04-02  7:42 graham labdon
  2009-04-02  8:02 ` Paul D. DeRocco
  0 siblings, 1 reply; 6+ messages in thread
From: graham labdon @ 2009-04-02  7:42 UTC (permalink / raw)
  To: ecos-discuss


Hello everyone
 
Can anyone please tell me if eCos supports C++ STL
 
Thanks
 
Graham
_________________________________________________________________
Share your photos with Windows Live Photos – Free.
http://clk.atdmt.com/UKM/go/134665338/direct/01/

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

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

* RE: [ECOS] eCos and C++
  2009-04-02  7:42 [ECOS] eCos and C++ graham labdon
@ 2009-04-02  8:02 ` Paul D. DeRocco
  0 siblings, 0 replies; 6+ messages in thread
From: Paul D. DeRocco @ 2009-04-02  8:02 UTC (permalink / raw)
  To: eCos Discuss

> From: graham labdon
>
> Hello everyone
>
> Can anyone please tell me if eCos supports C++ STL

The problem with the C++ library (not just containers, but C++ strings too)
is that it relies on exceptions to report out-of-memory, and off-the-shelf
eCos doesn't properly support C++ exception handling. (At least 2.x
doesn't--I don't think 3.0 does either.)

But if you have so much RAM that you know you'll never run out, then you may
be able to fudge it. I would assume you'd have to change the compiler flags
manually, and I can't promise that the compiler won't generate code that
breaks something even when exceptions aren't actually thrown. I'd write some
test code that contains automatic objects with destructors, and maybe a
try/catch block, and read the assembler output to make sure it doesn't refer
to some data structure that eCos doesn't initialize. And of course, this
hackery might work on some CPUs but not others.

The right way to do this is to buy the eCosCentric version of eCos, which
has a modified kernel that properly supports C++ exceptions in a thread-safe
manner. Don't know if the 3.0 version is ready yet.

--

Ciao,               Paul D. DeRocco
Paul                mailto:pderocco@ix.netcom.com


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

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

* Re: [ECOS] eCos and C++
  2003-06-18  7:47 ` Andrew Lunn
@ 2003-06-18  8:59   ` Ilan Finci
  0 siblings, 0 replies; 6+ messages in thread
From: Ilan Finci @ 2003-06-18  8:59 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Retallack, Mark (Poole), ecos-discuss


What I meant in developing C++ application, is not to use the eCos C++ 
API, but ISO C++ code: iostream ....

for example: can I compile and run the following code:

#include <iostream>
int main()
{
   std::cout << "Hello World" << std::endl;
   return 0;
}


Thanks,
Ilan
Andrew Lunn wrote:
> On Wed, Jun 18, 2003 at 08:32:55AM +0100, Retallack, Mark (Poole) wrote:
> 
>>The core of eCos is C++ classes. C stub functions have been added for use in
>>basic C code. So you could make an application in C++. However it has been
>>suggested that you should use the 'c' based kernel calls instead of the cpp
>>classes directly. I cannot remember why, I did try to find the thread on the
>>mailing list but it is not easy to search for the keyword "c++". 
> 
> 
> Only the C API is documented and guaranteed to not change. The
> internal C++ API is not documented and at times has changed in ways
> that can break compatibility. 
> 
> Some people do use the C++ API, but with the understanding that things
> could break at any time. 
> 
>       Andrew
> 


-- 
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] 6+ messages in thread

* Re: [ECOS] eCos and C++
  2003-06-18  7:36 Retallack, Mark (Poole)
@ 2003-06-18  7:47 ` Andrew Lunn
  2003-06-18  8:59   ` Ilan Finci
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2003-06-18  7:47 UTC (permalink / raw)
  To: Retallack, Mark (Poole); +Cc: 'Ilan Finci', ecos-discuss

On Wed, Jun 18, 2003 at 08:32:55AM +0100, Retallack, Mark (Poole) wrote:
> The core of eCos is C++ classes. C stub functions have been added for use in
> basic C code. So you could make an application in C++. However it has been
> suggested that you should use the 'c' based kernel calls instead of the cpp
> classes directly. I cannot remember why, I did try to find the thread on the
> mailing list but it is not easy to search for the keyword "c++". 

Only the C API is documented and guaranteed to not change. The
internal C++ API is not documented and at times has changed in ways
that can break compatibility. 

Some people do use the C++ API, but with the understanding that things
could break at any time. 

      Andrew

-- 
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] 6+ messages in thread

* RE: [ECOS] eCos and C++
@ 2003-06-18  7:36 Retallack, Mark (Poole)
  2003-06-18  7:47 ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: Retallack, Mark (Poole) @ 2003-06-18  7:36 UTC (permalink / raw)
  To: 'Ilan Finci'; +Cc: ecos-discuss

The core of eCos is C++ classes. C stub functions have been added for use in
basic C code. So you could make an application in C++. However it has been
suggested that you should use the 'c' based kernel calls instead of the cpp
classes directly. I cannot remember why, I did try to find the thread on the
mailing list but it is not easy to search for the keyword "c++". 

Mark Retallack
Siemens Traffic Controls 
Sopers Lane, Poole, Dorset. BH17 7ER. UK.
Tel: 01202 782844
Fax: 01202 78XXX
www.siemenstraffic.com

Committed to quality traffic solutions and service excellence


Today's Quote:

I feel like I'm in a Toilet Bowl with a thumbtack in my forehead!!

//-----------------------------------------------------------------------

-----Original Message-----
From: Ilan Finci [mailto:ifinci@myrealbox.com]
Sent: Tuesday 17 June 2003 10:58 AM
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] eCos and C++

Hi,
Can I use C++ with eCos?
I've just installed eCos 2.0, and the toolchain for powerpc-eabi, and I 
do see there the powerpc-eabi-g++ compiler, but no headers are found.
Is there a way to include support for C++?

Thanks,
Ilan


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


Siemens Traffic Controls is a division of Siemens plc. Registered No.
727817, England. 
Registered office: Siemens House, Oldbury, Bracknell, Berkshire, RG12 8FZ. 

This communication contains information which is confidential and 
may also be privileged. It is for the exclusive use of the addressee. 
If you are not the addressee please note that any distribution, 
reproduction, copying, publication or use of this communication 
or the information in it is prohibited.  If you have received this 
communication in error, please contact us immediately and also 
delete the communication from your computer. 



-- 
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] 6+ messages in thread

* [ECOS] eCos and C++
@ 2003-06-17 10:02 Ilan Finci
  0 siblings, 0 replies; 6+ messages in thread
From: Ilan Finci @ 2003-06-17 10:02 UTC (permalink / raw)
  To: ecos-discuss

Hi,
Can I use C++ with eCos?
I've just installed eCos 2.0, and the toolchain for powerpc-eabi, and I 
do see there the powerpc-eabi-g++ compiler, but no headers are found.
Is there a way to include support for C++?

Thanks,
Ilan


-- 
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] 6+ messages in thread

end of thread, other threads:[~2009-04-02  8:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-02  7:42 [ECOS] eCos and C++ graham labdon
2009-04-02  8:02 ` Paul D. DeRocco
  -- strict thread matches above, loose matches on Subject: below --
2003-06-18  7:36 Retallack, Mark (Poole)
2003-06-18  7:47 ` Andrew Lunn
2003-06-18  8:59   ` Ilan Finci
2003-06-17 10:02 Ilan Finci

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