AnsweredAssumed Answered

Failed on connect: Ee(36) on Ubuntu 16.04.1 - LPC800 MAX, LPCXpresso v8.2.2

Question asked by Sergey Patrushin on Jan 8, 2017
Latest reply on Jan 12, 2017 by Sergey Patrushin

Hello!

After a full day of struggle and intense googling I still could not get debugging of LPC800 MAX (OM13055) working on Linux.

Though it does work on Windows Ok (please do not suggest me to get back on Wndws) - hence the board is alive!

 

I followed the IDE installation thoroughly as per Installing LPCXpresso on Linux 

Here is what I get in the IDE when I hit "Debug 'periph_blinky' [Debug]":

 

LPCXpresso RedlinkMulti Driver v8.2 (Sep 5 2016 10:13:28 - crt_emu_cm_redlink build 725)
Failed on connect: Ee(36). Could not connect to core.
No connection to emulator device

 

Error in final launch sequence
Failed to execute MI command:
-target-select extended-remote | crt_emu_cm_redlink -msg-port=44309 -g -mi -2 -pLPC812 -vendor=NXP -vc -reset= -ProbeHandle=1 -CoreIndex=0 -flash-driver=LPC800_16.cfx
Error message from debugger back end:
Remote communication error. Target disconnected.: Connection reset by peer.
Remote communication error. Target disconnected.: Connection reset by peer.

 

Just found a way to get extended logging in the IDE (Help -> About LPCXpresso -> Installation Details -> View Error Log) [how obvious, eh?]:

!ENTRY org.eclipse.cdt.dsf.gdb 4 5012 2017-01-08 21:59:56.513 !MESSAGE Error in final launch sequence !STACK 1 org.eclipse.core.runtime.CoreException: Failed to execute MI command: -target-select extended-remote | crt_emu_cm_redlink -msg-port=44309 -g -mi -2 -pLPC812 -vendor=NXP -vc -reset= -ProbeHandle=1 -CoreIndex=0 -flash-driver=LPC800_16.cfx Error message from debugger back end: Remote communication error.  Target disconnected.: Connection reset by peer.      at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:111)      at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:235)      at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:109)      at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:97)      at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)      at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)      at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)      at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.Exception: Remote communication error.  Target disconnected.: Connection reset by peer.      at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:927)      at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:756) !SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2017-01-08 21:59:56.514 !MESSAGE Failed to execute MI command: -target-select extended-remote | crt_emu_cm_redlink -msg-port=44309 -g -mi -2 -pLPC812 -vendor=NXP -vc -reset= -ProbeHandle=1 -CoreIndex=0 -flash-driver=LPC800_16.cfx Error message from debugger back end: Remote communication error.  Target disconnected.: Connection reset by peer. !STACK 0 java.lang.Exception: Remote communication error.  Target disconnected.: Connection reset by peer.      at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:927)      at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:756)  !ENTRY com.crt.dsfdebug 4 0 2017-01-08 21:59:56.730 !MESSAGE 02: Failed on connect !SUBENTRY 1 com.crt.dsfdebug 4 0 2017-01-08 21:59:56.730 !MESSAGE 02: Failed on connect !SUBENTRY 1 com.crt.dsfdebug 4 0 2017-01-08 21:59:56.730 !MESSAGE Could not connect to core. !SUBENTRY 1 com.crt.dsfdebug 4 0 2017-01-08 21:59:56.730 !MESSAGE 31: No connection to emulator device

 

Here is more info on my system:

Ubuntu 16.04.1 LTS

LPCXpresso v8.2.2 [Build 650]

 

uname -a
Linux 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

 

lsusb:

Bus 001 Device 008: ID 0d28:0204 NXP LPC1768

 

dmesg:

[ 507.088407] usb 1-2.2: new full-speed USB device number 8 using xhci_hcd
[ 507.196054] usb 1-2.2: New USB device found, idVendor=0d28, idProduct=0204
[ 507.196063] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 507.196068] usb 1-2.2: Product: MBED CMSIS-DAP
[ 507.196072] usb 1-2.2: Manufacturer: MBED
[ 507.196076] usb 1-2.2: SerialNumber: 10500203E72FE7891AD30821
[ 507.197497] usb-storage 1-2.2:1.0: USB Mass Storage device detected
[ 507.197889] scsi host2: usb-storage 1-2.2:1.0
[ 507.198704] cdc_acm 1-2.2:1.1: ttyACM0: USB ACM device
[ 507.203295] hid-generic 0003:0D28:0204.0008: hiddev0,hidraw4: USB HID v1.00 Device [MBED MBED CMSIS-DAP] on usb-0000:00:14.0-2.2/input3
[ 508.197183] scsi 2:0:0:0: Direct-Access MBED microcontroller 1.0 PQ: 0 ANSI: 2
[ 508.197855] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 508.198324] sd 2:0:0:0: [sdb] 80 512-byte logical blocks: (41.0 kB/40.0 KiB)
[ 508.198625] sd 2:0:0:0: [sdb] Write Protect is off
[ 508.198627] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 508.198913] sd 2:0:0:0: [sdb] No Caching mode page found
[ 508.198916] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 508.211385] sdb:
[ 508.212966] sd 2:0:0:0: [sdb] Attached SCSI removable disk

 

 

With the default firmware that the board came from DigiKey the USB drive was mounted on Linux and I was able to upload bin files to the target MCU and run it. Though debugging from IDE did not work and was throwing similar errors.

 

Then I tried to update FW to the latest mbed one on Linux (Firmware LPC800 MAX - Handbook | mbed)

After that the board does not mount any external storage on Linux, be it normal boot or with depressed Reset button.

 

Actually an attempt to update FW on Linux literally bricked the board. Powering it up with depressed Reset did not help and I was about to throw it away and move on to another vendor . LPC800 was not showing any external storage, it was not recognized by IDE. Only later I learned that I should have used dd. Too bad.

 

As a last resort I tried to update FW on Windows. There it magically worked. I wish I was wise enough to preserve the default FW - it was handy to throw bin files on Linux. I installed LPCXpresso IDE on Windows and there it let me debug blinky no problem. Anyway I can not stand continuing my work on Wndws. Any ideas to get me going with LPCXpresso on Linux will be appreciated greatly!

 

Thanks,

 - Sergey Patrushin.

 ( MyElectrons.com / MyElectrons.ru )

Outcomes