1、【增加】FreeModbus主机离散量输入相关功能,并在app_task.c中增加相应测试用例,测试通过;

2、【修改】user_mb_app.c中涉及到使用xMBUtilSetBits()的几处逻辑,避免xMBUtilSetBits()在操作位数量为0时,出现数据越界及出错的bug;

Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
armink 2013-10-15 11:20:26 +08:00
parent 7ad3e63015
commit a07b2ae87f
14 changed files with 7761 additions and 1347 deletions

View File

@ -49,7 +49,8 @@ void thread_entry_SysMonitor(void* parameter)
usModbusUserData[0] = (USHORT)(rt_tick_get()/10);
usModbusUserData[1] = (USHORT)(rt_tick_get()%10);
ucModbusUserData[0] = 0x1F;
eMBMasterReqWriteMultipleCoils(1,3,5,ucModbusUserData);
eMBMasterReqReadDiscreteInputs(1,3,8);
// eMBMasterReqWriteMultipleCoils(1,3,5,ucModbusUserData);
// eMBMasterReqWriteCoil(1,8,0xFF00);
// eMBMasterReqReadCoils(1,3,8);
// eMBMasterReqReadInputRegister(1,3,2);

File diff suppressed because it is too large Load Diff

View File

@ -1895,6 +1895,9 @@
<file>
<name>$PROJ_DIR$\..\FreeModbus\modbus\functions\mbfunccoils_m.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\FreeModbus\modbus\functions\mbfuncdisc_m.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\FreeModbus\modbus\functions\mbfuncholding_m.c</name>
</file>

View File

@ -17,7 +17,7 @@
<Build><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1215</ColumnWidth1><ColumnWidth2>324</ColumnWidth2><ColumnWidth3>81</ColumnWidth3></Build><TerminalIO/><Debug-Log><ColumnWidth0>19</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log><Find-All-Declarations><ColumnWidth0>580</ColumnWidth0><ColumnWidth1>82</ColumnWidth1><ColumnWidth2>994</ColumnWidth2></Find-All-Declarations></Static>
<Windows>
<Wnd0>
<Wnd2>
<Tabs>
<Tab>
<Identity>TabID-30370-1297</Identity>
@ -25,11 +25,11 @@
<Factory>Workspace</Factory>
<Session>
<NodeDict><ExpandedNode>FreeModbus_Slave&amp;Master+RTT+STM32</ExpandedNode><ExpandedNode>FreeModbus_Slave&amp;Master+RTT+STM32/FreeModbusMaster</ExpandedNode><ExpandedNode>FreeModbus_Slave&amp;Master+RTT+STM32/FreeModbusMaster/Modbus</ExpandedNode></NodeDict></Session>
<NodeDict><ExpandedNode>FreeModbus_Slave&amp;Master+RTT+STM32</ExpandedNode></NodeDict></Session>
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-24390-6730</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-3984-13619</Identity><TabName>Find All Declarations</TabName><Factory>Find-All-Declarations</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1></Windows>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-24390-6730</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-3984-13619</Identity><TabName>Find All Declarations</TabName><Factory>Find-All-Declarations</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
<Editor>
@ -42,7 +42,7 @@
<Top><Row0><Sizes><Toolbar-01bf5d58><key>iaridepm.enu1</key></Toolbar-01bf5d58></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>725</Bottom><Right>241</Right><x>-2</x><y>-2</y><xscreen>456</xscreen><yscreen>101</yscreen><sizeHorzCX>271429</sizeHorzCX><sizeHorzCY>104339</sizeHorzCY><sizeVertCX>144643</sizeVertCX><sizeVertCY>751033</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>206612</sizeHorzCY><sizeVertCX>271429</sizeVertCX><sizeVertCY>104339</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-00f440c8><key>iaridepm.enu1</key></Toolbar-00f440c8></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>725</Bottom><Right>241</Right><x>-2</x><y>-2</y><xscreen>456</xscreen><yscreen>101</yscreen><sizeHorzCX>271429</sizeHorzCX><sizeHorzCY>104339</sizeHorzCY><sizeVertCX>144643</sizeVertCX><sizeVertCY>751033</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>206612</sizeHorzCY><sizeVertCX>271429</sizeVertCX><sizeVertCY>104339</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View File

