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

📄 board_memories.lst

📁 本代bootloader通过usb下载代码首先存放在sdram中
💻 LST
📖 第 1 页 / 共 3 页
字号:
###############################################################################
#                                                                             #
#                                                       24/Apr/2009  16:18:21 #
# 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:\basic-dataflash-project-at91sam7se-ek\at91lib\boards\ #
#                    at91sam7se-ek\board_memories.c                           #
#    Command line =  D:\basic-dataflash-project-at91sam7se-ek\at91lib\boards\ #
#                    at91sam7se-ek\board_memories.c -D at91sam7se512 -D sram  #
#                    -D TRACE_LEVEL=4 -lC D:\basic-dataflash-project-at91sam7 #
#                    se-ek\at91sam7se-ek\basic-dataflash-project\ewp\at91sam7 #
#                    se512_sram\List\ --remarks --diag_suppress Pe826,Pe1375  #
#                    -o D:\basic-dataflash-project-at91sam7se-ek\at91sam7se-e #
#                    k\basic-dataflash-project\ewp\at91sam7se512_sram\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\arm\ARM\INC\DLib_Config_ #
#                    Full.h" -I D:\basic-dataflash-project-at91sam7se-ek\at91 #
#                    sam7se-ek\basic-dataflash-project\ewp\..\..\..\at91lib/p #
#                    eripherals\ -I D:\basic-dataflash-project-at91sam7se-ek\ #
#                    at91sam7se-ek\basic-dataflash-project\ewp\..\..\..\at91l #
#                    ib\ -I D:\basic-dataflash-project-at91sam7se-ek\at91sam7 #
#                    se-ek\basic-dataflash-project\ewp\..\..\..\at91lib/memor #
#                    ies\ -I D:\basic-dataflash-project-at91sam7se-ek\at91sam #
#                    7se-ek\basic-dataflash-project\ewp\..\..\..\at91lib/boar #
#                    ds/at91sam7se-ek\ -I "D:\Program Files\arm\ARM\INC\"     #
#                    --interwork --cpu_mode arm -Oh                           #
#    List file    =  D:\basic-dataflash-project-at91sam7se-ek\at91sam7se-ek\b #
#                    asic-dataflash-project\ewp\at91sam7se512_sram\List\board #
#                    _memories.lst                                            #
#    Object file  =  D:\basic-dataflash-project-at91sam7se-ek\at91sam7se-ek\b #
#                    asic-dataflash-project\ewp\at91sam7se512_sram\Obj\board_ #
#                    memories.o                                               #
#                                                                             #
#                                                                             #
###############################################################################

