From ac91242845393f4fdb7ce844033c3206af1bffe7 Mon Sep 17 00:00:00 2001 From: nakasima Date: Thu, 22 Jan 2009 11:18:16 +0000 Subject: [PATCH] =?UTF-8?q?=E3=82=AA=E3=83=96=E3=82=B8=E3=82=A7=E3=82=AF?= =?UTF-8?q?=E3=83=88=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=8C=E7=94=9F?= =?UTF-8?q?=E6=88=90=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84=E3=81=93=E3=81=A8?= =?UTF-8?q?=E3=81=8C=E3=81=82=E3=82=8B=E3=81=AE=E3=81=A7=E3=82=BD=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=82=92=E5=88=86=E9=9B=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@203 b871894f-2f95-9b40-918c-086798483c85 --- .../build/bootrom/thread/ARM11/Makefile | 3 +- .../bootrom/build/bootrom/thread/ARM11/main.c | 38 +++++++++++++++++++ .../build/bootrom/thread/ARM9/Makefile | 3 +- .../bootrom/build/bootrom/thread/ARM9/main.c | 35 +++++++++++++++++ 4 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 trunk/bootrom/build/bootrom/thread/ARM11/main.c create mode 100644 trunk/bootrom/build/bootrom/thread/ARM9/main.c diff --git a/trunk/bootrom/build/bootrom/thread/ARM11/Makefile b/trunk/bootrom/build/bootrom/thread/ARM11/Makefile index ee132c4..f488463 100644 --- a/trunk/bootrom/build/bootrom/thread/ARM11/Makefile +++ b/trunk/bootrom/build/bootrom/thread/ARM11/Makefile @@ -29,12 +29,11 @@ TARGET_BIN = thread11.padbin SRCS = \ main.c \ +SRCDIR = . # $(ROOT)/bootrom/build/tests/thread/ARM11/src #LCFILE = # using default include $(CTRBROM_ROOT)/build/buildtools/commondefs -SRCDIR = . $(ROOT)/bootrom/build/tests/thread/ARM11 \ - INSTALL_DIR = .. INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN_BASENAME).axf diff --git a/trunk/bootrom/build/bootrom/thread/ARM11/main.c b/trunk/bootrom/build/bootrom/thread/ARM11/main.c new file mode 100644 index 0000000..eedb896 --- /dev/null +++ b/trunk/bootrom/build/bootrom/thread/ARM11/main.c @@ -0,0 +1,38 @@ +/*---------------------------------------------------------------------------* + Project: TwlBrom - thread + File: main.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 + +void BromMain( void ) +{ + osInitException(); + osInitBROM(); + + osPrintf( "ARM11: start\n" ); + + osInitThread(); + while (1) + { + OSTick tick = osGetTick(); + u32 mon = osGetPerfMonitor(OS_MONITOR_1); + osSleep(1000); + mon = osGetPerfMonitor(OS_MONITOR_1) - mon; + tick = osGetTick() - tick; + osTPrintf( "sleep mon = %llu msec\n", OS_TICK_TO_MSEC(mon) ); // MG20ではパフォーマンスモニタのクロックが違う + osTPrintf( "sleep tick = %llu msec\n", OS_TICK_TO_MSEC(tick) ); + } +} + diff --git a/trunk/bootrom/build/bootrom/thread/ARM9/Makefile b/trunk/bootrom/build/bootrom/thread/ARM9/Makefile index 01c0876..ef2465f 100644 --- a/trunk/bootrom/build/bootrom/thread/ARM9/Makefile +++ b/trunk/bootrom/build/bootrom/thread/ARM9/Makefile @@ -31,12 +31,11 @@ TARGET_BIN = thread9.padbin SRCS = \ main.c \ +SRCDIR = . # $(ROOT)/bootrom/build/tests/thread/ARM9 #LCFILE = # using default include $(CTRBROM_ROOT)/build/buildtools/commondefs -SRCDIR = . $(ROOT)/bootrom/build/tests/thread/ARM9 \ - INSTALL_DIR = .. INSTALL_TARGETS = $(BINDIR)/$(TARGET_BIN_BASENAME).axf diff --git a/trunk/bootrom/build/bootrom/thread/ARM9/main.c b/trunk/bootrom/build/bootrom/thread/ARM9/main.c new file mode 100644 index 0000000..2de8660 --- /dev/null +++ b/trunk/bootrom/build/bootrom/thread/ARM9/main.c @@ -0,0 +1,35 @@ +/*---------------------------------------------------------------------------* + Project: TwlBrom - thread + File: main.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 + +void BromSpMain( void ) +{ + osInitException(); + osInitBROM(); + + osPrintf( "ARM9: start\n" ); + + osInitThread(); + while (1) + { + OSTick tick = osGetTick(); + osSleep(1000); + tick = osGetTick() - tick; + osTPrintf( "sleep tick = %llu msec\n", OS_TICK_TO_MSEC(tick) ); + } +} +