реклама на сайте
подробности

 
 
> Assembler и WinARM, Компилятор ругается на #
mr.smart
сообщение Feb 5 2011, 11:59
Сообщение #1


Участник
*

Группа: Участник
Сообщений: 28
Регистрация: 2-10-10
Пользователь №: 59 884



Необходимо было реализовать функции запрета/разрешения прерываний. Эти функции описаны на асемблере в файле 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

Эти ошибки мне непонятны. В чем я ошибся?
Go to the top of the page
 
+Quote Post



Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 21st July 2025 - 12:53
Рейтинг@Mail.ru


Страница сгенерированна за 0.01352 секунд с 7
ELECTRONIX ©2004-2016