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

Memory map behavior for BL51

Hi All:

I use Keil uVision3.I setup BL51 Locate:
code range:0x80-0x3EFF
Xdata range:0x3E00-0x3FFF,0xE000-0xE1FF

I want to compile a .c file like this:

BYTE xdata array1[2];
BYTE xdata UsbBuffer[512];

but I get some Error Message:
*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: XDATA SEGMENT: ?XD?BULKEXT LENGTH: 0202H

If I remove array[2] and compile,It will be OK.
I don't know why BL51 not Locate array[2] to another memory block(0x3E00-0x3FFF)?

Parents

  • then the first thing 'grabbed' from the xdata are the local variables.

    just for show, enlarge the area a bit so the error disappears and look at the map

    If I define Global variable like this: BYTE xdata UsbBuffer[512];
    memory map will be:
    TYPE BASE LENGTH RELOCATION SEGMENT NAME
    XDATA E000H 0200H UNIT ?XD?BULKEXT

    If I define Global variable like this: BYTE xdata UsbBuffer[512]; BYTE xdata array1[2];

    it will Error:*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: XDATA SEGMENT: ?XD?BULKEXT LENGTH: 0202H

    If I change xdata range:0x3D00-0x3FFF,0xE000-0xE1FF,
    it will be OK.
    memory map will be:
    TYPE BASE LENGTH RELOCATION SEGMENT NAME
    XDATA 3D00H 0202H UNIT ?XD?BULKEXT

Reply

  • then the first thing 'grabbed' from the xdata are the local variables.

    just for show, enlarge the area a bit so the error disappears and look at the map

    If I define Global variable like this: BYTE xdata UsbBuffer[512];
    memory map will be:
    TYPE BASE LENGTH RELOCATION SEGMENT NAME
    XDATA E000H 0200H UNIT ?XD?BULKEXT

    If I define Global variable like this: BYTE xdata UsbBuffer[512]; BYTE xdata array1[2];

    it will Error:*** ERROR L107: ADDRESS SPACE OVERFLOW SPACE: XDATA SEGMENT: ?XD?BULKEXT LENGTH: 0202H

    If I change xdata range:0x3D00-0x3FFF,0xE000-0xE1FF,
    it will be OK.
    memory map will be:
    TYPE BASE LENGTH RELOCATION SEGMENT NAME
    XDATA 3D00H 0202H UNIT ?XD?BULKEXT

Children
No data