@ -118,6 +118,8 @@ eMBMasterFuncReadCoils( UCHAR * pucFrame, USHORT * usLen )
usCoilCount = ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_COILCNT_OFF] << 8 );
usCoilCount |= ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_COILCNT_OFF + 1] );
/* Test if the quantity of coils is a multiple of 8. If not last
* byte is only partially field with unused coils set to zero. */
if( ( usCoilCount & 0x0007 ) != 0 )
{
ucByteCount = ( UCHAR )( usCoilCount / 8 + 1 );

View File

@ -0,0 +1,146 @@
/*
* FreeModbus Libary: A portable Modbus implementation for Modbus ASCII/RTU.
* Copyright (C) 2013 Armink <armink.ztl@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* File: $Id: mbfuncdisc_m.c,v 1.60 2013/10/15 8:48:20 Armink Add Master Functions Exp $
*/
/* ----------------------- System includes ----------------------------------*/
#include "stdlib.h"
#include "string.h"
/* ----------------------- Platform includes --------------------------------*/
#include "port.h"
/* ----------------------- Modbus includes ----------------------------------*/
#include "mb.h"
#include "mb_m.h"
#include "mbframe.h"
#include "mbproto.h"
#include "mbconfig.h"
/* ----------------------- Defines ------------------------------------------*/
#define MB_PDU_REQ_READ_ADDR_OFF ( MB_PDU_DATA_OFF + 0 )
#define MB_PDU_REQ_READ_DISCCNT_OFF ( MB_PDU_DATA_OFF + 2 )
#define MB_PDU_REQ_READ_SIZE ( 4 )
#define MB_PDU_FUNC_READ_DISCCNT_OFF ( MB_PDU_DATA_OFF + 0 )
#define MB_PDU_FUNC_READ_VALUES_OFF ( MB_PDU_DATA_OFF + 1 )
#define MB_PDU_FUNC_READ_SIZE_MIN ( 1 )
/* ----------------------- Static functions ---------------------------------*/
eMBException prveMBError2Exception( eMBErrorCode eErrorCode );
/* ----------------------- Start implementation -----------------------------*/
#if MB_MASTER_RTU_ENABLED > 0 || MB_MASTER_ASCII_ENABLED > 0
#if MB_FUNC_READ_COILS_ENABLED > 0
eMBMasterReqErrCode
eMBMasterReqReadDiscreteInputs( UCHAR ucSndAddr, USHORT usDiscreteAddr, USHORT usNDiscreteIn )
{
UCHAR *ucMBFrame;
eMBMasterReqErrCode eErrStatus = MB_MRE_NO_ERR;
if ( xMBMasterGetIsBusy() ) eErrStatus = MB_MRE_MASTER_BUSY;
else if ( ucSndAddr > MB_MASTER_TOTAL_SLAVE_NUM ) eErrStatus = MB_MRE_ILL_ARG;
else
{
vMBMasterGetPDUSndBuf(&ucMBFrame);
vMBMasterSetDestAddress(ucSndAddr);
ucMBFrame[MB_PDU_FUNC_OFF] = MB_FUNC_READ_DISCRETE_INPUTS;
ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF] = usDiscreteAddr >> 8;
ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF + 1] = usDiscreteAddr;
ucMBFrame[MB_PDU_REQ_READ_DISCCNT_OFF ] = usNDiscreteIn >> 8;
ucMBFrame[MB_PDU_REQ_READ_DISCCNT_OFF + 1] = usNDiscreteIn;
vMBMasterSetPDUSndLength( MB_PDU_SIZE_MIN + MB_PDU_REQ_READ_SIZE );
( void ) xMBMasterPortEventPost( EV_MASTER_FRAME_SENT );
}
return eErrStatus;
}
eMBException
eMBMasterFuncReadDiscreteInputs( UCHAR * pucFrame, USHORT * usLen )
{
USHORT usRegAddress;
USHORT usDiscreteCnt;
UCHAR ucNBytes;
UCHAR *ucMBFrame;
eMBException eStatus = MB_EX_NONE;
eMBErrorCode eRegStatus;
if( *usLen >= MB_PDU_SIZE_MIN + MB_PDU_FUNC_READ_SIZE_MIN )
{
vMBMasterGetPDUSndBuf(&ucMBFrame);
usRegAddress = ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF] << 8 );
usRegAddress |= ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_ADDR_OFF + 1] );
usRegAddress++;
usDiscreteCnt = ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_DISCCNT_OFF] << 8 );
usDiscreteCnt |= ( USHORT )( ucMBFrame[MB_PDU_REQ_READ_DISCCNT_OFF + 1] );
/* Test if the quantity of coils is a multiple of 8. If not last
* byte is only partially field with unused coils set to zero. */
if( ( usDiscreteCnt & 0x0007 ) != 0 )
{
ucNBytes = ( UCHAR )( usDiscreteCnt / 8 + 1 );
}
else
{
ucNBytes = ( UCHAR )( usDiscreteCnt / 8 );
}
/* Check if the number of registers to read is valid. If not
* return Modbus illegal data value exception.
*/
if ((usDiscreteCnt >= 1) && ucNBytes == pucFrame[MB_PDU_FUNC_READ_DISCCNT_OFF])
{
/* Make callback to fill the buffer. */
eRegStatus = eMBRegDiscreteCB( &pucFrame[MB_PDU_FUNC_READ_VALUES_OFF], usRegAddress, usDiscreteCnt );
/* If an error occured convert it into a Modbus exception. */
if( eRegStatus != MB_ENOERR )
{
eStatus = prveMBError2Exception( eRegStatus );
}
}
else
{
eStatus = MB_EX_ILLEGAL_DATA_VALUE;
}
}
else
{
/* Can't be a valid read coil register request because the length
* is incorrect. */
eStatus = MB_EX_ILLEGAL_DATA_VALUE;
}
return eStatus;
}
#endif
#endif

