📄 usrconfig.c
字号:
ulipIP[7] = '1'+simProcnum; routeAdd("0.0.0.0",ulipIP); }#endif /* CPU==SIMNT */#endif /* INCLUDE_NET_INIT */#ifdef INCLUDE_PASSFS { extern STATUS passFsInit (); extern void *passFsDevInit (); char passName [256]; if (passFsInit (1) == OK) { extern char vxsim_hostname[]; extern char vxsim_cwd[]; sprintf (passName, "%s:", vxsim_hostname); if (passFsDevInit (passName) == NULL) { printf ("passFsDevInit failed for <%s>\n", passName); } else { sprintf (passName, "%s:%s", vxsim_hostname, vxsim_cwd); ioDefPathSet (passName); } } else printf ("passFsInit failed\n"); }#endif /* INCLUDE_PASSFS */#ifdef INCLUDE_DOS_DISK { char unixName [80]; extern void unixDrv (); extern void unixDiskInit (); extern char *u_progname; /* home of executable */ char *pLastSlash; unixDrv (); pLastSlash = strrchr (u_progname, '/'); pLastSlash = (pLastSlash == NULL) ? u_progname : (pLastSlash + 1); sprintf (unixName, "/tmp/%s%d.dos", pLastSlash, sysProcNumGet()); unixDiskInit (unixName, "A:", 0); }#endif /* INCLUDE_DOS_DISK */ /* initialize shared memory objects */#ifdef INCLUDE_SM_OBJ /* unbundled shared memory objects */ usrSmObjInit (BOOT_LINE_ADRS);#endif /* INCLUDE_SM_OBJ */ /* initialize WindMP */#ifdef INCLUDE_VXFUSION /* unbundled VxFusion (distributed objects) */ usrVxFusionInit (BOOT_LINE_ADRS);#ifdef INCLUDE_SHOW_ROUTINES { extern void msgQDistShowInit(); extern void distNameShowInit (); extern void distIfShowInit (); extern void msgQDistGrpShowInit (); msgQDistShowInit(); distNameShowInit (); distIfShowInit (); msgQDistGrpShowInit (); }#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_WINDMP */ /* write protect text segment & vector table only after bpattach () */#ifdef INCLUDE_MMU_FULL /* unbundled mmu product */#ifdef INCLUDE_PROTECT_TEXT if (vmTextProtect () != OK) printf ("\nError protecting text segment. errno = %x\n", errno);#endif /* INCLUDE_PROTECT_TEXT */#ifdef INCLUDE_PROTECT_VEC_TABLE if (intVecTableWriteProtect () != OK) printf ("\nError protecting vector table. errno = %x\n", errno);#endif /* INCLUDE_PROTECT_VEC_TABLE */#endif /* INCLUDE_MMU_FULL */ /* initialize select only after NFS and RPC for proper delete hook order */#ifdef INCLUDE_SELECT selectInit ();#endif /* INCLUDE_SELECT */ /* create system and status symbol tables */#ifdef INCLUDE_STANDALONE_SYM_TBL sysSymTbl = symTblCreate (SYM_TBL_HASH_SIZE_LOG2, TRUE, memSysPartId);#ifdef INCLUDE_SYM_TBL_SYNC /* create a module (group 1) that is not synchronized (SPR# 20301) */ moduleCreate ("vxWorks.sym", #if (defined INCLUDE_AOUT) MODULE_A_OUT,#elif ((defined INCLUDE_COFF) || (defined INCLUDE_ECOFF) || \ (defined INCLUDE_SOMCOFF)) MODULE_ECOFF,#elif (defined INCLUDE_ELF) MODULE_ELF,#endif /* INCLUDE_AOUT */ HIDDEN_MODULE|LOAD_NO_SYMBOLS);#endif /* INCLUDE_SYM_TBL_SYNC */ printf ("\nAdding %ld symbols for standalone.\n", standTblSize); /* fill in from built in table*/ for (ix = 0; (ULONG) ix < standTblSize; ix++)#if (CPU == ARM7TDMI_T) thumbSymTblAdd (sysSymTbl, &(standTbl[ix]));#else symTblAdd (sysSymTbl, &(standTbl[ix]));#endif /* CPU==ARM7TDMI_T `*/#endif /* INCLUDE_STANDALONE_SYM_TBL */#ifdef INCLUDE_NET_SYM_TBL sysSymTbl = symTblCreate (SYM_TBL_HASH_SIZE_LOG2, TRUE, memSysPartId); netLoadSymTbl (); /* fill in table from host */#endif /* INCLUDE_NET_SYM_TBL */#ifdef INCLUDE_STAT_SYM_TBL statSymTbl = symTblCreate (STAT_TBL_HASH_SIZE_LOG2, FALSE, memSysPartId); for (ix = 0; (ULONG)ix < statTblSize; ix ++) /* fill in from builtin table*/ symTblAdd (statSymTbl, &(statTbl [ix]));#endif /* INCLUDE_STAT_SYM_TBL */ /* initialize C++ support library */#if defined (INCLUDE_CPLUS) && defined (INCLUDE_CPLUS_MIN)#error Define only one of INCLUDE_CPLUS or INCLUDE_CPLUS_MIN, not both#endif#ifdef INCLUDE_CPLUS /* all standard C++ runtime support */ cplusLibInit ();#ifdef INCLUDE_LOADER cplusDemanglerInit ();#endif#endif#ifdef INCLUDE_CPLUS_MIN /* minimal C++ runtime support */ cplusLibMinInit ();#ifdef INCLUDE_LOADER cplusDemanglerInit ();#endif#endif /* initialize Wind Web Server */#ifdef INCLUDE_HTTP httpd ();#endif /* INCLUDE_HTTP */#ifdef INCLUDE_RBUFF /* install rBuff support */ rBuffLibInit();#ifdef INCLUDE_SHOW_ROUTINES rBuffShowInit (); /* install rBuff show routine */#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_RBUFF */#ifdef INCLUDE_WINDVIEW windviewConfig ();#endif /* INCLUDE_WINDVIEW */ /* initialize the WDB debug agent */#ifdef INCLUDE_WDB wdbConfig();#ifdef INCLUDE_WDB_BANNER#ifndef INCLUDE_SHELL /* short banner, like the bootPrintLogo banner */ Drv_Print ("\n\n"); Drv_Print ("%17s%s", "","VxWorks\n\n"); Drv_Print ("Copyright 1984-1998 Wind River Systems, Inc.\n\n"); Drv_Print (" CPU: %s\n", sysModel ()); Drv_Print (" VxWorks: " VXWORKS_VERSION "\n"); Drv_Print (" BSP version: " BSP_VERSION BSP_REV "\n"); Drv_Print (" Creation date: %s\n", __DATE__); Drv_Print (" WDB: %s.\n\n", ((wdbRunsExternal () || wdbRunsTasking ()) ? "Ready" : "Agent configuration failed") );#endif /*INCLUDE_SHELL*/#endif /*INCLUDE_WDB_BANNER*/#endif /* INCLUDE_WDB */ /* initialize interactive shell */#ifdef INCLUDE_SHELL#ifdef INCLUDE_SECURITY /* include shell security */ if ((sysFlags & SYSFLG_NO_SECURITY) == 0) { loginInit (); /* initialize login table */ shellLoginInstall (loginPrompt, NULL); /* install security program */ /* add additional users here as required */ loginUserAdd (LOGIN_USER_NAME, LOGIN_PASSWORD); }#endif /* INCLUDE_SECURITY */ printLogo (); /* print out the banner page */ Drv_Print (" "); Drv_Print ("CPU: %s. Processor #%d.\n", sysModel (), sysProcNumGet ()); Drv_Print (" "); Drv_Print ("Memory Size: 0x%x.", (UINT)(sysMemTop () - (char *)LOCAL_MEM_LOCAL_ADRS)); Drv_Print (" BSP version " BSP_VERSION BSP_REV ".");#if defined(INCLUDE_WDB) && defined(INCLUDE_WDB_BANNER) Drv_Print ("\n "); Drv_Print ("WDB: %s.", ((wdbRunsExternal () || wdbRunsTasking ()) ? "Ready" : "Agent configuration failed") );#endif /*INCLUDE_WDB && INCLUDE_WDB_BANNER*/ Drv_Print ("\n\n");#ifdef INCLUDE_STARTUP_SCRIPT /* run a startup script */ if (sysBootParams.startupScript [0] != EOS) usrStartupScript (sysBootParams.startupScript);#endif /* INCLUDE_STARTUP_SCRIPT */ shellInit (SHELL_STACK_SIZE, TRUE); /* create the shell */ /* only include the simple demo if the shell is NOT included */#else#if defined(INCLUDE_DEMO) /* create demo w/o shell */ taskSpawn ("demo", 20, 0, 2000, (FUNCPTR)usrDemo, 0,0,0,0,0,0,0,0,0,0);#endif /* mips cpp no elif */#endif /* INCLUDE_SHELL */#ifdef INCLUDE_UGL usrUglInit ();#endif /* INCLUDE_UGL */#if defined(INCLUDE_JAVA) javaConfig ();#endif /* INCLUDE_JAVA */#ifdef INCLUDE_HTML usrHtmlInit ();#endif /* INCLUDE_HTML */#if CPU==SIMNT win_ReleaseMutex(simUpMutex);#endif#ifdef INCLUDE_USER_APPL /* Startup the user's application */ USER_APPL_INIT; /* must be a valid C statement or block */#endif }/********************************************************************************* usrClock - user-defined system clock interrupt routine** This routine is called at interrupt level on each clock interrupt.* It is installed by usrRoot() with a sysClkConnect() call.* It calls all the other packages that need to know about clock ticks,* including the kernel itself.** If the application needs anything to happen at the system clock interrupt* level, it can be added to this routine.** RETURNS: N/A*/void usrClock () { Led_Flash(); tickAnnounce (); /* announce system tick to kernel */ }#ifdef INCLUDE_DEMO/********************************************************************************* usrDemo - example application without shell** This routine is spawned as a task at the end of usrRoot(), if INCLUDE_DEMO* is defined, and INCLUDE_SHELL is NOT defined in configAll.h or config.h.* It is intended to indicate how a shell-less application can be linked,* loaded, and ROMed.** NOMANUAL*/void usrDemo (void) { char string [40]; Drv_Print ("VxWorks (for %s) version %s.\n", sysModel (), vxWorksVersion); Drv_Print ("Kernel: %s.\n", kernelVersion ()); Drv_Print ("Made on %s.\n", creationDate); FOREVER { Drv_Print ("\nThis is a test. Type something: "); /*fioRdString (STD_IN, string, sizeof (string));*/ Drv_Print ("\nYou typed \"%s\".\n", string); if (strcmp (string, "0") == 0) memShow (0); if (strcmp (string, "1") == 0) memShow (1); } }#endif /* INCLUDE_DEMO */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -