1#--------------------------------------------------------------------------- 2# Project: NitroSDK - tools - makelcf 3# File: ARM7-TEG.lcf 4# 5# Copyright 2003-2008 Nintendo. All rights reserved. 6# 7# These coded instructions, statements, and computer programs contain 8# proprietary information of Nintendo of America Inc. and/or Nintendo 9# Company Ltd., and are protected by Federal copyright law. They may 10# not be disclosed to third parties or copied or duplicated in any form, 11# in whole or in part, without the prior written consent of Nintendo. 12# 13# $Log: ARM7-TEG.lcf,v $ 14# Revision 1.11 2004/08/18 02:00:49 yasu 15# Support SDK_SUBPRIV_ARENA_LO 16# 17# Revision 1.10 2004/07/26 00:08:27 yasu 18# Fix label of exception table 19# 20# Revision 1.9 2004/07/23 11:32:14 yasu 21# Define labels for __exception_table_start__ and _end__ 22# 23# Revision 1.8 2004/07/08 04:04:59 yasu 24# fix small typo 25# 26# Revision 1.7 2004/07/02 08:35:06 yasu 27# Add .wram section 28# 29# Revision 1.6 2004/07/01 09:41:50 yasu 30# support autoload 31# 32# Revision 1.5 2004/05/27 04:06:42 yasu 33# fix SDK_WRAM_ARENA_LO 34# 35# Revision 1.4 2004/05/07 05:13:47 yasu 36# remove STATICINIT for cw0.5 37# 38# Revision 1.3 2004/04/19 06:38:37 yasu 39# fix workram checker 40# 41# Revision 1.2 2004/04/19 04:27:30 yasu 42# support WRAM overflow check 43# 44# Revision 1.1 2004/03/26 06:04:32 yasu 45# move spec files 46# 47# Revision 1.5 2004/02/20 08:36:55 yasu 48# change default IRQ stack size 0xa0 -> 0x200 49# 50# Revision 1.4 2004/02/14 10:11:08 yasu 51# add SDK_MAIN_ARENA_LO 52# 53# Revision 1.3 2004/02/14 03:33:12 yasu 54# copy from ARM9's 55# 56# $NoKeywords: $ 57#--------------------------------------------------------------------------- 58MEMORY 59{ 60 main (RWX) : ORIGIN = 0x037f8000, LENGTH = 0x0 61 bss (RWX) : ORIGIN = AFTER(main), LENGTH = 0x0 62 arena (RW) : ORIGIN = AFTER(bss), LENGTH = 0x0 63 workram (RWX) : ORIGIN = 0x037f8000, LENGTH = 0x10000 > workram.check 64} 65 66KEEP_SECTION 67{ 68 .ctor 69} 70 71SECTIONS 72{ 73 .main: AT 0x037f8000 74 { 75 ALIGNALL(4); . = ALIGN(4); 76 77 SDK_STATIC_START =.; 78 SDK_STATIC_TEXT_START =.; 79 #:::::::::: text 80 crt0.o (.text) 81 * (.text) 82 * (.wram) 83 * (.init) 84 * (.exception) 85 . = ALIGN(4); 86 __exception_table_start__ =.; 87 EXCEPTION 88 __exception_table_end__ =.; 89 . = ALIGN(4); 90 * (.rodata) 91 __sinit__ =.; 92 * (.ctor) 93 WRITEW 0; 94 #:::::::::: text 95 . = ALIGN(4); 96 SDK_STATIC_TEXT_END =.; 97 98 SDK_STATIC_DATA_START =.; 99 #:::::::::: data 100 * (.sdata) 101 * (.data) 102 #:::::::::: data 103 . = ALIGN(4); 104 SDK_STATIC_DATA_END =.; 105 SDK_STATIC_END =.; 106 107 SDK_STATIC_TEXT_SIZE = SDK_STATIC_TEXT_END - SDK_STATIC_TEXT_START; 108 SDK_STATIC_DATA_SIZE = SDK_STATIC_DATA_END - SDK_STATIC_DATA_START; 109 SDK_STATIC_SIZE = SDK_STATIC_END - SDK_STATIC_START; 110 111 } > main 112 113 114 .bss: 115 { 116 ALIGNALL(4); . = ALIGN(4); 117 118 SDK_STATIC_BSS_START =.; 119 #:::::::::: bss 120 * (.sbss) 121 * (.bss) 122 #:::::::::: bss 123 SDK_STATIC_BSS_END =.; 124 125 SDK_STATIC_BSS_SIZE = SDK_STATIC_BSS_END - SDK_STATIC_BSS_START; 126 127 } > bss 128 129 .area: 130 { 131 . = ALIGN(4); 132 SDK_SECTION_ARENA_START = .; 133 134 } > arena 135 136 ############################ AUTOLOAD_INFO ########################## 137 SDK_AUTOLOAD_START = SDK_STATIC_END; 138 SDK_AUTOLOAD_SIZE = 0; 139 SDK_AUTOLOAD_NUMBER = 0; 140 SDK_AUTOLOAD_LIST = SDK_AUTOLOAD_START; 141 SDK_AUTOLOAD_LIST_END = SDK_AUTOLOAD_START; 142 143 ############################ OVERLAYS ############################### 144 SDK_OVERLAY_NUMBER = 0; 145 146 ############################ OTHERS ################################# 147 SDK_SUBPRIV_ARENA_LO = 0x02380000; 148 SDK_WRAM_ARENA_LO = SDK_SECTION_ARENA_START; 149 SDK_IRQ_STACKSIZE = 0x200; # allocated in PWRAM 150 SDK_SYS_STACKSIZE = 0x400; # allocated in PWRAM 151 152 # work ram size checker 153 .workram: 154 { 155 . = . + SDK_SECTION_ARENA_START - 0x037f8000 + SDK_IRQ_STACKSIZE + SDK_SYS_STACKSIZE; 156 } > workram 157} 158