mbfuncother.txt 6.93 KB
; generated by Component: ARM Compiler 5.06 update 6 (build 750) Tool: ArmCC [4d3637]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o.\flash\obj\mbfuncother.o --asm_dir=.\Flash\List\ --list_dir=.\Flash\List\ --depend=.\flash\obj\mbfuncother.d --cpu=Cortex-M4.fp --apcs=interwork -O1 --diag_suppress=9931,870 -I..\..\Libraries\CMSIS\Include -I..\..\Libraries\CMSIS\Device\ST\STM32F4xx\Include -I..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc -I..\..\uCOS-III\uC-CPU -I..\..\uCOS-III\uC-LIB -I..\..\uCOS-III\uCOS-III\Ports -I..\..\uCOS-III\uCOS-III\Source -I..\..\uCOS-III\uC-CPU\ARM-Cortex-M4\RealView -I..\..\uCOS-III\uC-LIB\Ports\ARM-Cortex-M4\RealView -I..\..\uCOS-III\uCOS-III\Ports\ARM-Cortex-M4\Generic\RealView -I..\..\User -I..\..\User\bsp -I..\..\User\bsp\inc -I..\..\User\libapp -I..\..\RL-ARM\Config -I..\..\RL-ARM\Driver -I..\..\RL-ARM\RL-RTX\inc -I..\..\User\bsp\BSP -I..\..\RL-ARM\RL-CAN -I..\..\Libraries\DSP_LIB\Include -I..\..\MODBUS\modbus\rtu -I..\..\MODBUS\BARE\port -I..\..\MODBUS\modbus\include -I..\..\User\bsp\BSP -I..\..\PLC -I..\..\Avoid -I..\..\User\parameter -I..\..\User\LaserMotionCtr -I..\..\User\W5100S -I..\..\User\bsp -I..\..\User\CHASSIS -I..\..\User\CONTROLFUNCTION -I..\..\User\DATAUPDATE -I..\..\User\HARAWARE -I..\..\User\MOTORDRIVER -I..\..\User\NAVAGATION -I..\..\User\PLATFORM -I..\..\User\SENSOR -I.\RTE\_Flash -IC:\Users\YDJ\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\YDJ\AppData\Local\Arm\Packs\Keil\STM32F4xx_DFP\2.13.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -D__UVISION_VERSION=527 -D_RTE_ -DSTM32F407xx -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -D__RTX -D__FPU_USED=1 --omf_browse=.\flash\obj\mbfuncother.crf ..\..\MODBUS\modbus\functions\mbfuncother.c]
                          THUMB

                          AREA ||i.eMBFuncReportSlaveID||, CODE, READONLY, ALIGN=2

                  eMBFuncReportSlaveID PROC
