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

📄 board_memories.lst

📁 ATmel的AT91sam7SE芯片 USB固件开发源代码
💻 LST
📖 第 1 页 / 共 3 页
字号:
###############################################################################
#                                                                             #
#                                                       18/Jul/2008  11:38:00 #
# IAR ARM ANSI C/C++ Compiler V5.11.0.20622/W32 EVALUATION                    #
# Copyright 1999-2007 IAR Systems. All rights reserved.                       #
#                                                                             #
#    Cpu mode     =  arm                                                      #
#    Endian       =  little                                                   #
#    Source file  =  D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91lib\boards\at91sam7se-ek\bo #
#                    ard_memories.c                                           #
#    Command line =  D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91lib\boards\at91sam7se-ek\bo #
#                    ard_memories.c -D at91sam7se512 -lC                      #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\at91sam7se512_sdram\List\ --remarks -o        #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\at91sam7se512_sdram\Obj\ --no_cse             #
#                    --no_unroll --no_inline --no_code_motion --no_tbaa       #
#                    --no_clustering --no_scheduling --debug --endian little  #
#                    --cpu ARM7TDMI -e --fpu None --dlib_config "D:\Program   #
#                    Files\IAR Systems\Embedded Workbench 5.0                 #
#                    Evaluation\ARM\INC\DLib_Config_Full.h" -I                #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\..\..\..\at91lib\ -I                          #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\..\..\..\at91lib\boards\at91sam7se-ek\ -I     #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\..\..\..\at91lib\peripherals\ -I              #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\..\..\..\at91lib\components\ -I               #
#                    D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\..\..\..\at91lib\usb\ -I "D:\Program          #
#                    Files\IAR Systems\Embedded Workbench 5.0                 #
#                    Evaluation\ARM\INC\" --interwork --cpu_mode arm -On      #
#    List file    =  D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\at91sam7se512_sdram\List\board_memories.lst   #
#    Object file  =  D:\rock\atarm\at91sam7se\software\usb-device-core-projec #
#                    t-1.3-iar5-at91sam7se-ek\at91sam7se-ek\usb-device-core-p #
#                    roject\ewp\at91sam7se512_sdram\Obj\board_memories.o      #
#                                                                             #
#                                                                             #
###############################################################################

