Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Any Open Source Embedded C++ Compiler ?

Reply
Thread Tools

Any Open Source Embedded C++ Compiler ?

 
 
arnuld
Guest
Posts: n/a
 
      10-06-2009
At the company where I work, its decided by higher authority that we will
use C since our software will run on some embedded platforms and for
embedded platforms C++ is not a good idea. Reading Stroustrup's FAQs
tells me the opposite: http://www.research.att.com/~bs/bs_faq.html

I am implementing a Priority-Queue (PQ) in C but I see C++ already has a
template, a generic PQ implemented in Std. Lib. Hence I am not much
interested in code-duplication, I am not interested in doing a work which
has already been done in a much better than I will ever do. We are using
gcc for our embedded platform, now I don't get it if gcc works on
embedded platform then why can't we use use g++ ? The embedded platforms
we are working on will mostly be *NIX or much less vxWorks and very
rarely something Windows based. (that's really not a ISO C++ question but
I asked it because I have to ask about templates on embedded platforms)

Has anyone worked on embedded platforms before, may be he can tell if we
can use templates over there and any other information will be
appreciated.




--
www.lispmachine.wordpress.com
my email is @ the above blog.

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      10-06-2009
arnuld wrote:
> At the company where I work, its decided by higher authority that we will
> use C since our software will run on some embedded platforms and for
> embedded platforms C++ is not a good idea. Reading Stroustrup's FAQs
> tells me the opposite: http://www.research.att.com/~bs/bs_faq.html
>
> I am implementing a Priority-Queue (PQ) in C but I see C++ already has a
> template, a generic PQ implemented in Std. Lib. Hence I am not much
> interested in code-duplication, I am not interested in doing a work which
> has already been done in a much better than I will ever do. We are using
> gcc for our embedded platform, now I don't get it if gcc works on
> embedded platform then why can't we use use g++ ?


Policy rather than practicality!

> Has anyone worked on embedded platforms before, may be he can tell if we
> can use templates over there and any other information will be
> appreciated.


Often. About half of my C++ work is with embedded platforms.

--
Ian Collins
 
Reply With Quote
 
 
 
 
robertwessel2@yahoo.com
Guest
Posts: n/a
 
      10-06-2009
On Oct 6, 12:00*am, arnuld <(E-Mail Removed)> wrote:
> At the company where I work, its decided by higher authority that we will
> use C since our software will run on some embedded platforms and for
> embedded platforms C++ is not a good idea. Reading Stroustrup's FAQs
> tells me the opposite:http://www.research.att.com/~bs/bs_faq.html
>
> I am implementing a Priority-Queue (PQ) in C but I see C++ already has a
> template, a generic PQ implemented in Std. Lib. Hence I am not much
> interested in code-duplication, I am not interested in doing a work which
> has already been done in a much better than I will ever do. We are using
> gcc for our embedded platform, now I don't get it if gcc works on
> embedded platform then why can't we use use g++ ? The embedded platforms
> we are working on will mostly be *NIX or much less vxWorks and very
> rarely something Windows based. (that's really not a ISO C++ question but
> I asked it because I have to ask about templates on embedded platforms)
>
> Has anyone worked on embedded platforms before, may be he can tell if we
> can use templates over there and any other information will be
> appreciated.