View File

@ -212,6 +212,8 @@ eMBMasterReqWriteCoil( UCHAR ucSndAddr, USHORT usCoilAddr, USHORT usCoilData );
eMBMasterReqErrCode
eMBMasterReqWriteMultipleCoils( UCHAR ucSndAddr,
USHORT usCoilAddr, USHORT usNCoils, UCHAR * pucDataBuffer );
eMBMasterReqErrCode
eMBMasterReqReadDiscreteInputs( UCHAR ucSndAddr, USHORT usDiscreteAddr, USHORT usNDiscreteIn );
eMBException
eMBMasterFuncReportSlaveID( UCHAR * pucFrame, USHORT * usLen );

View File

@ -129,8 +129,7 @@ static xMBFunctionHandler xMasterFuncHandlers[MB_FUNC_HANDLERS_MAX] = {
{MB_FUNC_WRITE_MULTIPLE_COILS, eMBMasterFuncWriteMultipleCoils},
#endif
#if MB_FUNC_READ_DISCRETE_INPUTS_ENABLED > 0
//TODO Add Master function define
{MB_FUNC_READ_DISCRETE_INPUTS, eMBFuncReadDiscreteInputs},
{MB_FUNC_READ_DISCRETE_INPUTS, eMBMasterFuncReadDiscreteInputs},
#endif
};

View File

