LPC82x, FreeRTOS, RTT Not Flushing

  • LPC82x, FreeRTOS, RTT Not Flushing

    Hi guys,

    I am implementing a system for debugging an LPC82x device. I am also running FreeRTOS v8.0.1, and debugging through the JLinkGDBServer.

    Previously, I used Segger RTT with no hassle using an nRF51822-based device. I brought the RTT source into the new project and can, periodically, see messages. All of the configurations are left as their default. However,

    1. The messages come very sporadically and incompletely while the device is not stopped.
    2. Once the device is stopped, either by halting debug or pausing, it causes the message buffer to be flushed

    I can't see anything in the API or the configurations that would indicate that I would need to flush the buffer, and it's my understanding that the JLink device scans the memory to locate the control block and handle it from there. It looks like something is preventing the debugger from actually scanning the memory continuously. Are there any settings that would help to prevent this?

    Thanks,
    -Alex
  • Hi Alex,


    I can't see anything in the API or the configurations that would indicate that I would need to flush the buffer, and it's my understanding that the JLink device scans the memory to locate the control block and handle it from there


    This is correct.
    Would it be possible for you to provide us with a reproduction project?
    Which tool do you use to display the messages?

    Best regards,
    Niklas
    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.
  • Hi Niklas,

    Thanks for the fast response.

    I am using

    * The LPCXPresso-824Max development board
    * JLink Plus (SN609301623) using 5.12g software, firmware Aug 3
    * The latest LPCOpen software

    The reproduction steps were basically just to

    * Use LPCXpresso to open the FreeRTOS blinky project (I duplicated it, but that shouldn't matter)
    * Bring the SEGGER_RTT.h, .c, _conf, and _printf files
    * Use SEGGER_RTT_WriteString(0, "In task2\n") in task2. Include the RTT header. I changed the rate to 1Hz
    * Set up GDB debugging for the project via your instructions

    Nothing else changed. I can compile and debug the project just fine, and changes to the code work as well. But I have tried both RTT Viewer, RTT Client, and a telnet connection (putty) to 19021 and I see similar behavior for RTT output in all methods. It works perfectly once I stop the target, where it should output on a regular basis without having to do that (from my experience with the nRF51 chip).

    [Edit] I also thought that maybe operating from within a task was causing issues, so I put some additional writeString calls in main. Those were also not flushed unless I stopped the hardware.

    Thanks,
    -Alex

    The post was edited 1 time, last by chalecampb ().

  • Hi Alex,


    sorry for the delay in response.

    First of all, could you please install the latest version of the J-Link software & documentation pack and also use the most recent RTT-Header files that ship with it?
    Secondly, could you please give Ozone - The J-Link Debugger a try in order to see if the issue persists when using Ozone?
    Ozone is part of the software available for J-Link, which can be downloaded free of charge here .
    Ozone can be used for evaluation purposes free of charge with any J-Link.

    If the issue is still occurring, could you zip your project and post it in the forum?
    I will then try to reproduce the issue here.

    Best regards,
    Niklas
    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.