Friday, November 24th 2017, 9:22pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

lo_529

Beginner

Date of registration: Nov 12th 2015

Posts: 10

1

Tuesday, February 23rd 2016, 8:38am

[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)

lo_529

Beginner

Date of registration: Nov 12th 2015

Posts: 10

2

Tuesday, February 23rd 2016, 8:42am

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?

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

3

Tuesday, February 23rd 2016, 9:01am

Hi,


Quoted

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
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

lo_529

Beginner

Date of registration: Nov 12th 2015

Posts: 10

4

Tuesday, February 23rd 2016, 10:32am

I have tried that version, still can't get any output, v500l gets no output neither.
In keil debug mode, the rtt works well. Only when I use rtt viewer standalone, it jlink can't locate the rtt cb.

SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

5

Tuesday, February 23rd 2016, 11:04am

Hi,

could you provide us with a logfile of RTT Viewer + J-Link 5.10n?

Quoted

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
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

lo_529

Beginner

Date of registration: Nov 12th 2015

Posts: 10

6

Wednesday, February 24th 2016, 7:41am

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.
lo_529 has attached the following file:
  • rtt_log.txt (70.38 kB - 380 times downloaded - Last download: Today, 5:56pm)

lo_529

Beginner

Date of registration: Nov 12th 2015

Posts: 10

7

Monday, February 29th 2016, 10:39am

Any update?

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 363

8

Monday, February 29th 2016, 12:05pm

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

lo_529

Beginner

Date of registration: Nov 12th 2015

Posts: 10

9

Tuesday, March 1st 2016, 4:50am

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?

SEGGER - Johannes

Super Moderator

Date of registration: Aug 31st 2012

Posts: 363

10

Tuesday, March 1st 2016, 10:38am

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

phantomgz

Beginner

Date of registration: Jan 3rd 2017

Posts: 2

11

Wednesday, January 4th 2017, 10:44am

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



SEGGER - Niklas

Super Moderator

Date of registration: Oct 6th 2014

Posts: 1,691

12

Wednesday, January 4th 2017, 11:21am

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
Would you like to be added to the J-Link software update notification list, so you get informed automatically when a new version becomes available?
Just write me a PM or in case you want to subscribe to it yourself, please use this link: Link
Notification for J-Link, J-Link Debugger, SystemView & J-Scope: Link
Notification for Embedded Studio: Link

phantomgz

Beginner

Date of registration: Jan 3rd 2017

Posts: 2

13

Thursday, January 5th 2017, 4:17am

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
phantomgz has attached the following file:

This post has been edited 1 times, last edit by "phantomgz" (Jan 5th 2017, 4:21am)