[SOLVED] J-Link RTT not working on AM335x - Reopen thread

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

  • [SOLVED] J-Link RTT not working on AM335x - Reopen thread

    This is original closed thread: [SOLVED] J-Link RTT not working on AM335x

    Where Niklas wrote:

    SEGGER - Niklas wrote:

    Hi Alexandre,


    as described on the website, J-Link RTT is supported by all devices/cores with background memory access.
    Unfortunately, Cortex-A8 does not support this feature.

    Best regards,
    Niklas

    Which is partially wrong.
    Background memory access is optional in Cortex-A and it depends on silicon manufacturer.

    In that case (TI AM335x) background memory access is present and RTT is working.
    I have enabled it by providing the "Control Block" address to JLink.dll through JLink commander command (or inside script) or gdb command.
    Without that JLink is scanning memory for the control block but the memory might be huge.

    1) Run JLink and execute command:

    Source Code

    1. exec SetRTTAddr <addr>




    Where <addr> is address of Control Block structure which you can find in map file or running 'nm' command on executable.
    Example output:


    Source Code

    1. 80039365 T sdoClientUpload
    2. 80000ebd t search_EIT_table
    3. 8005e915 T search_in_outstanding_alarm_table
    4. 801761a4 B _SEGGER_RTT
    5. 800c4abd T SEGGER_RTT_printf
    6. 800c4799 T SEGGER_RTT_vprintf
    7. 800c43e9 T SEGGER_RTT_Write
    _SEGGER_RTT is the control block structure with memory address 0x801761a4.
    So the command is:

    Source Code

    1. exec SetRTTAddr 0x801761a4
    2) While debugging you can do it automatically creating custom .gdbinit script with this command inside:



    Source Code

    1. eval "monitor exec SetRTTAddr %p", &_SEGGER_RTT


    And this is sample .gdbinit script:


    Source Code

    1. define target hookpost-remote
    2. set output-radix 16
    3. monitor reset halt
    4. load
    5. tbreak main
    6. eval "monitor exec SetRTTAddr %p", &_SEGGER_RTT
    7. end
  • Hello,

    Thank you for sharing your approach. For archiving reasons this thread will be closed now.

    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.