We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello again.
As I am very interested in learning ARM architecture, I would have few questions regarding assembly programming. Questions refer primarily to programming Cortex-M processors, because they are the only one which I am using (at least for now).
So... Do you program in C or assembly and why that? How do you suggest to start learning assembly programming? Do you think that the gain of execution time is big enough to justify time spent for assembly programming instead of C programming (with full optimization). Because in my case, processing time is quite important. Do you maybe only use intrinsics in special cases? Or inline/embedded assembly?
Every hint is very welcome and appreciated. Thank you in advance.
Regards,
Matic
> A very simple process that you can use to be sure that your C code is efficient is to look at compiler output (disassembly listing) and to improve your C to reach better performance.
A usefull tool for such stuff: Compiler Explorer
This tool seems to work only with GCC compilers. Even with full optimization, I never managed to get comparable code efficiency (compared to Keil or IAR compilers).
Therefore, from my experience, if someone tries to get the most from its Cortex-M4, they should not go towards GCC.
In addition, all compilers I know allow to generate assembly listing with interlaced C source during standard compilation, you just need to ask nicely !