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

 
 
> arm ассемблер. ошибка компиляции.
Alex19
сообщение Jun 15 2012, 21:06
Сообщение #1


Участник
*

Группа: Участник
Сообщений: 21
Регистрация: 14-05-09
Из: Тула
Пользователь №: 49 063



Доброго времени суток.
Процессор LPC1114, IAR5.50.

Ругается на вот такую вставку

asm ("LDR r0, =0x1000"); // Error[Og006]: Syntax error in inline assembly: "Error[401]: Operand syntax error"...

Подскажите, что здесь не так?
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
ILYAUL
сообщение Jun 16 2012, 19:39
Сообщение #2


Профессионал
*****

Группа: Свой
Сообщений: 1 940
Регистрация: 16-12-07
Из: Москва
Пользователь №: 33 339



User manual Rev. 8 — 8 March 2012 474 of 536
NXP Semiconductors UM10398
28.5.4.4.1 Syntax
LDR Rt, label
where:
Rt is the register to load.
label is a PC-relative expression.
See Section 28–28.5.3.5.
28.5.4.4.2 Operation
Loads the register specified by Rt from the word in memory specified by label.
28.5.4.4.3 Restrictions
In these instructions, label must be within 1020 bytes of the current PC and word aligned.
28.5.4.4.4 Condition flags
These instructions do not change the flags.
Chapter 28: LPC111x/LPC11Cxx Appendix: ARM Cortex-M0 reference
28.5.4.4.5 Examples
LDR R0, LookUpTable ; Load R0 with a word of data from an address
; labelled as LookUpTable.
LDR R3, [PC, #100] ; Load R3 with memory word at (PC + 100).


--------------------
Закон Мерфи:

Чем тщательнее составлен проект, тем больше неразбериха, если что-то пошло не так
Go to the top of the page
 
+Quote Post



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

 


RSS Текстовая версия Сейчас: 18th July 2025 - 02:22
Рейтинг@Mail.ru


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