This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/F28M35H52C: F28M35H52C connected to an external SDRAM ,the problem of callloc

Part Number: F28M35H52C

Tool/software: Code Composer Studio

My hardware is using an F28M35H52C connected to an external SDRAM.  Everything is working fine with the SDRAM.  I can read and write with large amounts of data on it.

the file of .cmd contain.

PAGE 1 :

  RAML1       : origin = 0x009000, length = 0x001000     /* on-chip RAM block L1 */

SRAMCS0 : origin = 0x300000, length = 0x040000     //An 16Mbyte SDRAM chip connected to 

SRAMCS2 : origin = 0x380000, length = 0x040000     //An 16Mbyte SDRAM chip connected to 

 .esysmem            : > RAML2      PAGE = 1

if I leave my heap size at 0x1000 in the linker settings, I can use the  calloc ,but when i use the 0x300000 ,the program will stay at  the follow

/*-----------------------------------------------------------------------*/
/* Find the first block large enough to hold the requested allocation */
/*-----------------------------------------------------------------------*/
while (current != LIMIT && -current->packet_size < allocsize)
{
prev = current;
current = current->next_free;
}

 

I also find that if the address which prudeced by the calloc is bigger than the 0xFFFF , the mistake is also happen.

wf = (float *)calloc(nwf*nwf_L, sizeof (float));

I can't find what produce the problem, hope you can help me . thank you