scorrpeio
Full Member level 5
Hello,
I have interfaced 128x64 glcd with MSP430. I am using CCS4 compiler and Embedded C language for programming.
My application runs in standalone mode (Display shows something). But, when tried to debug, display remains blank permanently. I tried to find out why does it not work in debug mode, when I faced a strange issue...
I wrote a function to draw vertical line on the display. This function takes an argument as Starting Row No, End Row No, Column No.
Function compares the row nos with maximum row no (63) available on display. After that it finds the minimum and maximum row no and then no of pixels to be illuminated to draw vertical line.
But, when I tried to debug... I could see that debug pointer doesn't at all start execution from the initialisation of local variables. Rather local variables (u8MinRow, u8MaxRow, u8Pixels etc.) are initialised with garbage values. Further, the watch window shows that the variable u8MaxRow(local to the function) and u8EndRow (Argument of the function) are stored in the same register R8. (Please refer attached image) This is a pathetic behavior of compiler. I have checked the optimisation level of compiler. It is set to '0' .
Can anyone tell me why this is happening?
I have interfaced 128x64 glcd with MSP430. I am using CCS4 compiler and Embedded C language for programming.
My application runs in standalone mode (Display shows something). But, when tried to debug, display remains blank permanently. I tried to find out why does it not work in debug mode, when I faced a strange issue...
I wrote a function to draw vertical line on the display. This function takes an argument as Starting Row No, End Row No, Column No.
Function compares the row nos with maximum row no (63) available on display. After that it finds the minimum and maximum row no and then no of pixels to be illuminated to draw vertical line.
But, when I tried to debug... I could see that debug pointer doesn't at all start execution from the initialisation of local variables. Rather local variables (u8MinRow, u8MaxRow, u8Pixels etc.) are initialised with garbage values. Further, the watch window shows that the variable u8MaxRow(local to the function) and u8EndRow (Argument of the function) are stored in the same register R8. (Please refer attached image) This is a pathetic behavior of compiler. I have checked the optimisation level of compiler. It is set to '0' .
Can anyone tell me why this is happening?
Attachments
Last edited: