1  /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - libraries - stubs - istd
3   File:     stubs_istd.c
4 
5   Copyright 2007-2009 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:: 2009-06-04#$
14   $Rev: 10698 $
15   $Author: okubata_ryoma $
16  *---------------------------------------------------------------------------*/
17 
18 #include <nitro.h>
19 
20 /*---------------------------------------------------------------------------*
21       Function prototype for IS TWL Debugger Console Functions
22  *---------------------------------------------------------------------------*/
23 typedef enum {
24     OVERLAYPROC_ARM9,
25     OVERLAYPROC_ARM7
26 } OVERLAYPROC;
27 typedef enum {
28     ISTDOVERLAYPROC_ARM9,
29     ISTDOVERLAYPROC_ARM7
30 } ISTDOVERLAYPROC;
31 
32 void    ISTDPrint(const char*);
33 void    ISTDPrintf(const char*, ...);
34 void    ISTDPrintEx(int, const char*);
35 void    ISTDPrintfEx(int, const char*, ...);
36 void    ISTDAssert(const char*, int, const char*, int);
37 void    _ISTDbgLib_Initialize(void);
38 void    _ISTDbgLib_AllocateEmualtor(void);
39 void    _ISTDbgLib_FreeEmulator(void);
40 int     _ISTDbgLib_RegistOverlayInfo( OVERLAYPROC, u32, u32, u32, u32);
41 int     _ISTDbgLib_UnregistOverlayInfo( OVERLAYPROC, u32, u32 );
42 int     _ISTDbgLib_IsDebuggerPresent(void);
43 void    _ISTDbgLib_OnLoadChildBinary(void);
44 BOOL    _ISTDbgLib_RegistOverlayInfoByAddr(ISTDOVERLAYPROC, u32, u32, u32, u32);
45 BOOL    _ISTDbgLib_UnregistOverlayInfoByAddr(ISTDOVERLAYPROC, u32, u32);
46 #ifdef  SDK_ARM9
47 void    _ISTDbgLib_OnBeforeResetHard(void);
48 #endif  // SDK_ARM9
49 void    ISTDPrintSetBlockingMode(BOOL);
50 BOOL    ISTDPrintGetBlockingMode(void);
51 
52 
53 /*---------------------------------------------------------------------------*
54       Dummy Function for IS TWL Debugger Console Functions
55  *---------------------------------------------------------------------------*/
ISTDPrint(const char *)56 SDK_WEAK_SYMBOL void ISTDPrint(const char*)
57 {
58 }
59 
ISTDPrintf(const char *,...)60 SDK_WEAK_SYMBOL void ISTDPrintf(const char*, ...)
61 {
62 }
63 
ISTDPrintEx(int,const char *)64 SDK_WEAK_SYMBOL void ISTDPrintEx(int, const char*)
65 {
66 }
67 
ISTDPrintfEx(int,const char *,...)68 SDK_WEAK_SYMBOL void ISTDPrintfEx(int, const char*, ...)
69 {
70 }
71 
ISTDAssert(const char *,int,const char *,int)72 SDK_WEAK_SYMBOL void ISTDAssert(const char*, int, const char*, int)
73 {
74 }
75 
_ISTDbgLib_Initialize(void)76 SDK_WEAK_SYMBOL void _ISTDbgLib_Initialize(void)
77 {
78 }
_ISTDbgLib_AllocateEmualtor(void)79 SDK_WEAK_SYMBOL void _ISTDbgLib_AllocateEmualtor(void)
80 {
81 }
82 
_ISTDbgLib_FreeEmulator(void)83 SDK_WEAK_SYMBOL void _ISTDbgLib_FreeEmulator(void)
84 {
85 }
86 
_ISTDbgLib_RegistOverlayInfo(OVERLAYPROC,u32,u32,u32,u32)87 SDK_WEAK_SYMBOL int  _ISTDbgLib_RegistOverlayInfo( OVERLAYPROC, u32, u32, u32, u32)
88 {
89     return 1;
90 }
91 
_ISTDbgLib_UnregistOverlayInfo(OVERLAYPROC,u32,u32)92 SDK_WEAK_SYMBOL int  _ISTDbgLib_UnregistOverlayInfo( OVERLAYPROC, u32, u32)
93 {
94     return 1;
95 }
96 
_ISTDbgLib_RegistOverlayInfoByAddr(ISTDOVERLAYPROC,u32,u32,u32,u32)97 SDK_WEAK_SYMBOL BOOL _ISTDbgLib_RegistOverlayInfoByAddr(ISTDOVERLAYPROC, u32, u32, u32, u32)
98 {
99     return TRUE;
100 }
101 
_ISTDbgLib_UnregistOverlayInfoByAddr(ISTDOVERLAYPROC,u32,u32)102 SDK_WEAK_SYMBOL BOOL _ISTDbgLib_UnregistOverlayInfoByAddr(ISTDOVERLAYPROC, u32, u32)
103 {
104     return TRUE;
105 }
106 
_ISTDbgLib_IsDebuggerPresent(void)107 SDK_WEAK_SYMBOL int  _ISTDbgLib_IsDebuggerPresent(void)
108 {
109     return 1;
110 }
111 
_ISTDbgLib_OnLoadChildBinary(void)112 SDK_WEAK_SYMBOL void _ISTDbgLib_OnLoadChildBinary(void)
113 {
114 }
115 
116 #ifdef  SDK_ARM9
_ISTDbgLib_OnBeforeResetHard(void)117 SDK_WEAK_SYMBOL void _ISTDbgLib_OnBeforeResetHard(void)
118 {
119 }
120 #endif  // SDK_ARM9
121 
ISTDPrintSetBlockingMode(BOOL)122 SDK_WEAK_SYMBOL void ISTDPrintSetBlockingMode(BOOL)
123 {
124 }
125 
ISTDPrintGetBlockingMode(void)126 SDK_WEAK_SYMBOL BOOL ISTDPrintGetBlockingMode(void)
127 {
128     return FALSE;
129 }
130