diff --git a/trunk/bootrom/build/bootrom/alarm/rom/Makefile b/trunk/bootrom/build/bootrom/alarm/rom/Makefile index 2ef54c6..4ba3445 100644 --- a/trunk/bootrom/build/bootrom/alarm/rom/Makefile +++ b/trunk/bootrom/build/bootrom/alarm/rom/Makefile @@ -29,7 +29,6 @@ TARGET_BIN = twl_bootrom.exo CRT0_O = SRCS = \ - crt0.c \ #SRCDIR = # using default #LCFILE = # using default diff --git a/trunk/bootrom/build/bootrom/ctr_bootrom/rom/Makefile b/trunk/bootrom/build/bootrom/ctr_bootrom/rom/Makefile index d6b0002..5c04bed 100644 --- a/trunk/bootrom/build/bootrom/ctr_bootrom/rom/Makefile +++ b/trunk/bootrom/build/bootrom/ctr_bootrom/rom/Makefile @@ -29,7 +29,6 @@ TARGET_BIN = twl_bootrom.exo CRT0_O = SRCS = \ - crt0.c \ #SRCDIR = # using default #LCFILE = # using default diff --git a/trunk/bootrom/build/bootrom/ctr_bootrom/rom/crt0.c b/trunk/bootrom/build/bootrom/ctr_bootrom/rom/crt0.c deleted file mode 100644 index 6fc177c..0000000 --- a/trunk/bootrom/build/bootrom/ctr_bootrom/rom/crt0.c +++ /dev/null @@ -1,41 +0,0 @@ -/*---------------------------------------------------------------------------* - Project: CtrBrom - bootrom - init - File: crt0.c - - Copyright 2008 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:: $ - $Rev$ - $Author$ - *---------------------------------------------------------------------------*/ -#include -#include -#include - -/*---------------------------------------------------------------------------* - Name: _start - - Description: Start up - - Arguments: None - - Returns: None. - *---------------------------------------------------------------------------*/ -asm void _start( void ) -{ - PRESERVE8 - - EXPORT CTR_BROM_ARM11 - EXPORT CTR_BROM_ARM9 - -CTR_BROM_ARM11 - INCBIN BROM_PADBIN_ARM11 -CTR_BROM_ARM9 - INCBIN BROM_PADBIN_ARM9 -} diff --git a/trunk/bootrom/build/bootrom/jtag-only/rom/Makefile b/trunk/bootrom/build/bootrom/jtag-only/rom/Makefile index df8122e..3a41917 100644 --- a/trunk/bootrom/build/bootrom/jtag-only/rom/Makefile +++ b/trunk/bootrom/build/bootrom/jtag-only/rom/Makefile @@ -29,7 +29,6 @@ TARGET_BIN = jtag_only.exo CRT0_O = SRCS = \ - crt0.c \ #SRCDIR = # using default #LCFILE = # using default diff --git a/trunk/bootrom/build/bootrom/jtag-only/rom/crt0.c b/trunk/bootrom/build/bootrom/jtag-only/rom/crt0.c deleted file mode 100644 index 6fc177c..0000000 --- a/trunk/bootrom/build/bootrom/jtag-only/rom/crt0.c +++ /dev/null @@ -1,41 +0,0 @@ -/*---------------------------------------------------------------------------* - Project: CtrBrom - bootrom - init - File: crt0.c - - Copyright 2008 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:: $ - $Rev$ - $Author$ - *---------------------------------------------------------------------------*/ -#include -#include -#include - -/*---------------------------------------------------------------------------* - Name: _start - - Description: Start up - - Arguments: None - - Returns: None. - *---------------------------------------------------------------------------*/ -asm void _start( void ) -{ - PRESERVE8 - - EXPORT CTR_BROM_ARM11 - EXPORT CTR_BROM_ARM9 - -CTR_BROM_ARM11 - INCBIN BROM_PADBIN_ARM11 -CTR_BROM_ARM9 - INCBIN BROM_PADBIN_ARM9 -} diff --git a/trunk/bootrom/build/bootrom/teg-dev/rom/Makefile b/trunk/bootrom/build/bootrom/teg-dev/rom/Makefile index 1e149ea..6443ebb 100644 --- a/trunk/bootrom/build/bootrom/teg-dev/rom/Makefile +++ b/trunk/bootrom/build/bootrom/teg-dev/rom/Makefile @@ -29,7 +29,6 @@ TARGET_BIN = twl_bootrom.exo CRT0_O = SRCS = \ - crt0.c \ #SRCDIR = # using default #LCFILE = # using default diff --git a/trunk/bootrom/build/bootrom/teg-dev/rom/crt0.c b/trunk/bootrom/build/bootrom/teg-dev/rom/crt0.c deleted file mode 100644 index 6fc177c..0000000 --- a/trunk/bootrom/build/bootrom/teg-dev/rom/crt0.c +++ /dev/null @@ -1,41 +0,0 @@ -/*---------------------------------------------------------------------------* - Project: CtrBrom - bootrom - init - File: crt0.c - - Copyright 2008 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:: $ - $Rev$ - $Author$ - *---------------------------------------------------------------------------*/ -#include -#include -#include - -/*---------------------------------------------------------------------------* - Name: _start - - Description: Start up - - Arguments: None - - Returns: None. - *---------------------------------------------------------------------------*/ -asm void _start( void ) -{ - PRESERVE8 - - EXPORT CTR_BROM_ARM11 - EXPORT CTR_BROM_ARM9 - -CTR_BROM_ARM11 - INCBIN BROM_PADBIN_ARM11 -CTR_BROM_ARM9 - INCBIN BROM_PADBIN_ARM9 -} diff --git a/trunk/bootrom/build/bootrom/thread/rom/Makefile b/trunk/bootrom/build/bootrom/thread/rom/Makefile index c0789e1..34f6750 100644 --- a/trunk/bootrom/build/bootrom/thread/rom/Makefile +++ b/trunk/bootrom/build/bootrom/thread/rom/Makefile @@ -29,7 +29,6 @@ TARGET_BIN = thread.exo CRT0_O = SRCS = \ - crt0.c \ #SRCDIR = # using default #LCFILE = # using default diff --git a/trunk/bootrom/build/bootrom/thread/rom/crt0.c b/trunk/bootrom/build/bootrom/thread/rom/crt0.c deleted file mode 100644 index 6fc177c..0000000 --- a/trunk/bootrom/build/bootrom/thread/rom/crt0.c +++ /dev/null @@ -1,41 +0,0 @@ -/*---------------------------------------------------------------------------* - Project: CtrBrom - bootrom - init - File: crt0.c - - Copyright 2008 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:: $ - $Rev$ - $Author$ - *---------------------------------------------------------------------------*/ -#include -#include -#include - -/*---------------------------------------------------------------------------* - Name: _start - - Description: Start up - - Arguments: None - - Returns: None. - *---------------------------------------------------------------------------*/ -asm void _start( void ) -{ - PRESERVE8 - - EXPORT CTR_BROM_ARM11 - EXPORT CTR_BROM_ARM9 - -CTR_BROM_ARM11 - INCBIN BROM_PADBIN_ARM11 -CTR_BROM_ARM9 - INCBIN BROM_PADBIN_ARM9 -} diff --git a/trunk/bootrom/build/bootrom/vfp/ARM11/main.c b/trunk/bootrom/build/bootrom/vfp/ARM11/main.c index 141e0ee..4538c90 100644 --- a/trunk/bootrom/build/bootrom/vfp/ARM11/main.c +++ b/trunk/bootrom/build/bootrom/vfp/ARM11/main.c @@ -55,11 +55,14 @@ void proc1(void *arg) #endif while (1) { + int i; + osPrintf( "Thread1: (%x)\n", (u32)arg ); // 1回目のみVFP例外発生 f0+=f1; + i = f0; // osVSNPrintf は %f 非サポート - osPrintf( "Thread1: %f\n", f0 ); + osPrintf( "Thread1: f0 = %d\n", i ); osSleepThread( NULL ); } } diff --git a/trunk/bootrom/build/bootrom/vfp/rom/Makefile b/trunk/bootrom/build/bootrom/vfp/rom/Makefile index 5bd4e84..2ad95d3 100644 --- a/trunk/bootrom/build/bootrom/vfp/rom/Makefile +++ b/trunk/bootrom/build/bootrom/vfp/rom/Makefile @@ -29,7 +29,6 @@ TARGET_BIN = twl_bootrom.exo CRT0_O = SRCS = \ - crt0.c \ #SRCDIR = # using default #LCFILE = # using default diff --git a/trunk/bootrom/build/bootrom/vfp/rom/crt0.c b/trunk/bootrom/build/bootrom/vfp/rom/crt0.c deleted file mode 100644 index 6fc177c..0000000 --- a/trunk/bootrom/build/bootrom/vfp/rom/crt0.c +++ /dev/null @@ -1,41 +0,0 @@ -/*---------------------------------------------------------------------------* - Project: CtrBrom - bootrom - init - File: crt0.c - - Copyright 2008 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:: $ - $Rev$ - $Author$ - *---------------------------------------------------------------------------*/ -#include -#include -#include - -/*---------------------------------------------------------------------------* - Name: _start - - Description: Start up - - Arguments: None - - Returns: None. - *---------------------------------------------------------------------------*/ -asm void _start( void ) -{ - PRESERVE8 - - EXPORT CTR_BROM_ARM11 - EXPORT CTR_BROM_ARM9 - -CTR_BROM_ARM11 - INCBIN BROM_PADBIN_ARM11 -CTR_BROM_ARM9 - INCBIN BROM_PADBIN_ARM9 -} diff --git a/trunk/bootrom/build/buildtools/commondefs b/trunk/bootrom/build/buildtools/commondefs index 58818b9..e3011b3 100644 --- a/trunk/bootrom/build/buildtools/commondefs +++ b/trunk/bootrom/build/buildtools/commondefs @@ -229,6 +229,13 @@ CTR_BUILDARCH ?= $(BROM_BUILDARCH) ### Compiler & Linker settings +BROM_PROM_SRCDIR ?= $(BROM_ROOT)/build/libraries/prom +BROM_PROM_SRC ?= prom_crt0.c +ifeq ($(BROM_PROMGEN),TRUE) +SRCDIR += $(BROM_PROM_SRCDIR) +SRCS += $(BROM_PROM_SRC) +endif + # replace NitroSDK LCFILE_TEMPLATE = $(DEFAULT_BROM_LCFILE_TEMPLATE) LCFILE_TEMPLATE_RV = $(shell cygpath -m $(DEFAULT_BROM_LCFILE_TEMPLATE)) diff --git a/trunk/bootrom/build/bootrom/alarm/rom/crt0.c b/trunk/bootrom/build/libraries/prom/prom_crt0.c similarity index 87% rename from trunk/bootrom/build/bootrom/alarm/rom/crt0.c rename to trunk/bootrom/build/libraries/prom/prom_crt0.c index 6fc177c..6cb9a86 100644 --- a/trunk/bootrom/build/bootrom/alarm/rom/crt0.c +++ b/trunk/bootrom/build/libraries/prom/prom_crt0.c @@ -1,8 +1,8 @@ /*---------------------------------------------------------------------------* - Project: CtrBrom - bootrom - init - File: crt0.c + Project: CtrBrom - libraries - PROM + File: prom_crt0.c - Copyright 2008 Nintendo. All rights reserved. + Copyright 2009 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo diff --git a/trunk/include/ctr/hw/ARM11/mmap_axi_wram.h b/trunk/include/ctr/hw/ARM11/mmap_axi_wram.h index 0e8575c..d9eefe6 100644 --- a/trunk/include/ctr/hw/ARM11/mmap_axi_wram.h +++ b/trunk/include/ctr/hw/ARM11/mmap_axi_wram.h @@ -30,7 +30,7 @@ extern "C" { //---- offset in system reserved area #ifdef SDK_ARM11 -// FCRAMまで命令プリフェッチしないように注意(MPCoreは8段パイプライン) +// FCRAMまで命令プリフェッチしないように配置(MPCoreは8段パイプライン) #define HW_AXI_WRAM_SYSRV_OFS_INTR_VENEER 0x00 #define HW_AXI_WRAM_SYSRV_OFS_FIQ_VENEER 0x08 #define HW_AXI_WRAM_SYSRV_OFS_SWI_VENEER 0x10 @@ -38,8 +38,8 @@ extern "C" { #define HW_AXI_WRAM_SYSRV_OFS_IABT_VENEER 0x20 #define HW_AXI_WRAM_SYSRV_OFS_DABT_VENEER 0x28 #endif // SDK_ARM11 -#define HW_AXI_WRAM_SYSRV_INIT_LOCK_BUF 0x30 -#define HW_AXI_WRAM_SYSRV_CARD_LOCK_BUF 0x34 +#define HW_AXI_WRAM_SYSRV_INIT_LOCK_BUF 0x30 // for firmware +#define HW_AXI_WRAM_SYSRV_CARD_LOCK_BUF 0x34 // for firmware #ifdef SDK_ARM11 #define HW_AXI_WRAM_SYSRV_OFS_START_VECTOR1 0x3c #define HW_AXI_WRAM_SYSRV_OFS_INTR_CHECK1 0x40