📄 board_memories.lst
字号:
###############################################################################
# #
# 25/May/2009 02:53:22 #
# IAR ANSI C/C++ Compiler V5.20.0.20892/W32 EVALUATION for ARM #
# Copyright 1999-2008 IAR Systems AB. #
# #
# Cpu mode = arm #
# Endian = little #
# Source file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91lib\boards\at91sam7x-ek\board_memories. #
# c #
# Command line = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91lib\boards\at91sam7x-ek\board_memories. #
# c -D at91sam7x256 -D flash -D TRACE_LEVEL=4 -lC #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\List\ --remarks --diag_suppress #
# Pe826,Pe1375 -o F:\Diplomovka\IARprojects\Diplomovka\25. #
# 4.2009\getting-started-project-at91sam7x-ek-iar\getting- #
# started-project-at91sam7x-ek\at91sam7x-ek\getting-starte #
# d-project\ewp\at91sam7x256_flash\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 "C:\Program #
# Files (x86)\IAR Systems\Embedded Workbench 5.0 #
# Evaluation\ARM\INC\DLib_Config_Full.h" -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/peripherals\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib\ -I F:\Diplomovka\IARprojects\Diplomovka\ #
# 25.4.2009\getting-started-project-at91sam7x-ek-iar\getti #
# ng-started-project-at91sam7x-ek\at91sam7x-ek\getting-sta #
# rted-project\ewp\..\..\..\at91lib\memories\sdmmc\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/components\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\at91lib/boards/at91sam7x-ek\ -I #
# F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\.. #
# \..\..\external_libs/crc\ -I "C:\Program Files #
# (x86)\IAR Systems\Embedded Workbench 5.0 #
# Evaluation\ARM\INC\" --interwork --cpu_mode arm -Oh #
# List file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\List\board_memories.lst #
# Object file = F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-s #
# tarted-project-at91sam7x-ek-iar\getting-started-project- #
# at91sam7x-ek\at91sam7x-ek\getting-started-project\ewp\at #
# 91sam7x256_flash\Obj\board_memories.o #
# #
# #
###############################################################################
F:\Diplomovka\IARprojects\Diplomovka\25.4.2009\getting-started-project-at91sam7x-ek-iar\getting-started-project-at91sam7x-ek\at91lib\boards\at91sam7x-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
37 //------------------------------------------------------------------------------
38 // Internal definitions
39 //------------------------------------------------------------------------------
40 /*
41 Constants: Remap types
42 BOARD_FLASH - Flash is mirrored in the remap zone.
43 BOARD_RAM - RAM is mirrored in the remap zone.
44 */
45 #define BOARD_FLASH 0
46 #define BOARD_RAM 1
47
48 //------------------------------------------------------------------------------
49 // Internal function
50 //------------------------------------------------------------------------------
51 /*
52 Function: BOARD_GetRemap
53 Returns the current remap (see <Remap types>).
54 */
\ In section .text, align 4, keep-with-next
55 static unsigned char BOARD_GetRemap( void )
56 {
57 unsigned int *remap = (unsigned int *) 0;
58 unsigned int *ram = (unsigned int *) AT91C_ISRAM;
59
60 // Try to write in 0 and see if this affects the RAM
61 unsigned int temp = *ram;
\ BOARD_GetRemap:
\ 00000000 8009A0E3 MOV R0,#+2097152
\ 00000004 000090E5 LDR R0,[R0, #+0]
62 *ram = temp + 1;
\ 00000008 011080E2 ADD R1,R0,#+1
\ 0000000C 8029A0E3 MOV R2,#+2097152
\ 00000010 001082E5 STR R1,[R2, #+0]
63 if (*remap == *ram) {
\ 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]
64
65 *ram = temp;
66 return BOARD_RAM;
\ 0000002C 0100A003 MOVEQ R0,#+1
67 }
68 else {
69
70 *ram = temp;
71 return BOARD_FLASH;
\ 00000030 0000A013 MOVNE R0,#+0
\ 00000034 1EFF2FE1 BX LR ;; return
72 }
73 }
74
75 //------------------------------------------------------------------------------
76 // Exported functions
77 //------------------------------------------------------------------------------
78 /*
79 Function: BOARD_RemapFlash
80 Changes the mapping of the chip so that the remap area mirrors the
81 internal flash.
82 */
\ In section .text, align 4, keep-with-next
83 void BOARD_RemapFlash( void )
84 {
\ BOARD_RemapFlash:
\ 00000000 00502DE9 PUSH {R12,LR}
85 if (BOARD_GetRemap() != BOARD_FLASH) {
\ 00000004 ........ BL BOARD_GetRemap
\ 00000008 000050E3 CMP R0,#+0
86
87 AT91C_BASE_MC->MC_RCR = AT91C_MC_RCB;
\ 0000000C ........ B ?Subroutine0
88 }
89 }
\ In section .text, align 4, keep-with-next
\ ?Subroutine0:
\ 00000000 FF00E013 MVNNE R0,#+255
\ 00000004 0110A013 MOVNE R1,#+1
\ 00000008 00108015 STRNE R1,[R0, #+0]
\ 0000000C 0140BDE8 POP {R0,LR}
\ 00000010 1EFF2FE1 BX LR ;; return
90
91 /*
92 Function: BOARD_RemapRam
93 Changes the mapping of the chip so that the remap area mirrors the
94 internal RAM.
95 */
\ In section .text, align 4, keep-with-next
96 void BOARD_RemapRam( void )
97 {
\ BOARD_RemapRam:
\ 00000000 00502DE9 PUSH {R12,LR}
98 if (BOARD_GetRemap() != BOARD_RAM) {
\ 00000004 ........ BL BOARD_GetRemap
\ 00000008 010050E3 CMP R0,#+1
99
100 AT91C_BASE_MC->MC_RCR = AT91C_MC_RCB;
\ 0000000C REQUIRE ?Subroutine0
\ 0000000C ;; // Fall through to label ?Subroutine0
101 }
102 }
103
Maximum stack usage in bytes:
Function .cstack
-------- -------
BOARD_GetRemap 0
BOARD_RemapFlash 0
BOARD_RemapRam 0
Section sizes:
Function/Label Bytes
-------------- -----
BOARD_GetRemap 56
BOARD_RemapFlash 16
?Subroutine0 20
BOARD_RemapRam 12
104 bytes in section .text
104 bytes of CODE memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -