536 lines
26 KiB
Plaintext
536 lines
26 KiB
Plaintext
###############################################################################
|
|
#
|
|
# IAR C/C++ Compiler V10.30.1.6000 for 8051 21/May/2019 08:36:38
|
|
# 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 =
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Components\mt\DebugTrace.c
|
|
# Command line =
|
|
# -f C:\Users\97110\AppData\Local\Temp\EW69FE.tmp
|
|
# (C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Components\mt\DebugTrace.c
|
|
# -D NWK_AUTO_POLL -D ZTOOL_P1 -D MT_TASK -D xMT_SYS_FUNC -D MT_ZDO_FUNC
|
|
# -D SAPP_ZSTACK_DEMO -lC
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\Demo\List
|
|
# -lA
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\Demo\List
|
|
# --diag_suppress Pe001,Pa010 -o
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\Demo\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
|
|
# C:\Users\97110\Desktop\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
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\zstack\Tools\CC2530DB\f8wConfig.cfg
|
|
# (-DZIGBEEPRO -DSECURE=0 -DZG_SECURE_DYNAMIC=0 -DREFLECTOR
|
|
# -DDEFAULT_CHANLIST=0x00000800 -DZDAPP_CONFIG_PAN_ID=0x0031
|
|
# -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
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\Source\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\zstack\ZMain\TI2530DB\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\hal\include\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\hal\target\CC2530EB\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\mac\include\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\mac\high_level\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\mac\low_level\srf04\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\mac\low_level\srf04\single_chip\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\mt\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\osal\include\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\services\saddr\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\services\sdata\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\af\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\nwk\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\sapi\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\sec\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\sys\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\stack\zdo\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\zmac\
|
|
# -I
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\..\..\Components\zmac\f8w\
|
|
# -Ohz --require_prototypes --no_code_motion)
|
|
# Locale = Chinese (Simplified)_CHN.936
|
|
# List file =
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\Demo\List\DebugTrace.lst
|
|
# Object file =
|
|
# C:\Users\97110\Desktop\ZStack-CC2530-r200\ZStack-CC2530-r200\Projects\SappWsn\Demo\Obj\DebugTrace.r51
|
|
#
|
|
###############################################################################
|
|
|
|
C:\Users\97110\Desktop\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 */
|
|
|
|
\ In segment BANKED_CODE, align 1, keep-with-next
|
|
115 void debug_msg( byte compID, byte severity, byte numParams, UINT16 param1,
|
|
\ debug_msg:
|
|
116 UINT16 param2, UINT16 param3 )
|
|
117 {
|
|
\ 000000 REQUIRE ?V0
|
|
\ 000000 REQUIRE ?V2
|
|
\ 000000 REQUIRE ?V3
|
|
\ 000000 REQUIRE ?V4
|
|
\ 000000 REQUIRE ?V5
|
|
\ 000000 74F2 MOV A,#-0xe
|
|
\ 000002 12.... LCALL ?BANKED_ENTER_XDATA
|
|
\ 000005 ; Saved register size: 14
|
|
\ 000005 ; Auto size: 0
|
|
\ 000005 E9 MOV A,R1
|
|
\ 000006 FE MOV R6,A
|
|
\ 000007 EA MOV A,R2
|
|
\ 000008 FF MOV R7,A
|
|
\ 000009 8B.. MOV ?V0,R3
|
|
\ 00000B 8C.. MOV ?V4,R4
|
|
\ 00000D 8D.. MOV ?V5,R5
|
|
118
|
|
119 mtDebugMsg_t *mtDebugMsg;
|
|
120 UINT16 timestamp;
|
|
121
|
|
122 if ( debugThreshold == 0 || debugCompId != compID )
|
|
\ 00000F 90.... MOV DPTR,#debugThreshold
|
|
\ 000012 E0 MOVX A,@DPTR
|
|
\ 000013 6068 JZ ??debug_msg_0
|
|
\ 000015 90.... MOV DPTR,#debugCompId
|
|
\ 000018 E0 MOVX A,@DPTR
|
|
\ 000019 6E XRL A,R6
|
|
\ 00001A 6002 JZ ??debug_msg_1
|
|
123 return;
|
|
\ ??debug_msg_2:
|
|
\ 00001C 805F SJMP ??debug_msg_0
|
|
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 ) );
|
|
\ ??debug_msg_1:
|
|
\ 00001E ; Setup parameters for call to function osal_msg_allocate
|
|
\ 00001E 7A0D MOV R2,#0xd
|
|
\ 000020 7B00 MOV R3,#0x0
|
|
\ 000022 12.... LCALL `??osal_msg_allocate::?relay`; Banked call to: osal_msg_allocate
|
|
130 if ( mtDebugMsg )
|
|
\ 000025 EA MOV A,R2
|
|
\ 000026 4B ORL A,R3
|
|
\ 000027 6054 JZ ??debug_msg_0
|
|
131 {
|
|
132 mtDebugMsg->hdr.event = CMD_DEBUG_MSG;
|
|
\ 000029 8A82 MOV DPL,R2
|
|
\ 00002B 8B83 MOV DPH,R3
|
|
\ 00002D 7402 MOV A,#0x2
|
|
\ 00002F F0 MOVX @DPTR,A
|
|
133 mtDebugMsg->compID = compID;
|
|
\ 000030 EE MOV A,R6
|
|
\ 000031 A3 INC DPTR
|
|
\ 000032 A3 INC DPTR
|
|
\ 000033 F0 MOVX @DPTR,A
|
|
134 mtDebugMsg->severity = severity;
|
|
\ 000034 EF MOV A,R7
|
|
\ 000035 8A82 MOV DPL,R2
|
|
\ 000037 8B83 MOV DPH,R3
|
|
\ 000039 A3 INC DPTR
|
|
\ 00003A A3 INC DPTR
|
|
\ 00003B A3 INC DPTR
|
|
\ 00003C 12.... LCALL ?Subroutine2 & 0xFFFF
|
|
135 mtDebugMsg->numParams = numParams;
|
|
\ ??CrossCallReturnLabel_2:
|
|
\ 00003F E5.. MOV A,?V0
|
|
\ 000041 12.... LCALL ?Subroutine2 & 0xFFFF
|
|
136
|
|
137 mtDebugMsg->param1 = param1;
|
|
\ ??CrossCallReturnLabel_3:
|
|
\ 000044 A3 INC DPTR
|
|
\ 000045 E5.. MOV A,?V4
|
|
\ 000047 F0 MOVX @DPTR,A
|
|
\ 000048 A3 INC DPTR
|
|
\ 000049 E5.. MOV A,?V5
|
|
\ 00004B F0 MOVX @DPTR,A
|
|
138 mtDebugMsg->param2 = param2;
|
|
\ 00004C 740E MOV A,#0xe
|
|
\ 00004E 12.... LCALL ?XSTACK_DISP0_8
|
|
\ 000051 12.... LCALL ?Subroutine1 & 0xFFFF
|
|
\ ??CrossCallReturnLabel_0:
|
|
\ 000054 E8 MOV A,R0
|
|
\ 000055 F0 MOVX @DPTR,A
|
|
\ 000056 A3 INC DPTR
|
|
\ 000057 E9 MOV A,R1
|
|
\ 000058 F0 MOVX @DPTR,A
|
|
139 mtDebugMsg->param3 = param3;
|
|
\ 000059 7410 MOV A,#0x10
|
|
\ 00005B 12.... LCALL ?XSTACK_DISP0_8
|
|
\ 00005E 12.... LCALL ?Subroutine1 & 0xFFFF
|
|
\ ??CrossCallReturnLabel_1:
|
|
\ 000061 A3 INC DPTR
|
|
\ 000062 A3 INC DPTR
|
|
\ 000063 E8 MOV A,R0
|
|
\ 000064 F0 MOVX @DPTR,A
|
|
\ 000065 A3 INC DPTR
|
|
\ 000066 E9 MOV A,R1
|
|
\ 000067 F0 MOVX @DPTR,A
|
|
140 mtDebugMsg->timestamp = timestamp;
|
|
\ 000068 EA MOV A,R2
|
|
\ 000069 240B ADD A,#0xb
|
|
\ 00006B F582 MOV DPL,A
|
|
\ 00006D E4 CLR A
|
|
\ 00006E 3B ADDC A,R3
|
|
\ 00006F F583 MOV DPH,A
|
|
\ 000071 E4 CLR A
|
|
\ 000072 F0 MOVX @DPTR,A
|
|
\ 000073 A3 INC DPTR
|
|
\ 000074 F0 MOVX @DPTR,A
|
|
141
|
|
142 osal_msg_send( MT_TaskID, (uint8 *)mtDebugMsg );
|
|
\ 000075 ; Setup parameters for call to function osal_msg_send
|
|
\ 000075 90.... MOV DPTR,#MT_TaskID
|
|
\ 000078 E0 MOVX A,@DPTR
|
|
\ 000079 F9 MOV R1,A
|
|
\ 00007A 12.... LCALL `??osal_msg_send::?relay`; Banked call to: osal_msg_send
|
|
143 }
|
|
144
|
|
145 } /* debug_msg() */
|
|
\ ??debug_msg_0:
|
|
\ 00007D REQUIRE ?Subroutine0
|
|
\ 00007D ; // Fall through to label ?Subroutine0
|
|
|
|
\ In segment BANKED_CODE, align 1, keep-with-next
|
|
\ ?Subroutine0:
|
|
\ 000000 7F06 MOV R7,#0x6
|
|
\ 000002 02.... LJMP ?BANKED_LEAVE_XDATA
|
|
|
|
\ In segment BANKED_CODE, align 1, keep-with-next
|
|
\ ?Subroutine2:
|
|
\ 000000 F0 MOVX @DPTR,A
|
|
\ 000001 8A82 MOV DPL,R2
|
|
\ 000003 8B83 MOV DPH,R3
|
|
\ 000005 A3 INC DPTR
|
|
\ 000006 A3 INC DPTR
|
|
\ 000007 A3 INC DPTR
|
|
\ 000008 A3 INC DPTR
|
|
\ 000009 22 RET
|
|
|
|
\ In segment BANKED_CODE, align 1, keep-with-next
|
|
\ ?Subroutine1:
|
|
\ 000000 E0 MOVX A,@DPTR
|
|
\ 000001 F8 MOV R0,A
|
|
\ 000002 A3 INC DPTR
|
|
\ 000003 E0 MOVX A,@DPTR
|
|
\ 000004 F9 MOV R1,A
|
|
\ 000005 8A82 MOV DPL,R2
|
|
\ 000007 8B83 MOV DPH,R3
|
|
\ 000009 A3 INC DPTR
|
|
\ 00000A A3 INC DPTR
|
|
\ 00000B A3 INC DPTR
|
|
\ 00000C A3 INC DPTR
|
|
\ 00000D A3 INC DPTR
|
|
\ 00000E A3 INC DPTR
|
|
\ 00000F A3 INC DPTR
|
|
\ 000010 22 RET
|
|
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 */
|
|
|
|
\ In segment BANKED_CODE, align 1, keep-with-next
|
|
163 void debug_str( byte *str_ptr )
|
|
\ debug_str:
|
|
164 {
|
|
\ 000000 REQUIRE ?V0
|
|
\ 000000 REQUIRE ?V1
|
|
\ 000000 REQUIRE ?V2
|
|
\ 000000 REQUIRE ?V3
|
|
\ 000000 REQUIRE ?V4
|
|
\ 000000 REQUIRE ?V5
|
|
\ 000000 74F2 MOV A,#-0xe
|
|
\ 000002 12.... LCALL ?BANKED_ENTER_XDATA
|
|
\ 000005 ; Saved register size: 14
|
|
\ 000005 ; Auto size: 0
|
|
\ 000005 8A.. MOV ?V0,R2
|
|
\ 000007 8B.. MOV ?V1,R3
|
|
165 mtDebugStr_t *msg;
|
|
166 byte mln;
|
|
167 byte strLen;
|
|
168
|
|
169 // Text string length
|
|
170 strLen = (byte)osal_strlen( (void*)str_ptr );
|
|
\ 000009 ; Setup parameters for call to function osal_strlen
|
|
\ 000009 12.... LCALL `??osal_strlen::?relay`; Banked call to: osal_strlen
|
|
\ 00000C EA MOV A,R2
|
|
\ 00000D F5.. MOV ?V3,A
|
|
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 );
|
|
\ 00000F ; Setup parameters for call to function osal_msg_allocate
|
|
\ 00000F 7405 MOV A,#0x5
|
|
\ 000011 2A ADD A,R2
|
|
\ 000012 FA MOV R2,A
|
|
\ 000013 7B00 MOV R3,#0x0
|
|
\ 000015 12.... LCALL `??osal_msg_allocate::?relay`; Banked call to: osal_msg_allocate
|
|
\ 000018 8A.. MOV ?V4,R2
|
|
\ 00001A 8B.. MOV ?V5,R3
|
|
\ 00001C AE.. MOV R6,?V4
|
|
\ 00001E AF.. MOV R7,?V5
|
|
177 if ( msg )
|
|
\ 000020 EA MOV A,R2
|
|
\ 000021 4F ORL A,R7
|
|
\ 000022 603F JZ ??debug_str_0
|
|
178 {
|
|
179 // Message type, length
|
|
180 msg->hdr.event = CMD_DEBUG_STR;
|
|
\ 000024 8A82 MOV DPL,R2
|
|
\ 000026 8B83 MOV DPH,R3
|
|
\ 000028 7406 MOV A,#0x6
|
|
\ 00002A F0 MOVX @DPTR,A
|
|
181 msg->strLen = strLen;
|
|
\ 00002B A3 INC DPTR
|
|
\ 00002C A3 INC DPTR
|
|
\ 00002D E5.. MOV A,?V3
|
|
\ 00002F F0 MOVX @DPTR,A
|
|
182
|
|
183 // Append message, no terminator
|
|
184 msg->pString = (uint8 *)(msg+1);
|
|
\ 000030 EA MOV A,R2
|
|
\ 000031 2405 ADD A,#0x5
|
|
\ 000033 FA MOV R2,A
|
|
\ 000034 E4 CLR A
|
|
\ 000035 3F ADDC A,R7
|
|
\ 000036 FB MOV R3,A
|
|
\ 000037 8E82 MOV DPL,R6
|
|
\ 000039 8F83 MOV DPH,R7
|
|
\ 00003B A3 INC DPTR
|
|
\ 00003C A3 INC DPTR
|
|
\ 00003D A3 INC DPTR
|
|
\ 00003E EA MOV A,R2
|
|
\ 00003F F0 MOVX @DPTR,A
|
|
\ 000040 A3 INC DPTR
|
|
\ 000041 EB MOV A,R3
|
|
\ 000042 F0 MOVX @DPTR,A
|
|
185 osal_memcpy ( msg->pString, str_ptr, strLen );
|
|
\ 000043 ; Setup parameters for call to function osal_memcpy
|
|
\ 000043 75..00 MOV ?V2,#0x0
|
|
\ 000046 78.. MOV R0,#?V0
|
|
\ 000048 12.... LCALL ?PUSH_XSTACK_I_THREE
|
|
\ 00004B AC.. MOV R4,?V3
|
|
\ 00004D 7D00 MOV R5,#0x0
|
|
\ 00004F 12.... LCALL `??osal_memcpy::?relay`; Banked call to: osal_memcpy
|
|
\ 000052 7403 MOV A,#0x3
|
|
\ 000054 12.... LCALL ?DEALLOC_XSTACK8
|
|
186
|
|
187 osal_msg_send( MT_TaskID, (uint8 *)msg );
|
|
\ 000057 ; Setup parameters for call to function osal_msg_send
|
|
\ 000057 EE MOV A,R6
|
|
\ 000058 FA MOV R2,A
|
|
\ 000059 EF MOV A,R7
|
|
\ 00005A FB MOV R3,A
|
|
\ 00005B 90.... MOV DPTR,#MT_TaskID
|
|
\ 00005E E0 MOVX A,@DPTR
|
|
\ 00005F F9 MOV R1,A
|
|
\ 000060 12.... LCALL `??osal_msg_send::?relay`; Banked call to: osal_msg_send
|
|
188 }
|
|
189 } // debug_str()
|
|
\ ??debug_str_0:
|
|
\ 000063 02.... LJMP ?Subroutine0 & 0xFFFF
|
|
190
|
|
191 /*********************************************************************
|
|
192 *********************************************************************/
|
|
193 #endif // MT_TASK
|
|
|
|
Maximum stack usage in bytes:
|
|
|
|
ISTACK XSTACK Function
|
|
------ ------ --------
|
|
1 18 debug_msg
|
|
0 14 -> osal_msg_allocate
|
|
0 14 -> osal_msg_send
|
|
1 17 debug_str
|
|
0 17 -> osal_memcpy
|
|
0 14 -> osal_msg_allocate
|
|
0 14 -> osal_msg_send
|
|
0 14 -> osal_strlen
|
|
|
|
|
|
Segment part sizes:
|
|
|
|
Bytes Function/Label
|
|
----- --------------
|
|
5 ?Subroutine0
|
|
17 ?Subroutine1
|
|
10 ?Subroutine2
|
|
125 debug_msg
|
|
102 debug_str
|
|
12 -- Other
|
|
|
|
|
|
259 bytes in segment BANKED_CODE
|
|
12 bytes in segment BANK_RELAYS
|
|
|
|
12 bytes of CODE memory
|
|
259 bytes of HUGECODE memory
|
|
|
|
Errors: none
|
|
Warnings: none
|