Go Back

LPCXpresso Support Added to LPC1343 Code Base

Friday, March 23, 2012
Debugging the LPC1343 Code Base in LPCXpresso

I've never been a huge fan of Eclipse, but since it's incredibly hard to argue with the price of LPCXpresso development boards with their removable SWD debuggers, basic support for flashing devices and debugging (size permitting) has just been added to the LPC1343 Code Base.  Since the code base isn't based on CMSIS, and still runs from a Makefile, the process of creating a project and selecting debug or release mode is a bit different, but we've put together a fairly straight-forward tutorial on it here: Debugging the LPC1343 Code Base in LPCXpresso.  Hopefully this will open the code base up to a few more people.

You will need to pull the latest version of the LPC1343 Code Base from Github to take advantage of LPCXpresso support, since the project files need to be more thoroughly tested before an official release.  A final v1.0.0 release of the LPC1343 Code Base is right around the corner, though, wrapping up about 2 years of constant development effort on this library.

Note: Project files also exist for Rowley Associate's Crossworks for ARM, and the fully cross-platform and open-source CodeLite IDE, both of which are found in the /build folder.  A very alpha DLL for CodeLite is also included in /tools, allowing you to program the flash and do step-through debugging via GDB Server with the Segger J-Link, but it's far from ready to see the light of day just yet.

Update 24-Mar-2012: LPCXpresso support has also been added to the LPC1114 Code Base as of v0.7.5.

Full story  | Comments (1)

JTAG to SWD Adapter for Crossworks

Thursday, March 25, 2010

One of the main problems facing people who have started working with Cortex M0/M3 devices is the limited number of HW debuggers supporting SWD.  While some Cortex-M3 devices support both SWD and JTAG (the LPC1700 family, for example), many smaller device only support SWD, including the LPC1100 (Cortex-M0) and LPC1300 (Cortex-M3).  If you wanted to work in Crossworks, the only real choice for debugging SWD-only devices was (until now) Segger's J-Link for ARM (REVIEW: Segger J-Link for ARM EDU).

While the J-Link works perfectly in Crossworks, and is an absolute bargain for hobbiests at 49 €/$60 USD, if you already own an ARM-USB-OCD or ARM-USB-TINY debugger from Olimex or don't qualify for the EDU/non-commercial version of the J-Link for ARM, you may be interested in the JTAG-to-SWD adapter currently in development by Rowley Associates (the company behind Crossworks for ARM).  It converts the JTAG-only Olimex debuggers to an SWD compatible device, and conveniently includes both the classic 20-pin 0.1" Molex-type connector found on most ARM JTAG boards, as well as the newer (and much smaller) 2x5 0.05" SWD connector, which is the official Cortex connector.  (This is one advantage the adapter has over the J-Link, which only includes a 20-pin 0.1" connector, requiring you to purchase an adapter board if you need to use the smaller 0.05" SWD connector.)

The device works exactly like the ARM-USB-OCD/TINY would: you simply plug the adapter directly into the 20-pin slot on the ARM-USB-OCD/TINY, connect your development board to the adapter via either a 2x5 pin or 2x10 pin cables (which will need to be purchased seperately if you don't already have them), and press F5 to deploy the compiled code and start debugging.  The only modification to be made in Crossworks is that you need to select 'SWD' instead of the default 'JTAG' for the debugger's Target Interface Type, as seen below:

Rowley JTAG to SWD converter settings

After playing around with it a bit using the LPC1343 Reference Design, we found no issues with the device, and appreciated the fact that we were able to use the smaller 0.05" SWD connector.  The small size of the 2x5 pin connector allows you to add SWD support even on very space constrained boards, something that just isn't possible with the classic 20-pin Molex-type 'box'.

The adapter is priced at $45.00 USD and 'should' theoretically work with other FTDI based debuggers -- it's apparently been tested and works with the Amontec JTAGKey and JTAGKey2 -- but we've only tested it with an Olimex ARM-USB-OCD ourselves, so you may wish to contact Rowley Associates if you plan on using it with anything other than an Olimex ARM-USB-OCD/TINY or Amontech debugger.

Rowley JTAG to SWD converterRowley JTAG to SWD adapter Top View

Full story  | Comments (0)

Electronic & Embedded Fundamentals

These articles are part of our regularly updated Fundamentals series and may be useful if you're new to electronics or embedded development: