The distribution of µC/CPU is typically included in a ZIP file called: Micrium_uC-CPU-Vxyy.zip . (Note: The ZIP file name might also include customer names, invoice numbers, and file creation date.) The ZIP file contains all the source code and documentation for µC/CPU organized in a directory structure according to “AN-2002, µC/OS-II Directory Structure.” Specifically, the files may be found in the following directories:
\Micrium\Software\uC-CPU
This is the main directory for µC/CPU and contains generic, processor-independent source code including:
cpu_def.h
This file declares #define constants used to configure processor/compiler-specific CPU word sizes, endianness word order, critical section methods, and other processor configuration.
cpu_core.c
and cpu_core.h
These files contain source code that implements µC/CPU features such as host name allocation, timestamps, time measurements, and counting lead zeros.
\Micrium\Software\uC-CPU\Doc
This directory contains all µC/CPU documentation files.
\Micrium\Software\uC-CPU\Cfg\Template
This directory contains a template file, cpu_cfg.h
, which includes configuration for µC/CPU features such as host name allocation, timestamps, time measurements, and assembly optimization. Your application must include a cpu_cfg.h configuration file with application-specific configuration settings.
\Micrium\Software\uC-CPU\BSP\Template
This directory contains a template file, cpu_bsp.c
, which includes function templates for the board-specific (BSP) code required if certain µC/CPU features such as timestamp time measurements and assembly optimization are enabled. Your application must include code for all BSP functions enabled in cpu_cfg.h
.
\Micrium\Software\<CPU Type>\<Compiler>
µC/CPU also contains additional sub-directories specific to each processor/compiler combination organized as follows:
cpu.h
This file contains µC/CPU configuration specific to the processor (CPU Type) and compiler (Compiler), such as data type definitions, processor address and data word sizes, endianness word order, and critical section macros. See Chapter 3, “µC/CPU Processor/Compiler Port Files” on page 12 for more details.
cpu_a.asm or cpu_a.s
These (optional) files contains assembly code to enable/disable interrupts, implement critical section methods, and any other processor-specific code not already defined or implemented in the processor’s cpu.h (or cpu.c).
cpu.c
This (optional) file contains C and/or assembly code to implement processor-specific code not already defined or implemented in the processor’s cpu.h (or cpu_a.asm).
\Template\cpu.h
and cpu_a.asm
These template µC/CPU configuration files include example configurations for a generic processor/compiler.
An example of ARM-specific CPU processor files is shown below:
Application files which intend to make use of µC/CPU macros or functions should #include the desired µC/CPU header files. In addition, applications are required to configure µC/CPU features in application-specific configuration file, cpu_cfg.h
.