I'm using the ARM MDK 4.1 kit, and need to call assembly functions from C, but for the life of me I cannot find any documentation describing how to do this. Is it possible? I'm developing for a Cortex-M3, so I can't inline the assembly, as it only uses thumb code.
Thanks! Stuart
Take a look at RTX source code (\Keil\ARM\RL\RTX\SRC\CM). The module HAL_CM3.c contains functions written in embedded assembly.
the EASY way
write a skeleton function in C and use the generated assembler as a template.
Erik
Thanks, that works flawlessly. In case someone finds this thread and is looking for the answer to this question, you should embed the assembly within a function in the following manner:
__asm void rt_set_PSP (U32 stack) { MSR PSP,R0 BX LR }