REVIEW: Segger J-Link for ARM (EDU)

Posted by:  |  Friday, February 26, 2010

Go Back

If you're interested in using any new Cortex-M3 or Cortex-M0 devices, one of the first problems you're likely to encounter is the relatively meager selection of HW debuggers on the market that support SWD.  While some Cortex M3 devices support both SWD and the older JTAG (such as the LPC1700 family), many of the smaller devices only work with the Cortex's native SWD (such as the LPC1100 and LPC1300 families).  The three main families of debuggers currently on the market that support SWD are:

Currently Available SWD Debuggers (Feb 2010)
Name IDE(s) Price (USD) Connectors Notes
Keil ULink Pro uVision $1,395.00 20-Pin 0.1"
10-Pin 0.05"
ARM7, ARM9, Cortex-Mx
Cortex M3 Instruction Trace (ETM)
Keil ULink2 uVision $373.95 20-Pin 0.1"
10-Pin 0.05"
ARM7, ARM9, Cortex-Mx, 8051 
Keil ULink-ME uVision -- 20-Pin 0.1" ARM7, ARM9, Cortex-Mx
Only available with Keil Starter Kits
NXP LPC-Link LPCXpresso $29.95 10-Pin 0.05" Tied to LPCXpresso/Code Red
Segger J-Trace IAR
Keil uVision
Crossworks
$1,248.00

20-Pin 0.1"
19-Pin JTAG/SWD + Trace

ARM7, ARM9, Cortex Mx
Cortex M3 Instruction Trace (ETM)
Segger J-Link IAR
Keil uVision
Crossworks
$299.00 20-Pin 0.1" ARM7, ARM9, Cortex-Mx
Segger J-Link EDU IAR
Keil uVision
Crossworks
$60.00  20-Pin 0.1" ARM7, ARM9, Cortex-Mx 

Keil's ULink2 and ULink Pro

