Problem with Segger_RTT_printf functionI cannot get the SEGGER_RTT_printf() func

Sysprogs forums Forums VisualGDB Problem with Segger_RTT_printf functionI cannot get the SEGGER_RTT_printf() func

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12185
    davel
    Participant

    I cannot get the SEGGER_RTT_printf() function to work with the Nordic BLINKY_PCA10040 example (without softdevice). I get the following diagnostic “undefined reference to SEGGER_RTT_printf” when using MSBuild. I have included the SEGGER header file in main.c, while the other supporting Segger header and c files appear in folders within the Solution Explorer window.

    The Segger file SEGGER_RTT_printf.c contains this statement:

    #if defined(NRF_LOG_USES_RTT) && NRF_LOG_USES_RTT == 1

    <span style=”color: #000000; font-family: Calibri;”>But it is not clear to me how to define this condition—I tried using a #define statement for this in main.c, but to no avail–</span>

    Attachments:
    You must be logged in to view attached files.
    #12188
    support
    Keymaster

    Hi,

    Please try adding the files from <Nordic SDK>\external\segger_rtt to your project.

    Please note that we normally recommend using the VisualGDB Fast Semihosting mechanism instead (can be enabled via the Embedded Frameworks page of VisualGDB Project Properties). It is fully integrated with VisualGDB, supports multiple text colors and its output will be automatically shown in a separate window inside the Visual Studio window while the debugging is active.

    #12200
    davel
    Participant

    I was able to get the Segger RTT printf function to work –but I had to remove the statement “#if defined(NRF_LOG_USES_RTT) && NRF_LOG_USES_RTT == 1” that had been inserted (by Intellisense?) into the SEGGER_RTT_printf.c file.

    #12205
    support
    Keymaster

    Hi,

    Good to know it works. If you encounter further issues, feel free to start another topic.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.