RelocateChecker:Makeである程度簡単にアプリのサイズを太らせられるように変更

・incre.exeは特に修正予定もないのでバイナリのみコミット
・ARM7の置き場や適切なサイズを検討中……ARM9を半減させてARM7のサイズを大きくする予定

git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@337 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
yoshida_teruhisa 2007-12-10 08:04:00 +00:00
parent a3c7e48491
commit 64bcc7e1e9
11 changed files with 122 additions and 13 deletions

View File

@ -38,8 +38,13 @@ LLIBRARY_DIRS += ../crt/ARM7/obj/ARM7-TS.LTD/$(TWL_BUILD_DIR)
CRT0_O = crt0_rc.LTD.TWL.o
TARGET_FOB += ARM7FLX.fob
FBDSIZE_ARM7FLX = 52144
TARGET_FOB += ARM7LTD.fob
FBDSIZE_ARM7LTD = 40000
#----------------------------------------------------------------------------
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
include $(TWL_IPL_RED_ROOT)/build/tests/RelocateChecker/buildtools/commondefs
include $(TWLSDK_ROOT)/build/libraries/reboot/commondefs.reboot
ifdef TWLSDK_NOCRYPTO
@ -53,7 +58,7 @@ endif
#MACRO_FLAGS += -DSDK_ARM7COMP_LTD
MAKELCF_FLAGS += -DADDRESS_LTDWRAM='0x037c0000' \
-DADDRESS_FLXMAIN='0x02280000' \
-DADDRESS_FLXMAIN='0x02300000' \
-DADDRESS_BOOTCORE='0x0380f000' \
-DCRT0_O='$(CRT0_O)'
@ -68,6 +73,7 @@ LDEPENDS_NEF = $(TWL_LIBS) $(LLIBRARIES)
do-build: $(TARGETS)
#----------------------------------------------------------------------------
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
include $(TWL_IPL_RED_ROOT)/build/tests/RelocateChecker/buildtools/modulerules
#include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
#===== End of Makefile =====

View File

@ -44,7 +44,7 @@ MEMORY
<LTDOVERLAY.NAME> (RWXO): ORIGIN = <LTDOVERLAY.ADDRESS>, LENGTH = 0x0 > <LTDOVERLAY.NAME><PROPERTY.LTDSUFFIX>
<END.LTDOVERLAYS>
check.LTDMAIN (RWX) : ORIGIN = 0x02280000, LENGTH = 0x74000 > ltdmain.check
check.LTDMAIN (RWX) : ORIGIN = 0x02300000, LENGTH = 0x134000 > ltdmain.check
}
KEEP_SECTION
@ -566,7 +566,7 @@ SECTIONS
SDK_LTDAUTOLOAD.LTDMAIN.BSS_END = SDK_LTDAUTOLOAD.LTDMAIN.START;
SDK_LTDAUTOLOAD.LTDMAIN.SIZE = 0;
SDK_LTDAUTOLOAD.LTDMAIN.BSS_SIZE = 0;
SDK_LTDAUTOLOAD_TOP_START = 0x02e80000;
SDK_LTDAUTOLOAD_TOP_START = 0x02e70000;
SDK_LTDAUTOLOAD_TOP_SIZE = 4; # STATIC 領域が無い代わりに 4 bytes のダミーがバイナリファイルの先頭に入る #
SDK_LTDAUTOLOAD_START = SDK_LTDAUTOLOAD_TOP_START + SDK_LTDAUTOLOAD_TOP_SIZE;
SDK_LTDAUTOLOAD_SIZE = 0;

View File

