1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - FS - demos - file-1
3   File:     main.c
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   $Date:: 2008-09-17 #$
14   $Rev: 8556 $
15   $Author: okubata_ryoma $
16  *---------------------------------------------------------------------------*/
17 #include	<nitro.h>
18 
19 /*
20   This test is checking:
21      if OVERLAY files are generated correctly (area of CW/makelcf)
22      if Rom image are constructed             (area of IPL/makerom)
23 
24   Not checking:
25      file system, overlay
26 
27   File Moves:
28 
29   [makelcf]
30      main.lsf
31      include/nitro/ARM9-TEG.lcf.template
32                                       =>    main.lcf
33 
34   [CodeWarrior]
35      main.c
36       boo.c
37       foo.c
38       woo.c
39      main.lcf                         =>    *.o
40                                             main.sbin
41                                             main_defs.sbin
42                                             main_table.sbin
43                                             main.nef
44                                             main_overlay_0.sbin
45                                             main_overlay_1.sbin
46 
47   [makerom]
48      main.rsf
49      main.sbin
50      main_defs.sbin
51      main_table.sbin
52      main.nef
53      main_overlay_0.sbin
54      main_overlay_1.sbin
55      tools/makerom/spMain.sbin
56      tools/makerom/spMain_defs.sbin   =>    main.bin  -----> TARGET
57                                             main.nlf  -----> for debug info
58                                             main_header.sbin
59                                             main_files.sbin
60 
61  */
62 
63 void    function_Boo(void);
64 void    function_Foo(void);
65 void    function_Woo(void);
66 void    SDK_MAIN_ARENA_LO(void);
67 void    SDK_SYS_STACKSIZE(void);
68 
NitroMain(void)69 void NitroMain(void)
70 {
71     OS_Printf("Hello, I am main.\n");
72 
73     OS_Printf(" This is function_Boo = 0x%08x\n", function_Boo);
74     OS_Printf(" This is function_Foo = 0x%08x\n", function_Foo);
75     OS_Printf(" This is function_Woo = 0x%08x\n", function_Woo);
76 
77     OS_Printf(" SDK_MAIN_ARENA_LO    = 0x%08x\n", SDK_MAIN_ARENA_LO);
78     OS_Printf(" SDK_SYS_STACKSIZE    = 0x%08x\n", SDK_SYS_STACKSIZE);
79 
80     while (1)
81     {
82     };
83 }
84 
NitroStartUp(void)85 void NitroStartUp(void)
86 {
87     OS_Init();
88     OS_Printf("Hello, I am NitroStartUp.\n");
89 }
90