首页下载资源硬件开发Threadx操作系统源代码(1.02M)

ZIPThreadx操作系统源代码(1.02M)

areful1.02MB需要积分:1

资源文件列表:

threadx.zip 大约有134个文件
  1. express.pdf 22.64KB
  2. threadx/build_ap.bat 170B
  3. threadx/build_tx.bat 4.37KB
  4. threadx/build_txe.bat 7.14KB
  5. threadx/demo.bld 278B
  6. threadx/demo.c 7KB
  7. threadx/demo.lnk 557B
  8. threadx/demo_el.bld 294B
  9. threadx/demo_el.lnk 626B
  10. threadx/docs/
  11. threadx/docs/ThreadX.pdf 1.49MB
  12. threadx/readme.txt 15.33KB
  13. threadx/tx.bld 1.69KB
  14. threadx/tx_api.h 31.57KB
  15. threadx/tx_ba.c 11.21KB
  16. threadx/tx_blo.h 6.52KB
  17. threadx/tx_bpc.c 10.82KB
  18. threadx/tx_bpcle.c 9.83KB
  19. threadx/tx_bpd.c 9.56KB
  20. threadx/tx_bpi.c 6.31KB
  21. threadx/tx_br.c 10.35KB
  22. threadx/tx_byt.h 6.8KB
  23. threadx/tx_byta.c 11.9KB
  24. threadx/tx_bytc.c 9.88KB
  25. threadx/tx_bytcl.c 9.91KB
  26. threadx/tx_bytd.c 9.83KB
  27. threadx/tx_byti.c 6.3KB
  28. threadx/tx_bytr.c 12.59KB
  29. threadx/tx_byts.c 12.84KB
  30. threadx/tx_efc.c 8.23KB
  31. threadx/tx_efcle.c 9.86KB
  32. threadx/tx_efd.c 9.61KB
  33. threadx/tx_efg.c 12.35KB
  34. threadx/tx_efi.c 6.32KB
  35. threadx/tx_efs.c 23.01KB
  36. threadx/tx_el.c 51.58KB
  37. threadx/tx_el.h 35.67KB
  38. threadx/tx_eve.h 6.82KB
  39. threadx/tx_ghs.c 8.16KB
  40. threadx/tx_ghs.h 2.09KB
  41. threadx/tx_ihl.c 8.48KB
  42. threadx/tx_ike.c 12.54KB
  43. threadx/tx_ill.68 11.7KB
  44. threadx/tx_ini.h 6.24KB
  45. threadx/tx_port.h 7.87KB
  46. threadx/tx_qc.c 10.29KB
  47. threadx/tx_qcle.c 9.92KB
  48. threadx/tx_qd.c 9.36KB
  49. threadx/tx_qf.c 10.21KB
  50. threadx/tx_qi.c 6.28KB
  51. threadx/tx_qr.c 20.52KB
  52. threadx/tx_qs.c 19.72KB
  53. threadx/tx_que.h 6.9KB
  54. threadx/tx_sc.c 8.27KB
  55. threadx/tx_scle.c 9.86KB
  56. threadx/tx_sd.c 9.45KB
  57. threadx/tx_sem.h 6.41KB
  58. threadx/tx_sg.c 10.23KB
  59. threadx/tx_si.c 6.3KB
  60. threadx/tx_sp.c 9.5KB
  61. threadx/tx_ta.c 9.78KB
  62. threadx/tx_taa.c 6.47KB
  63. threadx/tx_tc.c 13.04KB
  64. threadx/tx_tcr.68 12.31KB
  65. threadx/tx_tcs.68 12.23KB
  66. threadx/tx_td.c 8.69KB
  67. threadx/tx_tda.c 10.62KB
  68. threadx/tx_tdel.c 8.54KB
  69. threadx/tx_thr.h 12.15KB
  70. threadx/tx_ti.c 8.84KB
  71. threadx/tx_tic.68 6.48KB
  72. threadx/tx_tide.c 6.61KB
  73. threadx/tx_tim.h 8.92KB
  74. threadx/tx_timch.c 6.92KB
  75. threadx/tx_timcr.c 8.8KB
  76. threadx/tx_timd.c 7.63KB
  77. threadx/tx_timeg.c 6.43KB
  78. threadx/tx_times.c 6.36KB
  79. threadx/tx_timi.c 8.18KB
  80. threadx/tx_timin.68 13.2KB
  81. threadx/tx_tpc.68 7.82KB
  82. threadx/tx_tpch.c 9.41KB
  83. threadx/tx_tprch.c 14.54KB
  84. threadx/tx_tr.c 12.34KB
  85. threadx/tx_tra.c 7.95KB
  86. threadx/tx_trel.c 8.71KB
  87. threadx/tx_ts.68 8.71KB
  88. threadx/tx_tsa.c 7.52KB
  89. threadx/tx_tsb.68 9.39KB
  90. threadx/tx_tse.c 7.03KB
  91. threadx/tx_tsle.c 7.62KB
  92. threadx/tx_tsr.68 8.27KB
  93. threadx/tx_tsus.c 18.66KB
  94. threadx/tx_tt.c 8.9KB
  95. threadx/tx_tte.c 17.11KB
  96. threadx/tx_tto.c 7.5KB
  97. threadx/tx_tts.c 8.36KB
  98. threadx/tx_ttsc.c 7.29KB
  99. threadx/txe_ba.c 7.58KB
  100. threadx/txe_bpc.c 8.21KB
  101. threadx/txe_bpd.c 7.03KB
  102. threadx/txe_br.c 7.05KB
  103. threadx/txe_byta.c 8.15KB
  104. threadx/txe_bytc.c 7.97KB
  105. threadx/txe_bytd.c 7.01KB
  106. threadx/txe_bytr.c 6.98KB
  107. threadx/txe_efc.c 7.35KB
  108. threadx/txe_efd.c 7.05KB
  109. threadx/txe_efg.c 8.67KB
  110. threadx/txe_efs.c 7.27KB
  111. threadx/txe_qc.c 8.19KB
  112. threadx/txe_qd.c 6.91KB
  113. threadx/txe_qf.c 6.91KB
  114. threadx/txe_qr.c 7.58KB
  115. threadx/txe_qs.c 7.39KB
  116. threadx/txe_sc.c 7.41KB
  117. threadx/txe_sd.c 7.04KB
  118. threadx/txe_sg.c 7.09KB
  119. threadx/txe_sp.c 6.58KB
  120. threadx/txe_taa.c 6.85KB
  121. threadx/txe_tc.c 9.33KB
  122. threadx/txe_tda.c 6.6KB
  123. threadx/txe_tdel.c 6.84KB
  124. threadx/txe_timd.c 6.97KB
  125. threadx/txe_tmch.c 7.58KB
  126. threadx/txe_tmcr.c 8.36KB
  127. threadx/txe_tpch.c 7.46KB
  128. threadx/txe_tra.c 6.51KB
  129. threadx/txe_trel.c 6.22KB
  130. threadx/txe_trpc.c 7.48KB
  131. threadx/txe_tsa.c 6.91KB
  132. threadx/txe_tt.c 7KB
  133. threadx/txe_ttsc.c 7.3KB
  134. threadx/