@ -21,6 +21,7 @@
Static $(TARGET_NAME)
{
Address $(ADDRESS_FLXMAIN)
Object ../flabObj/ARM7FLX.fob
Library $(CRT0_O) \
libmi_sp$(LIBSUFFIX).a \
libsyscall_sp.twl.a
@ -134,6 +135,7 @@ Ltdautoload LTDMAIN
After $(TARGET_NAME)
Object * (.ltdmain)
Object ../flabObj/ARM7LTD.fob
Library libnvram_sp$(LIBSUFFIX).a
Library librtc_sp$(LIBSUFFIX).a
Library librompatch_sp$(LIBSUFFIX).a \

View File

@ -80,12 +80,15 @@ static void VBlankIntr(void);
/*---------------------------------------------------------------------------*
*---------------------------------------------------------------------------*/
extern u32 *begin_data_ARM7FLX;
extern u32 *begin_data_ARM7LTD;
#ifdef SDK_TWLHYB
extern void SDK_LTDAUTOLOAD_LTDWRAM_BSS_END(void);
extern void SDK_LTDAUTOLOAD_LTDMAIN_BSS_END(void);
#endif
static u32 c;
/*---------------------------------------------------------------------------*
Name: TwlSpMain
Description:
@ -96,6 +99,9 @@ void
TwlSpMain(void)
{
OSHeapHandle heapHandle;
u32 a = (u32)begin_data_ARM7FLX;
u32 b = (u32)begin_data_ARM7LTD;
c = a+b;
// SYSMワークのクリア
MI_CpuClear32( SYSMi_GetWork(), sizeof(SYSM_work) );

View File

@ -21,7 +21,7 @@
Static $(TARGET_NAME)
{
Address 0x02800000
Object $(OBJS_STATIC)
Object $(OBJS_STATIC) ../flabObj/ARM9FLX.fob
Library $(LLIBS) $(GLIBS) $(CW_LIBS)
}
@ -49,6 +49,6 @@ Ltdautoload LTDMAIN
# NITRO/TWL 共有のオーバーレイが在る場合は、さらにその後ろに配置する必要があります。
After $(TARGET_NAME)
Object * (.ltdmain)
Object $(OBJS_LTDAUTOLOAD)
Object $(OBJS_LTDAUTOLOAD) ../flabObj/ARM9LTD.fob
Library $(LLIBS_EX) $(GLIBS_EX)
}

View File

@ -24,6 +24,11 @@ TARGET_FIRM = SYSTEMMENU
TARGET_PLATFORM = TWL
TWL_ARCHGEN = LIMITED
TARGET_FOB = ARM9FLX.fob
FBDSIZE_ARM9FLX = 2097152
TARGET_FOB += ARM9LTD.fob
FBDSIZE_ARM9LTD = 3145728
TITLEID_LO = RLCK
TARGET_TAD = $(BINDIR)/$(TITLEID_LO).tad
@ -46,7 +51,7 @@ CRT0_O = crt0_rc.FLX.TWL.o
//MAKEROM_FLAGS += -DTITLEID_LO='$(TITLEID_LO)'
MAKEROM_FLAGS += -F -DTITLEID_LO='$(TITLEID_LO)'
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
include $(TWL_IPL_RED_ROOT)/build/tests/RelocateChecker/buildtools/commondefs
DEFAULT_COMP_ARM7 = hyena_rc
DEFAULT_MAKEROM_ARM7_BASE = ../ARM7/bin/$(TWL_BUILDTYPE_ARM7)/$(DEFAULT_COMP_ARM7)
@ -60,8 +65,7 @@ INSTALL_DIR = $(SDK_NMENU_DATADIR)
do-build : $(TARGETS)
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
include $(TWL_IPL_RED_ROOT)/build/tests/RelocateChecker/buildtools/modulerules
#----------------------------------------------------------------------------

View File

@ -658,7 +658,7 @@ SECTIONS
SDK_LTDAUTOLOAD.LTDMAIN.BSS_EDN = SDK_LTDAUTOLOAD.LTDMAIN.START;
SDK_LTDAUTOLOAD.LTDMAIN.SIZE = 0;
SDK_LTDAUTOLOAD.LTDMAIN.BSS_SIZE = 0;
SDK_LTDAUTOLOAD_TOP_START = 0x02400000;
SDK_LTDAUTOLOAD_TOP_START = 0x02380000;
SDK_LTDAUTOLOAD_TOP_SIZE = 4; # STATIC 領域が無い代わりに 4 bytes のダミーがバイナリファイルの先頭に入る #
SDK_LTDAUTOLOAD_START = SDK_LTDAUTOLOAD_TOP_START + SDK_LTDAUTOLOAD_TOP_SIZE;
SDK_LTDAUTOLOAD_SIZE = 0;

View File

@ -27,6 +27,8 @@
#define RETURN_BUTTON_BOTTOM_Y ( RETURN_BUTTON_TOP_Y + 2 )
// extern data------------------------------------------
extern u32 *begin_data_ARM9FLX;
extern u32 *begin_data_ARM9LTD;
// function's prototype declaration---------------------
@ -38,6 +40,8 @@ RTCDrawProperty g_rtcDraw = {
// static variable -------------------------------------
static BOOL s_switch = FALSE;
//static u32 dummy[1024*1024/2]={1,2,3,};//2MB
// const data -----------------------------------------
//======================================================
@ -112,11 +116,14 @@ void RelocateCheckerInit( void )
GXS_DispOn();
}
static u32 c;
// メインループ
void RelocateCheckerMain(void)
{
BOOL tp_cancel = FALSE;
u32 a = (u32)begin_data_ARM9FLX;
u32 b = (u32)begin_data_ARM9LTD;
c = a+b;
ReadTP(); // タッチパネル入力の取得

View File

@ -0,0 +1,48 @@
#! make -f
#----------------------------------------------------------------------------
# Project: TwlIPL - commondefs - common definitions for build system
# File: commondefs
#
# Copyright 2007 Nintendo. All rights reserved.
#
# These coded instructions, statements, and computer programs contain
# proprietary information of Nintendo of America Inc. and/or Nintendo
# Company Ltd., and are protected by Federal copyright law. They may
# not be disclosed to third parties or copied or duplicated in any form,
# in whole or in part, without the prior written consent of Nintendo.
#
# $Date:: 2007-09-06$
# $Rev: 318 $
# $Author: yosiokat $
#----------------------------------------------------------------------------
ifndef TWL_RELOCATECHECKER_COMMONDEFS_
TWL_RELOCATECHECKER_COMMONDEFS_ = TRUE
#----------------------------------------------------------------------------
# path settings
#
FBDDIR = $(TWL_IPL_RED_ROOT)/build/tests/RelocateChecker/flabObj
#----------------------------------------------------------------------------
### TWL-commondefs
#
#include $(TWLSDK_ROOT)/build/buildtools/commondefs
#include $(NITROSYSTEM_ROOT)/build/buildtools/commondefs
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
ifneq ($(TARGET_FOB),)
TARGETS := $(TARGET_FOB) $(TARGETS)
endif
#----------------------------------------------------------------------------
# MY BUILD TOOLS
#
MAKEFBD ?= $(FBDDIR)/incre.exe
MAKEFOB ?= $(TWLSDK_ROOT)/tools/bin/bin2obj.exe
#----------------------------------------------------------------------------
endif # TWL_RELOCATECHECKER_COMMONDEFS_
#----- End of commondefs -----

View File

@ -0,0 +1,36 @@
#! make -f
#----------------------------------------------------------------------------
# Project: TwlIPL - modulerules - common rules for build system
# File: modulerules
#
# Copyright 2007 Nintendo. All rights reserved.
#
# These coded instructions, statements, and computer programs contain
# proprietary information of Nintendo of America Inc. and/or Nintendo
# Company Ltd., and are protected by Federal copyright law. They may
# not be disclosed to third parties or copied or duplicated in any form,
# in whole or in part, without the prior written consent of Nintendo.
#
# $Date:: 2007-09-06$
# $Rev: 290 $
# $Author: yosiokat $
#----------------------------------------------------------------------------
ifndef TWL_RELOCATECHECKER_MODULERULES_
#----------------------------------------------------------------------------
### TWL-modulerules
#
#include $(TWLSDK_ROOT)/build/buildtools/modulerules
#include $(NITROSYSTEM_ROOT)/build/buildtools/modulerules
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
#fob
%.fob:
$(MAKEFBD) $(FBDDIR)/$*.fbd $(FBDSIZE_$*) ;\
$(MAKEFOB) -b begin_data_$* $(FBDDIR)/$*.fbd $(FBDDIR)/$@
#----------------------------------------------------------------------------
TWL_RELOCATECHECKER_MODULERULES_ = TRUE
endif # TWL_RELOCATECHECKER_MODULERULES_
#----- End of modulerules -----

Binary file not shown.