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

📄 core_cm3.lst

📁 stm32+ucos-ii
💻 LST
📖 第 1 页 / 共 3 页
字号:
###############################################################################
#                                                                             #
# IAR ANSI C/C++ Compiler V6.10.2.52244/W32 for ARM     07/Aug/2011  12:10:24 #
# Copyright 1999-2010 IAR Systems AB.                                         #
#                                                                             #
#    Cpu mode     =  thumb                                                    #
#    Endian       =  little                                                   #
#    Source file  =  F:\stm32\我的程序\Micrium\Software\EWARM\BSP\ST\CMSIS\CM #
#                    3\CoreSupport\core_cm3.c                                 #
#    Command line =  F:\stm32\我的程序\Micrium\Software\EWARM\BSP\ST\CMSIS\CM #
#                    3\CoreSupport\core_cm3.c -D USE_STDPERIPH_DRIVER -D      #
#                    STM32F10X_CL -lCN F:\stm32\我的程序\Micrium\Software\EWA #
#                    RM\OS-II\Flash\List\ -o F:\stm32\我的程序\Micrium\Softwa #
#                    re\EWARM\OS-II\Flash\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\core_cm3.lst                                           #
#    Object file  =  F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Obj #
#                    \core_cm3.o                                              #
#                                                                             #
#                                                                             #
###############################################################################

