Define a weak linkage function in Assembler

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

Define a weak linkage function in Assembler

1,888 次查看
-dan_l
Contributor I

I am porting an interface to the Interrupt Vector Table.    The default handler function is aliased by two weakly defined functions written in assembler, so that they may be overridden by the client code.

I cannot determine from the documentation of from the community a way to declare the function aliases as weak symbols.

If I were writing in C, this would be easy enough.

In Kinetis Design Studio a .weak directive would do the trick, but the coldfire assembler doesn't support .weak.

How does one define a symbol in ColdFire V1 assembler (using the CodeWarrior Compilation System) as a weak (aka Overload) symbol?

Thank you for your consideration!

 

0 项奖励
回复
1 回复

1,857 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

We have very limited resource for CF V1 assembly. All our demo code is for C. assembly is not recommended.

If you would like check assembly, you can right click on c source code, "disassemble...", you will see the generated assemble code

the assembly related documents:

1. Coldfire assembly Instruction Set:

https://www.nxp.com.cn/docs/en/reference-manual/CFPRM.pdf

2. Under CodeWarrior install folder: Assembler_CFV1_Microcontrollers.pdf

 

Have a nice day,

Jun Zhang

 

 

 

 

0 项奖励
回复