0, Environment
Windows XP 32bit/Windows 7 32 bit
1. Download Borland C ++ 3.1
Http://download.csdn.net/detail/g360883850/2415212
2. Download The uCOS-II source code.
Http://download.csdn.net/detail/wzq_sun/3594240
3. Install Borland C ++ 3.1
By default, install it in c: \ BorlandC.
4. View uCOS-II source code
Software
├ ── Blocks
│ ─ ── PC
│ ─ ── Bc45
Transfer─
│ ├ ── Exe
│ Sampled-Source
└ ── UCOS-II
├ ── Ex1_x86l
│ ─ ── Bc45
│ ─ ── Lst
│ ├ ── OBJ
│ Sampled-Source
│ Sampled-test
│ └ ── Work
├ ── Ex2_x86l
│ ─ ── Bc45
│ Sampled-Source
│ Sampled-test
─ ── Ex3_x86l
│ ─ ── Bc45
│ Sampled-Source
│ Sampled-test
├ ── Ix86l
│ ─ ── Bc45
│ ─ ── Doc
└ ── Source
5. Compilation routine ex3_x86l:
① Move the entire set of code to C: This step is just to make the path simple
② Modify the maketest. BAT file
Open the c: \ Software \ uCOS-II \ ex3_x86l \ bc45 \ test \ maketest. BAT file in Notepad
Modify c: \ b45 \ bin \ Make-F test. Mak to c: \ BorlandC \ bin \ Make-F test. Mak according to the BorlandC ++ installation path.
③ Modify the test. Mak File
Open the c: \ Software \ uCOS-II \ ex3_x86l \ bc45 \ test. Mak file in Notepad
Modify Borland = c: \ b45 to Borland = c: \ BorlandC according to the BorlandC ++ installation path.
Similarly, check whether the OS, PC, and port variables are correct.
④ Modify the test. lnk file
Open the c: \ Software \ uCOS-II \ ex3_x86l \ bc45 \ source \ test file in Notepad. The file may be incorrectly formatted or suffixed as an unknown file.
Similarly, change c: \ b45 to c: \ BorlandC according to the BorlandC ++ installation path.
⑤ Modify source file
Open the header file c: \ Software \ uCOS-II \ ex3_x86l \ bc45 \ source \ des. H. Note that the # include preprocessing file path is consistent with the source code path.
Open the c: \ Software \ uCOS-II \ source \ uCOS-II.C file, also pay attention to # include preprocessing file path is consistent with the source code path
⑥Compile Link
Now we are ready to run the maketest. bat batch program under the test directory.
If the link is compiled successfully, the test. EXE executable file can be generated.
---- End ----