#149878 - mr_munk - Sat Jan 26, 2008 10:58 am
Hi,
I have tried my best to research this on the forum but still cannot find / understand the information that I need.
I have the following asm function copied from an example:
this resides in source/redfill.s
I also have a function prototype in include/redfill.h
Finally I try to call the function in my main.cpp file
and get a compiler error - 'undefined reference to redfill()'
can someone tell me where I am going wrong ?
I have tried my best to research this on the forum but still cannot find / understand the information that I need.
I have the following asm function copied from an example:
Code: |
.arm .section .text .align 2 .global redfill redfill: mov r0, #0x4000000 mov r1, #0x400 add r1, r1, #3 str r1, [r0] mov r0, #0x6000000 mov r1, #0xFF mov r2, #0x9600 loop1: strh r1, [r0], #2 subs r2, r2, #1 bne loop1 infin: b infin |
this resides in source/redfill.s
I also have a function prototype in include/redfill.h
Code: |
extern void redfill(void); |
Finally I try to call the function in my main.cpp file
Code: |
//asm function redfill(); |
and get a compiler error - 'undefined reference to redfill()'
can someone tell me where I am going wrong ?