这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » 关于在IDE主从启动VXWROKS的问题

共1条 1/1 1 跳转至

关于在IDE主从启动VXWROKS的问题

菜鸟
2007-09-08 22:49:00     打赏

关于在IDE  Primary Slave 启动VXWROKS的问题
我的CF卡接在IDE  Primary Slave上,即主通道的从盘,至于如何设置ATA启动请参看我的另一篇发在论坛的文章《tonado2.2.1下X86的CF卡启动及WINDML3.0配置过程》:
这样定义启动参数:
#define DEFAULT_BOOT_LINE \
       "ata=0,1(0,1)host:/ata0/vxworks h=192.168.0.37 e=192.168.0.17 g=192.168.0.2 pw=1 f=0x08 u=tr tn=tr o=rtl0"
#define DOSFS_NAMES_ATA_PRIMARY_SL****E "/ata0"
 
 
 
#define SYS_WARM_ATA_CTRL       0       /* controller 0 */
#define SYS_WARM_ATA_DRIVE      1       /* 0 = c:, 1 = d: */
把这参数改对:
/* controller zero device one */
 
 
 
#define ATA_CTRL0_DRV1_CYL  (980)   /* ATA 0, device 1 cylinders */
#define ATA_CTRL0_DRV1_HDS  (8)     /* ATA 0, device 1 heads */
#define ATA_CTRL0_DRV1_SPT  (32)    /* ATA 0, device 1 sectors per track */
#define ATA_CTRL0_DRV1_BPS  (512)   /* ATA 0, device 1 bytes per sector */
#define ATA_CTRL0_DRV1_WPC  (0x00)  /* ATA 0, device 1 write pre-compensation */
 
 
 
#define ATA0_NUM_DRIVES   (2)          /* ATA 0 number drives present */
另外要注意一下NVRAM的问题!
在sysNvRam.c里的
static void sysNvRam_mount()
{
/* int ctrl = 0 这是主通道的要是换了从通道就不灵了*/
    int ctrl = SYS_WARM_ATA_CTRL;/* I add*/
    u_char * pVolDesc;
   
 
 
#if defined(INCLUDE_ATA) && (SYS_WARM_TYPE == SYS_WARM_ATA)
    IMPORT ATA_RESOURCE ataResources[];
    ATA_RESOURCE *pAtaResource
     = &ataResources[ctrl];
#endif 
  /* ctrl = 0 这是主通道的要是还了从通道就不灵了*/
ctrl = SYS_WARM_ATA_CTRL; /*I  add*/
 
 
    /* if BOOTROM_DIR has already been mounted do not try remounting it */
 
 
    if(NULL == dosFsVolDescGet(BOOTROM_DIR, &pVolDesc))
        {
        dosFsInit (NUM_DOSFS_FILES);
#if defined(INCLUDE_FD) && (SYS_WARM_TYPE == SYS_WARM_FD)
        if (fdDrv (FD_INT_VEC, FD_INT_LVL) != OK)
            {
            return;
            }
 
 
        if(usrFdConfig(ctrl, 0, BOOTROM_DIR) != OK)
            {
            logMsg("%s: usrFdConfig failed\n", (int)__FUNCTION__,2,3,4,5,6);
            return;
            }
#endif
#if defined(INCLUDE_ATA) && (SYS_WARM_TYPE == SYS_WARM_ATA)
        if (ataDrv
            (ctrl, pAtaResource->drives, pAtaResource->intVector,
             pAtaResource->intLevel, pAtaResource->configType,
             pAtaResource->semTimeout, pAtaResource->wdgTimeout) == ERROR)
            {
            return;
            }
        /* if(usrAtaConfig(ctrl,0,BOOTROM_DIR) != OK) 这是主盘的,从盘就不灵*/
        if(usrAtaConfig(ctrl,SYS_WARM_ATA_DRIVE,BOOTROM_DIR) != OK)/*I mod 让它跟CONFIG里的一起变*/
            {
            logMsg("%s: usrAtaConfig failed\n", (int)__FUNCTION__,2,3,4,5,6);
            return;
            }
#endif
#if defined(INCLUDE_TFFS) && (SYS_WARM_TYPE == SYS_WARM_TFFS)
        if (tffsDrv () != OK)
            {
            return;
            }
 
 
        if(usrTffsConfig(ctrl,0,BOOTROM_DIR) != OK)
            {
            logMsg("%s: usrTffsConfig failed\n", (int)__FUNCTION__,2,3,4,5,6);
            return;
            }
#endif       
        }
    }
转自Tony嵌入式 http://Cevx.Com    http://Cevx.Net
本人是原作者!

 




关键词: 关于     主从     启动     VXWROKS     问题     #defi    

共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]