⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 read.me

📁 基于zsp400的ucos移植。 绝对高质量
💻 ME
字号:
Title:      READ.ME
Subject:    uC/OS-II (v2.51) for the LSI Logic ZSP
Date:       08/20/2001
Author:     S.Wright

-----------------------------------------------------------------------

This readme file contains information concerning LSI Logic's distribution
of the porting files for Micrium's uC/OS-II Real-Time Kernel, v2.51.  Refer
to "MicroC/OS-II, The Real-Time Kernel" for additional details.


1) Files in the ZSP_UCOS.ZIP:

READ.ME     - this file

DEMO.C      - a (VERY) simple demo program targeted to the EB402 eval board

OS_CORE.C   - the LSI-modified file from the Micrium distribution
UC_ZSP_C.C  - the xxx_C.C porting file, ZSP-specific
UC_ZSP_S.S  - the xxx_S.S porting file, ZSP-specific
INTVECTS.S  - interrupt vector table relocated to 0x0000
UCOS_ZSP.H  - ZSP-specific declaration file
OS_CFG.H    - modified OS_CFG.H from the Micrium distribution

MAKEFILE    - makefile to build uC/OS-II library AND demo program
LNK.SCR     - linker script file to link demo program
DEMO.MAP    - (included to fix bug that linker won't generate a map file
               unless it already exists)
INCLUDES.H  - main header file for build


2) Building the demo program:

A) Ensure ZSP SDK is installed, note path to tools directory.
B) Ensure Micrium's uC/OS-II distribution files are installed in a test
   directory.
C) Un-Zip ZSP_UCOS.ZIP over the top of Micrium's uc/OS-II distribution files.
   This will guarantee that certain existing uC/OS-II files in the Micrium
   distribution will be overwritten (specifically OS_CFG.H).
D) In MAKEFILE, set the macro for "ZSP_TOOL" to the tools directory from step
   'A'.
E) Run a "make" utility using MAKEFILE as the argument.  UCOS_II.A and DEMO.EXE
   will result.


3) Configuring SDLAUNCH to test the demo program:

A) Execute SDLAUNCH from the ZSP SDK.
B) From within SDLAUNCH, change directories to the directory containing
   DEMO.EXE.
C) Create a new project by selecting the "Create Project1.pjt in this directory"
   button.
D) Select the "Project Options" button and select the "Compiler/Assembler" tab.
E) Under the "Output Option" group and the "EXE File Name" edit box, change
   the executable file name from "Project1" to "demo".
F) Select the "Debugger" tab and select the "JTAG Controller" radio button.
G) Select the "OK" button to save settings.


4) Testing the demo program:

A) From within SDLAUNCH, make sure the "Project1" project is selected from the
   demo directory.
B) Make sure JTAG debugger is connected to the EVB and EVB is powered "ON".
C) Select the "Debug" button.
D) Wait for program to load (DEMO.C source will appear in a source window).
E) Press "F5" to start debugger (debugger may take several seconds to start
   the demo program).
F) When the demo program is running, LED1 is illuminated "fixed", LED2 is
   "toggling" (it's toggling at about 140KHz -- the toggling is NOT apparent),
   and LED16 is "toggling" at 25 Hz.  All other LEDs are extinguished.
   
   
5) General porting notes:

A) The user will need to provide their own uC/OS-II distribution.  This can
   be obtained from Micrium or from the uC/OS-II text.  Always install the
   uC/OS-II distribution BEFORE installing the above porting files.

B) LSI Logic has made a number of modifications to OS_CORE.C.  These mods fall
   under two categories.  First, several checks of "OSRunning == TRUE" are made
   within function calls that are called from ISRs (specifically OSIntEnter(),
   OSIntExit(), and OSTimeTick()).  This ensures that the scheduler does not
   run prior to the kernel being ready.  This situation could occur if an
   interrupt occurs prior to the call to OSStartHighReady ().  The second set
   of modifications involve the selective enabling/disabling of the numerous
   OSxyzHook() calls.  Since the sum of these modifications exceeds a reasonable
   set of user modifications, the entire file has been included in the LSI ZSP
   port distribution.  Support for the enabling/disabling has been added as a
   set of OS_xyz_HOOK_EN constants within OS_CFG.H.

C) The demo program is compiled using optimization level 2 (-O2).  The file
   UC_ZSP_S.S is hard-coded to support optimization level -02 (as well as
   -O0 and -O3).  If -O1 is desired, line 524 will need to be UNCOMMENTED
   and line 523 will need to be COMMENTED-OUT.  Refer to the aforemention
   Micrium text for details concerning the "throw-away" of the OSIntExit()
   call caused by the "add r12, XYZ" instruction.
   
D) The file DEMO.C is a very simple program.  It launches three tasks.  Two
   of the tasks are different instances of the same task.  These two tasks
   do nothing but send a message back-and-forth to each other.  The task that
   is told to StartItAll does just that.  The task receiving the message will
   toggle LED2.  Each message transmission and LED toggle takes about 3.5 us.
   The third task simply suspends for 20000 us and toggles LED16 upon wake-up.
   
E) Timer support on the ZSP is accomplished via Timer1.  Timer0 is available
   for programmer use.  The tick resolution is approximately 156 us resulting
   in 6404 ticks per second.  The usToTicks() add-on function will convert
   microseconds to the appropriate number of ticks.  It should be noted that
   the call to usToTicks() is computationally expensive.  If the returned
   tick count is to be use repeatedly, it is best to call the function and
   save the return value for later use.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -