VxWorks / Tornado II FAQ


MCP750 BSP changes

1 Changes to the default BSP

2 ATA support

Index


MCP750 BSP changes

1 Changes to the default BSP

I do not have a MCP-target, so I cannot verify or fix any problems related to this HW. If you have made any changes to the BSP and want to share them with the other VxWorks developers, please send them to me (Johan Borkhuis), so they can be put here.


2 ATA support

Q: How do I add ATA HDD support to my BSP?

A: These are the notes I (= Arthur V. Grigorian) wrote on this subject.

  1. Update ...\target\config\mcp750\config.h in the following way:
    In section:
    	#ifdef	MCP750
    	...
    	#endif
            

    change #undef INCLUDE_ATA to #define INCLUDE_ATA
    In section:

    #ifdef INCLUDE_ATA
    ...
    #endif
            

    change ATA_DEVx_STATE macros values to the following:

    #define ATA_DEV0_STATE  DEV_NOT_PRESENT /* or DEV_PRESENT
    		 if you have CompactFlash on your mcp750 board */
    #define ATA_DEV1_STATE   DEV_NOT_PRESENT
    #define ATA_DEV2_STATE   DEV_PRESENT
    #define ATA_DEV3_STATE   DEV_NOT_PRESENT
            

    Note that the onboard CompactFlash chip is visible as EIDE HDD.

  2. Then rebuild vxWorks and put it to the target's TFTP/FTP zone.
    Note that if you build vxWorks using "project" facility (not from the command line) you should activate vxWorks confihuration items Hardware->-peripherals->-hard Disks->-ATA disk drive and development tool components->-show routines->-ata show
  3. Set J6 Jumper on the target mcp750 board to boot with vxWorks boot loader. (J6 jumper sets soldered flash as a boot flash to 0xFFF00000) Configure boot loader parameters and boot vxWorks you just have built.
    Here comes some magic. Possible situations:

    Fortunately after the 1st successfull boot from vxWorks loader you wont's have such a strange "hang" problems with ATA support.

  4. In the vxWorks prompt do the following actions:
    Check if you can access your HDD using ataShow() routine
    -> ataShow(1, 0)
    to check if you can access CompactFlash device enter
    -> ataShow(0, 0)
    You should get rather full list of non-zero parameters for the specified device, for example it should show valid VendorID and DeviceID in the "model" line and Revision in the "rev" line.
    Then Create block device structures
    -> ataPBlkDev1 = ataDevCreate(1, 0, 0, 0)
    for the CompactFlash Device
    -> ataPBlkDev2 = ataDevCreate(0, 0, 0, 0)
    Now its time to create a filesystem on your HD or to attach it if you have created it already.
    To create DOS filesystem enter:
    -> ataPDosDev = dosFsMkfs("/ata1/", ataPBlkDev1)
    for the CompactFlash device enter
    -> ataPDosDev = dosFsMkfs("/ata2/", ataPBlkDev2)
    To attach DOS filesystem enter:
    -> ataPVolDesc2 = dosFsDevInit("/ata1/", ataPBlkDev1, 0)
    for the CompactFlash device enter
    -> ataPVolDesc2 = dosFsDevInit("/ata2/", ataPBlkDev2, 0)
    After that enter "devs" command. You should get a list of available devices. There should be "/ata1/" (or "/ata2/" for CompactFlash). You can use this device to for example copy a file to your HDD. Example:
    -> ls
    vxWorks
    vxWorks.TET
    value = 0 = 0x0
    -> copy "vxWorks","/ata2/vxWorks"
    value = 0 = 0x0
    -> cd "/ata2/"
    value = 0 = 0x0
    -> ls
    VXWORKS
    value = 0 = 0x0
    ->
            

    Note: If you want to boot vxWorks from HDD you should copy it to this HDD like it was done above, and boot using vxWorks loader while boot parameters are:

    device boot device : ata=1,0 (ata=0,0 for CompactFlash)
    file name : /ata0/vxWorks

From: Arthur V. Grigorian (archy@auriga.ru)


Index

2 A How do I add ATA HDD support to my BSP?


VxWorks Homepage
© J.A. Borkhuis, 2000 - 2005
Send me an e-mail if this page was helpfull