threadx.zip
大小:1.02MB
价格:25积分
下载量:0
评分:
5.0
上传者:areful
更新日期:2025-09-22

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

资源文件列表(大概)

文件名
大小
express.pdf
22.64KB
threadx/build_ap.bat
170B
threadx/build_tx.bat
4.37KB
threadx/build_txe.bat
7.14KB
threadx/demo.bld
278B
threadx/demo.c
7KB
threadx/demo.lnk
557B
threadx/demo_el.bld
294B
threadx/demo_el.lnk
626B
threadx/docs/
-
threadx/docs/ThreadX.pdf
1.49MB
threadx/readme.txt
15.33KB
threadx/tx.bld
1.69KB
threadx/tx_api.h
31.57KB
threadx/tx_ba.c
11.21KB
threadx/tx_blo.h
6.52KB
threadx/tx_bpc.c
10.82KB
threadx/tx_bpcle.c
9.83KB
threadx/tx_bpd.c
9.56KB
threadx/tx_bpi.c
6.31KB
threadx/tx_br.c
10.35KB
threadx/tx_byt.h
6.8KB
threadx/tx_byta.c
11.9KB
threadx/tx_bytc.c
9.88KB
threadx/tx_bytcl.c
9.91KB
threadx/tx_bytd.c
9.83KB
threadx/tx_byti.c
6.3KB
threadx/tx_bytr.c
12.59KB
threadx/tx_byts.c
12.84KB
threadx/tx_efc.c
8.23KB
threadx/tx_efcle.c
9.86KB
threadx/tx_efd.c
9.61KB
threadx/tx_efg.c
12.35KB
threadx/tx_efi.c
6.32KB
threadx/tx_efs.c
23.01KB
threadx/tx_el.c
51.58KB
threadx/tx_el.h
35.67KB
threadx/tx_eve.h
6.82KB
threadx/tx_ghs.c
8.16KB
threadx/tx_ghs.h
2.09KB
threadx/tx_ihl.c
8.48KB
threadx/tx_ike.c
12.54KB
threadx/tx_ill.68
11.7KB
threadx/tx_ini.h
6.24KB
threadx/tx_port.h
7.87KB
threadx/tx_qc.c
10.29KB
threadx/tx_qcle.c
9.92KB
threadx/tx_qd.c
9.36KB
threadx/tx_qf.c
10.21KB
threadx/tx_qi.c
6.28KB
threadx/tx_qr.c
20.52KB
threadx/tx_qs.c
19.72KB
threadx/tx_que.h
6.9KB
threadx/tx_sc.c
8.27KB
threadx/tx_scle.c
9.86KB
threadx/tx_sd.c
9.45KB
threadx/tx_sem.h
6.41KB
threadx/tx_sg.c
10.23KB
threadx/tx_si.c
6.3KB
threadx/tx_sp.c
9.5KB
threadx/tx_ta.c
9.78KB
threadx/tx_taa.c
6.47KB
threadx/tx_tc.c
13.04KB
threadx/tx_tcr.68
12.31KB
threadx/tx_tcs.68
12.23KB
threadx/tx_td.c
8.69KB
threadx/tx_tda.c
10.62KB
threadx/tx_tdel.c
8.54KB
threadx/tx_thr.h
12.15KB
threadx/tx_ti.c
8.84KB
threadx/tx_tic.68
6.48KB
threadx/tx_tide.c
6.61KB
threadx/tx_tim.h
8.92KB
threadx/tx_timch.c
6.92KB
threadx/tx_timcr.c
8.8KB
threadx/tx_timd.c
7.63KB
threadx/tx_timeg.c
6.43KB
threadx/tx_times.c
6.36KB
threadx/tx_timi.c
8.18KB
threadx/tx_timin.68
13.2KB
threadx/tx_tpc.68
7.82KB
threadx/tx_tpch.c
9.41KB
threadx/tx_tprch.c
14.54KB
threadx/tx_tr.c
12.34KB
threadx/tx_tra.c
7.95KB
threadx/tx_trel.c
8.71KB
threadx/tx_ts.68
8.71KB
threadx/tx_tsa.c
7.52KB
threadx/tx_tsb.68
9.39KB
threadx/tx_tse.c
7.03KB
threadx/tx_tsle.c
7.62KB
threadx/tx_tsr.68
8.27KB
threadx/tx_tsus.c
18.66KB
threadx/tx_tt.c
8.9KB
threadx/tx_tte.c
17.11KB
threadx/tx_tto.c
7.5KB
threadx/tx_tts.c
8.36KB
threadx/tx_ttsc.c
7.29KB
threadx/txe_ba.c
7.58KB
threadx/txe_bpc.c
8.21KB
threadx/txe_bpd.c
7.03KB
threadx/txe_br.c
7.05KB
threadx/txe_byta.c
8.15KB
threadx/txe_bytc.c
7.97KB
threadx/txe_bytd.c
7.01KB
threadx/txe_bytr.c
6.98KB
threadx/txe_efc.c
7.35KB
threadx/txe_efd.c
7.05KB
threadx/txe_efg.c
8.67KB
threadx/txe_efs.c
7.27KB
threadx/txe_qc.c
8.19KB
threadx/txe_qd.c
6.91KB
threadx/txe_qf.c
6.91KB
threadx/txe_qr.c
7.58KB
threadx/txe_qs.c
7.39KB
threadx/txe_sc.c
7.41KB
threadx/txe_sd.c
7.04KB
threadx/txe_sg.c
7.09KB
threadx/txe_sp.c
6.58KB
threadx/txe_taa.c
6.85KB
threadx/txe_tc.c
9.33KB
threadx/txe_tda.c
6.6KB
threadx/txe_tdel.c
6.84KB
threadx/txe_timd.c
6.97KB
threadx/txe_tmch.c
7.58KB
threadx/txe_tmcr.c
8.36KB
threadx/txe_tpch.c
7.46KB
threadx/txe_tra.c
6.51KB
threadx/txe_trel.c
6.22KB
threadx/txe_trpc.c
7.48KB
threadx/txe_tsa.c
6.91KB
threadx/txe_tt.c
7KB
threadx/txe_ttsc.c
7.3KB
threadx/
-

