[SOLVED] 'Hello World' examples runs 64 instead of 100 loops

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

  • [SOLVED] 'Hello World' examples runs 64 instead of 100 loops

    Dear all,

    I just start with EmbeddedStudio. While I was testing with the 'Hello World' example that seems to be created each time you setup a new project I find out that in the DebugTerminal only 64 iterations of the 'Hello World' is shown. As far as I understand the program code it should be 100 times. Can anyone explain it to me?

    Best Regards
    Markus
  • Hello Markus,

    Thank you for your inquiry.
    This issue is related to the target device being "too fast".
    In the example application you are printing messages with a very high speed and that is all the application is doing.
    So the default RTT buffer which is set to accompany 64 printf strings per default overflows.

    To get your "100" you have several options.
    - Slow down the CPU (usually not wanted by the user)
    - Implement a little delay block between the printfs
    - Edit the RTT Buffer in the SEGGER_RTT_Conf.h file linked in your project: There search for BUFFER_SIZE_UP and increased the value to e.g. 2048
    - Change the RTT behavior if the buffer is full from SEGGER_RTT_MODE_NO_BLOCK_SKIP to SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL

    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.
  • Dear Nino,

    thanks for your answer. I will insert a small delay when I start integrating FreeRTOS to my project and test the issue again. I currently work on a SAME70 board that needs the entire 300MHz because of a lot of demanding workload.
    However, I guess in real-world applications it is not a big think because you don't use extensively the printf() function in real-time applications.

    Best Regards
    Markus
  • Hello Markus,

    Great to hear that the solution works for you.
    We will consider this case as closed.

    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.