prjConfig.c
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:10k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* prjConfig.c - dynamicaly generated configuration file */
  2. /*
  3. GENERATED: Wed Oct 02 10:19:18 Pacific Daylight Time 2002
  4. DO NOT EDIT - file is regenerated whenever the project changes.
  5. This file contains the non-BSP system initialization code
  6. for Create a bootable VxWorks image (custom configured).
  7. */
  8. /* includes */
  9. #include "vxWorks.h"
  10. #include "config.h"
  11. #include "bufLib.h"
  12. #include "cacheLib.h"
  13. #include "cplusLib.h"
  14. #include "drv/wdb/wdbPipePktDrv.h"
  15. #include "drv/wdb/wdbVioDrv.h"
  16. #include "envLib.h"
  17. #include "eventLib.h"
  18. #include "excLib.h"
  19. #include "fioLib.h"
  20. #include "hashLib.h"
  21. #include "intLib.h"
  22. #include "ioLib.h"
  23. #include "iosLib.h"
  24. #include "logLib.h"
  25. #include "lstLib.h"
  26. #include "math.h"
  27. #include "memLib.h"
  28. #include "msgQLib.h"
  29. #include "pipeDrv.h"
  30. #include "private/funcBindP.h"
  31. #include "private/kernelLibP.h"
  32. #include "private/seqDrvP.h"
  33. #include "private/taskLibP.h"
  34. #include "private/trgLibP.h"
  35. #include "private/vmLibP.h"
  36. #include "private/workQLibP.h"
  37. #include "private/wvFileUploadPathLibP.h"
  38. #include "private/wvTsfsUploadPathLibP.h"
  39. #include "private/wvUploadPathP.h"
  40. #include "qPriBMapLib.h"
  41. #include "rBuffLib.h"
  42. #include "rebootLib.h"
  43. #include "selectLib.h"
  44. #include "semLib.h"
  45. #include "sigLib.h"
  46. #include "sioLib.h"
  47. #include "stdio.h"
  48. #include "string.h"
  49. #include "symLib.h"
  50. #include "sysLib.h"
  51. #include "taskHookLib.h"
  52. #include "taskLib.h"
  53. #include "taskVarLib.h"
  54. #include "tickLib.h"
  55. #include "timexLib.h"
  56. #include "trgLib.h"
  57. #include "ttyLib.h"
  58. #include "usrConfig.h"
  59. #include "version.h"
  60. #include "vxLib.h"
  61. #include "wdLib.h"
  62. #include "wdb/wdb.h"
  63. #include "wdb/wdbBpLib.h"
  64. #include "wdb/wdbCommIfLib.h"
  65. #include "wdb/wdbLib.h"
  66. #include "wdb/wdbLibP.h"
  67. #include "wdb/wdbMbufLib.h"
  68. #include "wdb/wdbRegs.h"
  69. #include "wdb/wdbRpcLib.h"
  70. #include "wdb/wdbRtIfLib.h"
  71. #include "wdb/wdbSvcLib.h"
  72. #include "wdb/wdbUdpLib.h"
  73. #include "wdb/wdbVioLib.h"
  74. #include "wvLib.h"
  75. #include "wvTmrLib.h"
  76. /* imports */
  77. IMPORT char etext [];                   /* defined by loader */
  78. IMPORT char end [];                     /* defined by loader */
  79. IMPORT char edata [];                   /* defined by loader */
  80. /* BSP_STUBS */
  81. /* configlettes */
  82. #include "sysComms.c"
  83. #include "intrinsics.c"
  84. #include "sysClkInit.c"
  85. #include "usrBreakpoint.c"
  86. #include "usrCache.c"
  87. #include "usrKernel.c"
  88. #include "usrNtPassFs.c"
  89. #include "usrSerial.c"
  90. #include "usrStartup.c"
  91. #include "usrWdbBanner.c"
  92. #include "usrWdbBp.c"
  93. #include "usrWdbCore.c"
  94. #include "usrWdbFpp.c"
  95. #include "usrWdbSys.c"
  96. #include "usrWdbSysFpp.c"
  97. #include "usrWdbTask.c"
  98. #include "usrWdbTaskFpp.c"
  99. #include "usrWindview.c"
  100. #include "usrWvFileUploadPath.c"
  101. #include "usrWvTsfsUploadPath.c"
  102. #include "wdbPipe.c"
  103. /******************************************************************************
  104. *
  105. * usrInit - pre-kernel initialization
  106. */
  107. void usrInit (int startType)
  108.     {
  109.     sysStart (startType);               /* clear BSS and set up the vector table base address. */
  110.     cacheLibInit (USER_I_CACHE_MODE, USER_D_CACHE_MODE); /* include cache support */
  111.     excVecInit ();                      /* exception handling */
  112.     sysHwInit ();                       /* call the BSPs sysHwInit routine during system startup */
  113.     usrCacheEnable ();                  /* optionally enable caches */
  114.     wvLibInit ();                       /* low-level kernel instrumentation needed by windview */
  115.     usrKernelInit ();                   /* context switch and interrupt handling. DO NOT REMOVE. */
  116.     }
  117. /******************************************************************************
  118. *
  119. * usrWdbInit - the WDB target agent
  120. */
  121. void usrWdbInit (void)
  122.     {
  123.     wdbConfig ();                       /* software agent to support the tornado tools */
  124.     wdbMemLibInit ();                   /* read/write target memory */
  125.     wdbSysModeInit ();                  /* A breakpoint stops the entire operating system. */
  126.     wdbTaskModeInit ();                 /* A breakpoint stops one task, while others keep running. */
  127.     wdbEventLibInit ();                 /* asynchronous event handling needed for breakpoints etc. */
  128.     wdbEvtptLibInit ();                 /* support library for breakpoints and other asynchonous events. */
  129.     wdbDirectCallLibInit ();            /* call arbitrary functions directly from WDB */
  130.     wdbCtxLibInit ();                   /* create/delete/manipulate tasks */
  131.     wdbRegsLibInit ();                  /* get/set registers */
  132.     wdbGopherLibInit ();                /* information gathering language used by many tools */
  133.     wdbCtxExitLibInit ();               /* ability to notify the host when a task exits */
  134.     wdbExcLibInit ();                   /* notify the host when an exception occurs */
  135.     wdbFuncCallLibInit ();              /* asynchronous function calls */
  136.     wdbVioLibInit ();                   /* low-level virtual I/O handling */
  137.     wdbVioDrv ("/vio");                 /* vxWorks driver for accessing virtual I/O */
  138.     usrWdbBp ();                        /* core breakpoint library */
  139.     wdbTaskBpLibInit ();                /* task-mode breakpoint library */
  140.     wdbCtxStartLibInit ();              /* ability to notify the host when a task starts */
  141.     wdbUserEvtLibInit ();               /* ability to send user events to the host */
  142.     wdbFppInit ();                      /* WDB hardware fpp support */
  143.     wdbTaskFppInit ();                  /* task mode fpp debug support */
  144.     wdbSysFppInit ();                   /* system mode mode fpp debug support */
  145.     usrWdbBanner ();                    /* print banner to console after the agent is initialized */
  146.     }
  147. /******************************************************************************
  148. *
  149. * usrWindviewInit - 
  150. */
  151. void usrWindviewInit (void)
  152.     {
  153.     windviewConfig ();                  /* initialize and control event logging */
  154.     wvTmrRegister ((UINTFUNCPTR) seqStamp, (UINTFUNCPTR) seqStampLock, (FUNCPTR)     seqEnable, (FUNCPTR)     seqDisable, (FUNCPTR)     seqConnect, (UINTFUNCPTR) seqPeriod, (UINTFUNCPTR) seqFreq); /* no timestamping */
  155.     rBuffLibInit ();                    /* windview 2.0 ring of buffers for event logging  */
  156.     wdbTsfsDrv ("/tgtsvr");             /* virtual file system based on the WDB agent */
  157.     usrWvTsfsUploadPathInit ();         /* initialize path for the upload through TSFS socket  */
  158.     usrWvFileUploadPathInit ();         /* initialize path for the upload to file  */
  159.     }
  160. /******************************************************************************
  161. *
  162. * usrShowInit - enable object show routines
  163. */
  164. void usrShowInit (void)
  165.     {
  166.     taskShowInit ();                    /* task show routine */
  167.     msgQShowInit ();                    /* message queue show routine */
  168.     }
  169. /******************************************************************************
  170. *
  171. * usrToolsInit - software development tools
  172. */
  173. void usrToolsInit (void)
  174.     {
  175.     timexInit ();                       /* utility to measure function execution time */
  176.     trgInit ();                         /* triggering for system and user events */
  177.     usrWdbInit ();                      /* the WDB target agent */
  178.     usrWindviewInit ();                 /* usrWindviewInit */
  179.     usrShowInit ();                     /* enable object show routines */
  180.     }
  181. /******************************************************************************
  182. *
  183. * usrKernelCoreInit - core kernel facilities
  184. */
  185. void usrKernelCoreInit (void)
  186.     {
  187.     eventLibInit ();                    /* VxWorks events */
  188.     semBLibInit ();                     /* binary semaphores */
  189.     semMLibInit ();                     /* mutex semaphores */
  190.     semCLibInit ();                     /* counting semaphores */
  191.     msgQLibInit ();                     /* message queues */
  192.     wdLibInit ();                       /* watchdog timers */
  193.     taskHookInit ();                    /* user callouts on task creation/deletion/context switch */
  194.     }
  195. /******************************************************************************
  196. *
  197. * usrKernelExtraInit - extended kernel facilities
  198. */
  199. void usrKernelExtraInit (void)
  200.     {
  201.     hashLibInit ();                     /* hash library */
  202.     symLibInit ();                      /* symbol table */
  203.     envLibInit (ENV_VAR_USE_HOOKS);     /* environment variables */
  204.     sigInit ();                         /* signals */
  205.     }
  206. /******************************************************************************
  207. *
  208. * usrIosCoreInit - core I/O system
  209. */
  210. void usrIosCoreInit (void)
  211.     {
  212.     mathHardInit ();                    /* hardware fpp support */
  213.     iosInit (NUM_DRIVERS, NUM_FILES, "/null"); /* IO system */
  214.     ttyDrv ();                          /* terminal driver */
  215.     usrSerialInit ();                   /* SIO component */
  216.     }
  217. /******************************************************************************
  218. *
  219. * usrIosExtraInit - extended I/O system
  220. */
  221. void usrIosExtraInit (void)
  222.     {
  223.     excShowInit ();                     /* exception show routines */
  224.     excInit ();                         /* miscellaneous support task */
  225.     logInit (consoleFd, MAX_LOG_MSGS);  /* message logging */
  226.     pipeDrv ();                         /* pipes */
  227.     stdioInit ();                       /* buffered IO library */
  228.     fioLibInit ();                      /* formatting for printf, scanf, etc. */
  229.     floatInit ();                       /* allow printf and others to format floats correctly */
  230.     usrNtPassFsInit ();                 /* direct access to host filesystem */
  231.     }
  232. /******************************************************************************
  233. *
  234. * usrRoot - entry point for post-kernel initialization
  235. */
  236. void usrRoot (char *pMemPoolStart, unsigned memPoolSize)
  237.     {
  238.     usrKernelCoreInit ();               /* core kernel facilities */
  239.     memInit (pMemPoolStart, memPoolSize); /* full featured memory allocator */
  240.     memPartLibInit (pMemPoolStart, memPoolSize); /* core memory partition manager */
  241.     sysClkInit ();                      /* System clock component */
  242.     selectInit (NUM_FILES);             /* select */
  243.     usrIosCoreInit ();                  /* core I/O system */
  244.     usrKernelExtraInit ();              /* extended kernel facilities */
  245.     usrIosExtraInit ();                 /* extended I/O system */
  246.     selTaskDeleteHookAdd ();            /* install select task delete hook */
  247.     usrToolsInit ();                    /* software development tools */
  248.     cplusCtorsLink ();                  /* run compiler generated initialization functions at system startup */
  249.     usrAppInit ();                      /* call usrAppInit() (in your usrAppInit.c project file) after startup. */
  250.     }