μC/OS II installation and debugging Guide (with illustration)

Source: Internet
Author: User

Title: μC/OS II installation and debugging Guide

Reprint please explain the source: http://www.cnblogs.com/gylei/

 

Tools used

The development tools and Development kits in this article are as follows:

* Source code package: μ C/OS 2.52. The file name is μCOS_V2.52.rar. Click here to download it.

* Compilation tool: Borland C 3.1,the file name is bc31.rar. Click here to download it.

The development tool is dedicated to streamlining the compilation of μC/OS Ⅱ.

First, extract the source code package ucos252 and compile BC31 to the root directory of a disk.Root directory of a diskYou cannot decompress the package to another location. Otherwise, you need to modify a lot of files.

 

Here, extract the package to the root directory of the E disk. After decompression, the directory structure should be as follows:

Borand C 3.1 lite directory structure is as follows:

E:\BC31        |-----\bin        |-----\include        |-----\lib

 

μC/OS directory structure (The directory name has been changed.) As follows:

E:\SOFTWARE        |-----BLOCKS        |-----TO        |-----uCOS-II

 

The file to be modified is as follows:

BC3.1 Modification

E: \ BC31 \ bin tlink. cfg e: \ BC31 \ bin turboc. CFG

Software (source code of μC/OS) Modification

1 E: \ SOFTWARE \ uCOS-II \ EX1_x86L \ BC45 \ source test. LNK2 E: \ SOFTWARE \ uCOS-II \ exketx86l \ BC45 \ test maketest. BAT3 E: TEST. MAK

Note: E: \ SOFTWARE \ uCOS-II \For other routines, follow the preceding 3.

The specific modification content is as follows:

Note: The content marked in red in the following text is the content to be modified. Do not modify the default settings.

Decompress the package to E.The disk directory is modified as an example. You can modify the directory according to your path.

BC3.1:

1. TLINK. CFG

The content of the TLINK. CFG file is as follows:

        -LE:\BC31\LIB

2. TURBOC. CFG

The content of the TURBOC. CFG file is as follows:

 -IE:\BC31\INCLUDE -LE:\BC31\LIB

Software(That is, μC/OSSource code) Modification

1. E: \ SOFTWARE \ uCOS-II \ exclux86l \ BC45 \ source test. LNK

The content of the TEST. LNK file is as follows:

/v /s /c /P-          +E:\BC31\LIB\C0L.OBJ   +..\OBJ\TEST.OBJ       +..\OBJ\OS_CPU_A.OBJ   +..\OBJ\OS_CPU_C.OBJ   +..\OBJ\PC.OBJ         +..\OBJ\uCOS_II.OBJ..\OBJ\TEST,..\OBJ\TESTE:\BC31\LIB\EMU.LIB   +E:\BC31\LIB\MATHL.LIB +E:\BC31\LIB\CL.LIB

2. E: \ SOFTWARE \ uCOS-II \ exclux86l \ BC45 \ test maketest. BAT

The content of the MAKETEST. BAT file is as follows. Because MAKETEST. BAT contains a large amount of content, it is not listed one by one. Only the code that needs to be modified is listed. Other codes are kept by default.

ECHO ONMD  ..\WORKMD  ..\OBJMD  ..\LSTCD   ..\WORKCOPY  ..\TEST\TEST.MAK  TEST.MAKE:\BC31\BIN\MAKE -f TEST.MAKCD    ..\TEST

3. E: \ SOFTWARE \ uCOS-II \ EX1_x86L \ BC45 \ TEST. MAK

The content of the TEST. MAK file is as follows. Because the content of TEST. MAK is large and not listed one by one, only the code that needs to be modified is listed. Other codes are kept by default.

################################################                                   TOOLS################################################BORLAND=E:\BC31CC=$(BORLAND)\BIN\BCCASM=$(BORLAND)\BIN\TASMLINK=$(BORLAND)\BIN\TLINKTOUCH=$(BORLAND)\BIN\TOUCH

Now, all the modifications are complete. Execute the maketest.batcommand under E: \ SOFTWARE \ uCOS-II \ exw.x86l \ BC45 \ testto automatically compile the link, and use test.exe to run the final product.

In the download link provided above, the environment of the E disk has been set. If the reader unpacks the file to the root directory of the E disk, no further setup is required. Execute E directly: MAKETEST under \ SOFTWARE \ uCOS-II \ exdeskx86l \ BC45 \ TEST. BAT.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.