This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
You can call assembly functions using something similar to the code below. Essentially, it is a method of referencing functions from the .asm in your .c file.
// test_default.asm
.def test_func
test_func:
NOP
--------------------------------------
// main.c
extern void test_func();
void main(void)
{
test_func();
}
Lali,
In the assembly code you need to define your function with a leading underscore so it can be recognized by the C environment. Thus, you need to change test_func to _test_func in yoru <test_default.asm> file.
Reference: section 5.13 of the MSP430 C/C++ User's Guide (SLAU132G).
Hope this helps,
Rafael
P.S. Sorry, I couldn't reply to your e-mail in time.