@ -231,7 +231,11 @@ eMBRegCoilsCB( UCHAR * pucRegBuffer, USHORT usAddress, USHORT usNCoils, eMBRegis
iNReg--;
}
usNCoils = usNCoils % 8; //余下的线圈数
xMBUtilSetBits(&pucCoilBuf[iRegIndex++] , iRegBitIndex , usNCoils , *pucRegBuffer++);
if (usNCoils != 0) //xMBUtilSetBits方法 在操作位数量为0时存在bug
{
xMBUtilSetBits(&pucCoilBuf[iRegIndex++], iRegBitIndex, usNCoils,
*pucRegBuffer++);
}
break;
}
}
@ -294,8 +298,12 @@ eMBRegDiscreteCB( UCHAR * pucRegBuffer, USHORT usAddress, USHORT usNDiscrete )
xMBUtilSetBits(&pucDiscreteInputBuf[iRegIndex++] , iRegBitIndex , 8 , *pucRegBuffer++);
iNReg--;
}
usNDiscrete = usNDiscrete % 8; //余下的线圈数
xMBUtilSetBits(&pucDiscreteInputBuf[iRegIndex++] , iRegBitIndex , usNDiscrete , *pucRegBuffer++);
usNDiscrete = usNDiscrete % 8; //余下的线圈数
if (usNDiscrete != 0) //xMBUtilSetBits方法 在操作位数量为0时存在bug
{
xMBUtilSetBits(&pucDiscreteInputBuf[iRegIndex++], iRegBitIndex,
usNDiscrete, *pucRegBuffer++);
}
}
else
{

File diff suppressed because one or more lines are too long

View File

@ -790,6 +790,11 @@
<FileType>1</FileType>
<FilePath>..\FreeModbus\modbus\functions\mbfuncinput_m.c</FilePath>
</File>
<File>
<FileName>mbfuncdisc_m.c</FileName>
<FileType>1</FileType>
<FilePath>..\FreeModbus\modbus\functions\mbfuncdisc_m.c</FilePath>
</File>
</Files>
</Group>
</Groups>
@ -1578,6 +1583,11 @@
<FileType>1</FileType>
<FilePath>..\FreeModbus\modbus\functions\mbfuncinput_m.c</FilePath>
</File>
<File>
<FileName>mbfuncdisc_m.c</FileName>
<FileType>1</FileType>
<FilePath>..\FreeModbus\modbus\functions\mbfuncdisc_m.c</FilePath>
</File>
</Files>
</Group>
</Groups>

View File

@ -37,10 +37,10 @@ I (C:\Program Files\keil\ARM\RV31\INC\assert.h)(0x4BA13B9C)
I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525BB9A6)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525C9519)
I (..\FreeModbus\modbus\include\mbframe.h)(0x52254938)
I (..\FreeModbus\modbus\include\mbutils.h)(0x52082B30)
F (..\APP\src\app_task.c)(0x525BC4BC)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\app_task.o" --omf_browse ".\Output\app_task.crf" --depend ".\Output\app_task.d")
F (..\APP\src\app_task.c)(0x525CA35B)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\app_task.o" --omf_browse ".\Output\app_task.crf" --depend ".\Output\app_task.d")
I (..\APP\inc\app_task.h)(0x521C7499)
I (C:\Program Files\keil\ARM\RV31\INC\stdlib.h)(0x4BD5D7FE)
I (C:\Program Files\keil\ARM\RV31\INC\stdio.h)(0x4BA13B96)
@ -78,7 +78,7 @@ I (C:\Program Files\keil\ARM\RV31\INC\assert.h)(0x4BA13B9C)
I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525BB9A6)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525C9519)
I (..\FreeModbus\modbus\include\mbframe.h)(0x52254938)
I (..\FreeModbus\modbus\include\mbutils.h)(0x52082B30)
F (..\APP\src\stm32f10x_it.c)(0x52082B30)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\stm32f10x_it.o" --omf_browse ".\Output\stm32f10x_it.crf" --depend ".\Output\stm32f10x_it.d")
@ -1112,7 +1112,7 @@ I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mb.h)(0x52286461)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
F (..\FreeModbus\port\user_mb_app.c)(0x52268419)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\user_mb_app.o" --omf_browse ".\Output\user_mb_app.crf" --depend ".\Output\user_mb_app.d")
F (..\FreeModbus\port\user_mb_app.c)(0x525CA9E4)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\user_mb_app.o" --omf_browse ".\Output\user_mb_app.crf" --depend ".\Output\user_mb_app.d")
I (..\FreeModbus\port\user_mb_app.h)(0x5225499F)
I (..\FreeModbus\modbus\include\mb.h)(0x52286461)
I (..\FreeModbus\port\port.h)(0x5225461F)
@ -1144,10 +1144,10 @@ I (C:\Program Files\keil\ARM\RV31\INC\assert.h)(0x4BA13B9C)
I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525BB9A6)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525C9519)
I (..\FreeModbus\modbus\include\mbframe.h)(0x52254938)
I (..\FreeModbus\modbus\include\mbutils.h)(0x52082B30)
F (..\FreeModbus\modbus\mb_m.c)(0x525BB9BE)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\mb_m.o" --omf_browse ".\Output\mb_m.crf" --depend ".\Output\mb_m.d")
F (..\FreeModbus\modbus\mb_m.c)(0x525C9598)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\mb_m.o" --omf_browse ".\Output\mb_m.crf" --depend ".\Output\mb_m.d")
I (C:\Program Files\keil\ARM\RV31\INC\stdlib.h)(0x4BD5D7FE)
I (C:\Program Files\keil\ARM\RV31\INC\string.h)(0x4BA13B9A)
I (..\FreeModbus\port\port.h)(0x5225461F)
@ -1180,7 +1180,7 @@ I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mb.h)(0x52286461)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525BB9A6)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525C9519)
I (..\FreeModbus\modbus\include\mbframe.h)(0x52254938)
I (..\FreeModbus\modbus\include\mbfunc.h)(0x52216A0D)
I (..\FreeModbus\modbus\rtu\mbrtu.h)(0x52256DF1)
@ -1217,7 +1217,7 @@ I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mb.h)(0x52286461)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525BB9A6)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525C9519)
I (..\FreeModbus\modbus\rtu\mbrtu.h)(0x52256DF1)
I (..\FreeModbus\modbus\include\mbframe.h)(0x52254938)
I (..\FreeModbus\modbus\rtu\mbcrc.h)(0x52082B2F)
@ -1314,7 +1314,7 @@ I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mb.h)(0x52286461)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525BB9A6)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525C9519)
F (..\FreeModbus\modbus\functions\mbfuncholding_m.c)(0x525B8EC6)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\mbfuncholding_m.o" --omf_browse ".\Output\mbfuncholding_m.crf" --depend ".\Output\mbfuncholding_m.d")
I (C:\Program Files\keil\ARM\RV31\INC\stdlib.h)(0x4BD5D7FE)
I (C:\Program Files\keil\ARM\RV31\INC\string.h)(0x4BA13B9A)
@ -1348,9 +1348,9 @@ I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mb.h)(0x52286461)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525BB9A6)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525C9519)
I (..\FreeModbus\modbus\include\mbframe.h)(0x52254938)
F (..\FreeModbus\modbus\functions\mbfunccoils_m.c)(0x525BC04F)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\mbfunccoils_m.o" --omf_browse ".\Output\mbfunccoils_m.crf" --depend ".\Output\mbfunccoils_m.d")
F (..\FreeModbus\modbus\functions\mbfunccoils_m.c)(0x525C9395)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\mbfunccoils_m.o" --omf_browse ".\Output\mbfunccoils_m.crf" --depend ".\Output\mbfunccoils_m.d")
I (C:\Program Files\keil\ARM\RV31\INC\stdlib.h)(0x4BD5D7FE)
I (C:\Program Files\keil\ARM\RV31\INC\string.h)(0x4BA13B9A)
I (..\FreeModbus\port\port.h)(0x5225461F)
@ -1383,7 +1383,7 @@ I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mb.h)(0x52286461)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525BB9A6)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525C9519)
I (..\FreeModbus\modbus\include\mbframe.h)(0x52254938)
F (..\FreeModbus\modbus\functions\mbfuncinput_m.c)(0x525B8EA9)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\mbfuncinput_m.o" --omf_browse ".\Output\mbfuncinput_m.crf" --depend ".\Output\mbfuncinput_m.d")
I (C:\Program Files\keil\ARM\RV31\INC\stdlib.h)(0x4BD5D7FE)
@ -1418,5 +1418,40 @@ I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mb.h)(0x52286461)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525BB9A6)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525C9519)
I (..\FreeModbus\modbus\include\mbframe.h)(0x52254938)
F (..\FreeModbus\modbus\functions\mbfuncdisc_m.c)(0x525C96DF)(-c --cpu Cortex-M3 -g -O1 -Otime --apcs=interwork --split_sections -I..\Libaries\CMSIS_MDK\CM3\CoreSupport -I..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x -I..\Libaries\STM32F10x_StdPeriph_Driver\inc -I..\Libaries\USB-FS-Device_Driver\inc -I..\BSP\inc -I..\APP\inc -I..\RT-Thread-1.1.1\include -I..\RT-Thread-1.1.1\libcpu\arm\stm32 -I..\FreeModbus\modbus\include -I..\FreeModbus\modbus\rtu -I..\FreeModbus\port -I "C:\Program Files\keil\ARM\INC" -I "C:\Program Files\keil\ARM\INC\ST\STM32F10x" -DUSE_STDPERIPH_DRIVER -DSTM32F10X_MD -o ".\Output\mbfuncdisc_m.o" --omf_browse ".\Output\mbfuncdisc_m.crf" --depend ".\Output\mbfuncdisc_m.d")
I (C:\Program Files\keil\ARM\RV31\INC\stdlib.h)(0x4BD5D7FE)
I (C:\Program Files\keil\ARM\RV31\INC\string.h)(0x4BA13B9A)
I (..\FreeModbus\port\port.h)(0x5225461F)
I (..\APP\inc\stm32f10x_conf.h)(0x52082B30)
I (..\Libaries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_adc.h)(0x52082B30)
I (..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x\stm32f10x.h)(0x52082B30)
I (..\Libaries\CMSIS_MDK\CM3\CoreSupport\core_cm3.h)(0x52082B30)
I (C:\Program Files\keil\ARM\RV31\INC\stdint.h)(0x4BA13B96)
I (..\Libaries\CMSIS_MDK\CM3\DeviceSupport\ST\STM32F10x\system_stm32f10x.h)(0x52082B2F)
I (..\Libaries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_dma.h)(0x52082B30)
I (..\Libaries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_exti.h)(0x52082B30)
I (..\Libaries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_flash.h)(0x52082B30)
I (..\Libaries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_gpio.h)(0x52082B2F)
I (..\Libaries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_iwdg.h)(0x52082B30)
I (..\Libaries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_rcc.h)(0x52082B30)
I (..\Libaries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_tim.h)(0x52082B30)
I (..\Libaries\STM32F10x_StdPeriph_Driver\inc\stm32f10x_usart.h)(0x52082B30)
I (..\Libaries\STM32F10x_StdPeriph_Driver\inc\misc.h)(0x52082B30)
I (..\FreeModbus\modbus\include\mbconfig.h)(0x521C441D)
I (..\RT-Thread-1.1.1\include\rthw.h)(0x52082B30)
I (..\RT-Thread-1.1.1\include\rtthread.h)(0x52082B2F)
I (..\RT-Thread-1.1.1\include\rtdef.h)(0x52082B30)
I (..\APP\inc\rtconfig.h)(0x52082B30)
I (C:\Program Files\keil\ARM\RV31\INC\stdarg.h)(0x4BD5D7FE)
I (..\RT-Thread-1.1.1\include\rtdebug.h)(0x52082B30)
I (..\RT-Thread-1.1.1\include\rtservice.h)(0x52082B2F)
I (..\RT-Thread-1.1.1\include\rtm.h)(0x52082B2F)
I (C:\Program Files\keil\ARM\RV31\INC\assert.h)(0x4BA13B9C)
I (C:\Program Files\keil\ARM\RV31\INC\inttypes.h)(0x4BA25EFA)
I (..\FreeModbus\modbus\include\mb.h)(0x52286461)
I (..\FreeModbus\modbus\include\mbport.h)(0x5211DC23)
I (..\FreeModbus\modbus\include\mbproto.h)(0x521C4AF2)
I (..\FreeModbus\modbus\include\mb_m.h)(0x525C9519)
I (..\FreeModbus\modbus\include\mbframe.h)(0x52254938)

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff