I am trying to get Flash Magic to work on my LPC1768 based system, which recently went from working fine to "Target marked for no debug". I apparently need to clear the flash to get this going again. While working on this I noticed that swapping FTDI cables breaks flash magic. With one FTDI cable the links in the Resources/dosdevices match the ttys in the device directory:
% dir /Applications/FlashMagic.app/Contents/Resources/dosdevices/
total 136
drwxrwxrwx@ 19 sravet admin 646 Jan 11 21:26 .
drwxrwxrwx@ 31 sravet admin 1054 Jan 14 21:38 ..
lrwxrwxrwx 1 sravet admin 26 Jan 11 21:26 COM6 -> /dev/cu.usbserial-FTVV5C84
lrwxrwxrwx 1 sravet admin 27 Jan 11 21:26 COM9 -> /dev/tty.usbserial-FTVV5C84
% dir /dev/*usb*
crw-rw-rw- 1 root wheel 18, 9 Jan 14 21:35 /dev/cu.usbserial-FTVV5C84
crw-rw-rw- 1 root wheel 18, 8 Jan 14 21:35 /dev/tty.usbserial-FTVV5C84
If I exit flash magic, plug in a different cable, and rerun, the links are now broken:
% dir /Applications/FlashMagic.app/Contents/Resources/dosdevices/
total 136
drwxrwxrwx@ 19 sravet admin 646 Jan 11 21:26 .
drwxrwxrwx@ 31 sravet admin 1054 Jan 14 21:38 ..
lrwxrwxrwx 1 sravet admin 26 Jan 11 21:26 COM6 -> /dev/cu.usbserial-FTVV5C84
lrwxrwxrwx 1 sravet admin 27 Jan 11 21:26 COM9 -> /dev/tty.usbserial-FTVV5C84
% dir /dev/*usb*
crw-rw-rw- 1 root wheel 18, 11 Jan 14 21:40 /dev/cu.usbserial-FTVB3ODA
crw-rw-rw- 1 root wheel 18, 10 Jan 14 21:40 /dev/tty.usbserial-FTVB3ODA
The device names in /dev have changed but the links have not.
I can still select COM6 or COM9 without error. I suggest two changes:
1) error checking when trying to open a com port via a link that is broken
2) regenerate the COM links every time flash magic is run.
For now the workaround is to delete the COM* links in the dosdevices directory to force flash magic to regenerate them.
thanks,
--steve
% dir /Applications/FlashMagic.app/Contents/Resources/dosdevices/
total 136
drwxrwxrwx@ 19 sravet admin 646 Jan 11 21:26 .
drwxrwxrwx@ 31 sravet admin 1054 Jan 14 21:38 ..
lrwxrwxrwx 1 sravet admin 26 Jan 11 21:26 COM6 -> /dev/cu.usbserial-FTVV5C84
lrwxrwxrwx 1 sravet admin 27 Jan 11 21:26 COM9 -> /dev/tty.usbserial-FTVV5C84
% dir /dev/*usb*
crw-rw-rw- 1 root wheel 18, 9 Jan 14 21:35 /dev/cu.usbserial-FTVV5C84
crw-rw-rw- 1 root wheel 18, 8 Jan 14 21:35 /dev/tty.usbserial-FTVV5C84
If I exit flash magic, plug in a different cable, and rerun, the links are now broken:
% dir /Applications/FlashMagic.app/Contents/Resources/dosdevices/
total 136
drwxrwxrwx@ 19 sravet admin 646 Jan 11 21:26 .
drwxrwxrwx@ 31 sravet admin 1054 Jan 14 21:38 ..
lrwxrwxrwx 1 sravet admin 26 Jan 11 21:26 COM6 -> /dev/cu.usbserial-FTVV5C84
lrwxrwxrwx 1 sravet admin 27 Jan 11 21:26 COM9 -> /dev/tty.usbserial-FTVV5C84
% dir /dev/*usb*
crw-rw-rw- 1 root wheel 18, 11 Jan 14 21:40 /dev/cu.usbserial-FTVB3ODA
crw-rw-rw- 1 root wheel 18, 10 Jan 14 21:40 /dev/tty.usbserial-FTVB3ODA
The device names in /dev have changed but the links have not.
I can still select COM6 or COM9 without error. I suggest two changes:
1) error checking when trying to open a com port via a link that is broken
2) regenerate the COM links every time flash magic is run.
For now the workaround is to delete the COM* links in the dosdevices directory to force flash magic to regenerate them.
thanks,
--steve