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
更新者: