lpc13xx/lpc17xx with ST-LINK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpc13xx/lpc17xx with ST-LINK

3,005 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by frame on Mon Feb 27 08:49:12 MST 2012
I have  a slightly heretic question.

Has someone experience with flashing & debugging a lpcxpresso 13xx or 17xx board with a ST-Link adaptor ?

According to the following link, it should work:  http://www.coocox.org/Forum/topic.php?id=990

One has to cut off the lpclink part before, of course.

I have both lpcxpresso boards and stm boards around, so one debug interface (or even one IDE) for both would be a great advantage.
0 Kudos
7 Replies

2,171 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by izico on Fri Sep 13 18:04:45 MST 2013
I just made the debug to work with Keil ARM-MDK, but I have not figured out how to program the flash yet, I guess it may not be able to do it at all?

I'm used to STM32 and Cortex M, but new to LPC.
0 Kudos

2,171 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Marqueses on Thu Jun 13 14:25:18 MST 2013
Hi,

I am interested in programm NXP uC's with a ST-Link, could you give me an overall about this topic? Which things are necessary or any special connection? All uC from NXP (Cortex M family) can be programmed?

Thanks!!
0 Kudos

2,171 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by frame on Thu Mar 01 03:26:01 MST 2012
Well, not to my total satisfaction ...
It doesn't work in JTAG mode (only SWD), which is not tragical at all.
With Crossworks, it does not work at all, complaining about a lost connection to target. I asked for help, but don't hold too much hope. The ST-Link adaptor is supported by Crossworks only under Windows - my second choice for a host OS.


> Still surprised that ST-Link is not lock somehow to ST ARM parts.    

From my superficial understanding, the JTAG/SWD block is the same in all Cortex M3 parts, because it's supplied by ARM. So, I expect that physical layer to be basically identical in all adaptors, also. But then, one can decide to implement some additional code in the adaptor firmware to check for certain device IDs, and just refuse to work with others. ST obviously decided not to go this route. However, they do not explicitly encourage or support it, so you are on your own.
0 Kudos

2,171 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kendwyer on Thu Mar 01 01:13:29 MST 2012
Good to hear you got it working. Still surprised that ST-Link is not lock somehow to ST ARM parts.
0 Kudos

2,171 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by frame on Wed Feb 29 05:39:06 MST 2012
O.k., basically I got it working.
This morning I was able to flash and debug a sample application on a lpcxpresso 1769 board with a STLink in SWD mode. Singlestepping, breakpoints and viewing of variables worked. I just had to define a clocking frequency, the (Eclipse-based) CooCox IDE did it not for me.
Next step is to try the same in JTAG made, and under Linux and with Crossworks.

Once I got through, I may going to post some more info, just to complete this monologue.
0 Kudos

2,171 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by frame on Mon Feb 27 12:10:26 MST 2012
I am about to evaluate toolchains which generate code for both (LPC and STM32) and support debugging. To be honest, the lpclink is some kind of an obstacle in this regard.
CooCox (see the link in my first post) is one option. Albeit the workflow of the CoIDE is somehow strange (at least to me), it supports both, including some other Cortex controllers (Atmel, EnergyMicro, ...) and several JTAG/SWD adaptors. Cortex M4 debug support is still completely missing, but promised to arrive soon. The compiler (I use CodeSourcery Lite and not the CooCox specific one) already supports M4.

The other option is Rowley Crossworks, which is not free, but supports a lot more targets.

As none of those tools, for apparent reasons, supports lpclink, I'm looking for an alternative to that.

If anyone is interested, I could drop a note upon success (or failure ...).
0 Kudos

2,171 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Mon Feb 27 09:24:15 MST 2012
If you just cut the traces between the LPC-Link and the target part then you can connect the SWD/JTAG pins from the target side to any other JTAG/SWD debugger with the proper software tools.

So if you have an ST setup that allows you to select the LPC13xx/17xx as a target then just connect the target side of the LPCXpresso board and you should be ready to go.
Of course you will have to convert your LPCXpresso software project to use the STM compiler.

If you just cut the traces (they are all on one side of the board) with an Xacto knife and place a 16 pin header then you can always restore the connection with the LPC-Link by placing some jumpers on the header.

Rob
0 Kudos