LPCxpresso, Linux, LPC-Link connection problems

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

LPCxpresso, Linux, LPC-Link connection problems

361 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jaromir on Sun Aug 11 06:06:49 MST 2013
Hello,
I bougnt a few LPCXpresso boards and it worked with LPCXpresso IDE flawlessly under Microsoft Windows, both XP and 7 versions on three different PCs. I cut one of boards and use its head as handy debugger of external targets with no problems.

However I've run into problems when working under Linux. I use Lubuntu 13.04 (official Canonical supported release). Installation of LPCXpresso IDE was smooth as usual, as well as first loading/debugging external target (first after plugging LPCXpresso head into USB port). I can run/pause target, do single stepping or set breakpoints.
After stopping debug session, editing sources and starting debug session again, problems arise. This http://i.imgur.com/ipJPjxI.png is what I get. I can do as many retries as I want, but situation is all the same. Resetting target doesn't help, forcing target into ISP (holding boot pin low and hitting reset - the board is definitely in ISP mode, as program execution stops and I can do connection from FlashMagic or similar tool) mode doesn't help too. The ONLY thing that helps is removing and reinserting LPCXpresso head into USB port - leaving target powered or unpowered doesn't make any difference. Then I can do one debug session and problem returns.

Target is LPC-P1227 board from Olimex https://www.olimex.com/Products/ARM/NXP/LPC-P1227/ powered by external 5V source. Target is connected to LPCXpresso head by short (cca 10cm) flying wires - see images http://i.imgur.com/cMxOeEk.jpg http://i.imgur.com/tTZ8l9l.jpg Power supply is sufficient, I tried different USB cables for LPCXpresso head, as well as inserting powered USB hub, but no joy.
My LPCXpresso IDE is version "LPCXpresso v5.2.4 [Build 2122] [2013-04-29]" on Linux or Windows machines.
I tried it again with Windows machine and it gives perfect match as before. On Linux, it fails again after first successful hit.

My source code is quick-and-dirty blink a led program:
#include "LPC122x.h"
#include <cr_section_macros.h>
#include <NXP/crp.h>

// Variable to store CRP value in. Will be placed automatically
// by the linker when "Enable Code Read Protect" selected.
// See crp.h header for more information
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

void dly (void);

int main(void)
{
LPC_GPIO1->DIR=(1<<5)|(1<<4);
while(1)
{
LPC_GPIO1->OUT = 0x55;
dly();
LPC_GPIO1->OUT = 0xAA;
dly();
}
return 0 ;
}

void dly (void)
{
volatile unsigned long i;
for (i=0;i<100000;i++)
{
}
}



Different target was tested too - custom board with LPC1114 and it fails in the same way. On Windows host it works flawlessly.

I feel like there is problem with connection between LPCXpresso and IDE. Target seems to be out of suspect.
I searched on the web and there were a few topics with similar issues, but I'm not quite sure whether it is related to problems I'm experiencing and I haven't found any solution to this problem.

Any help is very appreciated.
0 Kudos
4 Replies

249 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Aug 15 00:32:48 MST 2013
We fully understand how to deliver software for Linux. The only prerequisites are the ability to run 32-bit applications (LPCXpresso is entirely 32-bit, and we tell you how to do this in the release notes) and a working USB sub-system. We supply everything else we need.

As I said, this is almost certainly caused by a problem in the Lubuntu USB drivers.
0 Kudos

249 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jaromir on Wed Aug 14 22:44:41 MST 2013
I fully understand your decision to actively support only a few Linux distributions, but it would be nice to know what are prerequisites or needed software/package/drivers whatever it expects on host system, so anyone could use LPCXpresso on any Linux distribution. No offense, but this belongs to Linux software etiquette.
If it works in Ubuntu - which is huge distro with all the bells and whistles - there is no reason why it wouldn't work on all Ubuntu derivatives, I believe all is needed is to install some additional software package that reside in offcial Ubuntu release.
0 Kudos

249 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Aug 13 10:57:35 MST 2013
Sorry, but we do not support Lubuntu. There are so many different distros we cannot possibly test every variant. We have heard that LPCXpresso works on a very large number of distros with no problems and any problems are almost always related to the distro.

As you have proved, LPCXpresso works on the official Ubuntu release, so I can only assume it is a problem with (the USB drivers on) the Lubuntu release.
0 Kudos

249 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jaromir on Tue Aug 13 10:43:46 MST 2013
I tried to install plain Ubuntu 12.04 LTS on USB stick, boot from it on the same computer where I run Lubuntu (with problematic LPCXpresso operation), install LPCXpresso and... it works as expected. Reboot into Lubuntu and problems are here again.

Now I'm really confused whether the problem is in Lubuntu derivative itself or there is something wrong with my Lubuntu system, maybe some corrupted file or problems with perimissions. Could anybody point me to some log file or any other way to determine root of this problem?

For now, I'm not very happy about thinking of reinstall my workstation to another Linux distribution because of LPCXpresso.
0 Kudos