Extended Inline Assembly with Kinetis Design Studio

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extended Inline Assembly with Kinetis Design Studio

Extended Inline Assembly with Kinetis Design Studio

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

- Bootloaders

- Time critical routines

- Benchmarking

 

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 !

Labels (1)
Attachments
Comments

Hello Eli Hughes:

Those are good resources indeed. Thanks for sharing!

No ratings
Version history
Last update:
‎09-30-2014 01:25 PM
Updated by: