This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Nulls at end of Code (Keil ARM7 compiler issue??)

LPC2103 using KEIL IDE / Compiler

variable declaration

const unsigned char copyright_str[32] __attribute__((at(0x1FDF))) = "Copyright© 2011-2011 Tester Plc.";

Hi there,

I require declaring a 32byte array at the end (0x1FDF) of my 8kb program (size allocation at 0x0000 to 0x1FFF). Ive found that this declaration brings up the following error ".\Hex\xxxxx.axf: Error: L6220E: Load region LR_IROM1 size (8212 bytes) exceeds limit (8192 bytes)."

When the program size was increased temporarily I found that as advised the program allocated 20 NULL bytes after the 32 byte variable. This doesnt change is the variable is aligned to 32 and the NULL bytes move back with the copyright variable declartion if pushed towards the start of FLASH memory.

Can someone advise if this is common for the compiler to do and if possible a solution around it to get rid of the NULL padding at the end of the program code

Kind Regards

Dev

0