Trouble with CW 10 linking Coldfire assy lang object file

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trouble with CW 10 linking Coldfire assy lang object file

672 Views
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.

Labels (1)
0 Kudos
1 Reply

268 Views
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 Kudos