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

ARM7: Compiler Error?

This code fragment is never reached on the MCB2300 board:

  UARTInit(9600);       /* baud rate setting */

  charToSend = 0x55;
  for ( ;; ) {
    charToSend = 0x55;
    UARTSend( (BYTE *)&charToSend, 1 );
#if 0
    charToSend = '1';
    UARTSend( (BYTE *)&charToSend, 1 );
#endif
   for (j = 0; j < 100000; j++)
      ;
  }

It works fine by removing either: 1) first charToSend line 2) #if 0 and #endif lines E.g.,

  UARTInit(9600);       /* baud rate setting */

  for ( ;; ) {
    charToSend = 0x55;
    UARTSend( (BYTE *)&charToSend, 1 );
#if 0
    charToSend = '1';
    UARTSend( (BYTE *)&charToSend, 1 );
#endif
   for (j = 0; j < 100000; j++)
      ;
  }

or....

  UARTInit(9600);       /* baud rate setting */

  charToSend = 0x55;
  for ( ;; ) {
    charToSend = 0x55;
    UARTSend( (BYTE *)&charToSend, 1 );
    charToSend = '1';
    UARTSend( (BYTE *)&charToSend, 1 );
    for (j = 0; j < 100000; j++)
      ;
  }

0