Skip to end of metadata
Go to start of metadata

The distribution of µC/LIB is typically included in a ZIP file called: . (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/LIB organized in a directory structure according to “AN-2002, µC/OS-II Directory Structure.” Specifically, the files may be found in the following directories:


This is the main directory for µC/LIB and contains source code for many standard library functions, macros, and constants including:


This file defines constants for many common values such as TRUE/FALSE, YES/NO, ENABLED/DISABLED; as well as for integer, octet, and bit values. However, all #defines in this file start are prefixed with DEF_DEF_TRUE/DEF_FALSE, DEF_YES/DEF_NO, DEF_ENABLED/DEF_DISABLED, etc. This file also contains macros for common mathematical operations like min()/max(), abs(), bit_set()/bit_clr(), etc. See Chapter 3, “µC/LIB Constant and Macro Library” for more details.

lib_mem.c and lib_mem.h

These files contain source code to replace standard library functions memclr(), memset(), memcpy(), memcmp(), etc. with µC/LIB equivalents Mem_Clr(), Mem_Set(), Mem_Copy(), and Mem_Cmp(), respectively. See Chapter 4, “µC/LIB Memory Library” for more details.

lib_str.c and lib_str.h

These files contain source code to replace standard library functions strlen(), strcpy(), strcmp(), etc. with µC/LIB equivalents Str_Len(), Str_Copy(), and Str_Cmp(), respectively. See Chapter 5, “µC/LIB String Library” for more details.

lib_ascii.c and lib_ascii.h

These files contain source code to replace standard library functions tolower(), toupper(), isalpha(), isdigit(), etc. with µC/LIB equivalents ASCII_ToLower(), ASCII_ToUpper(), ASCII_IsAlpha(), and ASCII_IsDig(), respectively. See Chapter 6, “µC/LIB ASCII Library” for more details.

lib_math.c and lib_math.h

These files contain source code to replace standard library functions rand(), srand(), etc. with µC/LIB equivalents Math_Rand(), Math_RandSetSeed(), respectively. See Chapter 7, “µC/LIB Mathematics Library” for more details.


This directory contains all µC/LIB documentation files.


This directory contains a template file, lib_cfg.h, which includes configuration for µC/LIB features such as memory allocation and assembly optimization. If not specified, all µC/LIB features are configured by default to be disabled. However, you should copy the configuration file template into your application’s folder and modify it for your application-specific configuration settings. See section 4-1 “Memory Library Configuration” and section 5-1 “String Library Configuration” for more details.

\Micrium\Software\uC-LIB\Ports\<CPU Type>\<Compiler>

µC/LIB also contains additional sub-directories specific to each processor/compiler combination which may include assembly-optimized files:

lib_mem_a.asm or lib_mem_a.s

These (optional) files contain assembly code to optimize certain memory library functions.

Application files which intend to make use of µC/LIB constants, macros, or functions should #include the desired µC/LIB header files. In addition, applications should configure µC/LIB features in the configuration file, lib_cfg.h.


  • No labels