Bug report for OSX version of flash magic

Started by sravet, January 14, 2014, 09:48:29 PM

Previous topic - Next topic

sravet

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

Andy Ayre

Thanks for the report and suggestion. We will look into this here.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

Andy Ayre

Does this happen every time? Do you change user accounts at all?

When Flash Magic starts it executes the command:

rm -rf $CONTENTSFOLD/Resources/dosdevices/COM*

where $CONTENTSFOLD is /Applications/FlashMagic.app/Contents. As far as I can tell this should delete all the links. Can you try manually running the rm command and see what happens?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com