Extended Inline Assembly with Kinetis Design Studio

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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 !

标签 (1)
附件
评论

Hello Eli Hughes:

Those are good resources indeed. Thanks for sharing!

无评分
版本历史
最后更新:
‎09-30-2014 01:25 PM
更新人: