[SOLVED] Setting RTT control block when not automatically found

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

  • [SOLVED] Setting RTT control block when not automatically found

    Hi,

    I am debugging an externally built executable in Embedded Studio, my setup is NXP MIMXRT1060-EVK board + JLink.
    I interact to this application with Putty, through RTT.
    I saw in another post in this forum that I can disable RTT redirection to the Debug Console, fine.
    The problem is that when I disable it throug "Debugger"->"RTT Enable"-> "No" setting,
    JLink doesn't locate _SEGGER_RTT anymore.
    It is located ad address 0x20280670, and if I specify it manually in the JLink settings, or through a custom jlink-script it works fine.

    My question is, how can I manage to have it automatically found, even if it will be further relocated (via _SEGGER_RTT symbol)?

    with GDB, I would have used
    eval "monitor exec SetRTTAddr %p", &_SEGGER_RTT
    as an itialization command.

    Thank you

    The post was edited 2 times, last by ballotz ().

  • Hi,
    Thank you for your inquiry.

    The reason why the RTT Control Block cannot be found is most likely that it is placed outside of the RAM area specified in out DLL.
    You can (as you already know) specify, the address to the DLL so it does not need to find it.

    You can also do this via TELNET, with for example in putty.
    Please find an article about how to do this here:
    wiki.segger.com/RTT#SEGGER_TELNET_Config_String
    Please make sure you use the latest J-Link version, since this is a very recent feature.

    Does this resolve the issue?

    On a side note:
    You can also you the J-Link RTT Viewer in attach mode (connect to existing session) for this purpose. It lets you set the Address via the Configuration Dialog.

    Best regards,
    Fabian
    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,
    thanks for your answer,
    I didn't know about this new feature, I'll give it a try,
    though it is not clear to me how can be putty or a telnet client be aware of the _SEGGER_RTT symbol,
    that string can be sent form the program itself?

    Just a note about ES, when "Debugger"->"RTT Enable" is set to "Yes",
    RTT works even if it is located at 0x20280670, without specifying additonal settings.
    Maybe disabling RTT redirection to the Debug Console disables ES auto-locating of RTT too?

    At the moment I solved the issue relocating _SEGGER_RTT to DTCM, so it can be automatically found.

    Thank you,
    Alessio
  • Hi Alessio,
    Sorry if my explaination wasn't clear enaugh:
    The Config string has to be sent from the host system, not the target.
    So you send it via e.g. putty within 100ms after esablishing the connection between putty and the TELNET channel.

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