Calling C functions from assembly

Hi,
i'm trying to call a C function from inline assembly.

void test()
{
  //awesome stuff
}
void setup()
{
  asm(
  ".extern test\n"
  "call test\n"
  );
}
void loop(){}

Compiling the code doesn't work:
sketch_sep06a.cpp.o: In function setup': /home/volker/Arbeitsfläche/arduino-1.6.5/sketch_sep06a.ino:10: undefined reference to test'
collect2: error: ld returned 1 exit status

How can I fix it?

Easy get rid of the pointless ASM!

Mark

You can put your function test() inside a

extern "C"

block.

Welcome, by the way :wink: