Problems getting started with LPCXpresso

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

Problems getting started with LPCXpresso

762 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akaraivanov on Tue May 15 10:48:32 MST 2012
Hi 

I got a LPCXpresso with LPC1769 rev b target. I've installed the latest  Code Red IDE (4.2.2) on Fedora 16 running on a physical machine. I can  build examples for LPC1700 fine but when I try to debug any of them, IDE  freezes.   When I connect board to usb port, I can see a flashing led and lsusb  says: 

  Bus 001 Device 004: ID 0471:df55 Philips (or NXP) LPCXpresso LPC-Link 

Then when I start IDE, a select Debug for some of the demos, it builds,  displays a dialog saying "Initializing LPC Link", dialog closes and on  the status bar I can see "Launching adc_buzzer. Debug (57%)"   and led on board stops flashing. IDE freezes at that point.  lsusb now says:

  Bus 001 Device 005: ID 1fc9:0009 NXP Semiconductors  

The IDE has spawned the following proceeses (seen while it is hanging):

3130 pts/0    Sl+    0:12  |   \_  /usr/local/lpcxpresso_4.2.2_238/lpcxpresso/lpcxpresso  
3431 pts/0    S      0:00  |       \_ arm-none-eabi-gdb -q -nw -i mi  /home/adk/workspace/adc_buzzer/Debug/adc_buzzer.axf  
3443 ?        Ss     0:00  |           \_ crt_emu_cm3_nxp -g -mi -2  -pLPC1768 -vendor=NXP -wire=winUSB -msg-port=52073 
When I kill the IDE and reconnect the board, led starts flashing again. 

Any ideas? 

Thanks
Alex.
0 Kudos
Reply
8 Replies

723 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akaraivanov on Fri May 18 09:33:03 MST 2012
I got it working!

I had an usb extension cable connected. Without it, device is working fine. I can debug the examples now.

Thank you very much for bearing with me!

Regards
Alex.
0 Kudos
Reply

723 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Fri May 18 02:47:42 MST 2012
Can you try running the tests in the below FAQ and posting the results...

http://support.code-red-tech.com/CodeRedWiki/LPCLinkDiagnostics

Also, have you ever been able to successful download/debug this particular LPCXpresso board (either on your current computer, or on another)?

It might also be worth just trying to boot the board in ISP mode before trying to connect...

http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip

Also try plugging the board into a different USB port .

Regards,
CodeRedSupport
0 Kudos
Reply

723 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akaraivanov on Thu May 17 10:57:58 MST 2012
I have an update. After IDE is frozen for quite a long time (not idea how long - I checked way later) I can get mcu debug log. It cointained:

LPCXpresso Debug Driver v4.0 (Mar 25 2012 14:25:27)
Looked for chip XML file in /usr/local/lpcxpresso_4.2.2_238/lpcxpresso/bin/LPC1768.xml
Looked for vendor directory XML file in /usr/local/lpcxpresso_4.2.2_238/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in /usr/local/lpcxpresso_4.2.2_238/lpcxpresso/bin/crt_directory.xml
02: Failed on connect: Ee(02). Not connected to emulator.
Emu(0): InError. Was: Connected. DpID: 2BA01477. Info: LPCLINK_1_1

0 Kudos
Reply

723 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akaraivanov on Thu May 17 06:06:54 MST 2012
Thank you!

I checked the RunningOnLinux wiki page and tried to install all required dependencies. There are still some not being installed:

  hal-libs.i686
  java.i686
  libXTrap.i686
  opencdk.i686
  sane-backends-libs-gphoto2.i686

hal-libs is retired from Fedora 16
java is not found as such. I've fot installed instead:
   java-1.7.0-openjdk-1.7.0.3-2.1.fc16.1.i686
libXTrap.i686 is not available in fedora. I installed this old one from the web
   libXTrap-1.0.0-4.fc8.i386.rpm
opencdk - not available in F16 installed this package from F14:
   opencdk-0.6.6-1400.fc14.i686.rpm  
sane-backends-libs-gphoto2.i686 appears to be renamed in F16 to
    sane-backends-drivers-cameras-1.0.22-10.fc16.i686

I have SELinux set to permissive.

Despite the additionally installed packages the symptoms have not changed even a bit. I get the IDE hanging when I click on Debug. From this point on, IDE window does not get redrawn if I overlap it with another window. Because of IDE hanging I cannot really follow the procedure for getting the mcu debug log.

In attempt to provide some more information that might reveal anything please find attached in a zip:
- ps of related processes
- pstack run on lpcxpresso process
- pmap of lpcxpresso process


Does anyone have similar setup running on Fedora 16?

Thanks in advance
Alex.

PS: would have been a bit better if the list of dependent packages in RunningOnLinux wiki page does not contain package version numbers as they may differ for different Fedora versions. Most of the packages do not have version number there but there are some that do have it.
0 Kudos
Reply

723 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed May 16 14:42:48 MST 2012
We have fixed the access problem with the page.

32 bit libusb 1.0 is required by the debug drivers. It is accessed through a shared library, so you won't see it by just looking at the executables.
0 Kudos
Reply

723 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Wed May 16 14:21:15 MST 2012

Quote: akaraivanov

I can't open this page:
http://support.code-red-tech.com/Cod...RunningOnLinux

Code Red's wiki tells me:

"You are not allowed to view this page"

I.



Did you click on the link (which is what you need to do), or copy'n'paste the text from the forum post? This forum reduces the text of a link, but keeps the link from the text correct.

Thus the page in your browser should be...

http://support.code-red-tech.com/CodeRedWiki/RunningOnLinux

HTH!
0 Kudos
Reply

723 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akaraivanov on Wed May 16 14:06:24 MST 2012
Thank you very much for your answer!

I am using 64 bit Fedora.

I can't open this page:
http://support.code-red-tech.com/Cod...RunningOnLinux

Code Red's wiki tells me:

"You are not allowed to view this page"

I can read other pages from the wiki though.

Reading the thread you linked, I can see libusb is needed in 32 bit?
I have both libusb-0.1.3 and libusb-1.0.9 for both arhcs:

$ rpm -qa| grep libusb| sort
libusb-0.1.3-9.fc16.i686
libusb-0.1.3-9.fc16.x86_64
libusb1-1.0.9-0.3.rc1.fc16.i686
libusb1-1.0.9-0.3.rc1.fc16.x86_64

I checked all binaries under /usr/local/lpcxpresso_4.2.2_238 and only dfu-util is using libusb, which can be found:

/usr/local/lpcxpresso_4.2.2_238/lpcxpresso/bin/dfu-util
libusb-0.1.so.4 => /lib/libusb-0.1.so.4 (0xf7753000)
libusb-1.0.so.0 => /lib/libusb-1.0.so.0 (0xf7743000)


I cannot really follow the procedure for getting the mcu log as IDE hangs when I try to debug an example. Before clicking on Debug button "Display Selected Console" is grayed out so MCU debug is not available.

Is there a way to diagnose this on the command line?

Thanks
Alex.
0 Kudos
Reply

723 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed May 16 01:12:54 MST 2012
Fedora 16 is one of our test environments, so we know that it works.

Are you running 32-bit or 64-bit version of fedora? For 64-bit you need to install the 32-bit compatibility libraries as specified here:
http://support.code-red-tech.com/CodeRedWiki/RunningOnLinux

If you have done that, we need to see your debug log:
http://support.code-red-tech.com/CodeRedWiki/DebugLog

You might also want to view this thread:
http://knowledgebase.nxp.com/showthread.php?p=16344
0 Kudos
Reply