Hello KDS users!
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? We can do this in Kinetis Design Studio, which comes with GCC tools preinstalled.
The attached document is an overview and explanation of this extended assembly feature. Also I am including a pair of example projects developed in KDS v1.1.1, for the KL25Z128 and K60DN512 devices.
Thanks to Abigail Inzunza Lopez, who helped with this.
I hope you find this useful !
Original Attachment has been moved to: KDS_KL25_ASM_C.zip
Original Attachment has been moved to: KDS_K60D100_ASM_C.zip