Tuesday, January 12, 2010

Using Flash magic in Linux



  1. This tutorial explains how to use Flash Magic software in Linux. With this method you can also use any window's ISP software in Linux.

  2. Install the Flash Magic software in Linux using wine. Right click the flash installer and select 'open with wine windows program loader'. The remaining steps are similar to the way it is installed in Windows.


  3. Next step is to detect the serial ports supported by your Linux. Open the terminal and type

    $ dmesg | grep tty

    This will display all the available serial ports. This is the output that I got :

    [ 0.001117] console [tty0] enabled

    [ 0.803118] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

    [ 0.803210] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

    [ 0.803530] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

    [ 0.803665] 00:08: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

    [ 20.621648] usb 2-2: pl2303 converter now attached to ttyUSB0


    (I had also attached a USB-to-serial converter, the last statement)


  4. Next use setserial command to set and report the configuration information associated with the serial port. Enter the command

    $ setserial -g /dev/ttyS[0123]

    If you dont have setserial installed, install it.

    Ubuntu users can try :: sudo apt-get install setserial


  5. Now link the serial devices in Linux with the com ports in the wine software.

    $ ln -s /dev/ttyS0 ~/.wine/dosdevices/com1

    This links serial port 0 of linux with com1 of wine.


  6. If you are using USB to serial converter, plug in the converter and type the command in step 1. The last result will give the name of the USB serial port.

    Just link that name with any com port number.

    (my USB to serial port name was USB0)

    $ ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com3

    This links USB-to-Serial USB0 to com3 in wine.


  7. Well, that's it. Start the Flash magic software, select the com port as per your available option and nJOY!. Feedbacks are welcomed.


    *Here is image which shows the Flash Magic in action to download a HEX program in LPC2378 (ARM Processor).

** Mind you it is not 'MAC OS X', but Ubuntu 9.10 with 'Mac-4-Lin' theme.

4 comments: