I have started McuExpresso and booted the LPC Link2 with the jumper in JP1, and the serial port ACM0 is created.
udevadm monitor
UDEV [40789.512598] add /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.1/tty/ttyACM0 (tty)
UDEV [40789.518267] bind /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.1 (usb)
./lpcscrypt -d ?
USB serial devices:
/dev/ttyACM0
dmesg
[42272.401334] usb 3-1: new high-speed USB device number 64 using xhci_hcd
[42272.550352] usb 3-1: New USB device found, idVendor=1fc9, idProduct=0090
[42272.550360] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[42272.550365] usb 3-1: Product: LPC-LINK2 CMSIS-DAP V5.182
[42272.550369] usb 3-1: Manufacturer: NXP Semiconductors
[42272.550373] usb 3-1: SerialNumber: JXBUF0CR
[42272.553259] hid-generic 0003:1FC9:0090.0007: hiddev0,hidraw3: USB HID v1.00 Device [NXP Semiconductors LPC-LINK2 CMSIS-DAP V5.182] on usb-0000:00:14.0-1/input0
[42272.555432] hid-generic 0003:1FC9:0090.0008: hiddev1,hidraw4: USB HID v1.00 Device [NXP Semiconductors LPC-LINK2 CMSIS-DAP V5.182] on usb-0000:00:14.0-1/input4
[42272.556085] cdc_acm 3-1:1.1: ttyACM0: USB ACM device
[42272.557304] hid-generic 0003:1FC9:0090.0009: hiddev2,hidraw5: USB HID v1.11 Device [NXP Semiconductors LPC-LINK2 CMSIS-DAP V5.182] on usb-0000:00:14.0-1/input3
7.1 Multiple serial ports When LPCScrypt firmware is booted, it will enumerate on the host as a USB serial (VCOM) port. In normal operation LPCScrypt (host) will be able to detect and use the correct serial port automatically. However this automatic detection cannot identify the port to use if multiple USB serial ports are found. The solution is to manually identify the correct serial port and specify it to LPCScrypt using the -d switch.
I have identified the serial port so but I get this error with any command. (neither as root or resetting the lpc link2).
./lpcscrypt -d /dev/ttyACM0 erase all
Error opening /dev/ttyACM0: Resource temporarily unavailable
(Sometimes ISP reset, or erasing the flash, can help...)
Previous error(s) stops further processing
Error: <Command line>:0: Resource temporarily unavailable
Script cmd: batchmode 1
Last target cmd: =print 1715657266
Terminated with errors