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.

Crash after memory layout change. Compiler generates strange assambly

Other Parts Discussed in Thread: TMS320VC5505

Hi,

I made some changes in my memory layout and my DSP/BIOS application did not work anymore. I traced it down to this lines:

 

bool ImageBuffer::initLCDController()

{

CSL_Status status;

CSL_LcdcConfigLidd  configLIDD;

CSL_LcdcLiddTiming  timingCs0LIDD;

CSL_LcdcHwSetup     lcdcLiddSetup;

status = 4;

    configLIDD.clkDiv      = LCD_CLOCK_DIVIDER;

    configLIDD.fdoneIntEn  = CSL_LCDC_LIDD_FDONE_DISABLE;

    configLIDD.dmaCs0Cs1   = CSL_LCDC_LIDD_CS0;

    configLIDD.dmaEnable   = CSL_LCDC_LIDD_DMA_DISABLE;

    configLIDD.polControl  = 0x0000;

    configLIDD.modeSel     = CSL_LCDC_LIDD_ASYNC_MPU80;

The "status=4" line is just for debugging the compiler generates this: (at least that is what I see in CCS)

 

          initLCDController:

0x040F92:   4ed5                     AADD #-43,SP

0x040F94:   eb0085                   MOV XAR0,dbl(@#00h)

0x040F97:   e60404                   MOV #4,@#02h

0x040F9A:   e60601                   MOV #1,@#03h

0x040F9D:   e60800                   MOV #0,@#04h

0x040FA0:   e60a00                   MOV #0,@#05h

0x040FA3:   e60c00                   MOV #0,@#06h

0x040FA6:   e60e00                   MOV #0,@#07h

0x040FA9:   e61003                   MOV #3,@#08h

 

 

This cant be right or? I am not so familiar with the C5000 Assmbly but AFAIK this just writes the entries to RAM Adresses 0x2-0x8. And it does not consider the stack pointer. Furthermore my CCS Debugger says that the status variable and the configLIDD Structure are located at 0x444 and above but defently not at 0x2 to 0x8. Furthermore my Stack seems to get corrupted by that lines at least I see "unresolved smybol" in the stack view in CCS after these lines are executed.

Is this a compiler BUG?

I am using a TMS320VC5505 on a EVM5505 from spectrum digital