Segger J-Link - Page 1
Forum section: electronics / general

author: mbrockdev
author_rank: Newbie
timestamp: March 19, 2025, 02:03:37 pm
content: Hi all,I know during covid segger j-link prices went crazy (shortages) - been out of the industry for a while - come back needing to pick one up and noticed they are still stupidly expensive - what is the go to thing these days? I've seen Pi Pico's can be used for SWD debug, but not sure how good that is? Don't want to be fighting the tool...Thanks in advanceMatt

author: eleguy
author_rank: Regular Contributor
timestamp: March 19, 2025, 02:34:18 pm
content: ST-Link programmer/debugger to rescue?

author: GromBeestje
author_rank: Frequent Contributor
timestamp: March 19, 2025, 02:51:57 pm
content: They've always been expensive. Primary target commercial use. For the EDU version, it seems, they only offer the mini, they dropped the regular EDU it seems.And well... there are the clones, in varying quality, with or without level shifters in place.Looking at what Raspberry offers, it's a CMSIS-DAP based probe. If that is their official offering, it should be good.And if you can run that firmware on another board, I expect it will perform the same.Other options include ST-Link clones, and FTDI based board.Basically, all of these will work with OpenOCD. So if your target is supported by OpenOCD you're fine. There is also a Python based PyOCD, but I never got that working smoothly.Another option would be a Black Magic Probe. These devices take a different approach and integrate a GDB debugger in the probe, and you connect your GDB to a "serial port" to debug the target. Also check the supported devices here.The official Black Magic Probe boards do contain a level shifter, but many of the other options lack such, so that is also something to consider, what voltage is your target running at.

author: ajb
author_rank: Super Contributor
timestamp: March 19, 2025, 02:53:58 pm
content: It would help to know what devices you're looking to work with. There was a thread here not too long ago discussing some debug probe options:https://www.eevblog.com/forum/microcontrollers/sts-gdb-server-probe-rs-jlink-etc-what-are-the-differences-between-them/msg5798911/

author: peter-h
author_rank: Super Contributor
timestamp: March 19, 2025, 03:42:19 pm
content: I looked at these a while ago and tried the Edu. A waste of money IMHO against the STLINK V3, unless you want the feature whereby they patch the CPU FLASH on the fly to get loads of "hardware" breakpoints, but only their top models do that.

author: voltsandjolts
author_rank: Unknown
timestamp: March 19, 2025, 05:28:19 pm
content: IMHO the Segger tools are among the best in the business. The J-Link just works, reliably, whatever platform, whatever ide, whatever mcu, plug-in and get going on your code. The best feature for me is the ozone programmer/debugger, which gives me the freedom to choose my editor and build system. Saying goodbye to the oem ide's made life easier tbh. All for £150 on a second-hand J-Link Plus I bought on this forum - bargain.That said, there are likely low cost tools that can offer most of what the Segger tools have, although I've not felt the need to look.

author: mwb1100
author_rank: Frequent Contributor
timestamp: March 19, 2025, 05:38:14 pm
content: Quote from: peter-h on March 19, 2025, 03:42:19 pmI believe all J-Links (including EDU) are licensed for flash breakpoints except the base model. I believe that for base models you get an "unlimited" trial.The ARM cores I've worked on inthe last decade have has 6 hardware breakpoints and that has usually enough been enough for me. Though occasionally I have to jump through some hoops to juggle which are enabled at any particular time.

author: mwb1100
author_rank: Frequent Contributor
timestamp: March 19, 2025, 05:44:16 pm
content: Quote from: voltsandjolts on March 19, 2025, 05:28:19 pmThat has been my experience too, though on ARM-based ST-Micro devices I had just as good an experience with ST-Link V2 - even the ultra cheap clones. As I mentioned in the thread linked to by@ajb, my understanding is the the ST-LINKs can be used with non-ST devices however I don't have experience with that.

