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

issueMDK4.10 compile problem....hple me

hi,i used MDK4.10 compile LPC1768 test code,and used jlink to debug,but i discovered global variables not initialize(did not i give value), it are Random value.Local variables are correct.
do i setting wrong? this issue let me can't debug,someone can solve this problem? or it is normal?

example:
uart.c
volatile uint32_t UART0Count = 0;


iotest.c
extern volatile uint32_t UART0Count;

//in the debugger,Teststring are not below,are 0xda,0xfc.....why
uint8_t  Teststring[LENGTH] = {'1','2','3','4','5','6','7','8','9','0'};

while (1)
{
  //in the debugger,UART0Count is not 0,is 0x24865414why
  if ( UART0Count != 0 )
  {
    LPC_UART0->IER = IER_THRE | IER_RLS;                     /* Disable RBR */
    UARTSend( 0, (uint8_t *)UART0Buffer, UART0Count );
    UARTSend( 0, (uint8_t *)string, 10 );

    UART0Count = 0;
    LPC_UART0->IER = IER_THRE | IER_RLS | IER_RBR;   /* Re-enable RBR */
  }
}


my english is bad, hope you don't mind......^^
please help me this question...very thank you...

0