Здравствуйте.
Такой вопрос - что означает эта ошибка "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.