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

📄 lib_mem.lst

📁 stm32+ucos-ii
💻 LST
📖 第 1 页 / 共 5 页
字号:
###############################################################################
#                                                                             #
# IAR ANSI C/C++ Compiler V6.10.2.52244/W32 for ARM     07/Aug/2011  12:10:25 #
# Copyright 1999-2010 IAR Systems AB.                                         #
#                                                                             #
#    Cpu mode     =  thumb                                                    #
#    Endian       =  little                                                   #
#    Source file  =  F:\stm32\我的程序\Micrium\Software\uC-LIB\lib_mem.c      #
#    Command line =  F:\stm32\我的程序\Micrium\Software\uC-LIB\lib_mem.c -D   #
#                    USE_STDPERIPH_DRIVER -D STM32F10X_CL -lCN                #
#                    F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Lis #
#                    t\ -o F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Fla #
#                    sh\Obj\ --no_cse --no_unroll --no_inline                 #
#                    --no_code_motion --no_tbaa --no_clustering               #
#                    --no_scheduling --debug --endian=little --cpu=Cortex-M3  #
#                    -e --fpu=None --dlib_config                              #
#                    D:\arm\INC\c\DLib_Config_Normal.h -I                     #
#                    F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\APP\ -I   #
#                    F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\   #
#                    -I F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP #
#                    \ST\CMSIS\CM3\CoreSupport\ -I                            #
#                    F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\ST #
#                    \CMSIS\CM3\DeviceSupport\ST\STM32F10x\ -I                #
#                    F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\ST #
#                    \STM32F10x_StdPeriph_Driver\inc\ -I                      #
#                    F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\uC #
#                    OS-II\ -I F:\stm32\我的程序\Micrium\Software\EWARM\OS-II #
#                    \..\..\uCOS-II\Ports\ARM-Cortex-M3\Generic\IAR\ -I       #
#                    F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\..\uCO #
#                    S-II\Source\ -I F:\stm32\我的程序\Micrium\Software\EWARM #
#                    \OS-II\..\..\uC-LIB\ -I F:\stm32\我的程序\Micrium\Softwa #
#                    re\EWARM\OS-II\..\..\uC-LIB\Ports\ARM-Cortex-M3\IAR\ -I  #
#                    F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\..\uC- #
#                    CPU\ -I F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\. #
#                    .\..\uC-CPU\ARM-Cortex-M3\IAR\ -On --use_c++_inline      #
#    List file    =  F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Lis #
#                    t\lib_mem.lst                                            #
#    Object file  =  F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Obj #
#                    \lib_mem.o                                               #
#                                                                             #
#                                                                             #
###############################################################################