资源内容介绍

嵌入式实时系统的源代码,号称比UCOS2还稳定。老资料了,想要新版本代码的话在网上找找吧。CSDN系统自动把下载积分改成12分了。现在能修改所需积分,改回1分意思一下。
Express Logic's ThreadX for 68332 Using the Green Hills Tools1. InstallationThreadX for the 68332 is delivered on a single CD-ROM compatible disk. The entire distribution can be found in the sub-directory:\THREADXTo 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\GREEN2. Building the ThreadX run-time LibraryFirst 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 SystemThe ThreadX demonstration is designed to execute on the 68332 QUADS evaluationboard 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.BLDYou should observe the following files in the project view area:DEMO.BLD TX_ILL.68 DEMO.C DEMO.LNK README.TXTAt 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. Sincethe 68020 simulator does not simulate the 68332 peripherals, the timer interrupts will not work under simulation until the following commandsare entered in the simulation control window:> interrupt dev1 vector 16> interrupt dev1 priority 2> interrupt dev1 time 10000 every 10000> trap 16To run on the 68332 Evaluation board, simply convert the demo output imageto S-records and download it to the evaluation board. The following command can be used to do the conversion:> gsrec demo.cfe -o demo.mot3.1 EventAnalyzer DemonstrationTo build a demonstration system that will also log events for theMULTI EventAnalyzer, perform the same steps as the regular demo, except build the ThreadX library with BUILD_TXE.BAT file and usethe DEMO_EL.BLD build file to build the demonstration that logsall system events.4. System InitializationThe 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 isis 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 SwitchesThe 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 generationThere are additional linker commands inside of the file DEMO.LNK. Please use this file as a template for your application.5.1 User definesThe 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 FramesThe 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 functionmust 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 switchesthat 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 topof 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

用户评论 (0)

发表评论

captcha