Необходимо было реализовать функции запрета/разрешения прерываний. Эти функции описаны на асемблере в файле interrupting.s:
CODE
/*----------------------------------------------------------------------------
/* extern void AT91F_enable_interrupt(void);
/* Enable Core interrupt
/*----------------------------------------------------------------------------*/
.global AT91F_Enable_Interrupt
.func AT91F_Enable_Interrupt
AT91F_Enable_Interrupt:
mrs r0,CPSR
bic r0,r0,#0xC0
msr CPSR_c,r0
bx lr
.size AT91F_Enable_Interrupt, . -AT91F_Enable_Interrupt
.endfunc
/*----------------------------------------------------------------------------
/* extern void AT91F_disable_interrupt(void);
/* Disable Core interrupt
/*----------------------------------------------------------------------------*/
.global AT91F_Disable_Interrupt
.func AT91F_Disable_Interrupt
AT91F_Disable_Interrupt:
mrs r0,CPSR
orr r0, r0, #0xC0
msr CPSR_c,r0
mrs r0,CPSR
ands r0, r0, #0xC0
beq AT91F_Disable_Interrupt
bx lr
.size AT91F_Disable_Interrupt, . - AT91F_Disable_Interrupt
.endfunc
Использую компилятор WinARM (GCC 4.1.1). В makefile данный файл вписал:
Код
# List Assembler source files here.
# Make them always end in a capital .S. Files ending in a lowercase .s
# will not be considered source files but generated files (assembler
# output from the compiler), and will be deleted upon "make clean"!
# Even though the DOS/Win* filesystem matches both .s and .S the same,
# it will preserve the spelling of the filenames, and gcc itself does
# care about how the name is spelled on its command-line.
ASRC = interrupting.S
# List Assembler source files here which must be assembled in ARM-Mode..
ASRCARM = interrupting.S ../compil/SrcWinARM/Cstartup.S
При компиляции выдаются следующие ошибки:
5 error: expected indentifier or '(' before '.' token
11 error: stray '#' in program
28 error: stray '#' in program
31 error: stray '#' in program
Эти ошибки мне непонятны. В чем я ошибся?