[SOLVED] JLinkRTTViewer can't find the RTT CB

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

  • [SOLVED] JLinkRTTViewer can't find the RTT CB

    When I am in Keil Debug mode, the RTT work well. But If I start
    JLinkRTTViewer without in Keil debug mode, then the JLinkRTTViewer can't
    find the RTT CB, and it will find it again and again.Below is some jlink log:
    SEGGER J-Link V4.98e Log File
    DLL Compiled: May 5 2015 11:00:52
    Logging started @ 2016-02-23 15:34

    T0474 000:000 JLINK_OpenEx(...)
    Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
    Hardware: V8.00
    S/N: 286370559
    Feature(s): RDI,FlashDL,FlashBP,JFlash returns O.K. (0270ms, 0270ms total)
    T0474 000:270 JLINK_ExecCommand("device = STM32F091RC", ...)Device "STM32F091RC" selected. returns 0x00 (0003ms, 0273ms total)
    T0474 000:273 JLINK_TIF_Select(JLINKARM_TIF_SWD) returns 0x00 (0001ms, 0274ms total)
    T0474 000:274 JLINK_SetSpeed(4000) (0000ms, 0274ms total)
    T0474
    000:274 JLINK_Connect() >0x108 TIF>Found SWD-DP with ID
    0x0BB11477 >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28
    TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x28
    TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x28
    TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x21
    TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x21
    TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x28
    TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x21
    TIF> >0x0D TIF> >0x28 TIF> >0x0D TIF> >0x21
    TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF> >0x28
    TIF> >0x0D TIF> >0x21 TIF> >0x0D TIF>
    >0x21
    TIF> >0x108 TIF>Found SWD-DP with ID 0x0BB11477 >0x0D
    TIF> >0x21 TIF> >0x0D TIF> >0x28 TIF> >0x0D
    TIF> >0x28 TIF> >0x0D TIF> >0x21 TIF> >0x0D
    TIF> >0x28 TIF> >0x0D TIF> >0x21 TIF> >0x0D
    TIF> >0x21 TIF> >0x0D TIF> >0x21 TIF> >0x0D
    TIF> >0x21 TIF> >0x0D TIF> >0x28 TIF> >0x0D
    TIF> >0x28 TIF> >0x0D TIF> >0x21 TIF> >0x0D
    TIF> >0x28 TIF> >0x0D TIF> >0x28 TIF> >0x0D
    TIF> >0x28 TIF> >0x0D TIF> >0x21 TIF> >0x0D
    TIF> >0x21 TIF> >0x0D TIF> >0x28 TIF> >0x0D
    TIF> >0x21 TIF> >0x0D TIF> >0x21 TIF>
    Found
    Cortex-M0 r0p0, Little endian. -- CPU_WriteMem(4 bytes @ 0xE0002000) --
    CPU_ReadMem(4 bytes @ 0xE000EDF0) -- CPU_ReadMem(4 bytes @
    0xE0002000)FPUnit: 4 code (BP) slots and 0 literal slots --
    CPU_ReadMem(4 bytes @ 0xE000EDFC) -- CPU_ReadMem(4 bytes @ 0xE0001000)
    -- CPU_WriteMem(4 bytes @ 0xE0001000)CoreSight components:ROMTbl 0 @
    E00FF000 -- CPU_ReadMem(16 bytes @ 0xE00FF000) -- CPU_ReadMem(16 bytes @
    0xE000EFF0) -- CPU_ReadMem(16 bytes @ 0xE000EFE0)
    ROMTbl 0 [0]:
    FFF0F000, CID: B105E00D, PID: 000BB008 SCS -- CPU_ReadMem(16 bytes @
    0xE0001FF0) -- CPU_ReadMem(16 bytes @ 0xE0001FE0)ROMTbl 0 [1]: FFF02000,
    CID: B105E00D, PID: 000BB00A DWT -- CPU_ReadMem(16 bytes @ 0xE0002FF0)
    -- CPU_ReadMem(16 bytes @ 0xE0002FE0)ROMTbl 0 [2]: FFF03000, CID:
    B105E00D, PID: 000BB00B FPBT-bit of XPSR is 0 but should be 1. Changed
    to 1. -- CPU_WriteMem(32768 bytes @ 0x20000000) returns 0x00 (0250ms,
    0524ms total)
    T0474 000:524 JLINK_RTTERMINAL_Control(Cmd = JLINKARM_RTTERMINAL_CMD_START) returns 0x00 (0000ms, 0524ms total)
    T1FC0
    000:524 -- CPU_ReadMem(1024 bytes @ 0x20000000) -- CPU_ReadMem(1024
    bytes @ 0x20000400) -- CPU_ReadMem(1024 bytes @
    0x20000800)JLINK_RTTERMINAL_Read(BufferIndex = 0, BufferSize =
    0x000FFFFF) returns 0 (0000ms, 0524ms total)
    T1FC0 000:631 --
    CPU_ReadMem(1024 bytes @ 0x20000C00) -- CPU_ReadMem(1024 bytes @
    0x20001000) -- CPU_ReadMem(1024 bytes @ 0x20001400) -- CPU_ReadMem(1024
    bytes @ 0x20001800)JLINK_RTTERMINAL_Read(BufferIndex = 0, BufferSize =
    0x000FFFFF) returns 0 (0000ms, 0524ms total)
  • My target is stm32f091rc, system is windows 10.
    I have tried the new jlink software but still can't get any output with only RTTViewer.
    If I set the RTT cb address when startup RTTViewer, I still can't get any output.

    When I use SWO, it's well to use JLinkSWOViewer as standalone.
    Is it impossible to use RTTView standalone, i.e, without in keil debug mode?
  • Hi,


    SEGGER J-Link V4.98e Log File

    First idea: Please give the current release of the J-Link software & documentation pack, J-Link V5.10n, a try.
    We improved the RTT CB detection several times since V4.98.

    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,

    could you provide us with a logfile of RTT Viewer + J-Link 5.10n?
    If I set the RTT cb address when startup RTTViewer, I still can't get any output.

    Can you provide us with a reproduction project? (and, optional, include step-by-step instructions on how to reproduce the issue)

    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.
  • the is the log of rttviewer with J-Link 5.10n.
    My PC os is windows 10 64bit.
    I create a simple stm32f091rc project with stm32cubemx, add rtt source code manually. rtt works well in keil debug mode. But if I use rttviewer standalone, the jlink can't find the rtt cb. Seems like jink can't readback memory data from the chipset if I use rttviewer standalone.
    Files
    • rtt_log.txt

      (70.38 kB, downloaded 810 times, last: )
  • Hi,

    There shouldn't be a difference when using RTT Viewer without Keil from the J-Link perspective.

    Could you make sure your application is still running when no debug session is running?
    Might it be possible that your application enables some device protection when running stand-alone/after power on?

    Could you check if RTT Viewer works when starting J-Link commander, connecting to your device and let it run?

    Best regards
    Johannes
    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.
  • When I connect Rttview to the device, the device stopped.
    I have checked my code, there's no any protection that stop jlink connect.
    My chip is stm32f091rc, can you try to reproduce it by yourself. I have tested that the simplest project got the same problem.
    And another question, Can't you find the any hint from my rtt viewer log?
  • Hi,

    Found the cause.
    The STM32F0xx, STM32F3xx, and STM32L0xx devices perform a parity check on SRAM accesses.
    In order to correctly handle most use cases (which include flash programming), the J-Link fills the RAM with a test pattern on connect.

    Since Keil does the Flash download and reset after connect everything works here.

    Currently you will have to have another session running, which does at least a reset.
    Easiest possibility is to use J-Link Commander.
    We will probably add an option to perform a reset from within RTT Viewer in a future version.

    Best regards
    Johannes
    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.
  • I have same problem of rtt viewer, but I am in NXP KDS3.0 IDE , the target MCU is MK22FN128VLH10,
    when debug in KDS, I can see rtt output, even if stop running in KDS, and I execute J-Link commander to reset and run target MCU again, also can see rtt output.
    after poweroff and poweron the target, execute rtt viewer, can't see output, open control panel can see RTT keep looking for RTT CB. I have read back variable _SEGGER_RTT with "mem8" command, I can see this variable have been set to string of "SEGGER_RTT".
    I am running in window 10, j-link software version is JLink_Windows_V612d, I have two type of jink, one for J-link V9 plus, anothor is J-Link OpenSDA Board-Specific Firmwares for FRDM-K22F


    [img]data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhIAAABACAIAAADAhgk9AAAH1ElEQVR4nO2dQZKrOAxAucXcta/U9U/Qi6m/TFVfIMu5QW7ALH4N47YlWTYCG/LeKghjCwN6JGnSy2scz+dz4Ogac2bVwfP5XIcydiavexyvm7kfzo39DNyL5Qn3Zbg2AOA2/K+NsZUFbsxztLcAIAq0AQAADaANAABo4Ic2zvkKBQAALgraAACABgRt/AXwNoy79KbjAxJGH42pkbUx+GMzgFNAGykfHx+jD8gsiNr4dTriYZohjVXTRtCpCDApK9r4CdrY0LTxz4kY2hiexoo24D1Z0cZP0MZGhzaW/zi0Xk+SxmprY1l6viQvt4rqx2iZYse1xuJWWqSaRrWNv8HYSLrq5Zi9WIxM7NdV1jhtaHMixvdMYNk+8BCgjY1WbSxJmd5eL47abbTp0EZ3GgYjtXF0J1lje9HuX9y2WpvKEiAWBU8/1aHPjJSLnrkNwS+wvnzWUG34F41g60Dd/YigjY092rCD/jY7tdGUhgHacPXfdHvbGqz2UzbeWe6j+jlfG0b/njyrrGjjJ2hjI0ob6S1/uZi18dTrI9IwctDSWDu0Ud7lZRHtRXqTWG5bXmzp5uVi1ti/aAQ9jasyEKdC60drWTZoioT349yjct+rh1s8+tXdcS4arLNqw7i+ykkrJ1nbXFvcQBsbId9tLPq9/+L4BCnquw1xrCwNI5MYbfirjxgva4rYc7poj7jFy0tL69kIGo2N6lamKiZv70vf7tvTWE54Xz9ZPvZspL1VD7cxohY0plTrRGQ9/rsNIyVPnv5J8xxl+3x7oY2EPX9JtShlekNr46nXe9JY5teGeDF31yljK3tbbS+0oKexMXqHNl76dGmvW4tvR/UxMrdTTUun/1TRCq49nLOBxjr9u40+bZTz6ZwitLERqw2jXmvFWqvXB6VhZDLFu41qpFy8kDZeiQPEUij2kzWrbtI0jU1btR4O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fjsUWc2jAW99OqDTGfU7WhnZ176OutWxsIBk7D0Ib4MH/2QZYd0bZKQRt+MnOUzvi+hTaisppXG/5VaAMmRNOGUeg9wig/7NI+/kIbTWzmEJ3xvU8bxsdEWZs0Xn7SFauNcogyT7GHAG2Udz3ZazFSNi7RVhnayPoX89GGAwhE00b5OrtMbCWkItG2+gPaaOWPOURnfAd9t7EUHxNlEa1BuDa0IbQ2KZHvNrLT13n2a70Zwy0F1RGdwwFE4dTG/og2HNro4PF4iM747nq3kcZTl4gle5Hu+jP9xGqjHMLIM1gbWfm2i7jWOOutOqK4WI6oBQGORjxLj9CGdimhjVi6tVFKQtSGppBqvS7T8ORTrrLzrKbRoA3j9O27RfI0aNKG1gDgaLKbpFfch1TpVmXPf0AbsRyhjfK+3vZK4F9SeWQ2nTY0kRhjVXOoJoM24H1AG7EEfkilCSMr3FmkQxva0NoQWeOjtPGq3SuV90TpotihHS9XiSNmEU+3AHcCbcTCU+J2GvFPiVOsAU4GbcTCb1LZacRoo3yrAQCngTZi4RdwbfhNKoDLc+Q/1X5TRh/Sqcm1Mfq/5gAAwFzUtXHyP+YEAIBp8WrjgLc1AAAwko7ajjYAAN4XtAEAAA0cpI1/AT/s8njGevLiAAAAAElFTkSuQmCC[/img]
  • Hi,

    where is the RTT Control Block located?
    In the control panel, does it search in the correct Memory Range? (can be seen in the control panel by checking the first field shown in the screenshot which says "LooKing for RTT CB @ 0x[...]"

    Would it be possible for you the provide us with a reproduction project?

    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,

    yes I can see control panel search in RAM with correct range, but failed to find segger CB. and I have setting RTT address manually which take from ".map" file, but no use.

    the attaching file is my test project. which is running in NXP FRDM-K22F . just flash a red LED, and print to RTT.
    because compiling issue, I have modify prototype of function "_write_r".
    In main() function call PRINTF are define in "fsl_debug_console.h".

    Best regards,
    Cai
    Files

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