我最近从 Keil Uvision 切换到我自己的 Makefile 我在编译文件 port.c 时遇到问题,文件中的函数:
__asm void vPortSVCHandler( void )
{
PRESERVE8
/* Get the location of the current TCB. */
ldr r3, =pxCurrentTCB
ldr r1, [r3]
ldr r0, [r1]
/* Pop the core registers. */
ldmia r0!, {r4-r11, r14}
msr psp, r0
isb
mov r0, #0
msr basepri, r0
bx r14
}
编译时出现以下错误:
../port.c:52:7: error: expected '(' before 'void'
52 | __asm void vPortSVCHandler( void )
| ^~~~
| (
../port.c:64:13: error: stray '#' in program
64 | mov r0, #0
我是否缺少包含或编译器选项?