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
  • If I define like this:

    BYTE xdata UsbBuffer[512]; //Global variable
    void TD_Poll(void){
    BYTE xdata array1[2];
    array1[0]=0;
    array1[1]=1;
    PA2=array1[0]; //LED1
    PC1=array1[1]; //LED2
    }
    

    and xdata range is 0x3F00-0x3FFF,0xE000-0xE1FF,It will be OK,memory map like this:
    TYPE BASE LENGTH RELOCATION SEGMENT NAME XDATA 3F00H 0002H UNIT _XDATA_GROUP_ XDATA E000H 0200H UNIT ?XD?BULKEXT

    why?it can place global variables and local variables on different memory block!

    If I move UsbBuffer[512];

     to local variable,it will overflow.
    
    If I change xdata range is 0x3D00-0x3FFF,0xE000-0xE1FF,it will add _XDATA_GROUP size and ?XD?BULKEXT disappear.
    
    
    

Reply
  • If I define like this:

    BYTE xdata UsbBuffer[512]; //Global variable
    void TD_Poll(void){
    BYTE xdata array1[2];
    array1[0]=0;
    array1[1]=1;
    PA2=array1[0]; //LED1
    PC1=array1[1]; //LED2
    }
    

    and xdata range is 0x3F00-0x3FFF,0xE000-0xE1FF,It will be OK,memory map like this:
    TYPE BASE LENGTH RELOCATION SEGMENT NAME XDATA 3F00H 0002H UNIT _XDATA_GROUP_ XDATA E000H 0200H UNIT ?XD?BULKEXT

    why?it can place global variables and local variables on different memory block!

    If I move UsbBuffer[512];

     to local variable,it will overflow.
    
    If I change xdata range is 0x3D00-0x3FFF,0xE000-0xE1FF,it will add _XDATA_GROUP size and ?XD?BULKEXT disappear.
    
    
    

Children
No data