Nowadays assembly language is being eradicated for embedded systems, and other alternatives such as C/C++ are widely used.
However we know sometimes it becomes necessary to get to "the bones" of our MCU, even from a C project, and play directly with its registers and status flags. Some use cases are:
- Startup code
- Time critical routines
It is common to include assembly code using the "asm()" style. But what if I want to use my C variables in the assembly code? or if I want to call an assembly subroutine from a C project? The GCC toolchain integrated with CodeWarrior brings this flexibility.
In the attached pdf document you can find an overview and explanation of this extended assembly feature. Also attached a pair of example projects tested with CW v10.6 using KL25Z128 and K60DN512.
Thanks to Abigail Inzunza Lopez for helping with this.
I hope you like it !