USBSerial on LPC4088QSB with MBed OS5?

Is there any ‘official’ support for the USBDevice (as an extra serial port) per the subject line? I’m using MBed OS 5.15.1

It seems to compile fine but throws a runtime error:

Note that I’m trying to use the 2nd micro-USB on this board port as a serial debug monitor using code such as in the example:

Any pointers appreciated…

Hi Chris,

Could you give more information?
Runtime error comes from serial debug? You try to use another USB for debugging instead of the one which prints this error message?
Maybe you should use another class (USBCDC class) with 2nd USB:


Hi Pekka,

Thanks for the reply.

Yes the runtime error is via the DAPLink USB serial connection, and yes I want to use a second USB ‘Device Interface’ port for general debug serial output when my board is mounted in it’s application environment - the DAPLink port is physically inaccessible in that case…

I’ve implemented a workaround using the normal UART pins into a Serial-USB adaptor-on-a-cable but it’s also physically cumbersome & fragile. A simple USB cable would be more robust.

I’ll try your suggestion, thanks. I’m also wondering if using the latest MBedOS (5.15.1) is an issue since the data on the board says 5.4 is the latest supported version?

How do I access the API docs for an older MBedOS version like that?

Update: Compiling your linked USBCDC example with MBedOS5.15.1 gives an almost identical result:

Attempting to build with OS 5.4 (acting on my previous thought about board compatibilty) doesn’t even get past ‘go’:

Traceback (most recent call last):
File "f:\Users\Chris\Documents\Mbed Programs\Workspaces\mbed-os-test/mbed-os/tools/", line 45, in <module>
from tools.options import get_default_options_parser
File "f:\Users\Chris\Documents\Mbed Programs\Workspaces\mbed-os-test\mbed-os\tools\", line 21, in <module>
from tools.toolchains import TOOLCHAINS
File "f:\Users\Chris\Documents\Mbed Programs\Workspaces\mbed-os-test\mbed-os\tools\toolchains\", line 28, in <module>
from tools.config import Config
File "f:\Users\Chris\Documents\Mbed Programs\Workspaces\mbed-os-test\mbed-os\tools\config\", line 29, in <module>
from tools.arm_pack_manager import Cache
File "f:\Users\Chris\Documents\Mbed Programs\Workspaces\mbed-os-test\mbed-os\tools\arm_pack_manager\", line 20, in <module>
from fuzzywuzzy import process
ImportError: No module named fuzzywuzzy

Hi Chris,

Just a tip, because I do not have the board like you have and I am no familiar with NXP.
Do you tried to looking for a USB driver, whether it exists in the target’s folder of the Mbed OS project on github?
I saw some similar isuue with Nucleo-L152RE (I know it not have on board USB but have it a USB interface) and it looks like the HAL driver for the USB of L1 series is not implemented in the Mbed’s target folder for some reason.

BR, Jan

it looks like the USB code for the LPC4088 is missing, it does not have the ‘USBDEVICE’ label in targets.json.
mbed2 and 5 have different implementations for USB, after the redesign and adding the USB support in mbed5, there are several targets now that have no implementation now. In mbed2, there was an ‘unsupported’ folder with some old USB stuff, but this no longer compatible with mbed5 and interferes with the existing header files. I’ve tried also to use it for a F103, but gave up and used mbed2 instead. It looks like it is some more work to modify the old implementation to fit into the new mbed5 design :frowning:
It would be great if the USB support could excluded (disable including USB headers), then older mbed2 or other sources could be merged. No this is no fun because all names are clashing.