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

about "hello" program display

Hi

When I try to test hello project (debugged in simulation mode), which is from \KEIL\ARM\EXAMPLES\HELLO\, I find that there is no characters displayed in Uart#1 window after the project is built.

Anybody knows why? whether or not addition setting is needed? Thank you very much.

BR,

Fisher

Parents
  • It is why I feel so stranger.

    Here are steps from «Getting Started - Creating Applications with µVision®4»:

    (1)Open the Serial Window UART #1 to display the application’s output
    (2)Click the Run button of the Debug Toolbar or choose Debug – Run to
    start the “Hello” program. “Hello World” is printed to the Serial
    Window and the program enters into an endless loop.
    (3)Click the Stop button to halt the program. Alternatively, press the Esc
    key while in the Command Line of the Command Window

    However, there is no character displayed in uart#1 windows. PC always points to endless loop.

    int main (void)  {                /* execution starts here                    */
    
      /* initialize the serial interface   */
      PINSEL0 = 0x00050000;           /* Enable RxD1 and TxD1                     */
      U1LCR = 0x83;                   /* 8 bits, no Parity, 1 Stop bit            */
      U1DLL = 97;                     /* 9600 Baud Rate @ 15MHz VPB Clock         */
      U1LCR = 0x03;                   /* DLAB = 0                                 */
    
      printf ("Hello World\n");       /* the 'printf' function call               */
    
      while (1) {                          /* An embedded program does not stop and       */
        ;  /* ... */                       /* never returns. We use an endless loop.      */
      }                                    /* Replace the dots (...) with your own code.  */
    
    }
    

    BR,

    Fisher

Reply
  • It is why I feel so stranger.

    Here are steps from «Getting Started - Creating Applications with µVision®4»:

    (1)Open the Serial Window UART #1 to display the application’s output
    (2)Click the Run button of the Debug Toolbar or choose Debug – Run to
    start the “Hello” program. “Hello World” is printed to the Serial
    Window and the program enters into an endless loop.
    (3)Click the Stop button to halt the program. Alternatively, press the Esc
    key while in the Command Line of the Command Window

    However, there is no character displayed in uart#1 windows. PC always points to endless loop.

    int main (void)  {                /* execution starts here                    */
    
      /* initialize the serial interface   */
      PINSEL0 = 0x00050000;           /* Enable RxD1 and TxD1                     */
      U1LCR = 0x83;                   /* 8 bits, no Parity, 1 Stop bit            */
      U1DLL = 97;                     /* 9600 Baud Rate @ 15MHz VPB Clock         */
      U1LCR = 0x03;                   /* DLAB = 0                                 */
    
      printf ("Hello World\n");       /* the 'printf' function call               */
    
      while (1) {                          /* An embedded program does not stop and       */
        ;  /* ... */                       /* never returns. We use an endless loop.      */
      }                                    /* Replace the dots (...) with your own code.  */
    
    }
    

    BR,

    Fisher

Children