Author Topic: Bug report for OSX version of flash magic  (Read 2773 times)

sravet

  • Jr. Member
  • **
  • Posts: 1
    • View Profile
Bug report for OSX version of flash magic
« on: January 15, 2014, 06:48:29 am »
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

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2105
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Bug report for OSX version of flash magic
« Reply #1 on: January 15, 2014, 10:30:44 am »
Thanks for the report and suggestion. We will look into this here.

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

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2105
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Bug report for OSX version of flash magic
« Reply #2 on: January 15, 2014, 10:41:32 am »
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