资源介绍:

嵌入式实时系统的源代码,号称比UCOS2还稳定。老资料了,想要新版本代码的话在网上找找吧。 CSDN系统自动把下载积分改成12分了。现在能修改所需积分,改回1分意思一下。
Express Logic's ThreadX for 68332 Using the Green Hills Tools 1. Installation ThreadX for the 68332 is delivered on a single CD-ROM compatible disk. The entire distribution can be found in the sub-directory: \THREADX To install ThreadX to your hard-disk, make a THREADX\68332\GREEN directory on your hard-disk and copy all the contents of the THREADX sub-directory on the distribution disk. The following is an example MS-DOS copy command (assuming source is D: and C: is your hard-drive): D:\THREADX>XCOPY /S *.* C:\THREADX\68332\GREEN 2. Building the ThreadX run-time Library First make sure you are in the ThreadX directory you have created on your hard-drive. Also, make sure that you have setup your path and other environment variables necessary for the Green Hills development environment. At this point you may run the BUILD_TX.BAT batch file. This will build the ThreadX run-time environment in the THREADX directory. C:\THREADX\68332\GREEN> build_tx You should observe assembly and compilation of a series of ThreadX source files. At the end of the batch file, they are all combined into the run-time library file: TX.OLB. This file must be linked with your application in order to use ThreadX. 3. Demonstration System The ThreadX demonstration is designed to execute on the 68332 QUADS evaluation board and under the MULTI environment using MULTI's 68000 simulator. The instructions that follow will show you how to get the ThreadX demonstration running in these environments. Building the demonstration is easy, simply load the MULTI project file DEMO.BLD, which is located inside your ThreadX directory: C:\THREADX\68332\GREEN\DEMO.BLD You should observe the following files in the project view area: DEMO.BLD TX_ILL.68 DEMO.C DEMO.LNK README.TXT At this point, select the "Project Build" operation and observe the compilation, assembly, and linkage of the ThreadX application. After the demonstration is built, you are now ready for debugging! To run on under MULTI's 68000 simulator, select the "Remote" button from the MULTI builder (you should see "s68 68020" in the remote window). This invokes MULTI's 68020 simulator and you should observe several new windows for it. Next, select the "Debug" button from the MULTI builder. You should now observe the demonstration program in the debugger window. At this point, you are free to debug with breakpoints, data watches, etc. The demonstration system attempts to setup a 68332 periodic timer. Since the 68020 simulator does not simulate the 68332 peripherals, the timer interrupts will not work under simulation until the following commands are entered in the simulation control window: > interrupt dev1 vector 16 > interrupt dev1 priority 2 > interrupt dev1 time 10000 every 10000 > trap 16 To run on the 68332 Evaluation board, simply convert the demo output image to S-records and download it to the evaluation board. The following command can be used to do the conversion: > gsrec demo.cfe -o demo.mot 3.1 EventAnalyzer Demonstration To build a demonstration system that will also log events for the MULTI EventAnalyzer, perform the same steps as the regular demo, except build the ThreadX library with BUILD_TXE.BAT file and use the DEMO_EL.BLD build file to build the demonstration that logs all system events. 4. System Initialization The system entry point using Green Hills tools is at the label _start. This is defined within the CRT0.O file supplied by Green Hills. In addition, this is where all static and global pre-set C variable initialization processing is called from. After the Green Hills startup function returns, ThreadX initialization is is called. The 68332 specific initialization is done in the function _tx_initialize_low_level, which is located in the file TX_ILL.68. This function is responsible for setting up various system data structures, interrupt vectors, and a periodic timer interrupt source for ThreadX. In addition, _tx_initialize_low_level defines the system timer thread�s stack and determines the first available address for use by the application. By default free memory is assumed to start at the linker defined symbol __ghsbegin_freemem. The ThreadX system timer's stack is allocated here and the memory address after the timer thread's stack is passed to the application definition function, tx_application_define. 5. Assembler / Compiler / Linker Switches The following are Green Hills switches used in building the demonstration system: Compiler/Assembler Meaning Switches -G Specifies debug information -c Specifies object code output -68332 Specifies 68332 code generation There are additional linker commands inside of the file DEMO.LNK. Please use this file as a template for your application. 5.1 User defines The following defines and their associated action are as follows: Define Meaning TX_DISABLE_ERROR_CHECKING If defined before tx_api.h is included, this define causes basic ThreadX error checking to be disabled. Please see Chapter 4 in the "ThreadX User Guide" for more details. TX_DISABLE_STACK_CHECKING By default, the thread create function fills the thread's stack with a 0xEF data pattern, which is used by the MULTI debugger to calculate stack usage. This can be bypassed by compiling tx_tc.c with this define. TX_ENABLE_EVENT_LOGGING This define enables event logging for any or all of the ThreadX source code. If this option is used anywhere, the tx_ihl.c file must be compiled with it as well, since this is where the event log is initialized. TX_NO_EVENT_INFO This is a sub-option for event logging. If this is enabled, only basic information is saved in the log. TX_ENABLE_EVENT_FILTERS This is also a sub-option for event-logging. If this is enabled, run-time filtering logic is added to the event logging code. 6. Register Usage and Stack Frames The Green Hills 68K compiler assumes that registers d0-d1, and a0-a1 are scratch registers for each function. All other registers used by a C function must be preserved by the function. ThreadX takes advantage of this in situations where a context switch happens as a result of making a ThreadX service call (which is itself a C function). In such cases, the saved context of a thread is only the non-scratch registers. The following defines the saved context stack frames for context switches that occur as a result of interrupt handling or from thread-level API calls. All suspended threads have one of these two types of stack frames. The top of the suspended thread's stack is pointed to by tx_stack_ptr in the associated thread control block TX_THREAD. Offset Interrupted Stack Frame Non-Interrupt Stack Frame 0x00 1 0 0x02 d0 d2 0x06 d1 d3 0x0A d2
100+评论
captcha