I'm trying to adapt some teaching material (ARM university program) for the KL25Z that contains assembler functions in it. While it probably worked in Keil, it's giving me syntax errors in MCUXpresso (10.2). MCUXpresso generates a syntax error on the first line of the function (__asm void...). Is there a recommended way to write assembler functions like this using MCUXpresso?
#include <MKL25Z4.H>
__asm void my_strcpy(const char *src, char *dst)
{
[not including contents of the function]
BX lr ; Else return from subroutine
}
__asm void my_capitalize(char *str)
{
[not including contents of the function]
BX lr ; Else return from subroutine
}
int main(void)
{
const char a[] = "Hello world!";
char b[20];
my_strcpy (a, b);
my_capitalize(b);
while (1)
;
}