Is there a significant problem if I write code for the embedded Linux system using C ++ programming?
In fact, I intend to port some code to arm linux with the arm-uclibc compiler.
thank
Are you asking about simple C ++ or embedded C ++? As far as I understand, inline C ++ is pretty much dead. You can program in C ++, but depending on your requirements, there may be some constructs that you want to avoid. For example, if you have little space, you can avoid templates as much as possible (or explicitly create templates) in order to preserve minimal template instances. You can also avoid exceptions or RTTI to reduce the amount of information about the generated type (to save space), and also to avoid having to deal with exception safety (to minimize potential traps), as well as the high cost of throwing exceptions (to reduce the longest execution paths for real-time systems).Virtual functions should be fine (they don’t add too much overhead), but if you have very strict requirements, you may also need to limit your use of these functions. If you use exceptions, you must also be sure that the compiler supports them (as many cross-compilers for embedded systems do).
, , Linux. ++ .. Linux, , .
. 8- motorolla gcc ++, , . , , , , , , ...
, ++ - . , , - - .
, Linux , ++. , , .
, ++ , ; , , , - , Linux Linux .
++ OS-less . Linux , , , ( ), ; , - .
uClinux ARM MMU (, ARM7 Cortex-M3), Linux - MMU /.
?
If I am not mistaken, arm-uclibcis the C compiler?
arm-uclibc