D:\basic-dataflash-project-at91sam7se-ek\at91lib\boards\at91sam7se-ek\board_memories.c
      1          /* ----------------------------------------------------------------------------
      2           *         ATMEL Microcontroller Software Support 
      3           * ----------------------------------------------------------------------------
      4           * Copyright (c) 2008, 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 disclaimer below.
     13           *
     14           * Atmel's name may not be used to endorse or promote products derived from
     15           * this software without specific prior written permission.
     16           *
     17           * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
     18           * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     19           * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
     20           * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
     21           * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     22           * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
     23           * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
     24           * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     25           * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     26           * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27           * ----------------------------------------------------------------------------
     28           */
     29          
     30          //------------------------------------------------------------------------------
     31          //         Headers
     32          //------------------------------------------------------------------------------
     33          
     34          #include "board_memories.h"
     35          #include "board.h"
     36          #include <pio/pio.h>
     37          
     38          /*
     39              Macros:
     40                  READ - Reads a register value. Useful to add trace information to read
     41                         accesses.
     42                  WRITE - Writes data in a register. Useful to add trace information to
     43                          write accesses.
     44          */
     45          #define READ(peripheral, register)          (peripheral->register)
     46          #define WRITE(peripheral, register, value)  (peripheral->register = value)
     47          
     48          //------------------------------------------------------------------------------
     49          //         Internal definitions
     50          //------------------------------------------------------------------------------
     51          /*
     52              Constants: Remap types
     53                  BOARD_FLASH - Flash is mirrored in the remap zone.
     54                  BOARD_RAM - RAM is mirrored in the remap zone.
     55          */
     56          #define BOARD_FLASH             0
     57          #define BOARD_RAM               1
     58          
     59          //------------------------------------------------------------------------------
     60          //         Internal function
     61          //------------------------------------------------------------------------------
     62          /*
     63              Function: BOARD_GetRemap
     64                  Returns the current remap (see <Remap types>).
     65          */

   \                                 In section .text, align 4, keep-with-next
     66          static unsigned char BOARD_GetRemap( void )
     67          {
     68              volatile unsigned int *remap = (volatile unsigned int *) 0;
     69              volatile unsigned int *ram = (volatile unsigned int *) AT91C_ISRAM;
     70          
     71              // Try to write in 0 and see if this affects the RAM
     72              unsigned int temp = *ram;
   \                     BOARD_GetRemap:
   \   00000000   8009A0E3           MOV      R0,#+2097152
   \   00000004   000090E5           LDR      R0,[R0, #+0]
     73              *ram = temp + 1;
   \   00000008   011080E2           ADD      R1,R0,#+1
   \   0000000C   8029A0E3           MOV      R2,#+2097152
   \   00000010   001082E5           STR      R1,[R2, #+0]
     74              if (*remap == *ram) {
                                       ^
Warning[Pa082]: undefined behavior: the order of volatile accesses is
          undefined in this statement
   \   00000014   0010A0E3           MOV      R1,#+0
   \   00000018   001091E5           LDR      R1,[R1, #+0]
   \   0000001C   002092E5           LDR      R2,[R2, #+0]
   \   00000020   020051E1           CMP      R1,R2
   \   00000024   8019A0E3           MOV      R1,#+2097152
   \   00000028   000081E5           STR      R0,[R1, #+0]
   \   0000002C   0000A013           MOVNE    R0,#+0
     75          
     76                  *ram = temp;
     77                  return BOARD_RAM;
   \   00000030   0100A003           MOVEQ    R0,#+1
   \   00000034   1EFF2FE1           BX       LR
     78              }
     79              else {
     80          
     81                  *ram = temp;
     82                  return BOARD_FLASH;
     83              }
     84          }
     85          
     86          //------------------------------------------------------------------------------
     87          //         Exported functions
     88          //------------------------------------------------------------------------------
     89          /*
     90              Function: BOARD_RemapFlash
     91                  Changes the mapping of the chip so that the remap area mirrors the
     92                  internal flash.
     93          */

   \                                 In section .text, align 4, keep-with-next
     94          void BOARD_RemapFlash( void )
     95          {
   \                     BOARD_RemapFlash:
   \   00000000   01402DE9           PUSH     {R0,LR}
     96              if (BOARD_GetRemap() != BOARD_FLASH) {
   \   00000004   ........           BL       BOARD_GetRemap
   \   00000008   000050E3           CMP      R0,#+0
     97          
     98                  AT91C_BASE_MC->MC_RCR = AT91C_MC_RCB;
   \   0000000C   ........           B        ?Subroutine1
     99              }
    100          }

   \                                 In section .text, align 4, keep-with-next
   \                     ?Subroutine1:
   \   00000000   FF00E013           MVNNE    R0,#+255
   \   00000004   0110A013           MOVNE    R1,#+1
   \   00000008   00108015           STRNE    R1,[R0, #+0]
   \   0000000C   0050BDE8           POP      {R12,LR}
   \   00000010   1EFF2FE1           BX       LR               ;; return
    101          
    102          /*
    103              Function: BOARD_RemapRam
    104                  Changes the mapping of the chip so that the remap area mirrors the
    105                  internal RAM.
    106          */

   \                                 In section .text, align 4, keep-with-next
    107          void BOARD_RemapRam( void )
    108          {
   \                     BOARD_RemapRam:
   \   00000000   01402DE9           PUSH     {R0,LR}
    109              if (BOARD_GetRemap() != BOARD_RAM) {
   \   00000004   ........           BL       BOARD_GetRemap
   \   00000008   010050E3           CMP      R0,#+1
    110          
    111                  AT91C_BASE_MC->MC_RCR = AT91C_MC_RCB;
   \   0000000C                      REQUIRE ?Subroutine1
   \   0000000C                      ;; // Fall through to label ?Subroutine1
    112              }
    113          }
    114          
    115          //------------------------------------------------------------------------------

⌨️ 快捷键说明

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