Author Topic: Segger J-Trace does less than J-Link?  (Read 2661 times)

0 Members and 1 Guest are viewing this topic.

Offline kerouantonTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: ch
  • Just curious about science, radio etc.
    • Sometimes I play with radio
Segger J-Trace does less than J-Link?
« on: August 24, 2023, 08:29:55 pm »
Hello to all official J-Link and J-Probe users, :)

A few weeks ago I decided to start focusing on ARM development and spent days to choose which tools I would need. So, after studying documentation, websites and reviews, I bought from Segger a J-Trace Pro Cortex-M, believing it would handle all the needs for a long time.

My current needs are :
- flashing + debugging + tracing Cortex-M devices (the reason I bought the J-Trace Pro Cortex-M),
- flashing a few Cortex-A devices (I discovered that the Cyclone FPGA embeds Cortex-A cores), maybe debugging them but no tracing.
- in the future, maybe play (flash+debug) Risc-V devices, but that's not a priority.

When explaining my needs, Segger told me I chose the wrong model and that I should upgrade it to the full-featured 1'980€ J-Trace Pro Portex probe. That's probably out of my hobbyist tight budget (not counting the return shipping fees, around 100€ forth and back).

For this reason, I need clarification before any return or deciding anything, as on the Segger website, the information is not clear for me.  :-//