You should really ask over in comp.arch.embedded. C++ can be used
successfully in embedded systems, particularly larger ones, but it's
often necessary to carefully control code size (many embedded systems
have very limited RAM and ROM, and things like template can lead to
major growth in code size), code speed (and things like extra this
pointers or vtable based calls can hurt a lot in some cases), and a
need to avoid things with unpredictable run-time impact, like dynamic
allocation (and since many C++ programs 'new' all over the place,
that's an issue). All that, plus poor or non-existent C++ support in
the tool chain, often leads embedded developers to stick with C.

But without knowing what you're doing, it's hard to say if C++ is
suitable.
 
Reply With Quote
 
arnuld
Guest
Posts: n/a
 
      10-06-2009
> On Tue, 06 Oct 2009 18:18:52 +1300, Ian Collins wrote:

> Policy rather than practicality!


I prefer technical discussions over business ones and that's why I posted
it here.


> Often. About half of my C++ work is with embedded platforms.


How much templates ? Currently using Templates is the only issue that is
stopping me from recommending C++ instead of C.




--
www.lispmachine.wordpress.com
my email is @ the above blog.

 
Reply With Quote
 
arnuld
Guest
Posts: n/a
 
      10-06-2009
> On Oct 6, 10:22*am, "(E-Mail Removed)" <(E-Mail Removed)> wrote:

> You should really ask over in comp.arch.embedded. *


Okay, I just posted it there.


> C++ can be used successfully in embedded systems,
> ...SNIP...
> But without knowing what you're doing, it's hard to say if C++ is
> suitable.


Well, the target embedded platform is not some specific one, it could
be anything with the guarantee that it mostly will be *NIX, very less
vxWorks and very rarely something Windows based. Thats all I can
guarantee. Currently the implementation of PQ is the only biggest
issue of using C. If I am able to use C++ then I will not be using any
OOP, only procedural style programming and Templates.

If I have not answered your question, please ask in detail and please
be specific.

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      10-06-2009
arnuld wrote:
>> On Tue, 06 Oct 2009 18:18:52 +1300, Ian Collins wrote:

>
>> Policy rather than practicality!

>
> I prefer technical discussions over business ones and that's why I posted
> it here.
>
>
>> Often. About half of my C++ work is with embedded platforms.

>
> How much templates ? Currently using Templates is the only issue that is
> stopping me from recommending C++ instead of C.


I don't see what the big deal is with templates. There's plenty of
other language features that can be misused.

--
Ian Collins
 
Reply With Quote
 
arnuld
Guest
Posts: n/a
 
      10-06-2009
> On Tue, 06 Oct 2009 19:38:14 +1300, Ian Collins wrote:

> I don't see what the big deal is with templates. There's plenty of
> other language features that can be misused.


I am not talking about misuse, I am talking about the possibility of
using templates as efficiently as (hand-coded) C implementations (by an
average guy) of them.





--
www.lispmachine.wordpress.com
my email is @ the above blog.

 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      10-06-2009
arnuld wrote:
>> On Tue, 06 Oct 2009 19:38:14 +1300, Ian Collins wrote:

>
>> I don't see what the big deal is with templates. There's plenty of
>> other language features that can be misused.

>
> I am not talking about misuse, I am talking about the possibility of
> using templates as efficiently as (hand-coded) C implementations (by an
> average guy) of them.


Well if the alternative is macros, where's the problem?

--
Ian Collins
 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      10-06-2009
Ian Collins wrote:
> arnuld wrote:
>>> On Tue, 06 Oct 2009 19:38:14 +1300, Ian Collins wrote:

>>
>>> I don't see what the big deal is with templates. There's plenty of
>>> other language features that can be misused.

>>
>> I am not talking about misuse, I am talking about the possibility of
>> using templates as efficiently as (hand-coded) C implementations (by
>> an average guy) of them.

>
> Well if the alternative is macros, where's the problem?


Going back to your original question, using C++ will save the developers
form having to hand roll containers.

--
Ian Collins
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      10-06-2009
arnuld a écrit :
> At the company where I work, its decided by higher authority that we will
> use C since our software will run on some embedded platforms and for
> embedded platforms C++ is not a good idea. Reading Stroustrup's FAQs
> tells me the opposite: http://www.research.att.com/~bs/bs_faq.html
>
> I am implementing a Priority-Queue (PQ) in C but I see C++ already has a
> template, a generic PQ implemented in Std. Lib. Hence I am not much
> interested in code-duplication, I am not interested in doing a work which
> has already been done in a much better than I will ever do. We are using
> gcc for our embedded platform, now I don't get it if gcc works on
> embedded platform then why can't we use use g++ ? The embedded platforms
> we are working on will mostly be *NIX or much less vxWorks and very
> rarely something Windows based. (that's really not a ISO C++ question but
> I asked it because I have to ask about templates on embedded platforms)
>
> Has anyone worked on embedded platforms before, may be he can tell if we
> can use templates over there and any other information will be
> appreciated.
>
>
>
>


And why don't you use a priority queue in C? There are quite a few implementations!

Look in

http://www.google.com/codesearch

and type

priority queue. Choose plain C as language.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any open source, embeddable and in-memory C compiler? Limin Fu C Programming 2 03-01-2007 03:53 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM
Looking for Embedded Linux open source SIP Client * VOIP 0 08-15-2006 04:55 PM
Open source embedded C ; appropiate group? may_2005@olley.com C Programming 15 06-05-2005 08:39 AM
Open Source Conference in Japan: Open Source Realize Forum 2005 pat eyler Ruby 1 03-05-2005 03:50 AM



Advertisments