Trouble with CW 10 linking Coldfire assy lang object file

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Trouble with CW 10 linking Coldfire assy lang object file

1,024件の閲覧回数
Ainslie
Contributor II

I am trying to call an assy lang routine from C but the linker always shows undefined symbol. The file is being assembled, and I can create a list file. CW7 forced me to prefix the routine with an underscore, but that appears to make no difference here on CW 10.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

620件の閲覧回数
CrasyCat
Specialist III

Hello

 

In the assembly source file the function name should start with an underscore and be defined as global.

This is done as follows:

 

   .global _foo      .text_foo:   nop   nop   nop   rts

 

 

In ANSI C module you need a prototype for the function without underscore as follows:

 

void foo(void);

 This should work.

 

CrasyCat

0 件の賞賛
返信