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

target is built with a big gap in it, and program is pushed out of memory because of that

Hi there,
I'm new to Keil, so please excuse my negligence. I am working with AT982051, and problem is that i'm writing a simple 5 line program and the code runs out of memory. I am looking at the generated M51 file. And it shows a big GAP been put in by the linker or something. Anyways here is the snippet from my .M51 file

TYPE BASE LENGTH RELOCATION SEGMENT NAME -----------------------------------------------------

* * * * * * * D A T A M E M O R Y * * * * * * * REG 0000H 0008H ABSOLUTE "REG BANK 0" IDATA 0008H 0001H UNIT ?STACK

* * * * * * * C O D E M E M O R Y * * * * * * * CODE 0000H 0003H ABSOLUTE 0003H 07FDH *** GAP *** CODE 0800H 001FH INBLOCK ?PR?MAIN?PROJECT CODE 081FH 0019H UNIT ?C?LIB_CODE CODE 0838H 0017H INBLOCK ?PR?_SEND_SERIAL?PROJECT CODE 084FH 0013H INBLOCK ?PR?_DELAY?PROJECT CODE 0862H 0011H INBLOCK ?PR?SERIAL_INIT?PROJECT CODE 0873H 000CH UNIT ?C_C51STARTUP CODE 087FH 0004H UNIT ?CO?PROJECT

and there are linker erros below this. If you see in the snippet that i posted there is GAP been put in ending at 07FDH, total memory available to me is 07FFH. So after the Gap i just have 2 bits of memory left for program. So i am dead in water can't do anything with this. I am trying to use the on chip memory i do not have an external memory and small memory model. Please if anybody knows how to reduce or reposition or configure this GAP that would be really helpful

thank you
Umer

0