interfacing a floppy - VxWorks

This is a discussion on interfacing a floppy - VxWorks ; Hi list, Iam trying to interface a floppy on the target machine using a vxWorks.st_rom image.The dosFs support has been enabled for the image.But when I typed devs,what I find is there is not entry for floppy at all.It shows ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: interfacing a floppy

  1. interfacing a floppy

    Hi list,
    Iam trying to interface a floppy on the target machine using a
    vxWorks.st_rom image.The dosFs support has been enabled for the
    image.But when I typed devs,what I find is there is not entry for
    floppy at all.It shows two tyCo devices,and two console devices. and
    one null device.But the iosDrvShow is showing 6 different drivers
    installed.The devs shows that the devices shown are linked to driver
    numbers 0,1 and 2.Driver no. 0 doesn't exist atll in the driver table
    shown.
    The end objective is to create a file in the floppy and
    write/read its contents.It is an IDE interface and Iam working on
    tornado 2.0 ,vxWorks 5.4,386 machine.Can someone share the steps to be
    followed to achieve the objective and/or clarify the doubts
    encountered.
    Thank you.

    cheers-
    kk


  2. Re: interfacing a floppy

    do ,
    mkboot a: vxworks.st_rom.bin

    before that in the config.h file, check your bootline,it should be
    fd(0,0)


  3. Re: interfacing a floppy

    Hey I think the question was abt how to mount floppy disk and not how
    to boot from a floppy? Anyways the floppy device can be created using
    fdDevInit(). This returns a pointer.....
    pDev=fdDevInit()
    then initialize the DOS file system on it using....
    dosFsDevInit("fDev",pDev,0)
    Here use 0 if the floppy has been pre-formatted in DOS (windows)
    A new device fDev will be created in the devs list. Just cd to the
    device and perform the usual create(), open(), read() functions.
    Hope this is what you asked for. I myself am new to vxWorks and learned
    this just yesterday from the documentation.

    Thanks


  4. Re: interfacing a floppy

    Hi list,
    Thank you all for the replies.code namespider,your solution did not
    work.But it gave me a hope.I tried to execute the same but it did not
    run.I tried with various combinations (logical)of the available apis
    and still it did not work.But when I was going through the limited
    available src files of vxWorks,I found the following details related to
    floppy:

    INCLUDE_FD
    INCLUDE_DOSFS
    were the macros related in my scenario.
    But both of them were defined in the bsp
    directory(c:\tornado\target\config\pcPentium).So I searched in the
    ...\all directory in the usrConfig.c file for these macros.

    In a particular line usrFdConfig was getting called that seemed to
    reflect my requirement.But it was in between #ifdef INCLUDE_FD and its
    #endif.

    The man page says this API would mount the floppy to the dosfs file
    system under the name provided as argument.

    Hence I tried
    ->usrFdConfig(0,0,"fdDev")

    It worked!!!!!!!!!!!!!!!!
    ->devs
    :
    4 fdDev
    ->cd "fdDev"
    ->ls
    BOOTROM.SYS
    ->

    VOILA it works.
    But few of the above questions still remain unanswered.To this another
    question is added now!
    If INCLUDE_FD was defined in the BSP file,then why did not this get
    initialised earlier during boot itself?
    Someone kindly answer the questions.
    Thank you all once again.
    -kk


+ Reply to Thread