Build and debug using command line for lpc1769 in ubuntu

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

Build and debug using command line for lpc1769 in ubuntu

1,367 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Sat Sep 07 03:16:42 MST 2013
Hi,

I'm trying to build and debug a LED blinking code using command line for target lpc1769 in ubuntu.I have already installed lpcxpresso_5.2.6. Can I get steps for build and debug?

Thank you
0 Kudos
24 Replies

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Thu Sep 19 23:22:32 MST 2013

Restallation solved the problem within a minute... :)
Reading/following wrong steps leads to wastage of time and efforts.

Thank you


0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Thu Sep 19 22:24:01 MST 2013
Thank you very much for support...
I will reinstall LPCXpresso ... :)
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Sep 19 06:00:00 MST 2013
As you have been editing and deleting files, I'd suggest that you uninstall LPCXpresso and re-install.
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Thu Sep 19 05:16:11 MST 2013
libusb-1.0.so.0 and libLPC_Link.so are present in bin directory
when I delete libusb-1.0.so.0 from bin the IDE is giving same error as command line try with presence of libusb-1.0.so.0...

0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Thu Sep 19 05:05:46 MST 2013
Today .. I tried on windows 7 64 bit with same board from command prompt ...and its working fine.... !!  :)

Why it is giving problem for linux ? 

0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Wed Sep 18 22:25:23 MST 2013
No both  libusb-1.0.so.0 and libLPC_Link.so are present ,I didn't edited anything .   


