Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Discussion on PIC C/C++ compilers

Status
Not open for further replies.

mfkutb

Banned
Joined
May 27, 2005
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
0
C++ compiler

can any one introduce a pic c++ compiler
 

C++ compiler

AFAIK : C2C C++ compiler and IAR Embeeded Workbench...

Why do you want to use c++ in pic ?
 

C++ compiler

ok if there was c compiler not c++ i'll be grateful
 

C++ compiler

C is more than powerfull enough for embedded systems. C is a simple elegant complete language.

Lets face it, C++ is the biggest, corrupted, name mangled, convoluted pile of indecypheral crap that ever pretended to be a programming language.
 

Re: C++ compiler

btbass said:
Lets face it, C++ is the biggest, corrupted, name mangled, convoluted pile of indecypheral crap that ever pretended to be a programming language.
I'm not trying to flame here, and I agree that C++ is overkill for a PIC, but you would change you mind about C++ after working with 10 other programmers on the same executable. Granted, embedded firmware projects are relatively small and it's rare when there are more than 2 programmers working on the code for the same microcontroller. However, in the world of software large projects are not uncommon, and integration of large project in C++ is a lot easier than in C.
 

Re: C++ compiler

Granted, c++ is meant for large distributed systems where namespaces and interfaces allow software teams to develop systems. Miles away from 2K of rom in a pic.
But when you get into templates and partial template specialization it begins to get complex. You cant say that the following code snippet rolls off the tounge and is obvious.
From Andrei Alexandrescu.

Code:
////////////////////////////////////////////////////////////////////////////////
// class template Factory
// Implements a generic object factory
////////////////////////////////////////////////////////////////////////////////

    template
    <
        class AbstractProduct, 
        typename IdentifierType,
        typename ProductCreator = AbstractProduct* (*)(),
        template<typename, class>
            class FactoryErrorPolicy = DefaultFactoryError
    >
    class Factory 
        : public FactoryErrorPolicy<IdentifierType, AbstractProduct>
    {
    public:
        bool Register(const IdentifierType& id, ProductCreator creator)
        {
            return associations_.insert(
                IdToProductMap::value_type(id, creator)).second;
        }
        
        bool Unregister(const IdentifierType& id)
        {
            return associations_.erase(id) == 1;
        }
        
        AbstractProduct* CreateObject(const IdentifierType& id)
        {
            typename IdToProductMap::iterator i = associations_.find(id);
            if (i != associations_.end())
            {
                return (i->second)();
            }
            return OnUnknownType(id);
        }
        
    private:
        typedef AssocVector<IdentifierType, ProductCreator> IdToProductMap;
        IdToProductMap associations_;
    };
 

C++ compiler

What about gcc ...
 

C++ compiler

gcc is an excellent compiler. Microchips Pic30_tools is a port of the gcc compiler which is a cut above for the pic30f series.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top