dbg.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2009, Texas Instruments Incorporated
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * *  Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * *  Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * *  Neither the name of Texas Instruments Incorporated nor the names of
00017  *    its contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00022  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00023  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00024  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00028  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00029  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00030  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  * 
00032  */
00033 /*
00034  *  ======== dbg.h ========
00035  *
00036  *  DSP-side debug support.
00037  *
00038  */
00039 
00040 #ifndef _DBGSUPPORT_
00041 #define _DBGSUPPORT_
00042 
00043 
00044 #ifdef _DBG_                    /* set when 'dbg' macro used in MAKE file */
00045 
00046 #ifdef _DBG_WITH_SYS_
00047 #include <sys.h>
00048 #define TRACE 0 /* unused with _DBG_WITH_SYS, but necessary */
00049 
00050 #define DBG_printf0(a,b) SYS_printf(b)
00051 #define DBG_printf1(a,b,c) SYS_printf(b,c)
00052 #define DBG_printf2(a,b,c,d) SYS_printf(b,c,d)
00053 
00054 #elif defined(_DBG_WITH_GT_)
00055 
00056 #include <ti/sdo/fc/utils/trace/gt.h>
00057 extern GT_Mask ti_sdo_fc_GTMask;
00058 
00059 #define DBG_printf0(a,b) GT_0trace(ti_sdo_fc_GTMask, GT_ENTER, b "\n")
00060 #define DBG_printf1(a,b,c) GT_1trace(ti_sdo_fc_GTMask, GT_ENTER, b "\n", c)
00061 #define DBG_printf2(a,b,c,d) GT_2trace(ti_sdo_fc_GTMask, GT_ENTER, b "\n", c, d)
00062 
00063 #else
00064 
00065 #include <log.h>
00066 #define TRACE &bridge
00067 extern LOG_Obj bridge;
00068 #define DBG_printf0(a,b) LOG_printf(a,b)
00069 #define DBG_printf1(a,b,c) LOG_printf(a,b,c)
00070 #define DBG_printf2(a,b,c,d) LOG_printf(a,b,c,d)
00071 
00072 #endif
00073 
00074 #else /* !_DBG_ */
00075 
00076 #define DBG_printf0(a,b)
00077 #define DBG_printf1(a,b,c)
00078 #define DBG_printf2(a,b,c,d)
00079 
00080 #endif
00081 
00082 
00083 #endif /* _DBGSUPPORT_ */
00084 
00085 /*
00086  *  @(#) ti.sdo.fc.utils; 1, 0, 2,264; 11-8-2009 20:59:00; /db/atree/library/trees/fc/fc-l04x/src/
00087  */
00088 

Copyright 2009, Texas Instruments Incorporated