I read on forum about copying libusb-1.0.so.0 into /lib for 32bit compatibility ,but later I deleted it from /lib :(,already present libusb-1.0.so.0 may be overwritten

If I delete libusb-1.0.so.0 from installed directory then IDE is giving same error .

0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Sep 18 00:48:27 MST 2013
This is reporting that libusb-1.0.so.0 is missing. This file is installed by LPCXpresso and should be located in the same directory, so have you deleted it? If you have, please restore it.
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Tue Sep 17 21:57:40 MST 2013
Hi Fallguy,
I am disturbing you again...

It is still not working .

0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Mon Sep 16 23:25:50 MST 2013
I am again disturbing you people ,sorry..

These are the steps I followed  :

# dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Opening USB Device 0x0471:0xdf55...
Claiming USB DFU Runtime Interface...
Determining device status: state = dfuIDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [0x0471:0xdf55] devnum=7, cfg=0, intf=0, alt=0, name="UNDEFINED"
Claiming USB DFU Interface...
Setting Alternate Setting ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
Transfer Size = 0x0800
bytes_per_hash=583
Starting download: [##################################################] finished!
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!
can't detach: error sending control message: Broken pipe
Resetting USB to switch back to runtime mode


$./crt_emu_cm3_nxp -wire=winusb -vendor=NXP -pLPC1769 -flash-load-exec=app.axf or ./crt_emu_cm3_nxp -wire=winusb -pLPC1769 -flash-load-exec=app.axf
Ni: LPCXpresso Debug Driver v5.2 (Jul  5 2013 11:36:15 - crt_emu_cm3_nxp build 15)

Ee(36). libLPC_Link.so file load error.

Et: Failed emulator initialization: E(xx). WinUSB driver load/install error: libLPC_Link.so. libusb-1.0.so.0: cannot open shared object file: No such file or directory

Is that a compatibility issue as given in http://support.code-red-tech.com/CodeRedWiki/RunningOnLinux .
I didn't installed sudo apt-get install linux32 ia32-libs before installing product .I did it after as sudo apt-get install linux32 ia32* 

Do I need to reinstall LPCXpresso ?

Thank you




0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Mon Sep 16 03:25:37 MST 2013
yes it will be -wire=winusb ,I will check it and let you know.
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Sep 16 03:10:37 MST 2013
Again, you have not read the instructions. You would save yourself a lot of time if you read them before posting here...

Hint: You need to add a "-wire=" parameter to tell it you are using LPC-Link (the default is Red Probe+). The details are in one of the FAQs you were pointed at.
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Mon Sep 16 01:36:23 MST 2013
Yes it is working fine through IDE i.e lpcxpresso_5.2.6
0 Kudos

1,165 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Mon Sep 16 01:07:50 MST 2013
Might be interesting to know whether you can get a debug session going using one of the standard examples from within the IDE itself?
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Mon Sep 16 00:33:28 MST 2013
Thank you...!!
After booting LPC-link i tried :
./crt_emu_cm3_nxp -pLPC1769 -flash-load-exec=my_appl.axf
is it saying :

Ni: LPCXpresso Debug Driver v5.2 (Jul 5 2013 11:36:15 - crt_emu_cm3_nxp build 15)
Nc: Looked for chip XML file in /usr/local/lpcxpresso_5.2.6_2137/lpcxpresso/bin/LPC1769.xml

Nc: Looked for vendor directory XML file in /usr/local/lpcxpresso_5.2.6_2137/lpcxpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in /usr/local/lpcxpresso_5.2.6_2137/lpcxpresso/bin/crt_directory.xml

Ed:02: Failed on connect: Ee(05). No matching emulator found - make sure power is on and not in use already.
Et:31: No connection to emulator device

Installed 32 bit compatibility components as I found on forum :sudo apt-get install linux32 ia32*

These are outputs of some commands before connecting LPC-link :

$dfu-util -V
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util version 0.1+svn

$dfu-util -l
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

$lsusb
Bus 002 Device 002: ID 8087:0024
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 17ef:602e Lenovo
Bus 001 Device 002: ID 8087:0024
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

These are outputs of some commands after connecting LPC-link :

$ dfu-util -V
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util version 0.1+svn

$ dfu-util -l
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Found Runtime: [0x0471:0xdf55] devnum=3, cfg=0, intf=0, alt=0, name="UNDEFINED"


~$ lsusb
Bus 002 Device 003: ID 0471:df55 Philips
Bus 002 Device 002: ID 8087:0024
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 17ef:602e Lenovo
Bus 001 Device 002: ID 8087:0024
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Thank you
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Mon Sep 16 00:13:44 MST 2013

For this command :

# ./crt_emu_lpc11_13_nxp -mi -info-emu -wire=winUSB
Ni: LPCXpresso Debug Driver v5.2 (Jul  5 2013 11:36:31 - crt_emu_lpc11_13_nxp build 15)

Ee(36). libLPC_Link.so file load error.

<emulators available="0" type="Debug">
</emulators>
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Mon Sep 16 00:12:52 MST 2013

For this command :

# ./crt_emu_lpc11_13_nxp -mi -info-emu -wire=winUSB
Ni: LPCXpresso Debug Driver v5.2 (Jul  5 2013 11:36:31 - crt_emu_lpc11_13_nxp build 15)

Ee(36). libLPC_Link.so file load error.

<emulators available="0" type="Debug">
</emulators>
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Mon Sep 16 00:09:51 MST 2013

yes sir I am using dfu-util everytime... 
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sun Sep 15 23:50:54 MST 2013
you have to use dfu-util to boot LPC-Link every time you connect it. You did this in your first posting, so why aren't you doing it now?
0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nikita on Sun Sep 15 23:40:14 MST 2013
Thank you...!!
but after ./crt_emu_cm3_nxp -pLPC1769 -flash-load-exec=my_appl.axf
is it saying :

Ni: LPCXpresso Debug Driver v5.2 (Jul  5 2013 11:36:15 - crt_emu_cm3_nxp build 15)
Nc: Looked for chip XML file in /usr/local/lpcxpresso_5.2.6_2137/lpcxpresso/bin/LPC1769.xml

Nc: Looked for vendor directory XML file in /usr/local/lpcxpresso_5.2.6_2137/lpcxpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in /usr/local/lpcxpresso_5.2.6_2137/lpcxpresso/bin/crt_directory.xml

Ed:02: Failed on connect: Ee(05). No matching emulator found - make sure power is on and not in use already.
Et:31: No connection to emulator device

Installed 32 bit compatibility components as I found on forum :sudo apt-get install linux32 ia32*

These are outputs of some commands before connecting LPC-link :


$dfu-util -V
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util version 0.1+svn

$dfu-util -l
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY


$lsusb
Bus 002 Device 002: ID 8087:0024 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 17ef:602e Lenovo
Bus 001 Device 002: ID 8087:0024 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


These are outputs of some commands after connecting LPC-link :


$ dfu-util -V
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

dfu-util version 0.1+svn



$ dfu-util -l
dfu-util - (C) 2007-2008 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Found Runtime: [0x0471:0xdf55] devnum=3, cfg=0, intf=0, alt=0, name="UNDEFINED"


~$ lsusb

Bus 002 Device 003: ID 0471:df55 Philips
Bus 002 Device 002: ID 8087:0024 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 17ef:602e Lenovo
Bus 001 Device 002: ID 8087:0024 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Can I get help ?

Thank you





0 Kudos

1,166 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Sat Sep 14 10:42:13 MST 2013
In my experience, that is NOT an error. The LPC-Link has been booted and you can use it.
0 Kudos