F:\stm32\我的程序\Micrium\Software\EWARM\BSP\ST\CMSIS\CM3\CoreSupport\core_cm3.c
      1          /**************************************************************************//**
      2           * @file     core_cm3.c
      3           * @brief    CMSIS Cortex-M3 Core Peripheral Access Layer Source File
      4           * @version  V1.30
      5           * @date     30. October 2009
      6           *
      7           * @note
      8           * Copyright (C) 2009 ARM Limited. All rights reserved.
      9           *
     10           * @par
     11           * ARM Limited (ARM) is supplying this software for use with Cortex-M 
     12           * processor based microcontrollers.  This file can be freely distributed 
     13           * within development tools that are supporting such ARM based processors. 
     14           *
     15           * @par
     16           * THIS SOFTWARE IS PROVIDED "AS IS".  NO WARRANTIES, WHETHER EXPRESS, IMPLIED
     17           * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
     18           * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
     19           * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
     20           * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
     21           *
     22           ******************************************************************************/
     23          
     24          #include <stdint.h>
     25          
     26          /* define compiler specific symbols */
     27          #if defined ( __CC_ARM   )
     28            #define __ASM            __asm                                      /*!< asm keyword for ARM Compiler          */
     29            #define __INLINE         __inline                                   /*!< inline keyword for ARM Compiler       */
     30          
     31          #elif defined ( __ICCARM__ )
     32            #define __ASM           __asm                                       /*!< asm keyword for IAR Compiler          */
     33            #define __INLINE        inline                                      /*!< inline keyword for IAR Compiler. Only avaiable in High optimization mode! */
     34          
     35          #elif defined   (  __GNUC__  )
     36            #define __ASM            __asm                                      /*!< asm keyword for GNU Compiler          */
     37            #define __INLINE         inline                                     /*!< inline keyword for GNU Compiler       */
     38          
     39          #elif defined   (  __TASKING__  )
     40            #define __ASM            __asm                                      /*!< asm keyword for TASKING Compiler      */
     41            #define __INLINE         inline                                     /*!< inline keyword for TASKING Compiler   */
     42          
     43          #endif
     44          
     45          
     46          /* ###################  Compiler specific Intrinsics  ########################### */
     47          
     48          #if defined ( __CC_ARM   ) /*------------------RealView Compiler -----------------*/
     49          /* ARM armcc specific functions */
     50          
     51          /**
     52           * @brief  Return the Process Stack Pointer
     53           *
     54           * @return ProcessStackPointer
     55           *
     56           * Return the actual process stack pointer
     57           */
     58          __ASM uint32_t __get_PSP(void)
     59          {
     60            mrs r0, psp
     61            bx lr
     62          }
     63          
     64          /**
     65           * @brief  Set the Process Stack Pointer
     66           *
     67           * @param  topOfProcStack  Process Stack Pointer
     68           *
     69           * Assign the value ProcessStackPointer to the MSP 
     70           * (process stack pointer) Cortex processor register
     71           */
     72          __ASM void __set_PSP(uint32_t topOfProcStack)
     73          {
     74            msr psp, r0
     75            bx lr
     76          }
     77          
     78          /**
     79           * @brief  Return the Main Stack Pointer
     80           *
     81           * @return Main Stack Pointer
     82           *
     83           * Return the current value of the MSP (main stack pointer)
     84           * Cortex processor register
     85           */
     86          __ASM uint32_t __get_MSP(void)
     87          {
     88            mrs r0, msp
     89            bx lr
     90          }
     91          
     92          /**
     93           * @brief  Set the Main Stack Pointer
     94           *
     95           * @param  topOfMainStack  Main Stack Pointer
     96           *
     97           * Assign the value mainStackPointer to the MSP 
     98           * (main stack pointer) Cortex processor register
     99           */
    100          __ASM void __set_MSP(uint32_t mainStackPointer)
    101          {
    102            msr msp, r0
    103            bx lr
    104          }
    105          
    106          /**
    107           * @brief  Reverse byte order in unsigned short value
    108           *
    109           * @param   value  value to reverse
    110           * @return         reversed value
    111           *
    112           * Reverse byte order in unsigned short value
    113           */
    114          __ASM uint32_t __REV16(uint16_t value)
    115          {
    116            rev16 r0, r0
    117            bx lr
    118          }
    119          
    120          /**
    121           * @brief  Reverse byte order in signed short value with sign extension to integer
    122           *
    123           * @param   value  value to reverse
    124           * @return         reversed value
    125           *
    126           * Reverse byte order in signed short value with sign extension to integer
    127           */
    128          __ASM int32_t __REVSH(int16_t value)
    129          {
    130            revsh r0, r0
    131            bx lr
    132          }
    133          
    134          
    135          #if (__ARMCC_VERSION < 400000)
    136          
    137          /**
    138           * @brief  Remove the exclusive lock created by ldrex
    139           *
    140           * Removes the exclusive lock which is created by ldrex.
    141           */
    142          __ASM void __CLREX(void)
    143          {
    144            clrex
    145          }
    146          
    147          /**
    148           * @brief  Return the Base Priority value
    149           *
    150           * @return BasePriority
    151           *
    152           * Return the content of the base priority register
    153           */
    154          __ASM uint32_t  __get_BASEPRI(void)
    155          {
    156            mrs r0, basepri
    157            bx lr
    158          }
    159          
    160          /**
    161           * @brief  Set the Base Priority value
    162           *
    163           * @param  basePri  BasePriority
    164           *
    165           * Set the base priority register
    166           */
    167          __ASM void __set_BASEPRI(uint32_t basePri)
    168          {
    169            msr basepri, r0
    170            bx lr
    171          }
    172          
    173          /**
    174           * @brief  Return the Priority Mask value
    175           *
    176           * @return PriMask
    177           *
    178           * Return state of the priority mask bit from the priority mask register
    179           */
    180          __ASM uint32_t __get_PRIMASK(void)
    181          {
    182            mrs r0, primask
    183            bx lr
    184          }
    185          
    186          /**
    187           * @brief  Set the Priority Mask value
    188           *
    189           * @param  priMask  PriMask
    190           *
    191           * Set the priority mask bit in the priority mask register
    192           */
    193          __ASM void __set_PRIMASK(uint32_t priMask)
    194          {
    195            msr primask, r0
    196            bx lr
    197          }
    198          
    199          /**
    200           * @brief  Return the Fault Mask value
    201           *
    202           * @return FaultMask
    203           *
    204           * Return the content of the fault mask register
    205           */
    206          __ASM uint32_t  __get_FAULTMASK(void)
    207          {
    208            mrs r0, faultmask
    209            bx lr
    210          }
    211          
    212          /**
    213           * @brief  Set the Fault Mask value
    214           *
    215           * @param  faultMask  faultMask value
    216           *
    217           * Set the fault mask register
    218           */
    219          __ASM void __set_FAULTMASK(uint32_t faultMask)
    220          {
    221            msr faultmask, r0
    222            bx lr
    223          }
    224          
    225          /**
    226           * @brief  Return the Control Register value
    227           * 
    228           * @return Control value
    229           *
    230           * Return the content of the control register
    231           */
    232          __ASM uint32_t __get_CONTROL(void)
    233          {
    234            mrs r0, control
    235            bx lr
    236          }
    237          
    238          /**
    239           * @brief  Set the Control Register value
    240           *
    241           * @param  control  Control value
    242           *
    243           * Set the control register
    244           */
    245          __ASM void __set_CONTROL(uint32_t control)
    246          {
    247            msr control, r0
    248            bx lr
    249          }
    250          
    251          #endif /* __ARMCC_VERSION  */ 
    252          
    253          
    254          
    255          #elif (defined (__ICCARM__)) /*------------------ ICC Compiler -------------------*/
    256          /* IAR iccarm specific functions */
    257          #pragma diag_suppress=Pe940
    258          
    259          /**
    260           * @brief  Return the Process Stack Pointer
    261           *
    262           * @return ProcessStackPointer
    263           *
    264           * Return the actual process stack pointer
    265           */

   \                                 In section .text, align 4, keep-with-next
    266          uint32_t __get_PSP(void)
    267          {
    268            __ASM("mrs r0, psp");

⌨️ 快捷键说明

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