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.
Hullo guys , I want to write some performance-critical sections in Assembly to be called from the C code , The C compiler in my KEIL is ARMCC and the Assembler is ARMASM . Any help or guide to good documentation or examples ?
Add the assembler file to the project. The IDE understands what to do with them. And if you aren't happy, then you can modify the rules for individual source files.
When it gets to linking, the linker will not care if the object file came from a *.c file, a *.cpp file or a *.asm file. All it cares about is that the object files are of the proper format and exports meaningful symbols where all the "I require" can be matched with corresponding "I supply".
But note that only add assembler if you need it - like having a teacher that requires you to do it, or using a tool chain that requires the startup file to be in assembler or when you need extra performance and also have the required skills to actually be able to produce faster code. Assembler-written routines are not automatically faster than compiled C/C++ code - todays compilers are much better at optimizing code than they were 20 years ago.