source: svn/branches/kctv/newcon3bcm2_21bu/magnum/basemodules/dbg/bdbg.inc

Last change on this file was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 4.4 KB
Line 
1############################################################
2#     Copyright (c) 2003-2012, Broadcom Corporation
3#     All Rights Reserved
4#     Confidential Property of Broadcom Corporation
5#
6#  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7#  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8#  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9#
10# $brcm_Workfile: bdbg.inc $
11# $brcm_Revision: Hydra_Software_Devel/15 $
12# $brcm_Date: 2/22/12 1:57p $
13#
14# Module Description:
15#
16# Revision History:
17#
18# Created: 01/09/2007 by Jon Garrett
19#
20# $brcm_Log: /magnum/basemodules/dbg/bdbg.inc $
21#
22# Hydra_Software_Devel/15   2/22/12 1:57p erickson
23# SW7425-2130: fix logic error
24#
25# Hydra_Software_Devel/14   2/21/12 1:59p erickson
26# SW7425-2130: add new DBG options for compact debug mode
27#
28# Hydra_Software_Devel/13   7/22/11 9:28a agin
29# SWNOOS-473:  Add no_os.
30#
31# Hydra_Software_Devel/12   5/3/11 1:41p erickson
32# SW7420-1819: add bare OS support to magnum basemodules
33#
34# Hydra_Software_Devel/11   4/4/11 6:14p vsilyaev
35# SW7405-5221: Added option to forward debug output to FIFO
36#
37# Hydra_Software_Devel/10   7/20/10 2:43p jfisher
38# SW7572-30:  Add ucos_ii support.
39#
40# Hydra_Software_Devel/9   6/10/10 7:20p vsilyaev
41# SW7468-69: Fixed Win32/MINGW build
42#
43# Hydra_Software_Devel/9   6/10/10 1:38p vsilyaev
44# SW7468-69: Fixed Win32/MINGW build
45#
46# Hydra_Software_Devel/9   6/10/10 1:37p vsilyaev
47# SW7468-69: Fixed Win32/MINGW build
48#
49# Hydra_Software_Devel/8   1/21/10 10:44a kaiz
50# SW35230-56: adding linuxpal support for Palladium emulation environment
51#
52# Hydra_Software_Devel/SW35230-56/1   1/18/10 6:39p kaiz
53# SW35230-56: adding linuxpal support for Palladium emulation environment
54#
55# Hydra_Software_Devel/7   11/20/09 5:23p jgarrett
56# SW7408-17: adding bkernel
57#
58# Hydra_Software_Devel/6   9/22/09 5:06p erickson
59# SW3548-2493: add standard compile-time debug levels
60#
61# Hydra_Software_Devel/5   9/15/09 1:37p erickson
62# SW7400-2511: use B_REFSW_OS
63#
64# Hydra_Software_Devel/4   5/29/09 4:37p jessem
65# PR 54881: Added linuxemu.
66#
67# Hydra_Software_Devel/3   10/16/07 1:48p jessem
68# PR 36129: Added linuxclient for use with Linux-based IKOS emulation
69# platform.
70#
71# Hydra_Software_Devel/2   7/25/07 11:27a vsilyaev
72# PR 32813: Added Windows MINGW support
73#
74# Hydra_Software_Devel/1   1/11/07 2:37p jgarrett
75# PR27004: Adding new .inc files
76#
77############################################################
78
79#
80# Conditional Options for this Makefile
81#
82# N/A
83#
84
85# Define this module
86MAGNUM_MODULES += BDBG
87
88# Backward-compatibility
89B_REFSW_OS ?= $(OS)
90
91# Module Includes
92BDBG_INCLUDES += $(MAGNUM)/basemodules/dbg
93
94# Sanity Check OS provided
95BDBG_SUPPORTED_OS := linuxuser linuxkernel linuxclient linuxemu linuxpal vxworks ucos nucleus win32 bkernel ucos_ii bare no_os
96ifeq ($(findstring $(B_REFSW_OS), $(BDBG_SUPPORTED_OS)),)
97$(error [dbg] OS must be one of the following: $(BDBG_SUPPORTED_OS))
98endif
99
100BDBG_SOURCES += $(MAGNUM)/basemodules/dbg/bdbg.c \
101                $(MAGNUM)/basemodules/dbg/bdbg_fifo.c \
102                $(MAGNUM)/basemodules/dbg/$(B_REFSW_OS)/bdbg_os_priv.c
103
104ifeq ($(B_REFSW_OS),vxworks)
105BDBG_SOURCES += $(MAGNUM)/basemodules/dbg/$(B_REFSW_OS)/bdbg_output.c
106else
107BDBG_SOURCES += $(MAGNUM)/basemodules/dbg/bdbg_output.c
108endif
109
110#
111# Options for reducing binary size:
112# B_REFSW_DEBUG=n
113#    this is the minimum size, but all error messages are removed. do not use this mode if your system still has bugs.
114# B_REFSW_DEBUG=y B_REFSW_DEBUG_LEVEL=err
115#    this gives you full BDBG_ERR, BERR_TRACE and BDBG_ASSERT, which are essential for debug
116# B_REFSW_DEBUG=y B_REFSW_DEBUG_LEVEL=err B_REFSW_DEBUG_COMPACT_ERR=y
117#    this gives you every BDBG_ERR, BERR_TRACE and BDBG_ASSERT, but with a minimal size
118#
119
120# compile time level: ERR, no WRN, MSG, TRACE or LOG
121ifeq ($(B_REFSW_DEBUG_LEVEL),err)
122BDBG_DEFINES += BDBG_NO_WRN=1 BDBG_NO_LOG=1 BDBG_NO_MSG=1
123endif
124# compile time level: ERR, WRN and LOG, no MSG or TRACE
125ifeq ($(B_REFSW_DEBUG_LEVEL),wrn)
126BDBG_DEFINES += BDBG_NO_MSG=1
127endif
128
129# reduce size by reusing a single format string for all errors
130ifeq ($(B_REFSW_DEBUG_COMPACT_ERR),y)
131BDBG_DEFINES += B_REFSW_DEBUG_COMPACT_ERR=1
132endif
133
134ifeq ($(B_REFSW_DEBUG_ASSERT_FAIL),n)
135# BDBG_ASSERT will print ERR, but not fail
136# the env variable is positive logic, but the macro is negative logic to not introduce a new default
137BDBG_DEFINES += B_REFSW_DEBUG_ASSERT_NO_FAIL=1
138endif
Note: See TracBrowser for help on using the repository browser.