/////////////////////////////////////////////////////////////////////////////// // // IAR C/C++ Compiler V10.30.1.6000 for 8051 23/Aug/2019 12:13:53 // Copyright 2004-2018 IAR Systems AB. // PC-locked license - IAR Embedded Workbench for 8051 // // Core = plain // Code model = banked // Data model = large // Calling convention = xdata reentrant // Constant location = data_rom // Dptr setup = 1,16 // // Source file = // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Components\mt\DebugTrace.c // Command line = // -f C:\Users\VULCAN\AppData\Local\Temp\EW8CEE.tmp // (E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Components\mt\DebugTrace.c // -D ZIGBEEPRO -D NWK_AUTO_POLL -D ZTOOL_P1 -D xMT_TASK -D xMT_SYS_FUNC // -D MT_ZDO_FUNC -D SAPP_ZSTACK -lC // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\EndDeviceEB\List // -lA // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\EndDeviceEB\List // --diag_suppress Pe001,Pa010 -o // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\EndDeviceEB\Obj // -e --debug --core=plain --dptr=16,1 --data_model=large // --code_model=banked --calling_convention=xdata_reentrant // --place_constants=data_rom --nr_virtual_regs 8 -f // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\zstack\Tools\CC2530DB\f8wEndev.cfg // (-DCPU32MHZ -DROOT=__near_func -DMAC_CFG_TX_DATA_MAX=3 // -DMAC_CFG_TX_MAX=6 -DMAC_CFG_RX_MAX=3) -f // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\zstack\Tools\CC2530DB\f8wConfig.cfg // (-DZIGBEEPRO -DSECURE=0 -DZG_SECURE_DYNAMIC=0 -DREFLECTOR // -DDEFAULT_CHANLIST=0x00800000 -DZDAPP_CONFIG_PAN_ID=0x0057 // -DNWK_START_DELAY=100 -DEXTENDED_JOINING_RANDOM_MASK=0x007F // -DBEACON_REQUEST_DELAY=100 -DBEACON_REQ_DELAY_MASK=0x00FF // -DLINK_STATUS_JITTER_MASK=0x007F -DROUTE_EXPIRY_TIME=30 // -DAPSC_ACK_WAIT_DURATION_POLLED=3000 -DNWK_INDIRECT_MSG_TIMEOUT=7 // -DMAX_RREQ_ENTRIES=8 -DAPSC_MAX_FRAME_RETRIES=3 // -DNWK_MAX_DATA_RETRIES=2 -DMAX_POLL_FAILURE_RETRIES=2 -DMAX_BCAST=9 // -DAPS_MAX_GROUPS=16 -DMAX_RTG_ENTRIES=40 -DNWK_MAX_BINDING_ENTRIES=4 // -DMAX_BINDING_CLUSTER_IDS=4 "-DDEFAULT_KEY={0x01, 0x03, 0x05, 0x07, // 0x09, 0x0B, 0x0D, 0x0F, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, // 0x0D}" -DMAC_MAX_FRAME_SIZE=116 -DZDNWKMGR_MIN_TRANSMISSIONS=20 // "-DCONST=const __code" -DGENERIC=__generic -DRFD_RCVC_ALWAYS_ON=FALSE // -DPOLL_RATE=1000 -DQUEUED_POLL_RATE=100 -DRESPONSE_POLL_RATE=100 // -DREJOIN_POLL_RATE=440) -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\Source\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\zstack\ZMain\TI2530DB\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\hal\include\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\hal\target\CC2530EB\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\mac\include\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\mac\high_level\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\mac\low_level\srf04\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\mac\low_level\srf04\single_chip\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\mt\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\osal\include\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\services\saddr\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\services\sdata\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\af\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\nwk\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\sapi\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\sec\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\sys\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\zdo\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\zmac\ // -I // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\zmac\f8w\ // -Ohz --require_prototypes --no_code_motion) // Locale = Chinese (Simplified)_CHN.936 // List file = // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\EndDeviceEB\List\DebugTrace.s51 // /////////////////////////////////////////////////////////////////////////////// NAME DebugTrace RTMODEL "__SystemLibrary", "CLib" RTMODEL "__calling_convention", "xdata_reentrant" RTMODEL "__code_model", "banked" RTMODEL "__core", "plain" RTMODEL "__data_model", "large" RTMODEL "__dptr_size", "16" RTMODEL "__extended_stack", "disabled" RTMODEL "__location_for_constants", "data" RTMODEL "__number_of_dptrs", "1" RTMODEL "__register_banks", "*" RTMODEL "__rt_version", "1" RSEG DOVERLAY:DATA:NOROOT(0) RSEG IOVERLAY:IDATA:NOROOT(0) RSEG ISTACK:IDATA:NOROOT(0) RSEG PSTACK:XDATA:NOROOT(0) RSEG XSTACK:XDATA:NOROOT(0) END // E:\qqÏÂÔØÎļþ\ZStack-CC2530-r200\ZStack-CC2530-r200\Components\mt\DebugTrace.c // 1 /************************************************************************************************** // 2 Filename: DebugTrace.c // 3 Revised: $Date: 2008-01-17 12:22:57 -0800 (Thu, 17 Jan 2008) $ // 4 Revision: $Revision: 16223 $ // 5 // 6 // 7 Description: This interface provides quick one-function-call functions to // 8 Monitor and Test reporting mechanisms. // 9 // 10 // 11 Copyright 2007 Texas Instruments Incorporated. All rights reserved. // 12 // 13 IMPORTANT: Your use of this Software is limited to those specific rights // 14 granted under the terms of a software license agreement between the user // 15 who downloaded the software, his/her employer (which must be your employer) // 16 and Texas Instruments Incorporated (the "License"). You may not use this // 17 Software unless you agree to abide by the terms of the License. The License // 18 limits your use, and you acknowledge, that the Software may not be modified, // 19 copied or distributed unless embedded on a Texas Instruments microcontroller // 20 or used solely and exclusively in conjunction with a Texas Instruments radio // 21 frequency transceiver, which is integrated into your product. Other than for // 22 the foregoing purpose, you may not use, reproduce, copy, prepare derivative // 23 works of, modify, distribute, perform, display or sell this Software and/or // 24 its documentation for any purpose. // 25 // 26 YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE // 27 PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, // 28 INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, // 29 NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL // 30 TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, // 31 NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER // 32 LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES // 33 INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE // 34 OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT // 35 OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES // 36 (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. // 37 // 38 Should you have any questions regarding your right to use this Software, // 39 contact Texas Instruments Incorporated at www.TI.com. // 40 // 41 **************************************************************************************************/ // 42 // 43 #if defined( MT_TASK ) || defined( APP_DEBUG ) // 44 // 45 /********************************************************************* // 46 * INCLUDES // 47 */ // 48 #include "ZComDef.h" // 49 #include "OSAL.h" // 50 #include "MT.h" // 51 #include "MT_TASK.h" // 52 #include "MT_DEBUG.h" // 53 #include "DebugTrace.h" // 54 // 55 #if defined ( APP_DEBUG ) // 56 #include "DebugApp.h" // 57 #endif // 58 // 59 /********************************************************************* // 60 * MACROS // 61 */ // 62 // 63 /********************************************************************* // 64 * CONSTANTS // 65 */ // 66 // 67 // 68 /********************************************************************* // 69 * TYPEDEFS // 70 */ // 71 // 72 /********************************************************************* // 73 * GLOBAL VARIABLES // 74 */ // 75 // 76 /********************************************************************* // 77 * EXTERNAL VARIABLES // 78 */ // 79 // 80 /********************************************************************* // 81 * EXTERNAL FUNCTIONS // 82 */ // 83 // 84 /********************************************************************* // 85 * LOCAL VARIABLES // 86 */ // 87 // 88 /********************************************************************* // 89 * LOCAL FUNCTIONS // 90 */ // 91 // 92 /********************************************************************* // 93 * @fn debug_msg // 94 * // 95 * @brief // 96 * // 97 * This feature allows modules to display debug information as // 98 * applications execute in real-time. This feature will work similar // 99 * to "printf()" but will output to the serial port for display in // 100 * the Z-Test tool. // 101 * // 102 * This feature will most likely be compiled out in the production code // 103 * to save code space. // 104 * // 105 * @param byte compID - Component ID // 106 * @param byte severity - CRITICAL(0x01), ERROR(0x02), INFORMATION(0x03) // 107 * or TRACE(0x04) // 108 * @param byte numParams - number of parameter fields (param1-3) // 109 * @param UINT16 param1 - user defined data // 110 * @param UINT16 param2 - user defined data // 111 * @param UINT16 param3 - user defined data // 112 * // 113 * @return void // 114 */ // 115 void debug_msg( byte compID, byte severity, byte numParams, UINT16 param1, // 116 UINT16 param2, UINT16 param3 ) // 117 { // 118 // 119 mtDebugMsg_t *mtDebugMsg; // 120 UINT16 timestamp; // 121 // 122 if ( debugThreshold == 0 || debugCompId != compID ) // 123 return; // 124 // 125 // Fill in the timestamp // 126 timestamp = 0; // 127 // 128 // Get a message buffer to build the debug message // 129 mtDebugMsg = (mtDebugMsg_t *)osal_msg_allocate( sizeof( mtDebugMsg_t ) ); // 130 if ( mtDebugMsg ) // 131 { // 132 mtDebugMsg->hdr.event = CMD_DEBUG_MSG; // 133 mtDebugMsg->compID = compID; // 134 mtDebugMsg->severity = severity; // 135 mtDebugMsg->numParams = numParams; // 136 // 137 mtDebugMsg->param1 = param1; // 138 mtDebugMsg->param2 = param2; // 139 mtDebugMsg->param3 = param3; // 140 mtDebugMsg->timestamp = timestamp; // 141 // 142 osal_msg_send( MT_TaskID, (uint8 *)mtDebugMsg ); // 143 } // 144 // 145 } /* debug_msg() */ // 146 // 147 /********************************************************************* // 148 * @fn debug_str // 149 * // 150 * @brief // 151 * // 152 * This feature allows modules to display a debug text string as // 153 * applications execute in real-time. This feature will output to // 154 * the serial port for display in the Z-Test tool. // 155 * // 156 * This feature will most likely be compiled out in the production // 157 * code in order to save code space. // 158 * // 159 * @param byte *str_ptr - pointer to null-terminated string // 160 * // 161 * @return void // 162 */ // 163 void debug_str( byte *str_ptr ) // 164 { // 165 mtDebugStr_t *msg; // 166 byte mln; // 167 byte strLen; // 168 // 169 // Text string length // 170 strLen = (byte)osal_strlen( (void*)str_ptr ); // 171 // 172 // Debug string message length // 173 mln = sizeof ( mtDebugStr_t ) + strLen; // 174 // 175 // Get a message buffer to build the debug message // 176 msg = (mtDebugStr_t *)osal_msg_allocate( mln ); // 177 if ( msg ) // 178 { // 179 // Message type, length // 180 msg->hdr.event = CMD_DEBUG_STR; // 181 msg->strLen = strLen; // 182 // 183 // Append message, no terminator // 184 msg->pString = (uint8 *)(msg+1); // 185 osal_memcpy ( msg->pString, str_ptr, strLen ); // 186 // 187 osal_msg_send( MT_TaskID, (uint8 *)msg ); // 188 } // 189 } // debug_str() // 190 // 191 /********************************************************************* // 192 *********************************************************************/ // 193 #endif // MT_TASK // // // // // //Errors: none //Warnings: none