I read on their J-Link "comparison" page (https://www.segger.com/products/debug-probes/j-link/#comparison) that the full J-Link probes family (except the Edu model) can support Cortex-A, Cortex-R, Cortex-M, Risc-V cores and more.

I also read on their J-Trace Pro "Key Features" page (https://www.segger.com/products/debug-probes/j-trace/#key-features) that all J-Trace Pro models all have "Full J-Link Debug Functionality".

I can't understand for this reason why any J-Link probe, even the 398€ J-Link Base support all CPU families but that the J-Trace Pro Cortex-M cannot.  :palm: When buying the device, I really thought it was able to support the "Full J-Link Debug Functionnality" that I had read on the J-Link page. For me, it meant that all cores described as supported on any J-Link were supported, but that the Trace feature was only available for Cortex-M.

I only need to *trace* Cortex-M, nothing else. It doesn't make sense that a 1'500€ device does much less than a 398€ device or even than the 998€ J-Link Pro which seem to share much hardware features with the J-Trace Pro. If this was clear on the website, I probably would not have bought the J-Trace Pro.

In advance, thank you for your answers. That will help me decide what to do.

Best regards and I hope your answers will also help other people to decide without making the same mistake as I did  |O
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: Segger J-Trace does less than J-Link?
« Reply #1 on: August 24, 2023, 09:37:48 pm »
Well, they do strange software locking of features to get more money. This is their business model, basically.

One generic advice - don't expect a lot from trace. It is rarely useful in practical applications and in almost all cases there are better ways to debug the issue without involving the trace. So, I personally would focus on getting the debugger you need ignoring the trace support. If it is there - nice, otherwise - don't worry about it.

And you will also find that a lot of devices don't even implement trace support.

One trace-related feature I found useful is MTB present on some Cortex-M devices. It does not even need any debugger support and trivial to enable from the firmware. It then on each taken branch writes source and destination address into the circular buffer. Really easy to setup and interpret by hand and in majority of cases this is all you need to know. But unfortunately it is very rarely implemented.
Alex
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6389
  • Country: ca
  • Non-expert
Re: Segger J-Trace does less than J-Link?
« Reply #2 on: August 24, 2023, 11:07:52 pm »
Can you return it?
What are you using tracing for as a hobbyist?

Get a jlink pro clone for your cortex-a stuff, if EDU does not support them.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline rsjsouza

  • Super Contributor
  • ***
  • Posts: 5988
  • Country: us
  • Eternally curious
    • Vbe - vídeo blog eletrônico
Re: Segger J-Trace does less than J-Link?
« Reply #3 on: August 25, 2023, 03:07:31 am »

For this reason, I need clarification before any return or deciding anything, as on the Segger website, the information is not clear for me.  :-//

Their J-Trace comparison page shows the Cortex M model does not support any of the other Cortex cores.
https://www.segger.com/products/debug-probes/j-trace/#supported-devices

In my experience, Trace is useful in very specific cases where all other debugging techniques present on the upper abstraction layers can't get to the root cause of the problem. In other words, Trace will never be your first line of defense against a problem especially if you have RTOSes, Protocol libraries (BLE, USB, etc) or otherwise any higher level abstraction with their own context-debugging capabilities. Trace will output raw assembly data (with proper correlation with your source code if using the appropriate IDE) and allow you to navigate at the lowest level possible. It may also allow real-time monitoring of specific memory regions (DWT) that can help with runaway arrays and other unexpected and uncontrollable conditions.

The difference in price for a full blown Trace probe that supports Cortex R or A is the sheer complexity that demands faster hardware and a more intricate firmware. Cortex M Trace is a lot simpler when compared to ETM and, depending on the device manufacturer, can be physically quite different, with many data lanes for ETM.

If you are not seeing the immediate need for Trace, I would return this probe and get the full featured non-Trace probe from them.
Vbe - vídeo blog eletrônico http://videos.vbeletronico.com

Oh, the "whys" of the datasheets... The information is there not to be an axiomatic truth, but instead each speck of data must be slowly inhaled while carefully performing a deep search inside oneself to find the true metaphysical sense...
 
The following users thanked this post: kerouanton

Offline kerouantonTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: ch
  • Just curious about science, radio etc.
    • Sometimes I play with radio
Re: Segger J-Trace does less than J-Link?
« Reply #4 on: August 25, 2023, 05:26:58 am »
Thank you for your quick answer. I'll see with Segger what is possible.  ;D

By the way, in the case I keep the J-Trace Pro (from what I understood their return policy is crap, 20% restocking fee etc.), if I buy a J-Link Base, the low-end model that doesn't seem to come with licenses for Ozone etc, do you know if I connect it along with the J-Trace Pro which has the licenses, it can use Ozone etc? Sorry to ask so dumb questions  :palm:
And what about the Chinese clones I see everywhere on Aliexpress?
« Last Edit: August 25, 2023, 05:40:20 am by kerouanton »
 

Online eutectique

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: be
Re: Segger J-Trace does less than J-Link?
« Reply #5 on: August 25, 2023, 09:20:16 am »
Ozone will nag you with the pop-up saying "you can only use Ozone for non-commercial purposes". There is a "stop nagging me for today" checkbox though.
 

Offline kerouantonTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: ch
  • Just curious about science, radio etc.
    • Sometimes I play with radio
Re: Segger J-Trace does less than J-Link?
« Reply #6 on: August 25, 2023, 09:25:49 am »
that's good to know, thanks
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6389
  • Country: ca
  • Non-expert
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline kerouantonTopic starter

  • Regular Contributor
  • *
  • Posts: 94
  • Country: ch
  • Just curious about science, radio etc.
    • Sometimes I play with radio
Re: Segger J-Trace does less than J-Link?
« Reply #8 on: August 26, 2023, 09:47:43 am »
Thank you, I've put one in my aliexpress basket. Have a good weekend
 

Offline GromBeestje

  • Frequent Contributor
  • **
  • Posts: 280
  • Country: nl
Re: Segger J-Trace does less than J-Link?
« Reply #9 on: August 26, 2023, 10:43:59 am »
Keep in mind not all clones contain a level shifter. Make sure to check this if your voltage ain't 3.3 Volt.
Also, clones may **OUTPUT** 3.3 Volt on the VTref pin. This can usually be disabled by a jumper inside.
 

Online hans

  • Super Contributor
  • ***
  • Posts: 1641
  • Country: nl
Re: Segger J-Trace does less than J-Link?
« Reply #10 on: August 26, 2023, 11:32:35 am »
I have a J-Link EDU V8, and in theory it doesn't support Cortex-m4, m7, etc. I've used it to debug countless of STM32F4s and other m4 CPUs without problems, however, that is with a 3rd party debugtool "openocd". It is probably more mechanical in generating SWD commands  to support the necessary SWD and Flash programming commands for each target (that is, if someone on the community wrote a functioning target script for it). Segger may eventually drop a probe generation simply because it gets too old. This can allow you to still get some extra mileage of JLink tools that dont officially support e.g. Cortex-A processors, but having the hardware (e.g. JTAG or SWD) to do so... but it may not be without bumps as OpenOCD afterall is a community-sourced project.

I've since then gotten a J-Link EDU Mini, as I needed to debug some Cortex-m33 device, and its securezone stuff can be a bit iffy in OpenOCD (especially on niche targets such as EFR32 radio SoCs). With official J-Link support, I can use IDEs such as SiLabs SimplicityStudio, which debugs using Segger's Jlink executables instead of Openocd.
Its somewhat funny that Segger is so vocal about "illegal" clones of probes that implement their API (or use their HEX as well? IDC) But then plenty of hobbyists and the like use 3rd party PC tools to drive their probes, potentially.. Its similar with buying a Saleae clone that was made to work with the Logic software, but then ending up using Sigrok anyway.


But yeah , the times I have needed instruction or data trace has been very limited as well. Maybe only 1 or 2 times it was hard to pinpoint exactly where a HardFault was generated in my code, and that took some extra time.. But I'm fairly certain that learning a new tool also costs time, so that may tie it down, and with the limited occasions of needing it, I skipped it for hobby use.
« Last Edit: August 26, 2023, 11:34:30 am by hans »
 

Offline mac.6

  • Regular Contributor
  • *
  • Posts: 225
  • Country: fr
Re: Segger J-Trace does less than J-Link?
« Reply #11 on: August 30, 2023, 07:52:15 am »
Remember that some cortex m0+ have ETB included (Embedded Trace Buffer), although not a perfect trace (it shows only branches), it can be very useful.
JLink tools support it, I don't know for OpenOCD/GDB duo.
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3915
  • Country: gb
Re: Segger J-Trace does less than J-Link?
« Reply #12 on: August 30, 2023, 08:35:28 am »
don't expect a lot from trace. It is rarely useful in practical applications and in almost all cases there are better ways to debug the issue without involving the trace. So, I personally would focus on getting the debugger you need ignoring the trace support. If it is there - nice, otherwise - don't worry about it.

yup, that's my opinion, too, especially for hobby.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 3701
  • Country: gb
  • Doing electronics since the 1960s...
Re: Segger J-Trace does less than J-Link?
« Reply #13 on: August 30, 2023, 10:20:50 am »
Quote
What are you using tracing for as a hobbyist?

I did a google on this stuff and it resembles the old ICE (in circuit emulator) functionality which died out when CPUs got beyond a few tens of MHz.

It can be incredibly useful, especially for finding crash bugs.

I used a £10k Japanese ICE for the Z180, extensively. A brilliant tool. But that had a much bigger trace buffer than one seems to get in these CPUs.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline slugrustle

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Segger J-Trace does less than J-Link?
« Reply #14 on: September 02, 2023, 06:00:31 pm »
I've used a Holtek In Circuit Emulator to develop code for an HT48R003, and I loved it.  You can see everything.

I wish ICEs were still common, but alas, they are not.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf