[SOLVED] Example Program 'Hello World' can't stop

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Example Program 'Hello World' can't stop

    Hi,
    I'm new to use J-link as the development board. Now I am using Spansion S6E2CC with J-link EDU.
    The board is connected, but when I just try the FM4 Samples files. The debugger is weird.
    I run the file "Hello world"
    which the source code is:
    int main(void) {
    int i;

    for (i = 0; i < 100; i++) {
    printf("Hello World %d!\n", i);
    }
    do {
    i++;
    } while (1);
    }

    the loop stuck in i=63 which shown in the attachment
    Do anyone know where the problem is?
    Thanks!
    Images
    • segger debug error.PNG

      128.46 kB, 1,936×1,033, viewed 595 times
  • Hello,

    Thank you for your inquiry.
    The application does not stop. For printf this example uses SEGGER RTT which uses a buffer on the target as a I/O channel to J-Link.
    The default buffer is 1 kB in size. Depending on how fast the target device is this can be filled up faster than the J-Link reads it out.
    To avoid this you can e.g. increase the buffer size in the SEGGER_RTT_Conf.h file. Simply increase the value for BUFFER_SIZE_UP to e.g. 2048 and you should now see all 100 prints in the buffer.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.