📄 usrconfig.c
字号:
{ IMPORT LPT_RESOURCE lptResources[]; lptDrv (LPT_CHANNELS, &lptResources[0]); /* init LPT parallel driver */ }#endif /* INCLUDE_LPT */#ifdef INCLUDE_PCMCIA#ifdef INCLUDE_SHOW_ROUTINES pcmciaShowInit (); /* install PCMCIA show routines */#endif /* INCLUDE_SHOW_ROUTINES */ pcmciaInit (); /* init PCMCIA Lib */#endif /* INCLUDE_PCMCIA */#ifdef INCLUDE_TFFS tffsDrv (); /* it should be after pcmciaInit() */#endif /* INCLUDE_TFFS */#ifdef INCLUDE_FORMATTED_IO fioLibInit (); /* initialize formatted I/O */#endif /* INCLUDE_FORMATTED_IO */ /* initialize floating point facilities */#ifdef INCLUDE_FLOATING_POINT floatInit (); /* initialize floating point I/O */#endif /* INCLUDE_FLOATING_POINT */ /* install software floating point emulation (if applicable) */#ifdef INCLUDE_SW_FP mathSoftInit (); /* use software emulation for fp math */#endif /* INCLUDE_SW_FP */ /* install hardware floating point support (if applicable) */#ifdef INCLUDE_HW_FP mathHardInit (); /* do fppInit() & install hw fp math */#ifdef INCLUDE_SHOW_ROUTINES fppShowInit (); /* install hardware fp show routine */#endif /* INCLUDE_SHOW_ROUTINES */#endif /* INCLUDE_HW_FP */ /* install dsp support (if applicable) */#ifdef INCLUDE_DSP usrDspInit (); /* do dspInit() */#endif /* INCLUDE_DSP */ /* initialize AltiVec library (if applicable) */#ifdef INCLUDE_ALTIVEC usrAltivecInit ();#endif /* INCLUDE_ALTIVEC */ /* initialize performance monitoring tools */#ifdef INCLUDE_SPY spyLibInit (); /* install task cpu utilization tool */#endif /* INCLUDE_SPY */#ifdef INCLUDE_TIMEX timexInit (); /* install function timing tool */#endif /* INCLUDE_TIMEX */#ifdef INCLUDE_ENV_VARS envLibInit (ENV_VAR_USE_HOOKS); /* initialize environment variable */#endif /* INCLUDE_ENV_VARS */#ifdef INCLUDE_NTPASSFS { IMPORT int ntPassFsInit(); IMPORT void * ntPassFsDevInit(); IMPORT char fullExePath[]; char passName [MAX_FILENAME_LENGTH]; char * defPathEnd; if (ntPassFsInit(1) == OK) { if (ntPassFsDevInit("host:") == NULL) {#ifdef INCLUDE_STDIO printf ("ntPassFsDevInit failed for host: \n");#endif /* INCLUDE_STDIO */ } else { sprintf (passName, "host:%s", fullExePath); /* Remove bootFile name at the end of the string */ defPathEnd = strrchr (passName, '\\'); if (defPathEnd != NULL) *defPathEnd = '\0'; ioDefPathSet (passName); } } else {#ifdef INCLUDE_STDIO printf ("ntPassFsInit failed\n");#endif /* INCLUDE_STDIO */ } }#endif /* INCLUDE_NTPASSFS */ /* initialize object module loader */#ifdef INCLUDE_LOADER moduleLibInit (); /* initialize module manager */#if defined(INCLUDE_AOUT) loadAoutInit (); /* use a.out format */#else /* coff or ecoff */#if defined(INCLUDE_ECOFF) loadEcoffInit (); /* use ecoff format */#else /* ecoff */#if defined(INCLUDE_COFF) loadCoffInit (); /* use coff format */#else /* coff */#if defined(INCLUDE_ELF) loadElfInit (); /* use elf format */#else#if defined(INCLUDE_SOM_COFF) loadSomCoffInit ();#else#if defined(INCLUDE_PECOFF) { extern int loadPecoffInit(); loadPecoffInit (); }#endif#endif#endif#endif#endif#endif#endif /* INCLUDE_LOADER */ /* initialize wtx client to synchronize host and target symbol tables */#ifdef INCLUDE_SYM_TBL_SYNC symSyncLibInit ();#endif /* INCLUDE_SYM_TBL_SYNC */ /* initialize network */#ifdef INCLUDE_NET_INIT usrBootLineInit (sysStartType); /* crack the bootline */# if defined(INCLUDE_LOGGING) && defined(INCLUDE_LOG_STARTUP) logMsg ("before usrNetInit()\n", 1,2,3,4,5,6); taskDelay (2); /* allow time for message to be displayed */# endif /* INCLUDE_LOGGING && INCLUDE_LOG_STARTUP */ usrNetInit (BOOT_LINE_ADRS); /* initialize network support */# if defined(INCLUDE_LOGGING) && defined(INCLUDE_LOG_STARTUP) logMsg ("after usrNetInit()\n", 1,2,3,4,5,6); taskDelay (2); /* allow time for message to be displayed */# endif /* INCLUDE_LOGGING && INCLUDE_LOG_STARTUP */#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) {#ifdef INCLUDE_STDIO printf ("passFsDevInit failed for <%s>\n", passName);#endif /* INCLUDE_STDIO */ } else { sprintf (passName, "%s:%s", vxsim_hostname, vxsim_cwd); ioDefPathSet (passName); } } else#ifdef INCLUDE_STDIO printf ("passFsInit failed\n");#endif /* INCLUDE_STDIO */ }#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 */ /* install select hook only after NFS/RPC for proper delete hook order */#ifdef INCLUDE_SELECT selTaskDeleteHookAdd ();#endif /* INCLUDE_SELECT */ /* create system and status symbol tables */#ifdef INCLUDE_STANDALONE_SYM_TBL#if defined(INCLUDE_LOGGING) && defined(INCLUDE_LOG_STARTUP) logMsg ("before symTblCreate()\n", 1,2,3,4,5,6); taskDelay (2); /* allow time for message to be displayed */#endif /* INCLUDE_LOGGING && INCLUDE_LOG_STARTUP */ 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_FAMILY == ARM) && ARM_THUMB) thumbSymTblAdd (sysSymTbl, &(standTbl[ix]));#else symTblAdd (sysSymTbl, &(standTbl[ix]));#endif /* CPU_FAMILY == ARM */# if defined(INCLUDE_LOGGING) && defined(INCLUDE_LOG_STARTUP) logMsg ("sysSymTbl complete.\n", 1,2,3,4,5,6); taskDelay (2); /* allow time for message to be displayed */# endif /* INCLUDE_LOGGING && INCLUDE_LOG_STARTUP */#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#if defined (INCLUDE_CPLUS) || defined (INCLUDE_CPLUS_MIN)#ifndef INCLUDE_CTORS_DTORS#define INCLUDE_CTORS_DTORS#endif#endif#ifdef INCLUDE_CTORS_DTORS /* * call compiler generated init functions (usually - but not necessarily - * C++ related) */ cplusCtorsLink ();#endif#ifdef INCLUDE_CPLUS /* all standard C++ runtime support */ cplusLibInit ();#endif#ifdef INCLUDE_CPLUS_MIN /* minimal C++ runtime support */ cplusLibMinInit ();#endif#ifdef INCLUDE_CPLUS_DEMANGLER cplusDemanglerInit ();#endif /* initialize COM/DCOM runtime support */#ifdef INCLUDE_COM comLibInit ();#endif#ifdef INCLUDE_DCOM dcomLibInit ();#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# if defined(INCLUDE_LOGGING) && defined(INCLUDE_LOG_STARTUP) logMsg ("before wdbConfig()\n", 1,2,3,4,5,6); taskDelay (2); /* allow time for message to be displayed */# endif /* INCLUDE_LOGGING && INCLUDE_LOG_STARTUP */ wdbConfig();# if defined(INCLUDE_LOGGING) && defined(INCLUDE_LOG_STARTUP) logMsg ("after wdbConfig()\n", 1,2,3,4,5,6); taskDelay (2); /* allow time for message to be displayed */# endif /* INCLUDE_LOGGING && INCLUDE_LOG_STARTUP */#ifdef INCLUDE_WDB_BANNER#if (WDB_COMM_TYPE == WDB_COMM_NETWORK)#define WDB_COMM_TYPE_STR "WDB_COMM_NETWORK"#endif /* WDB_COMM_TYPE == WDB_COMM_NETWORK */#if (WDB_COMM_TYPE == WDB_COMM_SERIAL)#define WDB_COMM_TYPE_STR "WDB_COMM_SERIAL"#endif /* WDB_COMM_TYPE == WDB_COMM_SERIAL */#if (WDB_COMM_TYPE == WDB_COMM_TYCODRV_5_2)#define WDB_COMM_TYPE_STR "WDB_COMM_TYCODRV_5_2"#endif /* WDB_COMM_TYPE == WDB_COMM_TYCODRV_5_2 */#if (WDB_COMM_TYPE == WDB_COMM_NETROM)#define WDB_COMM_TYPE_STR "WDB_COMM_NETROM"#endif /* WDB_COMM_TYPE == WDB_COMM_NETROM */#if (WDB_COMM_TYPE == WDB_COMM_VTMD)#define WDB_COMM_TYPE_STR "WDB_COMM_VTMD"#endif /* WDB_COMM_TYPE == WDB_COMM_VTMD */#if (WDB_COMM_TYPE == WDB_COMM_END)#define WDB_COMM_TYPE_STR "WDB_COMM_END"#endif /* WDB_COMM_TYPE == WDB_COMM_END */#if (WDB_COMM_TYPE == WDB_COMM_CUSTOM)#define WDB_COMM_TYPE_STR "WDB_COMM_CUSTOM"#endif /* WDB_COMM_TYPE == WDB_COMM_CUSTOM */#if (WDB_COMM_TYPE == WDB_COMM_PIPE)#define WDB_COMM_TYPE_STR "WDB_COMM_PIPE"#endif /* WDB_COMM_TYPE == WDB_COMM_PIPE */#ifndef WDB_COMM_TYPE_STR#define WDB_COMM_TYPE_STR "Unknown"#endif /* WDB_COMM_TYPE_STR */#ifndef INCLUDE_SHELL /* WDB banner same as printed by usrWdbBanner */ printf ("\n\n"); printf ("%23s\n\n", runtimeName); printf ("Copyright 1984-2002 Wind River Systems, Inc.\n\n"); printf (" CPU: %s\n", sysModel ()); printf (" Runtime Name: %s\n", runtimeName); printf ("Runtime Version: %s\n", runtimeVersion); printf (" BSP version: " BSP_VERSION BSP_REV "\n"); printf (" Created: %s\n", creationDate); printf (" WDB Comm Type: %s\n", WDB_COMM_TYPE_STR); printf (" WDB: %s.\n\n", ((wdbRunsExternal () || wdbRunsTasking ()) ? "Ready" : "Agent configuration failed") );#endif /*INCLUDE_SHELL*/#endif /*INCLUDE_WDB_BANNER*/#endif /* INCLUDE_WDB */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -