1 /*---------------------------------------------------------------------------* 2 Project: TwlSDK - ELF Loader Configuration 3 File: el_config.h 4 5 Copyright 2006-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-12-05#$ 14 $Rev: 9518 $ 15 $Author: yosizaki $ 16 *---------------------------------------------------------------------------*/ 17 18 #ifndef __ELF_LOADER_CONFIG_H__ 19 #define __ELF_LOADER_CONFIG_H__ 20 21 /*********************************************************************** 22 Print debugging statements: on or off 23 ***********************************************************************/ 24 #define DEBUG_PRINT_ON (0) 25 26 /*********************************************************************** 27 Specify the target ARM architecture (ARM7TDMI is V4) 28 ***********************************************************************/ 29 #ifdef SDK_ARM7 30 #define TARGET_ARM_V4 (1) 31 #else 32 #define TARGET_ARM_V4 (0) 33 #endif 34 35 #define TARGET_ARM_V5 (TARGET_ARM_V4 ^ 1) 36 37 38 39 #if( DEBUG_PRINT_ON == 1) 40 #define PRINTDEBUG OS_TPrintf 41 #else 42 #define PRINTDEBUG( ...) ((void)0) 43 #endif 44 45 #define OSAPI_CPUFILL8 MI_CpuFill8 46 #define OSAPI_CPUCOPY8 MI_CpuCopy8 47 48 49 /*********************************************************************** 50 Debug notification-related (select istdbglibpriv.h definitions) 51 ***********************************************************************/ 52 #ifdef SDK_ARM7 53 #define ISTDRELOCATIONPROC_AUTO ISTDOVERLAYPROC_ARM7 54 #else 55 #define ISTDRELOCATIONPROC_AUTO ISTDOVERLAYPROC_ARM9 56 #endif 57 58 #if (TARGET_ARM_V5 == 1) 59 #define ISTDVENEERTYPE_AUTO ISTDVENEERTYPE_ARM 60 #else 61 #define ISTDVENEERTYPE_AUTO ISTDVENEERTYPE_ARMV4T 62 #endif 63 64 65 /*********************************************************************** 66 TWL OS 67 ***********************************************************************/ 68 //#ifndef SDK_TWL 69 #if 0 // Do not use OS_Alloc unchanged 70 #define OSAPI_MALLOC OS_Alloc 71 #define OSAPI_FREE OS_Free 72 #define OSAPI_STRLEN STD_GetStringLength 73 #define OSAPI_STRNCMP STD_CompareNString 74 #define OSAPI_STRCMP STD_CompareString 75 #else 76 //#include <string.h> 77 #define OSAPI_MALLOC i_elAlloc 78 #define OSAPI_FREE i_elFree 79 #define OSAPI_STRLEN STD_GetStringLength 80 #define OSAPI_STRNCMP STD_CompareNString 81 #define OSAPI_STRCMP STD_CompareString 82 // #define OSAPI_STRLEN strlen 83 // #define OSAPI_STRNCMP strncmp 84 // #define OSAPI_STRCMP strcmp 85 #endif 86 87 #define OSAPI_FLUSHCACHEALL IC_InvalidateAll(), DC_FlushAll 88 #define OSAPI_WAITCACHEBUF DC_WaitWriteBufferEmpty 89 90 91 #endif /*__ELF_LOADER_CONFIG_H__*/ 92