;;;80     eMBException
;;;81     eMBFuncReportSlaveID( UCHAR * pucFrame, USHORT * usLen )
000000  b570              PUSH     {r4-r6,lr}
;;;82     {
000002  460c              MOV      r4,r1
;;;83         memcpy( &pucFrame[MB_PDU_DATA_OFF], &ucMBSlaveID[0], ( size_t )usMBSlaveIDLen );
000004  4d05              LDR      r5,|L1.28|
000006  4906              LDR      r1,|L1.32|
000008  1c40              ADDS     r0,r0,#1
00000a  882a              LDRH     r2,[r5,#0]  ; usMBSlaveIDLen
00000c  f7fffffe          BL       __aeabi_memcpy
;;;84         *usLen = ( USHORT )( MB_PDU_DATA_OFF + usMBSlaveIDLen );
000010  8828              LDRH     r0,[r5,#0]  ; usMBSlaveIDLen
000012  1c40              ADDS     r0,r0,#1
000014  8020              STRH     r0,[r4,#0]
;;;85         return MB_EX_NONE;
000016  2000              MOVS     r0,#0
;;;86     }
000018  bd70              POP      {r4-r6,pc}
;;;87     
                          ENDP

00001a  0000              DCW      0x0000
                  |L1.28|
                          DCD      ||.data||
                  |L1.32|
                          DCD      ||.bss||

                          AREA ||i.eMBSetSlaveID||, CODE, READONLY, ALIGN=2

                  eMBSetSlaveID PROC
;;;52     eMBErrorCode
;;;53     eMBSetSlaveID( UCHAR ucSlaveID, BOOL xIsRunning,
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;54                    UCHAR const *pucAdditional, USHORT usAdditionalLen )
;;;55     {
000004  468c              MOV      r12,r1
000006  4607              MOV      r7,r0
000008  4611              MOV      r1,r2
00000a  461c              MOV      r4,r3
;;;56         eMBErrorCode    eStatus = MB_ENOERR;
00000c  2500              MOVS     r5,#0
;;;57     
;;;58         /* the first byte and second byte in the buffer is reserved for
;;;59          * the parameter ucSlaveID and the running flag. The rest of
;;;60          * the buffer is available for additional data. */
;;;61         if( usAdditionalLen + 2 < MB_FUNC_OTHER_REP_SLAVEID_BUF )
00000e  1ca0              ADDS     r0,r4,#2
000010  2820              CMP      r0,#0x20
000012  d216              BCS      |L2.66|
;;;62         {
;;;63             usMBSlaveIDLen = 0;
000014  4e0d              LDR      r6,|L2.76|
;;;64             ucMBSlaveID[usMBSlaveIDLen++] = ucSlaveID;
000016  2001              MOVS     r0,#1
000018  8030              STRH     r0,[r6,#0]
00001a  480d              LDR      r0,|L2.80|
00001c  7007              STRB     r7,[r0,#0]
;;;65             ucMBSlaveID[usMBSlaveIDLen++] = ( UCHAR )( xIsRunning ? 0xFF : 0x00 );
00001e  f1bc0f00          CMP      r12,#0
000022  d001              BEQ      |L2.40|
000024  22ff              MOVS     r2,#0xff
000026  e000              B        |L2.42|
                  |L2.40|
000028  2200              MOVS     r2,#0
                  |L2.42|
00002a  2302              MOVS     r3,#2
00002c  8033              STRH     r3,[r6,#0]
00002e  7042              STRB     r2,[r0,#1]
;;;66             if( usAdditionalLen > 0 )
000030  b144              CBZ      r4,|L2.68|
;;;67             {
;;;68                 memcpy( &ucMBSlaveID[usMBSlaveIDLen], pucAdditional,
000032  1c80              ADDS     r0,r0,#2
000034  4622              MOV      r2,r4
000036  f7fffffe          BL       __aeabi_memcpy
;;;69                         ( size_t )usAdditionalLen );
;;;70                 usMBSlaveIDLen += usAdditionalLen;
00003a  8830              LDRH     r0,[r6,#0]  ; usMBSlaveIDLen
00003c  4420              ADD      r0,r0,r4
00003e  8030              STRH     r0,[r6,#0]
000040  e000              B        |L2.68|
                  |L2.66|
;;;71             }
;;;72         }
;;;73         else
;;;74         {
;;;75             eStatus = MB_ENORES;
000042  2504              MOVS     r5,#4
                  |L2.68|
;;;76         }
;;;77         return eStatus;
000044  4628              MOV      r0,r5
;;;78     }
000046  e8bd81f0          POP      {r4-r8,pc}
;;;79     
                          ENDP

00004a  0000              DCW      0x0000
                  |L2.76|
                          DCD      ||.data||
                  |L2.80|
                          DCD      ||.bss||

                          AREA ||.bss||, DATA, NOINIT, ALIGN=0

                  ucMBSlaveID
                          %        32

                          AREA ||.data||, DATA, ALIGN=1

                  usMBSlaveIDLen
000000  0000              DCB      0x00,0x00

;*** Start embedded assembler ***

#line 1 "..\\..\\MODBUS\\modbus\\functions\\mbfuncother.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___13_mbfuncother_c_c996ba8d____REV16|
#line 129 "..\\..\\Libraries\\CMSIS\\Include\\core_cmInstr.h"
|__asm___13_mbfuncother_c_c996ba8d____REV16| PROC
#line 130

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___13_mbfuncother_c_c996ba8d____REVSH|
#line 144
|__asm___13_mbfuncother_c_c996ba8d____REVSH| PROC
#line 145

 revsh r0, r0
 bx lr
	ENDP
	AREA ||.rrx_text||, CODE
	THUMB
	EXPORT |__asm___13_mbfuncother_c_c996ba8d____RRX|
#line 300
|__asm___13_mbfuncother_c_c996ba8d____RRX| PROC
#line 301

 rrx r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***