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

 
 
> Cortex-m3 assembler - что значит этот warning?, Вопрос
Нортон
сообщение Aug 1 2014, 08:07
Сообщение #1


Участник
*

Группа: Участник
Сообщений: 41
Регистрация: 9-04-11
Пользователь №: 64 246



Здравствуйте.

Такой вопрос - что означает эта ошибка "A1581W: Added 2 bytes of padding at address 0xb2"?

У меня МК STM32, компилятор keil, если это поможет.

Возникает эта ошибка при удалении, казалось-бы не нужного и нигде не используемого, части кода в ассемблерной части программы.

google ответил - http://infocenter.arm.com/help/index.jsp?t...c/CACHCBBJ.html, но я ничего не понял:

Added <no_padbytes> bytes of padding at address <address>

The assembler warns by default when padding bytes are added to the generated code. This occurs whenever an instruction/directive is used at an address that requires a higher alignment, for example, to ensure ARM instructions start on a four-byte boundary after some Thumb instructions, or where there is a DCB followed by DCD.

For example:
AREA Test, CODE, READONLY
THUMB
ThumbCode
MOVS r0, #1
ADR r1, ARMProg
BX r1
; ALIGN ; <<< add to avoid the first warning
ARM
ARMProg
ADD r0,r0,#1
BX LR
DCB 0xFF
DCD 0x1234
END

Results in the warnings: A1581W: Added 2 bytes of padding at address 0x6

The warning can also occur when using ADR in Thumb-only code. The ADR Thumb pseudo-instruction can only load addresses that are word aligned, but a label within Thumb code might not be word aligned. Use ALIGN to ensure four-byte alignment of an address within Thumb code.
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
jcxz
сообщение Aug 1 2014, 08:48
Сообщение #2


Гуру
******

Группа: Свой
Сообщений: 5 228
Регистрация: 3-07-08
Из: Омск
Пользователь №: 38 713



А Вы вообще понимаете что делаете???
Какие ARM и THUMB если у Вас Cortex?? Он имеет только Thumb2 и ничего более.
Go to the top of the page
 
+Quote Post



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

 


RSS Текстовая версия Сейчас: 23rd July 2025 - 10:57
Рейтинг@Mail.ru


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