Hello All,
So far, I have been writing code for ARM Cortex M7 (STM32F7691) using C language. But I am planning to write more structured, OOPS style coding for my next application. And so, I am thinking about using C++ instead of C. Please let me know the following,
1. What will be the performance difference and also the final code size (excluding the programmer's skills )?
2. Does arm cortex m7 has good c++ compiler?
3. Specifically, Does OOPS methodology causes performance overheads?
Thank you.
The performance difference depends on the assembly code generated.
You'll have to get some basic ARM assembly understanding and check the code during the development process to identify potential performances losses due to the compiler doing things you never intended to do. Having an idea on what assembly code a C/C++ should generate, compare it and evaluate can clearly help you identify performances issues due to the language itself very quickly.
Profiling and benchmarking the generated algorithms can also help you identify performances issues. If you can implement the same algorithms with two different languages, you might be able to clearly figure out which one you should use, performance wise.
C++ has a lot of features making the compilers extremely conservative at times. Here are some hints that you can try to follow : http://www.agner.org/optimize/optimizing_cpp.pdf
I remember that Niall Cooling managed some webinars about using C++ for embedded systems projects.