Ucos-ii porting on MSP430 2--Detailed process _ operating system

Source: Internet
Author: User

Ucos-ii on MSP430 Migration 2--detailed process

1, a new IAR project file, saved in the "E:\430uCOSII\OSTest" folder. Create a new folder SRC, which is used to store the source code. As shown in the following figure.


2, add the source code corresponding folder.

(1) Create a new two folders under the SRC folder, "Oskernel" and "Msp430ports" respectively.


(2) Decompression micrium-ucos-ii-v286.zip.

There are 14 files under Micrium\software\ucos-ii\source. UCOS_II.C Displays all ucos-ii source files, os_dbg_r.c for debugging, which is not used during this migration process. Copy the os_cfg_r.h to the SRC folder.

Copy the remaining 11 source files to the Oskernel folder. This folder contains the processor-independent code files in the ΜC/OS-II system. Oskernel contains the following files:

L OS_CORE.C

L OS_FLAG.C

L OS_MBOX.C

L OS_MEM.C

L OS_MUTEX.C

L OS_Q.C

L OS_SEM.C

L OS_TASK.C

L OS_TIME.C

L OS_TMR.C

L UCOS_II.H


(3) Decompression ti-msp430-ucos-ii-v270.zip.

Copy the Msp430\iar three files (OS_CPU.H,OS_CPU_A.S43,OS_CPU_C.C) to the Sp430ports folder;

Copy the three files (app.c,includes.h,os_cfg.h) under Msp430\iar\ex1-c-spy to the SRC folder.


(4) New file app_cfg.h.

The SRC directory structure is shown in the following illustration:


3, the SRC folder under the source code added to the project file, and to group.

After the separation, the following figure shows:


Appcode: User program code;

CFG: Program configuration file;

Os-kernel:μc/os-ii the processor-independent code in the system;

Ports:μc/os-ii transplant to 430 on the file to be modified;


4, to complete the project file creation, start compiling debugging.

Errors and resolutions that occur during compilation are written another day.


Keep Blogging is a good thing, you can clear the way, the understanding of the problem more in-depth.

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.