Hi,
using this assembler function in my c-code, I will get a warning message from the keil µvision compiler (warning: A1581W: added 2 bytes of padding at address 0xe)
__asm void jump_to_application(void) { ; program stack pointer of application LDR R0, =0x10000 LDR SP, [R0] ; extract entry point into application LDR R0, =0x10004 ; jump LDR PC, [R0] }
Which steps do I have to add to solve this warning message?
best regards Lars
This warning is telling you that the assembler is doing something that you did not specifically instruct it to do, but is likely going to be very helpful to you. Probably asking the assembler to specifically do what it is doing is the best way to remove the warning. You want to add the ALIGN keyword to the AREA directive. The Assembler aligning your data to a 4 byte boundary. To officially ask it to align to a 4 byte boundary, add the ALIGN=2 to the AREA directive. Often AREA's are aligned to 8-byte boundary with ALIGN=3 and I would suggest you do this unless you specially understand why you would want to make it different.
AREA CUBE_lut, DATA, READWRITE, ALIGN=2
Thanks for the help it removed the warning.