F:\stm32\我的程序\Micrium\Software\uC-LIB\lib_mem.c
      1          /*
      2          *********************************************************************************************************
      3          *                                                uC/LIB
      4          *                                        CUSTOM LIBRARY MODULES
      5          *
      6          *                          (c) Copyright 2004-2011; Micrium, Inc.; Weston, FL
      7          *
      8          *               All rights reserved.  Protected by international copyright laws.
      9          *
     10          *               uC/LIB is provided in source form to registered licensees ONLY.  It is 
     11          *               illegal to distribute this source code to any third party unless you receive 
     12          *               written permission by an authorized Micrium representative.  Knowledge of 
     13          *               the source code may NOT be used to develop a similar product.
     14          *
     15          *               Please help us continue to provide the Embedded community with the finest 
     16          *               software available.  Your honesty is greatly appreciated.
     17          *
     18          *               You can contact us at www.micrium.com.
     19          *********************************************************************************************************
     20          */
     21          
     22          /*
     23          *********************************************************************************************************
     24          *
     25          *                                     STANDARD MEMORY OPERATIONS
     26          *
     27          * Filename      : lib_mem.c
     28          * Version       : V1.35.00
     29          * Programmer(s) : ITJ
     30          *                 FGK
     31          *********************************************************************************************************
     32          * Note(s)       : (1) NO compiler-supplied standard library functions are used in library or product software.
     33          *
     34          *                     (a) ALL standard library functions are implemented in the custom library modules :
     35          *
     36          *                         (1) \<Custom Library Directory>\lib_*.*
     37          *
     38          *                         (2) \<Custom Library Directory>\Ports\<cpu>\<compiler>\lib*_a.*
     39          *
     40          *                               where
     41          *                                       <Custom Library Directory>      directory path for custom library software
     42          *                                       <cpu>                           directory name for specific processor (CPU)
     43          *                                       <compiler>                      directory name for specific compiler
     44          *
     45          *                     (b) Product-specific library functions are implemented in individual products.
     46          *********************************************************************************************************
     47          */
     48          
     49          
     50          /*
     51          *********************************************************************************************************
     52          *                                            INCLUDE FILES
     53          *********************************************************************************************************
     54          */
     55          
     56          #define    LIB_MEM_MODULE
     57          #include  <lib_mem.h>
     58          
     59          
     60          /*$PAGE*/
     61          /*
     62          *********************************************************************************************************
     63          *                                            LOCAL DEFINES
     64          *********************************************************************************************************
     65          */
     66          
     67          
     68          /*
     69          *********************************************************************************************************
     70          *                                           LOCAL CONSTANTS
     71          *********************************************************************************************************
     72          */
     73          
     74          
     75          /*
     76          *********************************************************************************************************
     77          *                                          LOCAL DATA TYPES
     78          *********************************************************************************************************
     79          */
     80          
     81          
     82          /*
     83          *********************************************************************************************************
     84          *                                            LOCAL TABLES
     85          *********************************************************************************************************
     86          */
     87          
     88          
     89          /*
     90          *********************************************************************************************************
     91          *                                       LOCAL GLOBAL VARIABLES
     92          *********************************************************************************************************
     93          */
     94          
     95          #if     (LIB_MEM_CFG_ALLOC_EN == DEF_ENABLED)
     96          MEM_POOL    *Mem_PoolTbl;                                               /* Mem      pool/seg tbl.                       */
     97          MEM_POOL     Mem_PoolHeap;                                              /* Mem heap pool/seg.                           */
     98          
     99          #ifndef  LIB_MEM_CFG_HEAP_BASE_ADDR
    100          CPU_INT08U   Mem_Heap[LIB_MEM_CFG_HEAP_SIZE];                           /* Mem heap.                                    */
    101          #endif
    102          #endif
    103          
    104          
    105          /*
    106          *********************************************************************************************************
    107          *                                      LOCAL FUNCTION PROTOTYPES
    108          *********************************************************************************************************
    109          */
    110          
    111          #if (LIB_MEM_CFG_ALLOC_EN == DEF_ENABLED)                               /* -------------- MEM POOL FNCTS -------------- */
    112          
    113          #if (LIB_MEM_CFG_ARG_CHK_EXT_EN == DEF_ENABLED)
    114          static  CPU_BOOLEAN   Mem_PoolBlkIsValidAddr(MEM_POOL    *pmem_pool,
    115                                                       void        *pmem_blk);
    116          #endif
    117          
    118          
    119          static  CPU_SIZE_T    Mem_PoolSegCalcTotSize(void        *pmem_addr,
    120                                                       CPU_SIZE_T   blk_nbr,
    121                                                       CPU_SIZE_T   blk_size,
    122                                                       CPU_SIZE_T   blk_align);
    123          
    124          static  void         *Mem_PoolSegAlloc      (MEM_POOL    *pmem_pool,
    125                                                       CPU_SIZE_T   size,
    126                                                       CPU_SIZE_T   align);
    127          
    128          #endif
    129          
    130          
    131          /*
    132          *********************************************************************************************************
    133          *                                     LOCAL CONFIGURATION ERRORS
    134          *********************************************************************************************************
    135          */
    136          
    137          
    138          /*$PAGE*/
    139          /*
    140          *********************************************************************************************************
    141          *                                           Mem_Init()
    142          *
    143          * Description : (1) Initialize Memory Management Module :
    144          *
    145          *                   (a) Initialize heap memory pool
    146          *                   (b) Initialize      memory pool table
    147          *
    148          *
    149          * Argument(s) : none.
    150          *
    151          * Return(s)   : none.
    152          *
    153          * Caller(s)   : Application.
    154          *
    155          * Note(s)     : none.
    156          *********************************************************************************************************
    157          */
    158          

   \                                 In section .text, align 2, keep-with-next
    159          void  Mem_Init (void)
    160          {
    161          #if (LIB_MEM_CFG_ALLOC_EN == DEF_ENABLED)
    162              MEM_POOL  *pmem_pool;
    163          
    164                                                                                  /* --------- INIT MEM HEAP SEG / POOL --------- */
    165              pmem_pool                   = (MEM_POOL   *)&Mem_PoolHeap;
    166              pmem_pool->Type             = (LIB_MEM_TYPE) LIB_MEM_TYPE_HEAP;
    167              pmem_pool->SegPrevPtr       = (MEM_POOL   *) 0;

⌨️ 快捷键说明

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