Sysprogs forums › Forums › VisualGDB › live tracing is not
- This topic has 13 replies, 2 voices, and was last updated 3 years, 4 months ago by support.
-
AuthorPosts
-
June 14, 2021 at 13:16 #30691milamberParticipant
Ii am using a segger jlink probe to debug a nucleo-h7a3zi-q board. i have enabled the ‘arm tracing’ option but the ‘live tracing-live coverage’ panel is never updated. it show ‘runs 0 last run never’ for all functions
June 14, 2021 at 15:32 #30692supportKeymasterHi,
This could indicate a hardware problem with the tracing pins, or wiring issues. You can try checking the low-level tracing functionality by disabling the Live Tracing, starting a debug session, and running the following commands in the GDB Session window:
- maint packet qSeggerSTRACE:config
- maint packet qSeggerSTRACE:caps
- maint packet qSeggerSTRACE:start
- [step over a few instructions]
- maint packet qSeggerSTRACE:read:4
If the last command does not return non-zero data, the Segger GDB stub is not reporting the tracing data correctly. If this is the case, please double-check all the wiring and consider contacting Segger support for further help.
June 14, 2021 at 16:58 #30693milamberParticipantI did as you suggested and it reports 0 data. Please have in mind that everything else seems to be working. the jlink flashes the cpu, swv is working
maint packet qSeggerSTRACE:config
&”maint packet qSeggerSTRACE:config\n”
sending: “qSeggerSTRACE:config”
received: “”
OK
maint packet qSeggerSTRACE:caps
&”maint packet qSeggerSTRACE:caps\n”
sending: “qSeggerSTRACE:caps”
received: “config;start;stop;read;GetInstStats”
OK
maint packet qSeggerSTRACE:start
&”maint packet qSeggerSTRACE:start\n”
sending: “qSeggerSTRACE:start”
received: “00000001”
OK
maint packet qSeggerSTRACE:read:4
&”maint packet qSeggerSTRACE:read:4\n”
sending: “qSeggerSTRACE:read:4”
received: “00000000”
OKC:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe -select USB -device STM32H7A3ZI -speed auto -if SWD -port 15971
SEGGER J-Link GDB Server V7.22a Command Line VersionJLinkARM.dll V7.22a (DLL compiled Jun 9 2021 16:33:57)
Command line: -select USB -device STM32H7A3ZI -speed auto -if SWD -port 15971
—–GDB Server start settings—–
GDBInit file: none
GDB Server Listening port: 15971
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: localhost only
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
——J-Link related settings——
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
——Target related settings——
Target device: STM32H7A3ZI
Target interface: SWD
Target interface speed: auto
Target endian: littleConnecting to J-Link…
J-Link is connected.
Firmware: J-Link V11 compiled Jun 7 2021 15:48:52
Hardware: V11.00
S/N: 261012769
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
Checking target voltage…
Target voltage: 3.31 V
Listening on TCP/IP port 15971
Connecting to target…
Connected to target
Waiting for GDB connection…Connected to 127.0.0.1
Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x08002F70 (Data = 0x681B4B03)
Received monitor command: reset
Resetting target
Downloading 684 bytes @ address 0x08000000
Downloading 16032 bytes @ address 0x080002B0
Downloading 15984 bytes @ address 0x08004150
Downloading 15920 bytes @ address 0x08007FC0
Downloading 7044 bytes @ address 0x0800BDF0
Downloading 428 bytes @ address 0x0800D978
Downloading 8 bytes @ address 0x0800DB24
Downloading 8 bytes @ address 0x0800DB2C
Downloading 4 bytes @ address 0x0800DB34
Downloading 1092 bytes @ address 0x0800DB38
Writing register (PC = 0x 8002c2c)
Read 4 bytes @ address 0x40005024 (Data = 0x00000000)
Reading register (MSP = 0x20020000)
Reading register (PSP = 0x 0)
Reading register (PRIMASK = 0x 0)
Reading register (BASEPRI = 0x 0)
Reading register (FAULTMASK = 0x 0)
Reading register (CONTROL = 0x 0)
Reading register (FPSCR = 0x 0)
Reading register (s0 = 0x 0)
Reading register (s1 = 0x 0)
Reading register (s2 = 0x 0)
Reading register (s3 = 0x 0)
Reading register (s4 = 0x 0)
Reading register (s5 = 0x 0)
Reading register (s6 = 0x 0)
Reading register (s7 = 0x 0)
Reading register (s8 = 0x 0)
Reading register (s9 = 0x 0)
Reading register (s10 = 0x 0)
Reading register (s11 = 0x 0)
Reading register (s12 = 0x 0)
Reading register (s13 = 0x 0)
Reading register (s14 = 0x 0)
Reading register (s15 = 0xFFFFFFFF)
Reading register (s16 = 0x 0)
Reading register (s17 = 0x 0)
Reading register (s18 = 0x 0)
Reading register (s19 = 0x 0)
Reading register (s20 = 0x 0)
Reading register (s21 = 0x 0)
Reading register (s22 = 0x 0)
Reading register (s23 = 0x 0)
Reading register (s24 = 0x 0)
Reading register (s25 = 0x 0)
Reading register (s26 = 0x 0)
Reading register (s27 = 0x 0)June 14, 2021 at 17:06 #30694supportKeymasterIf it reports zero data, VisualGDB will indeed not able able to show anything meaningful, because all it gets is zero data. As we have suggested before, please check this with Segger support – they should have a better insight on what is going on inside the Segger GDB stub and why it doesn’t report the correct values.
June 16, 2021 at 10:50 #30719milamberParticipantapparently you need J-Trace PRO to have trace information and not a simple j-link. please update the documentation since it is not clear what probe you need to get trace data
June 16, 2021 at 10:59 #30720supportKeymasterHi,
VisualGDB supports 2 mechanisms of gathering coverage information:
- Using hardware trace pins. This requires expensive trace probes, but doesn’t slow down the code. The tutorial does mention J-Trace.
- Using code instrumentation. It doesn’t need any special hardware, but slightly slows down the program and uses additional RAM to store the branch counters. This method is described here.
Hope this clarifies it.
June 17, 2021 at 08:11 #30726milamberParticipantit does somewhat. I did follow the code instrumentation tutorial but I dont get the same results are you are showing in your tutorial. In your tutorial one can see function like IRQHandlers and o but when i do it i get something like the attached image
Attachments:
You must be logged in to view attached files.June 17, 2021 at 11:24 #30728supportKeymasterHi,
Please try checking that the files containing the functions you want to check are instrumented for coverage (i.e. compiled with the -coverage switch). You can verify it by looking for .gcno files near the .o files. If the .gcno files are not present, the code was not instrumented for coverage.
Either way, we would advise first getting it working on a basic project by exactly following one of our tutorials, and then using it as a reference point.
June 17, 2021 at 14:25 #30731milamberParticipanti get an exception when i try to add a file to code coverage
VisualGDB version: 5.6.1.4141
—————— System.Exception ——————
System.Exception: ${BSP_ROOT}/Src/main.c is not excluded from code coverage
at f73.g1_2(w42 b, Boolean a, String c)
at hr1.a.o_2(da2 a, Object b)
at wy2.o1.Exec(Guid& a, UInt32 e, UInt32 d, IntPtr b, IntPtr c)
trace=[f73.g1_2:217, hr1+a.o_2:407, wy2+o1.Exec:350]Attachments:
You must be logged in to view attached files.June 18, 2021 at 17:03 #30739supportKeymasterHi,
This error would generally be shown when CMake reports that the file has code coverage enabled, but the CMakeLists files indicate otherwise. Most likely, something went out of sync at some point.
Please try re-creating the project from scratch and reproducing the problem. If you could share the steps we could follow on our side to reproduce the issue from scratch, we should be able to advise a workaround, or release a hotfix for it.
June 19, 2021 at 11:00 #30741milamberParticipantI have started a new project based on smt32cubemx project wizard and enabled code coverage. Now I don’t even get the live coverage window.
Attachments:
You must be logged in to view attached files.June 19, 2021 at 13:40 #30743milamberParticipantwhen i added an new file to compile (myprintf.c) then the button appeared and the code contained in my file is displayed on live coverage. I would like to see HAL functions covered as well like interrupt handlers
June 23, 2021 at 12:27 #30768milamberParticipantany update on this? i was able to reproduce it
June 28, 2021 at 08:24 #30792supportKeymasterHi,
As you have never provided the complete non-ambiguous steps to reproduce the problem from scratch, all we could do is re-run our standard coverage tests on a STM32CubeMX project during the v5.6 Beta 3 release cycle. They did uncover a glitch that could be causing this issue and we have fixed it in the Beta 3. Please try downloading and installing it from the download page.
-
AuthorPosts
- You must be logged in to reply to this topic.