mirror of
https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32.git
synced 2025-01-22 21:47:11 +08:00
1、【修改】FreeModbus主机中几处断言逻辑,解决了软件在运行过程中误报断言出错的问题
Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
parent
a421f79264
commit
d5b26b9516
22
.cproject
22
.cproject
@ -37,13 +37,13 @@
|
||||
<tool id="iar.arm.toolchain.compiler.v5.4.1.137030134" name="IAR C/C++ Compiler for ARM" superClass="iar.arm.toolchain.compiler.v5.4.1">
|
||||
<option defaultValue="true" id="iar.arm.toolchain.compiler.option.debugInfo.v5.4.0.2005964005" name="Generate debug information" superClass="iar.arm.toolchain.compiler.option.debugInfo.v5.4.0" valueType="boolean"/>
|
||||
<option defaultValue="iar.arm.toolchain.compiler.option.optLevel.none.v5.4.0" id="iar.arm.toolchain.compiler.option.optLevel.v5.4.0.138043467" name="Optimization level:" superClass="iar.arm.toolchain.compiler.option.optLevel.v5.4.0" value="iar.arm.toolchain.compiler.option.optLevel.low.v5.4.0" valueType="enumerated"/>
|
||||
<option id="iar.arm.toolchain.compiler.option.optCSE.v5.4.0.1260922337" name="Disable common subexpression elimination" superClass="iar.arm.toolchain.compiler.option.optCSE.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option id="iar.arm.toolchain.compiler.option.optUnroll.v5.4.0.960654524" name="Disable loop unrolling" superClass="iar.arm.toolchain.compiler.option.optUnroll.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option id="iar.arm.toolchain.compiler.option.optInline.v5.4.0.408796017" name="Disable function inlining" superClass="iar.arm.toolchain.compiler.option.optInline.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option id="iar.arm.toolchain.compiler.option.optCodeMotion.v5.4.0.645470963" name="Disable code motion" superClass="iar.arm.toolchain.compiler.option.optCodeMotion.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option id="iar.arm.toolchain.compiler.option.optAliasAnalysis.v5.4.0.604513418" name="Disable type-based alias analysis" superClass="iar.arm.toolchain.compiler.option.optAliasAnalysis.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option id="iar.arm.toolchain.compiler.option.optStaticClustering.v5.4.0.387756412" name="Disable static clustering" superClass="iar.arm.toolchain.compiler.option.optStaticClustering.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option id="iar.arm.toolchain.compiler.option.optScheduling.v5.4.0.125024994" name="Disable instruction scheduling" superClass="iar.arm.toolchain.compiler.option.optScheduling.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option defaultValue="true" id="iar.arm.toolchain.compiler.option.optCSE.v5.4.0.1260922337" name="Disable common subexpression elimination" superClass="iar.arm.toolchain.compiler.option.optCSE.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option defaultValue="true" id="iar.arm.toolchain.compiler.option.optUnroll.v5.4.0.960654524" name="Disable loop unrolling" superClass="iar.arm.toolchain.compiler.option.optUnroll.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option defaultValue="true" id="iar.arm.toolchain.compiler.option.optInline.v5.4.0.408796017" name="Disable function inlining" superClass="iar.arm.toolchain.compiler.option.optInline.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option defaultValue="true" id="iar.arm.toolchain.compiler.option.optCodeMotion.v5.4.0.645470963" name="Disable code motion" superClass="iar.arm.toolchain.compiler.option.optCodeMotion.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option defaultValue="true" id="iar.arm.toolchain.compiler.option.optAliasAnalysis.v5.4.0.604513418" name="Disable type-based alias analysis" superClass="iar.arm.toolchain.compiler.option.optAliasAnalysis.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option defaultValue="true" id="iar.arm.toolchain.compiler.option.optStaticClustering.v5.4.0.387756412" name="Disable static clustering" superClass="iar.arm.toolchain.compiler.option.optStaticClustering.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option defaultValue="true" id="iar.arm.toolchain.compiler.option.optScheduling.v5.4.0.125024994" name="Disable instruction scheduling" superClass="iar.arm.toolchain.compiler.option.optScheduling.v5.4.0" value="true" valueType="boolean"/>
|
||||
<option id="iar.arm.toolchain.compiler.option.language.v6.1.0.1547191898" name="Language" superClass="iar.arm.toolchain.compiler.option.language.v6.1.0"/>
|
||||
<option id="iar.arm.toolchain.compiler.option.cppdialect.v6.1.0.1638054484" name="C++ dialect" superClass="iar.arm.toolchain.compiler.option.cppdialect.v6.1.0"/>
|
||||
<option id="iar.arm.toolchain.compiler.option.cpuMode.v5.4.0.1177576854" name="Processor mode:" superClass="iar.arm.toolchain.compiler.option.cpuMode.v5.4.0" value="iar.arm.toolchain.compiler.option.cpuMode.thumb.v5.4.0" valueType="enumerated"/>
|
||||
@ -187,8 +187,13 @@
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.iar.cdt.arm.scanner.IAR_ARM_PerProjectProfile"/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope" versionNumber="1">
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/FreeModbus_Slave&Master+RTT+STM32"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/FreeModbus_Slave&Master+RTT+STM32"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.language.mapping">
|
||||
<project-mappings>
|
||||
@ -200,4 +205,5 @@
|
||||
</project-mappings>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
</cproject>
|
||||
|
@ -258,3 +258,13 @@ void Delay(vu32 nCount)
|
||||
for(; nCount!= 0;nCount--);
|
||||
}
|
||||
|
||||
|
||||
void assert_failed(u8* file, u32 line)
|
||||
{
|
||||
/* User can add his own implementation to report the file name and line number,
|
||||
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
|
||||
/* Infinite loop */
|
||||
while (1)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ xMBMasterRTUReceiveFSM( void )
|
||||
BOOL xTaskNeedSwitch = FALSE;
|
||||
UCHAR ucByte;
|
||||
|
||||
assert_param( eSndState == STATE_M_TX_IDLE );
|
||||
assert_param(( eSndState == STATE_M_TX_IDLE ) || ( eSndState == STATE_M_TX_XFWR ));
|
||||
|
||||
/* Always read the character. */
|
||||
( void )xMBMasterPortSerialGetByte( ( CHAR * ) & ucByte );
|
||||
@ -369,7 +369,8 @@ xMBMasterRTUTimerExpired(void)
|
||||
/* Function called in an illegal state. */
|
||||
default:
|
||||
assert_param(
|
||||
( eRcvState == STATE_M_RX_INIT ) || ( eRcvState == STATE_M_RX_RCV ) || ( eRcvState == STATE_M_RX_ERROR ));
|
||||
( eRcvState == STATE_M_RX_INIT ) || ( eRcvState == STATE_M_RX_RCV ) ||
|
||||
( eRcvState == STATE_M_RX_ERROR ) || ( eRcvState == STATE_M_RX_IDLE ));
|
||||
break;
|
||||
}
|
||||
eRcvState = STATE_M_RX_IDLE;
|
||||
@ -384,7 +385,8 @@ xMBMasterRTUTimerExpired(void)
|
||||
break;
|
||||
/* Function called in an illegal state. */
|
||||
default:
|
||||
assert_param( eSndState == STATE_M_TX_XFWR );
|
||||
assert_param(
|
||||
( eSndState == STATE_M_TX_XFWR ) || ( eSndState == STATE_M_TX_IDLE ));
|
||||
break;
|
||||
}
|
||||
eSndState = STATE_M_TX_IDLE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user