Chibios C or C++ for new project?

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
Alexte
Posts: 27
Joined: Sun Jul 01, 2012 1:24 pm

Chibios C or C++ for new project?

Post by Alexte »

We are starting a new hobby project of a smart home. Question specialists. Is it possible to write in C++? Or is it better to write in a C language?
I used a long time to write in the C++. I'm used to classes and object-oriented programming. Should we abandon this?
I would like to hear those who writes on Chibios C++ languge.
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Chibios C or C++ for new project?

Post by Giovanni »

Hi,

Both are possible, however efficient embedded C++ requires to drop things like exceptions and RTTI because space constraints.

BTW, ChibiOS uses concepts of OOP even if it is written in C: classes, objects, interfaces, inheritance. OOP is not matter of language.

Giovanni
Alexte
Posts: 27
Joined: Sun Jul 01, 2012 1:24 pm

Re: Chibios C or C++ for new project?

Post by Alexte »

Giovanni , thanks for the reply! We write in the С language.
Post Reply