author: ColinB
author_rank: Contributor
timestamp: March 19, 2025, 08:09:50 pm
content: The Segger J-Link is solid. But it is expensive, starting at 500 USD for the base model (though EDU might be an option, but I haven't looked at it since I like to avoid products with usage restrictions).If I was shopping for an alternative ARM programming, I'd look at the Black Magic Probe.https://black-magic.org/. It is open source. It has a GDB server built-in which should make it more convenient to use, than a lot of the more limited low-cost JTAG/SWD like Olimex JTAG or RP2030 DAP etc.If you're using ST or NXP products they have good low-cost programmers for their devices, the ST-Link or NXP MCU Link Pro.

author: __george__
author_rank: Contributor
timestamp: March 26, 2025, 07:31:29 pm
content: Quote from: ColinB on March 19, 2025, 08:09:50 pmNordic as well, they actually use a Segger debugger in their dev boards. But it can only be used with Nordic chips :/

author: peter-h
author_rank: Super Contributor
timestamp: March 29, 2025, 08:15:01 am
content: Is this a Segger product, or a fake?https://www.ebay.co.uk/itm/316519892284What should be the minimal software for loading code into a F4xx?I ordered one, because the GD 407 seems dead with the STLINK V3https://www.eevblog.com/forum/microcontrollers/opinions-on-st-32f407vgt6-versus-gigadevice-gd32f407vgt6/

author: voltsandjolts
author_rank: Unknown
timestamp: March 29, 2025, 08:22:09 am
content: Enjoy your _obviously_ fake J-Link which illegally uses Segger copyrighted software for developing your commercial copyrighted firmware product.Do you see the irony?Do you believe in karma?

author: peter-h
author_rank: Super Contributor
timestamp: March 29, 2025, 08:47:39 am
content: Read the above link about the GD32F407 which is "dead" with an STLINK debugger. This is an experiment. I am not using the device commercially.Segger did sell a debugger for about 60 quid; I bought one.

author: voltsandjolts
author_rank: Unknown
timestamp: March 29, 2025, 08:54:36 am
content: You're experimenting with replacing the STM mcu in your commercial product with a cheaper GD, for commercial benefit.But this isn't commercial work.OK.

author: peter-h
author_rank: Super Contributor
timestamp: March 29, 2025, 09:17:51 am
content: Gosh you are sitting on an impressive high horse todayThe GD 407 doesn't have hardware crypto and is of no use for whatever I might be selling. Like I said, and I can't keep repeating it for ever, this is an experiment. I would not use a chinese CPU in production - notwithstanding that during covid the ST chips were unavailable while the chinese ones were - given the current political risk. I use STLINK debuggers for everything including production. Tested a Segger EDU debugger, it didn't do anything special, so I sold it, otherwise the house just fills up with junk. This one is to see if that GD 407 chip is real, or another fake.Happier now?

author: voltsandjolts
author_rank: Unknown
timestamp: March 29, 2025, 09:32:24 am
content: Oh, just experimenting, eh.Well that's fine, because copyright law doesn't apply to hobbyists, and importing counterfeit goods is totally fine

author: mwb1100
author_rank: Frequent Contributor
timestamp: March 29, 2025, 02:57:35 pm
content: FWIW I worked a project that used a GD32F103 part because of ST supply problems during covid, and it worked fine with Segger tools - once we figured out that code could only run from the first 256K (or 128K - I can't remember for sure) of flash due to the shadow RAM. That fact wasn't documented in the original references GigaDevice provided.The GD32F103 is otherwise a very close clone of the STM32F103. There was one minor issue with I2C where using a certain register access order worked on ST but didn't on GD and we had to do a little bit of rejiggering to get the code to work on both.Having only half the flash executable was a big deal though, it forced us to redo our flash update design.

author: zapta
author_rank: Super Contributor
timestamp: March 31, 2025, 02:38:08 am
content: What is your target architecture?If it's ESP32, RPI Pico, or STM32, there are inexpensive alternatives that work well (my experience is with platformio).

author: bson
author_rank: Unknown
timestamp: March 31, 2025, 11:50:35 pm
content: Quote from: ColinB on March 19, 2025, 08:09:50 pmI just got a Black Magic. Haven't had a chance to use it "for real" yet, but plugged it in and confirmed that gdb can connect to it just fine. Pretty handy not to have to run openocd, although the latter is certainly more full featured and easily modified for example to support a custom RTOS. The Black Magic can be used without gdbserver as well. And it's not vendor locked the way e.g. stlink v3 is (which is a pretty nice device IMO).

author: julian1
author_rank: Frequent Contributor
timestamp: April 01, 2025, 12:12:42 am
content: Openocd has patches for GD32. A generic debugger + openocd makes sense, unless support for gd32 is specifically listed.https://review.openocd.org/c/openocd/+/6543https://review.openocd.org/c/openocd/+/6527https://github.com/openocd-org/openocd/blob/master/src/flash/nor/stm32f1x.c

author: bingo600
author_rank: Super Contributor
timestamp: April 01, 2025, 03:38:45 pm
content: Quote from: bson on March 31, 2025, 11:50:35 pmI just build one, for a Blackpill (401cc)Not as fancy as yours - No level xlate , but not $75 eitherhttps://github.com/blackmagic-debug/blackmagic/tree/main/src/platforms/common/blackpill-f4Bootloader & Firmware built & loaded fine.Now to solder pins on the BlackpillTip: The User key is active low

author: thm_w
author_rank: Super Contributor
timestamp: April 01, 2025, 11:48:11 pm
content: Quote from: peter-h on March 29, 2025, 08:15:01 amOld clone, V9, last supported firmware is probably from 2021:https://uglyduck.vajn.icu/ep/archive/2019/05/Unbricking_a_SEGGER_J_Link_v9_debug_probe.htmlLots of newer clones exist, eg V12:https://www.aliexpress.us/item/3256807767975833.html

author: peter-h
author_rank: Super Contributor
timestamp: April 02, 2025, 06:07:38 am
content: What is the minimal software which is likely to run on it, for loading code to the GD 407, from Cube IDE v1.14 (which supports Segger debuggers - or at least did work with the Edu a couple of years ago)?I read that uglyduck article and the guy is an expert at this

author: peter-h
author_rank: Super Contributor
timestamp: April 02, 2025, 12:20:00 pm
content: I installed Ozone and it seems to see the chip but it doesn't look like Ozone is capable of FLASH programming. What sort of tool is needed for that? The Ozone manual says nothing. Sounds like I need J-Flash, and that worked fine.Cube IDE does not run with the debugger either. When I do F11 (build and load FLASH) even with a ST chip it says "failure to execute MI command". With the GD407 it doesn't find an ST device which is probably not surprising.I will update herehttps://www.eevblog.com/forum/microcontrollers/opinions-on-st-32f407vgt6-versus-gigadevice-gd32f407vgt6/

author: __george__
author_rank: Contributor
timestamp: April 02, 2025, 12:52:36 pm
content: Quote from: peter-h on April 02, 2025, 12:20:00 pmOzone is certainly possible to do flash programming. I have used it multiple times and they also advertise it in their front page. But if you cannot connect to the debugger it cannot help you I guess.

author: bingo600
author_rank: Super Contributor
timestamp: April 02, 2025, 01:38:40 pm
content: Quote from: peter-h on April 02, 2025, 12:20:00 pmdavid_alpha has "beaten" Cube IDE into submisiion for Pyua (Non ST) , in the Puya thread.

author: peter-h
author_rank: Super Contributor
timestamp: April 02, 2025, 01:56:03 pm
content: Right, but he is an expertI have no real need to run Cube with the Segger box. I just got the (fake) Segger to load code into the GD 407, which it does do, using J-Link.

author: peter-h
author_rank: Super Contributor
timestamp: October 05, 2025, 04:28:55 pm
content: Here we go againI bought what looks like a genuine J-Link on Ebay. Not a good external condition, looks like year 2006, was on a buy it now for £300, got it with esnipe for £25https://www.ebay.co.uk/itm/286845886720It might be pretty old. Is there a firmware update possible? It would be for a 32F417, mainly, with SWV ITM debug and maybe statistical profiling if that works.

author: hans
author_rank: Super Contributor
timestamp: October 05, 2025, 06:16:47 pm
content: Old Segger's are pretty.. useless:https://kb.segger.com/J-Link_BASE_V5_or_lowerEven cloned J-Link V8's are pretty out of date:https://kb.segger.com/J-Link_BASE_V8There are some that claim they have a J-Link V9 etc. but then it turns out not to be true and to be yet another v8 clone (plenty of posts on Reddit about this, some "serial numbers" are banned)..OpenOCD can have 'compatibility' in that it uses bitbanging for Jlink dongles. Its not using the native Api's, so no support for software breakpoints and the like which is provided by J-Link DLLs itself.300 pounds is ridiculously overpriced for such an old dongle. Its actually quite sad that J-Link dongle versions are so implicit. We increment smartphone and laptop model numbers every year, and its quite crucial for receiving future firmware updates.. don't exactly understand why J-Link's are not marketed like this (even Segger doesn't do this).

author: __george__
author_rank: Contributor
timestamp: October 05, 2025, 08:27:42 pm
content: Yeah, it seems that Segger added SWD support since version 6 only. So this should have limited usability I guess. I didn't know that it was called J-Link-ARM and not base at that time

author: free_electron
author_rank: Super Contributor
timestamp: October 05, 2025, 08:31:51 pm
content: Quote from: hans on October 05, 2025, 06:16:47 pmI've thrown a bunch away a couple of months ago. V1.2 V2 using mitsubishi micros inside.That's the problem with used seggers. They are no longer supported or updated. There are lots of hardware permutations. Don't buy a used one unless you have it's version and check it against their version database.

author: mikerj
author_rank: Super Contributor
timestamp: October 06, 2025, 12:34:25 pm
content: Another Segger feature I find very useful is the RTT API that gives you very high speed, low latency comms through the debugger and it just works. I have used for for years and it's been invaluable for debugging real time control loops.

author: peter-h
author_rank: Super Contributor
timestamp: October 06, 2025, 03:15:53 pm
content: OK maybe that was 25 quid wasted thenFor those still running on ST development boards, Segger are offering a software conversion of the on-board STLINK to J-Link, which is quite funnyhttps://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/

author: thm_w
author_rank: Super Contributor
timestamp: October 06, 2025, 10:33:53 pm
content: Quote from: hans on October 05, 2025, 06:16:47 pmIts not hard to find a V12 clone, it just costs a bit more than the $10 V8 clones.edit: I already even linked it above..

author: abyrvalg
author_rank: Frequent Contributor
timestamp: October 07, 2025, 06:27:05 am
content: Quote from: peter-h on October 06, 2025, 03:15:53 pmAny ST-Link can be converted actually:https://gist.github.com/jamesy0ung/919ef51fea4631e9dfe0bd26dc85c8f0

author: peter-h
author_rank: Super Contributor
timestamp: October 07, 2025, 06:40:22 am
content: That seems to deal with chinese STLINKs, but why bother with those when the real ones are ~ 50 quid? That is still 1/10 of the cost of a Segger.What is not clear to me is which "Segger" do you end up with doing this? I bought the (genuine) Edu a while ago and AFAICT it didn't do anything more than the STLINK.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: October 07, 2025, 09:50:41 am
content: I bought a handful of ST-Link V2 clones years ago and they do work. Even the versions with weird type numbers inside (2 or 3 different manurefacturers) get updated by the cube software. But recently I did have an issue, where I forgot to enable SWD / SDIO and I had to reroute the target reset wire on these cheap chinese dongles.I bought them years ago, and now the official ST-Link V3 is available for around EUR10, which is on itself a no brainer, except that the price doubles when buying form a local shop.I just had a peek at Mouser, EUR 700 is a ridiculous price for an EUR 5 uC with a few connectors.Adafruit has a Black Magic Probe for USD75 (Exclusive shipping), and that would be the top I would even consider buying, but I'd be much more inclined to flash the uC myself and then donate a bit directly to the project.

author: mikerj
author_rank: Super Contributor
timestamp: October 07, 2025, 10:44:31 am
content: Quote from: peter-h on October 07, 2025, 06:40:22 amYou get one of these after flashing the ST-Link:https://www.segger.com/products/debug-probes/j-link/models/j-link-ob/

author: peter-h
author_rank: Super Contributor
timestamp: October 07, 2025, 11:17:39 am
content: It looks like you get a J-Link Base, listing at €400.I wonder why Segger are offering this for free?If somebody is willing to set up an STLINK V3 ISOL for me with this software (happy to pay) I will give it a test run

author: gamalot
author_rank: Super Contributor
timestamp: October 07, 2025, 11:49:08 am
content: Quote from: peter-h on October 07, 2025, 11:17:39 amMy guess is that the chip manufacturers paid for it. Even after flashing the JLink-OB firmware onto an ST-Link, it still only works with STM32 chips. It's the same situation with Nordic as well.

author: peter-h
author_rank: Super Contributor
timestamp: October 07, 2025, 11:52:54 am
content: I would only want it for a 32F417/437.To program the chinese 407 clones you need a Segger because an STLINK checks for an ST chiphttps://www.eevblog.com/forum/microcontrollers/opinions-on-st-32f407vgt6-versus-gigadevice-gd32f407vgt6/msg5868889/#msg5868889but I did that little project, to see if they work at all, with a fake Segger and (IIRC) J-Flash. Cube IDE did not work with it at all. Not spending any more time on it, but might be worth knowing for Covid Mk 2.As I wrote up herehttps://www.eevblog.com/forum/microcontrollers/stlink-debugger-configures-some-32f4-target-registers-e-g-swo-trace-macrocell/the STLINK V3isworkable for all the features which are supposed to work (notably SWV ITM debug console, and Statistical Profiling) but it took several days of experimentation to find out the Cube IDE settings that work anywhere near reliably, and stat profiling only works for a short time (but long enough). If I could get this "Segger" thing I would happily give it a run.

author: thm_w
author_rank: Super Contributor
timestamp: October 07, 2025, 09:49:08 pm
content: Quote from: peter-h on October 07, 2025, 11:17:39 amV3 is not supported: "A ST-LinkV3 conversion tool is currently not planned as according to ST all V3 boards should have an external debug header so an external J-Link can be used for debugging."https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/Its not really "free" if you read the licensing terms, you'd be violating them. If you are OK with violating them, then just use a jlink clone and a USB isolator, or a stlink V2.

author: peter-h
author_rank: Super Contributor
timestamp: October 07, 2025, 09:59:17 pm
content: QuoteDo you mean that everybody except a "pure hobbyist" would be violating the Segger licensing terms? That's my reading of it.Is a J-Link clone supposed to work with Cube IDE's Segger support mode? When I was mucking about with that clone to test the Chinese 407 chips, I just tried loading the code into them and that didn't work, so I got nowhere. I probably didn't try running it with a real ST 32F417.I know the genuine Edu did run with the 32F417 but it didn't seem to do anything extra that was useful, and I sold it. Maybe I should re-run the SWV ITM and stat profiling tests with the Edu?

author: thm_w
author_rank: Super Contributor
timestamp: October 07, 2025, 10:37:44 pm
content: Quote from: peter-h on October 07, 2025, 09:59:17 pmYeah, even a pro hobbyist will easily violate them.QuoteIts supposed to work yeah, I've not personally tried it.You can see a lot of features are added in V9 and V11, so those would not work on V8:https://kb.segger.com/J-Link_BASE(I think the clones are of the base version?)

author: peter-h
author_rank: Super Contributor
timestamp: October 08, 2025, 11:05:24 am
content: I connected up that fake "Hardware: V9-G" box to the 32F417 target, Cube IDE, and it does work, for both SWV ITM debugs and the statistical profiling!Quite amazing.The operation is slicker than with the STLINK V3. You can start/stop the target and each time it starts up, with all the debugs working. My money would be on the Segger box doing the CPU reset correctly; I mean thisProgramming is also super fast; it looks like they read back the FLASH before programming it, and then obviously the programming will be super fast if the code is not changedThe only slight issue, which I won't spend time on, is the target power. If the debugger is connected to a target already powered up, it says it can't find the target. You have to power the targetfrom the debugger onlyand then you can, if you want, apply power to the target. They need to do an isolated version, so that the isolated interface is powered from the target, like the STLINK V3 ISOL.Also note that a Segger box doesnotprevent the eventual Cube IDE crash, with some memory leak taking it to ~1.5GB, when doing PC Sampling (as needed for the stat profiling function). So in that respect it is no better than the STLINK V3.https://community.st.com/t5/stm32cubeide-mcus/cube-ide-leaks-about-30mb-hour-when-doing-swv-itm-debugs-at-1hz/td-p/844816I also ordered the V12 box mentioned further back, fromhttps://www.aliexpress.us/item/3256807767975833.htmlto see if it is any good.

author: peter-h
author_rank: Super Contributor
timestamp: October 16, 2025, 11:43:28 am
content: I can report that aliexpress "v12" box above works fine, with Cube IDE.That genuine Segger "v5" J-Link I bought on Ebay for £25 arrived, internal pic attached, with the sticker removedI don't know if the seller was reading this conversation. With no SWD support, I binned it. It contains an Atmel ARM chip.It also came with some nice cable adaptors.How Segger can charge so much, I don't know. Maybe because German customers heavily prefer German stuff and pay almost anything for it.

author: mikerj
author_rank: Super Contributor
timestamp: October 16, 2025, 12:21:14 pm
content: Quote from: peter-h on October 16, 2025, 11:43:28 amBecause it's a well made product with excellent support, and companies making commercial products don't typically want to use counterfeit development tools.

author: peter-h
author_rank: Super Contributor
timestamp: October 16, 2025, 01:01:19 pm
content: I wasn't suggesting that Segger should price it like the Chinese. Nobody can do that.But they could price their €500-1000 boxes at say €200. The STLINK ISOL option (and remember the Segger is not even isolated, which amazes me) is about €80 but it is a less reliable product.I can't find pricing on a Segger with V12 software (only V8) but they seem to be charging some 20x more for the genuine box compared to the chinese fakes. That is not sustainable. My own business (professional/industrial datacomms) got hit by the chinese too, but anybody trying to sell a box with a parts cost of €15 at a 20x premium over the chinese is going to go bust. It is just a matter of time. Even with German loyalty you go only so far, plus Germans are well known for looking for a bargain, and Germany is full of "German" products actually made in Turkey and so on.That said, even with the "V12" Segger (copy) Cube IDE crashes when collecting statistical profiling data, as usual after an hour or so, upon reaching 1.5GB RAM allocation

author: eutectique
author_rank: Frequent Contributor
timestamp: October 16, 2025, 03:13:19 pm
content: It's not just a box stuffed with ₤15 worth of components. Add to this the Ozone debugger, JLink drivers, SystemView -- all available for free download, with a licence of course.

author: peter-h
author_rank: Super Contributor
timestamp: October 16, 2025, 09:46:45 pm
content: I don't disagree as to the value of these tools in a commercial setting, but the willingness of corporates to pay 3-4 digits for tools which do little more than an STLINK is going down every year.Across 30 years I have sold many tens of thousands of programmable comms converters and loads of C compilers for them at £450 each, and today you cannot sell these anymore. People have got smarter...IMHO Segger are trading on their old reputation in combination with German loyalty, and Germany is Europe's biggest industrial economy, so no doubt they can milk it for a while yet. But one day it will all go bang.

author: hans
author_rank: Super Contributor
timestamp: October 16, 2025, 10:58:54 pm
content: All the cost of Segger is pretty much in the tooling though. They have their own IDE, programming tools, SystemView, RTT libraries, etc. Its actually quite amazing most of these tools are usable with the EDU as well.At at a previous job we had sidegraded to Keil debug probes at some point. I overheard they were close to 1k and in many ways they were a significant downgrade to the J-Links we had (I certainly would swap them out from time to time for the unlimited breakpoints feature). But yeah, there was a good reason we got the Keil dongles.. as our J-Links also had some suffix that started with "E" and ended with "DU".I always found Segger's approach to J-Link clones amusing. They labeled them as "illegal". Yes, abusing someones trademark is not OK and it would probably become seized goods if customs found out. But imo its similar with the Saleae LA's. At some point you have a brandless product that operates, and its their problem for securing their IP better IMO. They can refuse interopability, however as an user I can still choose to operate them with e.g. OpenOCD (or Sigrok for LA clones).But I'm guessing "illegal clones" sounds far more threatening to users.

author: thm_w
author_rank: Super Contributor
timestamp: October 16, 2025, 11:28:45 pm
content: Quote from: peter-h on October 16, 2025, 09:46:45 pmThey could throw in some AI tools and companies would be paying millions.I dont know why you say "corporates" though, its usually the engineers buying the tools. I'd gladly pay 1k+ for a tool if it says me 15min a day, or makes some process easier, etc.Quote from: hans on October 16, 2025, 10:58:54 pmSure it is illegal to sell counterfeit products with copied IP, but the point is more that if you are using those products, then they can sue you. Happens all the time with large companies like Microsoft, Altium, Solidworks, etc. when companies (and even individuals) use their software without a license. Same idea here.

author: peter-h
author_rank: Super Contributor
timestamp: October 18, 2025 07:22:49 am
content: I am probably not appreciating the value of their software tools. The only one I ever used was the simple J-Flash, for testing those chinese 407 copies (actually there are no "copies"; just potential replacements with software mods) because STLINK won't FLASH non-ST chips.Sure big software companies sue. I know of Altium having sued a friend of mine in Turkey. IIRC it was settled out of court. Amusingly they went after him for about 4x more than what their software could have been bought for if you pressed for discounts. He probably got blown by an ex employee.

author: NorthGuy
author_rank: Super Contributor
timestamp: October 18, 2025 01:56:03 pm
content: Quote from: peter-h on October 16, 2025, 01:01:19 pmThey have huge R&D expenses, while Chinese have none. That's what you're paying for, not for the BOM, which is BTW higher than €15, at least for high end models. If Segger didn't have enough money to do their R&D, there would be no Chinese clones. If you're using cheap Chinese J-link clones you could've at least recognized that it was Segger who provided them to you.Basically, legitimate J-link customers involuntary sponsor users of Chinese clones. If all Segger customers switch to Chinese clones, Segger will die.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: October 18, 2025 02:14:45 pm
content: Quote from: peter-h onYesterdayat 07:22:49 amWell, a standalone flashing tool might sound simple, but it supports hundred of devices and how many free/cheap standalone reprogramming tools do you know for more or less any ARM processor (and more)?JFlash is certainly a valuable tool and it's great to be able to just reprogram a microcontroller without needing to install the whole gigantic toolchain.But then there's also the standalone debuggerOzonewhich is just ten times better than any debugger embedded in the large IDEs that NXP/STM etc. provide.Plus there's stuff likeRTTwhich is pretty helpful as it allows a kind of in/out console over the debug interface.

author: peter-h
author_rank: Super Contributor
timestamp: October 18, 2025 03:44:12 pm
content: This reminds me a bit of Data I/O - the once massive device programmer manufacturer. I still have their Chiplab-48 here, which cost about 1.5k 35 years agoand which supports thousands of devices, each of which had to be individually programmed by Data I/O. Now the company is basically gone, but why? Their business was heavy on EPROMs, OTP CPUs, PALs, and similar, and these went out of fashion. And there always were much cheaper EPROM programmers. Most programming is now in-circuit. That Chiplab is used only to program the H8/323 (via that ZIF adaptor) which is still used in a 30 year old product...How many of the devices supported by J-Flash are in current production? Probably not many, from from the POV of a given user, only at most a few will be relevant. And as with EPROMs there are other options e.g. ST do a ST-LINK Utility which is free and with the £50 STLINK (or a £10 fake STLINK) does the same job. I have just set up a production programming environment using this ST utility.I had a quick play with the above Segger boxes to see what they do better and the answer is really very little IF you want the Cube IDE integration. So I spent a lot of time documenting the STLINK V3 configs which run reliably. I might have to send a debugger to a customer and no way can I send him a chinese fake one, but I can send him an STLINK.I have a simple Q re Segger and their "much better" software tools: do they solve any of the following Cube IDE issues:- you can place a breakpoint where there is no code (e.g. a comment!)- you can have a dud breakpoint because you placed it on code which doesn't get run "even when it does" e.g. a conditional instruction- optimisation can render breakpoints useless- a breakpoint counter can slow down the execution quite a bit- this weird issuehttp://efton.sk/STM32/gotcha/g258.htmlI know the top-price Segger tools (AFAIK none of the fake ones) can do dynamic FLASH reprogramming to provide unlimited hardware breakpoints. That could sometimes be handy.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: October 18, 2025 04:11:04 pm
content: Quote from: peter-h onYesterdayat 03:44:12 pmThe really expensive Segger tools can provide a flow trace and what not. And if you ever looked into the pricing of professional debuggers like Lauterbach, you will notice that Segger is more in the cheap to middle price range anyway."Unlimited breakpoints" is a feature that is present in everything above the "J-Link Base" where it's an option you have to buy. Just like support for J-Flash btw.Actually even the "EDU" version supports "unlimited breakpoints" (but not J-FLash)The clones usually clone the "Plus" version, i.e. with support for J-Flash and unlimited breakpoints.The problems with the clones is not their lack of features but (letting aside them being illegal and stealing profits from Segger) that their hardware is usually obsolete by one or two generations. Besides, their serial numbers are blacklisted sooner or later by some Segger update unless you patch it - if that is still possible. And I guess the clones might have also spared some protection circuit here and there.

author: peter-h
author_rank: Super Contributor
timestamp: October 18, 2025 05:00:39 pm
content: There is surely no way to implement a real time trace. The only way is a "bond out chip", or in the days of the Z80 and such (where everything happening was on the external bus) you could do a long trace by logging the bus activity and then disassembling it, with the aid of an uploaded symbol table. I used to have such a tool, 10k, 1985.

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: October 18, 2025 05:13:23 pm
content: Quote from: peter-h onYesterdayat 05:00:39 pmWell, all somewhat modern (like younger than 20 years) microcontrollers have some kind of "on chip debugging" (OCD) support.I worked with full flow traces for Motorola/NXP and Reneas controllers for at least the last 17 years.Like up to 6 Cores running at 400MHz or so. Full flow trace of all cores for >=20 seconds.You can then perform a detailed performance analysis for each function. See the min/max runtime, the interruptions, the call tree and so on.I just used the onchip trace feature of an Aurix TC38x some days ago.But even small CortexM0+ devices I used years (LPC824) ago could use internal RAM for a flow trace. Very limited due to smallish size of course (Micro Trace Buffer).The Lauterbach "Power Trace" devices have Gigabytes of RAM though.

author: peter-h
author_rank: Super Contributor
timestamp: October 18, 2025 06:58:27 pm
content: OK logging into RAM is clever. What tools are there for e.g. STM 32F4?I used to have a Z180 ICE, Japanese, which would log about 10k machine cycles. It also cost about £10kIt was priceless, in the right situation.But is this relevant to anything Segger do?

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: October 18, 2025 07:31:30 pm
content: Looking into the manual for the STM32F446xx, there is a "Trace port unit interface" TPUI and an "Embedded Trace Macrocell" (ETM), both only available on larger devices where the according pins are mapped.At first look it doesn't sound as if a flow trace to internal memory is supported, but Tracing with external devices sure is.This document from Lauterbach gives an overview of flow/data Trace possibilities on Cortex-M-devices:https://www2.lauterbach.com/pdf/training_cortexm_etm.pdf

author: peter-h
author_rank: Super Contributor
timestamp: October 18, 2025 08:50:59 pm
content: I use the trace macrocell and it is slow - of the order of 10 megabits/sec max.It is also a bit unreliable, for reasons possibly related to the CPU clock PLL starting up etc, but this is OK in the usage context.A real time trace would of course be nice but then you would not need a pricey debugger for it. Cube IDE + STLINK could read it out over SWD.

author: kloetpatra
author_rank: Regular Contributor
timestamp: October 18, 2025 10:19:28 pm
content: Then you probably are not using the correct debugger or it is not supported in your specific chip. The ETM can easily stream at 400 Mbps over TPIU for example in 4-Bit mode @ 100 MHz with many Cortex M3/M4 MCUs. For example STM32F3, -F4, -H7. Some higher end MCUs like Cortex R5 or R7 support 8-Bit Traceports @ 200 MHz. Cortex-A8/9 usually uses 32-Bit TPIU @ 250 MHz while newer like Cortex-A53/A72 etc. use MIPI-HSSTP streaming (>1Gbit/s) via SerDes.- STLink is a toy and limited to SWO and does not do ETM live trace- J-Trace Pro supports ETM TPIU live streaming with up to 4-Bit @ 150 MHz via USB3.0/GbE- For anything more Lauterbach is the way

author: thm_w
author_rank: Super Contributor
timestamp: October 18, 2025 11:06:47 pm
content: Quote from: peter-h onYesterdayat 03:44:12 pmPlacing breakpoints in comments is just not a thing debuggers offer, your software should move it to the next line of compiled code.Placing a "dud" breakpoint would be on you, the hardware doesn't know what code is or isn't used, though the IDE should grey out anything not compiled. If you are not sure which lines are run you can do code coverage analysis.Similar issue with optimization, the c code might not exist in the assembly at all. If you must have optimization on, you can often use memory or register access breakpoints instead.https://www.segger.com/products/debug-probes/j-link/technology/flash-breakpoints/looks like you'd need a Plus or Pro clone for it to work, or figure out how to unlock it in softwarehttps://shop-us.segger.com/product/j-link-upgrade-base-to-plus-8-08-13/

author: peter-h
author_rank: Super Contributor
timestamp: «Reply #64 on:Todayat 05:43:34 am »
content: QuoteIf you could log bus transactionsinto RAMthen you could read them out via SWD, using any SWD debugger. Speed is not important if you are after a one-shot bus trace, which mostly is more than enough.QuoteWhich Segger product does the chinese "V12" above correspond to? I don't see them making a V12 box. But clearly you need Segger software to use that feature.

author: voltsandjolts
author_rank: Unknown
timestamp: «Reply #65 on:Todayat 09:14:48 am »
content: AFAICT none of the M0+ STM32F0/G0/L0 series have the MTB unit implemented.ST is approximately zero help in finding out for sure - is there a list somewhere of STM32 devices that include the optional MTB unit?

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: «Reply #66 on:Todayat 09:51:04 am »
content: There are several NXP Cortex M0+ devices that support the MTB. E.g. the LPC800 series. I didn't find a Cortex M33 with MTB yet, though.ST doesn't seem to support MTB even on Cortex M0+ devices. At least I haven't found one yet.

author: voltsandjolts
author_rank: Unknown
timestamp: «Reply #67 on:Todayat 10:11:16 am »
content: Quote from: 0xdeadbeef onTodayat 09:51:04 amSeems that wayAll you have is the return address when you get a hard fault, so "trace" is one 32-bit address

author: kloetpatra
author_rank: Regular Contributor
timestamp: «Reply #68 on:Todayat 10:16:43 am »
content: I never had a STM32 where MTB was implemented. This is also in accord with the available CMSIS-SVD files.https://www.scribd.com/document/473085488/Atollic-TrueSTUDIO-for-STM32-User-Guide-pdfp. 306QuoteSAMD21 or some NXP Kinetis for example have MTB implemented.You can check if it is implemented by reading the components of the Coresight-ROM-Table at 0xE00FF000 and verify for the MTB Component/Peripheral IDhttps://developer.arm.com/documentation/ddi0486/b/programmers-model/register-summary/coresight-registers?lang=en

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: «Reply #69 on:Todayat 10:24:36 am »
content: To be totally frank, even though it's certainly "nice to have", the MTB is not quite as helpful as it sounds.It's just much too small for performance analysis and for traps, there are usually other ways to find them.A full flow trace over (dozens) of seconds is extremely helpful though as it allows detailed performance analysis and even analyzing/understanding more sophisticated problems like data consistency issues due to interrupts and the like.