D:\rock\atarm\at91sam7se\software\usb-device-core-project-1.3-iar5-at91sam7se-ek\at91lib\boards\at91sam7se-ek\board_memories.c
      1          /* ----------------------------------------------------------------------------
      2           *         ATMEL Microcontroller Software Support  -  ROUSSET  -
      3           * ----------------------------------------------------------------------------
      4           * Copyright (c) 2006, Atmel Corporation
      5          
      6           * All rights reserved.
      7           * 
      8           * Redistribution and use in source and binary forms, with or without
      9           * modification, are permitted provided that the following conditions are met:
     10           * 
     11           * - Redistributions of source code must retain the above copyright notice,
     12           * this list of conditions and the disclaiimer below.
     13           * 
     14           * - Redistributions in binary form must reproduce the above copyright notice,
     15           * this list of conditions and the disclaimer below in the documentation and/or
     16           * other materials provided with the distribution. 
     17           * 
     18           * Atmel's name may not be used to endorse or promote products derived from
     19           * this software without specific prior written permission. 
     20           * 
     21           * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
     22           * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     23           * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
     24           * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
     25           * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     26           * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
     27           * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     28           * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     29           * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     30           * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31           * ----------------------------------------------------------------------------
     32           */
     33          
     34          //------------------------------------------------------------------------------
     35          //         Headers
     36          //------------------------------------------------------------------------------
     37          
     38          #include "board_memories.h"
     39          #include "board.h"
     40          #include <pio/pio.h>
     41          
     42          /*
     43              Macros:
     44                  READ - Reads a register value. Useful to add trace information to read
     45                         accesses.
     46                  WRITE - Writes data in a register. Useful to add trace information to
     47                          write accesses.
     48          */
     49          #define READ(peripheral, register)          (peripheral->register)
     50          #define WRITE(peripheral, register, value)  (peripheral->register = value)
     51          
     52          //------------------------------------------------------------------------------
     53          //         Internal definitions
     54          //------------------------------------------------------------------------------
     55          /*
     56              Constants: Remap types
     57                  BOARD_FLASH - Flash is mirrored in the remap zone.
     58                  BOARD_RAM - RAM is mirrored in the remap zone.
     59          */
     60          #define BOARD_FLASH             0
     61          #define BOARD_RAM               1
     62          
     63          //------------------------------------------------------------------------------
     64          //         Internal function
     65          //------------------------------------------------------------------------------
     66          /*
     67              Function: BOARD_GetRemap
     68                  Returns the current remap (see <Remap types>).
     69          */

   \                                 In section .text, align 4, keep-with-next
     70          static unsigned char BOARD_GetRemap( void )
     71          {
     72              volatile unsigned int *remap = (volatile unsigned int *) 0;
   \                     BOARD_GetRemap:
   \   00000000   0000A0E3           MOV      R0,#+0
   \   00000004   0010B0E1           MOVS     R1,R0
     73              volatile unsigned int *ram = (volatile unsigned int *) AT91C_ISRAM;
   \   00000008   8009A0E3           MOV      R0,#+2097152
   \   0000000C   0020B0E1           MOVS     R2,R0
     74          
     75              // Try to write in 0 and see if this affects the RAM
     76              unsigned int temp = *ram;
   \   00000010   000092E5           LDR      R0,[R2, #+0]
   \   00000014   0030B0E1           MOVS     R3,R0
     77              *ram = temp + 1;
   \   00000018   010093E2           ADDS     R0,R3,#+1
   \   0000001C   000082E5           STR      R0,[R2, #+0]
     78              if (*remap == *ram) {
                                       ^
Warning[Pa082]: undefined behavior: the order of volatile accesses is
          undefined in this statement
   \   00000020   000091E5           LDR      R0,[R1, #+0]
   \   00000024   00C092E5           LDR      R12,[R2, #+0]
   \   00000028   0C0050E1           CMP      R0,R12
   \   0000002C   0200001A           BNE      ??BOARD_GetRemap_0
     79          
     80                  *ram = temp;
   \   00000030   003082E5           STR      R3,[R2, #+0]
     81                  return BOARD_RAM;
   \   00000034   0100A0E3           MOV      R0,#+1
   \   00000038   010000EA           B        ??BOARD_GetRemap_1
     82              }
     83              else {
     84          
     85                  *ram = temp;
   \                     ??BOARD_GetRemap_0:
   \   0000003C   003082E5           STR      R3,[R2, #+0]
     86                  return BOARD_FLASH;
   \   00000040   0000A0E3           MOV      R0,#+0
   \                     ??BOARD_GetRemap_1:
   \   00000044   1EFF2FE1           BX       LR               ;; return
     87              }
     88          }
     89          
     90          //------------------------------------------------------------------------------
     91          //         Exported functions
     92          //------------------------------------------------------------------------------
     93          /*
     94              Function: BOARD_RemapFlash
     95                  Changes the mapping of the chip so that the remap area mirrors the
     96                  internal flash.
     97          */

   \                                 In section .text, align 4, keep-with-next
     98          void BOARD_RemapFlash( void )
     99          {
   \                     BOARD_RemapFlash:
   \   00000000   01402DE9           PUSH     {R0,LR}
    100              if (BOARD_GetRemap() != BOARD_FLASH) {
   \   00000004   ........           BL       BOARD_GetRemap
   \   00000008   000050E3           CMP      R0,#+0
   \   0000000C   0200000A           BEQ      ??BOARD_RemapFlash_0
    101          
    102                  AT91C_BASE_MC->MC_RCR = AT91C_MC_RCB;
   \   00000010   FF00E0E3           MVN      R0,#+255
   \   00000014   0110A0E3           MOV      R1,#+1
   \   00000018   001080E5           STR      R1,[R0, #+0]
    103              }
    104          }
   \                     ??BOARD_RemapFlash_0:
   \   0000001C   0050BDE8           POP      {R12,LR}
   \   00000020   1EFF2FE1           BX       LR               ;; return
    105          
    106          /*
    107              Function: BOARD_RemapRam
    108                  Changes the mapping of the chip so that the remap area mirrors the
    109                  internal RAM.
    110          */

   \                                 In section .text, align 4, keep-with-next
    111          void BOARD_RemapRam( void )
    112          {
   \                     BOARD_RemapRam:

⌨️ 快捷键说明

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