Keil's ULink2 and ULink Pro are unique, in that they are currently the only two devices on the market that support both the classic 20-pin 0.1" JTAG connector as well as the new (official) 2x5-pin 0.05" connector (they also have a good page explaining all the different target connectors).  The main drawback, other than price, is that they are also tied to Keil's (now ARM's) IDEs, which also adds to the price tag if you don't already have a license (though they offer a free 32KB limited version for non-commercial development, which obviously poses no restriction for a 32KB part like the LPC1114 or LPC1343).  It's a solid choice, and you can be confident it will be regularly updated since the company is now owned by ARM, but it's also the most expensive solution and you are tied to Keil's development tools (which are generally excellent, but may not be appropriate to every project or budget).

LPCXpresso

NXP (in collaboration with Code Red and Embedded Artists) have put together the very interesting LPCXpresso, which includes both an ARM9-based HW debugger and a very basic development board using either the LPC1114 or LPC1343.  At $29 USD, it definately has the lowest cost of entry financially, and you have access to a free 128KB limited version of Code Red's Red Suite called the LPCXpresso IDE.  The HW debugger can be carefully cut in half and seperated from the MCU half of the board and used seperately, giving you both a HW debugger and a simple breakout board for either the Cortex-M0 LPC1114 or Cortex-M3 LPC1343.  The main drawback is that the debugger is limited to the LPCXpresso IDE, which only supports a small selection of MCUs (the entire LPC1100 and LPC1300 families, LPC1700 parts with 128KB or less flash, and a token selection of ARM7 and ARM9 parts, with the only commonly used device being the ARM9 LPC3130).  At present, it is also limited to 32-bit operating systems, though NXP is reportedly working on an x64 driver.  If you're just getting start and simply want to test out the Cortex M0/M3 devices, this is probably the cheapest route to go for a total toolchain and a great deal ($29 is almost the price of a coffee at Starbucks these days) ... you simply need to be aware of what it's limitations are as you're requirements grow, and decide for yourself whether the LPCXpresso IDE suits your needs (based on Eclipse, using GCC for the cross compilation toolchain). You definately won't find a better deal for a full-featured IDE, a HW debugger, and a simple development board.

Segger's J-Link for ARM

The biggest advantage of Segger's J-Link -- aside from supporting both ARM7 and ARM9 as well as Cortex's native SWD/SWO -- is that it works with all of the main IDEs, whether IAR, Keil, or Rowley's Crossworks for ARM, making it a safe investment if you need to change IDEs with different projects or situations. It's also actively supported and updated, meaning that you can be reasonably confident that as new devices come out they will continue working with your existing debugger. We had been using Rowley's (excellent) Crossconnect ourselves for ARM7/ARM9, but when we started developping with the SWD-only LPC1100 and LPC1300 families we needed to find another HW debugger that supported SWD and SWO and worked in Crossworks. At the time, Segger was the only option (though Rowley Associates will no doubt update their Crossconnect, and they have some other interesting surprises up their sleeve with regard to SWD support). The J-Link is fast, is currently the most universally adapted board, and is probably the best investment financially if you are serious about commercial development. It's the device we usually recommend to anyone looking for a HW debugger for use with ARM Cortex-Mx devices.  Unfortunately, if you're just a hobbiest or are doing this for non-commercial/non-profit work, $299/249€ can still be a bit expensive.

Segger J-Link for ARM EDUSegger previously offered a non-commercial version of the J-Link -- the J-Link NCU -- which sold for 149 €.  You got an excellent, actively updated product that doesn't tie you to a specific IDE or architecture, at a reasonable price.  Despite the lower price of the LPCXpresso, this was the unit that we invariably recommended to hobbiests or students since it was probably the best deal in the long term.  You can imagine our surprise, then, when Segger recently introduced the J-Link EDU at the ridiculously low seeming price of 49€.  The NCU unit was a good deal at 149€ ... at 49€ (VAT included!), the EDU version is an absolute bargain if you qualify for it (non-profit, hobbiest or educational use only).  The EDU version also includes a GDB-server for non-commercial use (with a popup window reminding you of this restriction) ... but for most hobbiests, all you are likely to use the device for is downloading your compiled project to flash and stepping through the code with HW breakpoints ... both of which are supported by the EDU version.  If you're a hobbiest who doesn't currently own a hardware debugger, stop reading this, pull out the credit card, and buy one of these now ... you won't regret it.

Segger J-Link Properties in Crossworks for ARMThe device is well integrated with Keil's uVision, IAR's Embedded Workbench for ARM, and Rowley Associate's Crossworks for ARM (which is what we use internally, and is also the best deal going for hobbiests at $150 for non-commercial use, with a full commercial license costing $1500).  Crossworks supports the J-Link and SWD out-of-the-box.  You simply need to download the drivers for the J-Link from the Segger website, point Crossworks to the J-Link DLL File (most likely in "C:\Program Files\Segger\ ..."), select SWD as the Target Interface Type and away you go.  You can see a screenshot of the properties window here (taken from Crossworks 2.0.5):

Once you are connected to your board with the J-Link, you can set breakpoints like usual.  Deploying your code to the device is as easy as pressing F5. The debugging process is fast (which was a nice surprise since we had gotten used to the very speedy CrossConnect), and it hasn't failed us yet after a couple months of working with the LPC1343 and LPC1114.

Debugging with the Segger J-Link in Crossworks for ARM To the left you can see a screenshot of the debugging process in Crossworks for ARM, where a breakpoint has been set on line 44.  You can easily step through the code line by line using the F10 and F11 shortcut keys or the appropriate menu items, and examine any variable by setting a watch or in certain cases simply mousing over a field or variable (you can select "Quick Watch ..." from the popup menu for more details or options).  It's easy, it works, and it's invisible to the end-user ... which is how it should be (though Rowley has a lot to do with making the entire debugging process so painless as well).

Reservations

The only real reservation we had about the J-Link (compared to Keil's ULink, for example) was the fact that it only supports the classic 20-Pin 0.1" Molex-type connector ... despite the fact that the official SWD connector for ARM is a much smaller 2x5-pin 0.05" model.  Since there currently aren't any commercially available adapters on the market (we've made one internally that we may publish to the website), we ended up adjusting our own LPC1114 and LPC1343 Reference Design to include both the 20-Pin Molex-type connectors (used by the Segger J-Link) as well as the official 0.05" connectors.  It would have been preferrable to use the much smaller 0.05" cables exclusively, but until the new connectors have a better adoption rate people will have to make 20-pin 0.1" to 2x5 pin 0.05" adapter boards, or keep adding the classic MOLEX adapters to their boards.  At present, Keil is still the only solution offering both, and we'll look forward to seeing manufacturers slowly adopt the smaller connectors since it significantly reduces to amount of real-estate used on the PCB.

Conclusion

We already thought that at 149€ the NCU unit from Segger was the best deal on the market for hobbiests or non-profit work.  At 49€ (VAT included), it's an absolute no-brainer if you don't already have a HW debugger, and need to work with the Cortex M0 and M3 cores (though ARM7 and ARM9 are of course supported as well).  You get a mature, regularly updated product that works with all the main toolchains/IDEs, and the peace-of-mind of working with a device that you can trust debugging any HW or SW problems you might have.  Our heartfelt recommendation ... get one now before someone at Segger realises they could be selling these things at twice the price, and it would still be a pretty good deal!

Update: If you're a hobbiest who already has an Olimex ARM-USB-OCD or ARM-USB-TINY and uses Crossworks for ARM, Rowley also has an interesting solution coming to market soon, which will also be worth considering if you have already invested in an Olimex or FTDI-based JTAG debugger.  We'll post a review of it as soon as we can. That said ... we have at least 8 or 9 HW debuggers for ARM here ... you can always be like us and just buy everything!  At 49€ for the J-Link, you don't have a lot to lose, and it's always nice to have backups anyway.
20-Pin 0.1" JTAG to 2x5-Pin SWD Adapter BoardUpdate 2: We recently added a tutorial on flashing a Cortex-Mx device with the Segger J-Link using GDB Server and the CodeLite IDE. We haven't been able to get the breakpoints working yet but are currently working on it.  We've also added an inexpensive 20-pin 0.1" to 2x5-pin 0.05" SWD adapter plus cable to the online store.  This will allow you to connect a Segger J-Link directly to the smaller 0.05" SWD connector on any Cortex device with a minimum of hassle.
  • Facebook
  • DZone It!
  • Digg It!
  • StumbleUpon
  • Technorati
  • Del.icio.us
  • NewsVine
  • Reddit
  • Blinklist
  • Furl it!