Extended inline assembly with GCC in CodeWarrior

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

Extended inline assembly with GCC in CodeWarrior

Extended inline assembly with GCC in CodeWarrior

Hello community!

 

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? 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 !

标签 (1)
附件
无评分
版本历史
最后更新:
‎09-30-2014 11:29 AM
更新人: