Browse Source

4G OTA更新测试,串口问题待优化

LAPTOP-KB7QFH2U\ChenJie-PC 2 years ago
parent
commit
46462b6e48

+ 6 - 2
.cproject

@@ -13,7 +13,7 @@
 				</extensions>
 				</extensions>
 			</storageModule>
 			</storageModule>
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
-				<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="com.nxp.s32ds.cle.arm.mbs.arm32.bare.buildArtefact.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=com.nxp.s32ds.cle.arm.mbs.arm32.bare.buildArtefact.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="" id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.exe.debug.222968549" name="Debug_FLASH" parent="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.exe.debug">
+				<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="com.nxp.s32ds.cle.arm.mbs.arm32.bare.buildArtefact.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=com.nxp.s32ds.cle.arm.mbs.arm32.bare.buildArtefact.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="" errorParsers="org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GmakeErrorParser;com.freescale.s32ds.cdt.core.errorParsers.S32DSGNULinkerErrorParser;org.eclipse.cdt.core.GCCErrorParser" id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.exe.debug.222968549" name="Debug_FLASH" parent="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.exe.debug">
 					<folderInfo id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.exe.debug.222968549." name="/" resourcePath="">
 					<folderInfo id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.exe.debug.222968549." name="/" resourcePath="">
 						<toolChain id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.toolchain.debug.1669149124" name="NXP GCC 9.2 for Arm 32-bit Bare-Metal" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.toolchain.debug">
 						<toolChain id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.toolchain.debug.1669149124" name="NXP GCC 9.2 for Arm 32-bit Bare-Metal" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.toolchain.debug">
 							<option defaultValue="true" id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.printsize.1799663837" name="Print size" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.printsize" useByScannerDiscovery="false" valueType="boolean"/>
 							<option defaultValue="true" id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.printsize.1799663837" name="Print size" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.printsize" useByScannerDiscovery="false" valueType="boolean"/>
@@ -119,6 +119,7 @@
 									<listOptionValue builtIn="false" value="m"/>
 									<listOptionValue builtIn="false" value="m"/>
 									<listOptionValue builtIn="false" value="gcc"/>
 									<listOptionValue builtIn="false" value="gcc"/>
 								</option>
 								</option>
+								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.c.linker.option.target.unalignedaccess.252706967" name="Unaligned access" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.c.linker.option.target.unalignedaccess" useByScannerDiscovery="false" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.unalignedaccess.default" valueType="enumerated"/>
 								<inputType id="com.freescale.s32ds.cross.gnu.tool.c.linker.inputType.scriptfile.223205338" superClass="com.freescale.s32ds.cross.gnu.tool.c.linker.inputType.scriptfile"/>
 								<inputType id="com.freescale.s32ds.cross.gnu.tool.c.linker.inputType.scriptfile.223205338" superClass="com.freescale.s32ds.cross.gnu.tool.c.linker.inputType.scriptfile"/>
 							</tool>
 							</tool>
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.tool.cpp.linker.2010049876" name="Standard S32DS C++ Linker" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.tool.cpp.linker">
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.tool.cpp.linker.2010049876" name="Standard S32DS C++ Linker" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.tool.cpp.linker">
@@ -130,6 +131,7 @@
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.endianness.395475268" name="Endianness" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.endianness" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.endianness.little" valueType="enumerated"/>
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.endianness.395475268" name="Endianness" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.endianness" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.endianness.little" valueType="enumerated"/>
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.abi.1916612348" name="Float ABI" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.abi" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.abi.hard" valueType="enumerated"/>
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.abi.1916612348" name="Float ABI" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.abi" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.abi.hard" valueType="enumerated"/>
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.unit.437003658" name="FPU Type" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.unit" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.unit.fpv4spd16" valueType="enumerated"/>
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.unit.437003658" name="FPU Type" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.unit" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.fpu.unit.fpv4spd16" valueType="enumerated"/>
+								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.unalignedaccess.945469418" name="Unaligned access" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.unalignedaccess" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.cpp.linker.option.target.unalignedaccess.default" valueType="enumerated"/>
 							</tool>
 							</tool>
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.archiver.50914677" name="Standard S32DS Archiver" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.archiver"/>
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.archiver.50914677" name="Standard S32DS Archiver" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.archiver"/>
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.339533218" name="Standard S32DS Assembler" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler">
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.339533218" name="Standard S32DS Assembler" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler">
@@ -157,11 +159,12 @@
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.endianness.246218978" name="Endianness" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.endianness" useByScannerDiscovery="false" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.endianness.little" valueType="enumerated"/>
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.endianness.246218978" name="Endianness" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.endianness" useByScannerDiscovery="false" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.endianness.little" valueType="enumerated"/>
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.abi.1586904906" name="Float ABI" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.abi" useByScannerDiscovery="true" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.abi.hard" valueType="enumerated"/>
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.abi.1586904906" name="Float ABI" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.abi" useByScannerDiscovery="true" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.abi.hard" valueType="enumerated"/>
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.unit.1665512193" name="FPU Type" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.unit" useByScannerDiscovery="true" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.unit.fpv4spd16" valueType="enumerated"/>
 								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.unit.1665512193" name="FPU Type" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.unit" useByScannerDiscovery="true" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.fpu.unit.fpv4spd16" valueType="enumerated"/>
+								<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.unalignedaccess.1904480425" name="Unaligned access" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.assembler.option.target.unalignedaccess" useByScannerDiscovery="true" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.unalignedaccess.default" valueType="enumerated"/>
 								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1966293971" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
 								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1966293971" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
 								<inputType id="com.freescale.s32ds.cross.gnu.tool.assembler.inputType.asmfile.1184782747" superClass="com.freescale.s32ds.cross.gnu.tool.assembler.inputType.asmfile"/>
 								<inputType id="com.freescale.s32ds.cross.gnu.tool.assembler.inputType.asmfile.1184782747" superClass="com.freescale.s32ds.cross.gnu.tool.assembler.inputType.asmfile"/>
 							</tool>
 							</tool>
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.createflash.655082520" name="Standard S32DS Create Flash Image" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.createflash">
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.createflash.655082520" name="Standard S32DS Create Flash Image" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.createflash">
-								<option id="com.freescale.s32ds.cross.gnu.option.createflash.choice.1356908850" name="Output file format (-O)" superClass="com.freescale.s32ds.cross.gnu.option.createflash.choice" useByScannerDiscovery="false" value="com.freescale.s32ds.cross.gnu.option.createflash.choice.ihex" valueType="enumerated"/>
+								<option id="com.freescale.s32ds.cross.gnu.option.createflash.choice.1356908850" name="Output file format (-O)" superClass="com.freescale.s32ds.cross.gnu.option.createflash.choice" useByScannerDiscovery="false" value="com.freescale.s32ds.cross.gnu.option.createflash.choice.binary" valueType="enumerated"/>
 							</tool>
 							</tool>
 							<tool id="com.freescale.s32ds.cross.gnu.tool.createlisting.958717661" name="Standard S32DS Create Listing" superClass="com.freescale.s32ds.cross.gnu.tool.createlisting">
 							<tool id="com.freescale.s32ds.cross.gnu.tool.createlisting.958717661" name="Standard S32DS Create Listing" superClass="com.freescale.s32ds.cross.gnu.tool.createlisting">
 								<option id="com.freescale.s32ds.cross.gnu.option.createlisting.source.623943954" name="Display source (--source|-S)" superClass="com.freescale.s32ds.cross.gnu.option.createlisting.source" value="true" valueType="boolean"/>
 								<option id="com.freescale.s32ds.cross.gnu.option.createlisting.source.623943954" name="Display source (--source|-S)" superClass="com.freescale.s32ds.cross.gnu.option.createlisting.source" value="true" valueType="boolean"/>
@@ -190,6 +193,7 @@
 							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.abi.2049331992.1277828703" name="Float ABI" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.abi.2049331992"/>
 							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.abi.2049331992.1277828703" name="Float ABI" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.abi.2049331992"/>
 							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.unit.515607088.1728449705" name="FPU Type" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.unit.515607088"/>
 							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.unit.515607088.1728449705" name="FPU Type" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.unit.515607088"/>
 							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.createflash.118878663.1453625427" name="Create flash image" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.createflash.118878663"/>
 							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.createflash.118878663.1453625427" name="Create flash image" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.createflash.118878663"/>
+							<option defaultValue="true" id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.printsize.536059321" name="Print size" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.printsize" valueType="boolean"/>
 							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
 							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.tool.c.compiler.560052675" name="Standard S32DS C Compiler" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.tool.c.compiler.1980082058">
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.tool.c.compiler.560052675" name="Standard S32DS C Compiler" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.tool.c.compiler.1980082058">
 								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.include.paths.1843278825" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
 								<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="gnu.c.compiler.option.include.paths.1843278825" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">

+ 4 - 4
.settings/language.settings.xml

@@ -5,7 +5,7 @@
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="317783601230043299" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1869165178597326029" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 			</provider>
 			</provider>
@@ -16,7 +16,7 @@
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="317783601230043299" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1869165178597326029" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 			</provider>
 			</provider>
@@ -27,7 +27,7 @@
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="317783601230043299" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1869165178597326029" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 			</provider>
 			</provider>
@@ -38,7 +38,7 @@
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
 			<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="317783601230043299" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1869165178597326029" id="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT S32DS Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.gcc"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 				<language-scope id="org.eclipse.cdt.core.g++"/>
 			</provider>
 			</provider>

+ 1 - 1
Project_Settings/Debugger/S32K146_4G_Debug_FLASH_PNE.launch

@@ -216,5 +216,5 @@
 </listAttribute>
 </listAttribute>
 <stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536806032&quot; label=&quot;RX_Buffer[UART_LPUART2]&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536823956&quot; label=&quot;GpsBufferGet&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;255&quot; label=&quot;SocketId&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionList&gt;&#13;&#10;"/>
 <stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536806032&quot; label=&quot;RX_Buffer[UART_LPUART2]&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536823956&quot; label=&quot;GpsBufferGet&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;255&quot; label=&quot;SocketId&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionList&gt;&#13;&#10;"/>
 <stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
 <stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
-<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0x1fff4b50,0x1fff0103,1fff3798,0x1fff3798,0x1fffab2c,0x1fffa82c,0x1fff01f3,0x1fff050e,0,0x14200,0x14000,0x0,0x1fff051d,0x1fff04e8,0x1fff04fc"/>
+<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0x14000,0x0,0x1fff051d,0x1fff04e8,0x1fff04fc,0x80000,0x1fffbdc2,0x1fffbd82,0x80200,0x8000,0x1fffbdd3,0x1fffbdcb,0x1fffbe4b,0x1fffbd8d,0x1fffbe20"/>
 </launchConfiguration>
 </launchConfiguration>

+ 624 - 0
generate/include/Mcal.h

@@ -0,0 +1,624 @@
+/*==================================================================================================
+* Project : RTD AUTOSAR 4.4
+* Platform : CORTEXM
+* Peripheral : S32K14X
+* Dependencies : none
+*
+* Autosar Version : 4.4.0
+* Autosar Revision : ASR_REL_4_4_REV_0000
+* Autosar Conf.Variant :
+* SW Version : 1.0.0
+* Build Version : S32K1_RTD_1_0_0_HF01_D2109_ASR_REL_4_4_REV_0000_20210907
+*
+* (c) Copyright 2020-2021 NXP Semiconductors
+* All Rights Reserved.
+*
+* NXP Confidential. This software is owned or controlled by NXP and may only be
+* used strictly in accordance with the applicable license terms. By expressly
+* accepting such terms or by downloading, installing, activating and/or otherwise
+* using the software, you are agreeing that you have read, and that you agree to
+* comply with and are bound by, such license terms. If you do not agree to be
+* bound by the applicable license terms, then you may not retain, install,
+* activate or otherwise use the software.
+==================================================================================================*/
+/**
+*   @file           Mcal.h
+*   @implements     Mcal.h_Artifact
+*   @version 1.0.0
+*
+*   @brief   AUTOSAR Base - SWS Compiler abstraction specific for MCAL.
+*   @details The file Mcal.h provides MCAL specific macros used for compiler abstraction.
+*
+*
+*   @addtogroup BASE_COMPONENT
+*   @{
+*/
+
+
+#ifndef MCAL_H
+#define MCAL_H
+
+#ifdef __cplusplus
+extern "C"{
+#endif
+
+/*==================================================================================================
+*                                        INCLUDE FILES
+* 1) system and project includes
+* 2) needed interfaces from external units
+* 3) internal and external interfaces from this unit
+==================================================================================================*/
+/*
+* @file        Mcal.h
+* @brief Include compiler abstraction
+*/
+#include "Compiler.h"
+/*
+* @file        Mcal.h
+* @brief Include standard types
+*/
+#include "StandardTypes.h"
+
+#include "Soc_Ips.h"
+
+#include "Reg_eSys.h"
+
+#include "OsIf_Internal.h"
+
+/*==================================================================================================
+*                              SOURCE FILE VERSION INFORMATION
+==================================================================================================*/
+#define MCAL_VENDOR_ID                    43
+/** @violates @ref Mcal_h_REF_2 unused macro. */
+#define MCAL_MODULE_ID                    0
+#define MCAL_AR_RELEASE_MAJOR_VERSION     4
+#define MCAL_AR_RELEASE_MINOR_VERSION     4
+#define MCAL_AR_RELEASE_REVISION_VERSION  0
+#define MCAL_SW_MAJOR_VERSION             1
+#define MCAL_SW_MINOR_VERSION             0
+#define MCAL_SW_PATCH_VERSION             0
+
+/*==================================================================================================
+*                                     FILE VERSION CHECKS
+==================================================================================================*/
+#ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
+    /* Check if source file and Compiler.h header file are of the same Autosar version */
+    #if ((MCAL_AR_RELEASE_MAJOR_VERSION != COMPILER_AR_RELEASE_MAJOR_VERSION) || \
+         (MCAL_AR_RELEASE_MINOR_VERSION != COMPILER_AR_RELEASE_MINOR_VERSION))
+        #error "AutoSar Version Numbers of Mcal.h and Compiler.h are different"
+    #endif
+#endif
+
+#ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
+    /* Check if source file and StandardTypes.h header file are of the same Autosar version */
+    #if ((MCAL_AR_RELEASE_MAJOR_VERSION != STD_AR_RELEASE_MAJOR_VERSION) || \
+         (MCAL_AR_RELEASE_MINOR_VERSION != STD_AR_RELEASE_MINOR_VERSION))
+        #error "AutoSar Version Numbers of Mcal.h and StandardTypes.h are different"
+    #endif
+#endif
+
+#ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
+    /* Check if source file and StandardTypes.h header file are of the same Autosar version */
+    #if ((MCAL_AR_RELEASE_MAJOR_VERSION != REG_ESYS_AR_RELEASE_MAJOR_VERSION) || \
+         (MCAL_AR_RELEASE_MINOR_VERSION != REG_ESYS_AR_RELEASE_MINOR_VERSION))
+        #error "AutoSar Version Numbers of Mcal.h and Reg_eSys.h are different"
+    #endif
+#endif
+
+/* Check if source file and Soc_Ips.h header file have same versions */
+#if (MCAL_VENDOR_ID  != SOC_IPS_VENDOR_ID)
+#error "Soc_Ips.h and Mcal.h have different vendor IDs"
+#endif
+
+/* Check if source file and Soc_Ips.h header file are of the same Autosar version */
+#if ((MCAL_AR_RELEASE_MAJOR_VERSION != SOC_IPS_AR_RELEASE_MAJOR_VERSION) || \
+     (MCAL_AR_RELEASE_MINOR_VERSION != SOC_IPS_AR_RELEASE_MINOR_VERSION))
+    #error "AutoSar Version Numbers of Mcal.h and Soc_Ips.h are different"
+#endif
+
+#if ((MCAL_SW_MAJOR_VERSION != SOC_IPS_SW_MAJOR_VERSION) || \
+     (MCAL_SW_MINOR_VERSION != SOC_IPS_SW_MINOR_VERSION) || \
+     (MCAL_SW_PATCH_VERSION != SOC_IPS_SW_PATCH_VERSION))
+    #error "Software Version Numbers of Soc_Ips.h and Mcal.h are different"
+#endif
+/*==================================================================================================
+*                                         CONSTANTS
+==================================================================================================*/
+
+/*==================================================================================================
+*                                      DEFINES AND MACROS
+==================================================================================================*/   
+
+/**************************************** Green Hills *********************************************/
+#ifdef _GREENHILLS_C_S32K1XX_
+    /**
+    * @brief Compiler abstraction for the asm keyword.
+    */    
+    #define ASM_KEYWORD  __asm
+
+    /**
+    * @brief Compiler abstraction for the intrinsic wait instruction.
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define EXECUTE_WAIT()  \
+                do  \
+                {   \
+                    OsIf_ResumeAllInterrupts();  \
+                    ASM_KEYWORD("  wfi");   \
+                    OsIf_SuspendAllInterrupts(); \
+                } while (0)
+
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_START(sec_name, align)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define VAR_ALIGN(v, size) __attribute__(( aligned(size) )) v;
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_STOP()
+    
+   /**
+    * @brief Compiler abstraction for the packed qualifier
+    */
+    #define PACKED __packed 
+
+    /**
+     * @brief Compiler abstraction for MCAL Fault Injection tests 
+    */
+    #ifdef MCAL_ENABLE_FAULT_INJECTION
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_PUT_IN_QUOTES(x) #x
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_FAULT_INJECTION_POINT(label) ASM_KEYWORD(MCAL_PUT_IN_QUOTES(label::))
+    #else
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_FAULT_INJECTION_POINT(label)
+    #endif
+        
+#endif /* #ifdef _GREENHILLS_C_S32K1XX_ */
+
+/**************************************** Wind River Diab *****************************************/
+#ifdef _DIABDATA_C_S32K1XX_
+    /**
+    * @brief Compiler abstraction for the asm keyword.
+    */
+    #define ASM_KEYWORD  __asm volatile
+
+    /**
+    * @brief Compiler abstraction for the intrinsic wait instruction.
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define EXECUTE_WAIT()  \
+                do  \
+                {   \
+                    OsIf_ResumeAllInterrupts();              \
+                    ASM_KEYWORD(" wfi");  \
+                    OsIf_SuspendAllInterrupts();             \
+                } while (0)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_START(sec_name, align)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define VAR_ALIGN(v, size) __attribute__(( aligned(size) )) v;
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_STOP()
+    
+    /**
+     * @brief Compiler abstraction for the packed qualifier
+     */
+    #define PACKED __attribute__((packed)) 
+    
+    /**
+     * @brief Compiler abstraction for MCAL Fault Injection tests 
+    */
+    #ifdef MCAL_ENABLE_FAULT_INJECTION
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_PUT_IN_QUOTES(x) #x
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_FAULT_INJECTION_POINT(label) ASM_KEYWORD(MCAL_PUT_IN_QUOTES(label:))
+    #else
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_FAULT_INJECTION_POINT(label)
+    #endif
+
+#endif /* #ifdef _DIABDATA_C_S32K1XX_ */
+
+/*************************************** CodeWarrior **********************************************/
+#ifdef _CODEWARRIOR_C_S32K1XX_
+    /**
+    * @brief Compiler abstraction for the asm keyword.
+    */
+    #define ASM_KEYWORD  asm
+
+    /**
+    * @brief Compiler abstraction for the intrinsic wait instruction.
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define EXECUTE_WAIT()  \
+                do  \
+                {   \
+                    OsIf_ResumeAllInterrupts();                  \
+                    ASM_KEYWORD (" opword 0x7C00007C");     \
+                    OsIf_SuspendAllInterrupts();                 \
+                } while (0)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_START(sec_name, align)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define VAR_ALIGN(v, size) v __attribute__(( aligned(size) ));
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_STOP()
+    
+    /**
+    * @brief Compiler abstraction for the packed qualifier
+    */
+    #define PACKED __packed 
+
+#endif /* #ifdef _CODEWARRIOR_C_S32K1XX_ */
+
+/*************************************** Cosmic ***************************************************/
+#ifdef _COSMIC_C_S32K1XX_
+    /**
+    * @brief Compiler abstraction for the asm keyword.
+    */
+    #define ASM_KEYWORD  _asm
+    /**
+    * @brief Compiler abstraction for the asm keyword.
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ASM_PUBLIC_LABEL(label)  _asm("\txdef\t" #label "\n" #label ":")
+
+    /**
+    * @brief Compiler abstraction for the intrinsic wait instruction.
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define EXECUTE_WAIT()  \
+                do  \
+                {   \
+                    OsIf_ResumeAllInterrupts();                  \
+                    ASM_KEYWORD (" dc.l 0x7C00007C");       \
+                    OsIf_SuspendAllInterrupts();                 \
+                } while (0)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    #define ALIGNED_VARS_START(sec_name, align) \#pragma section [sec_name ## align]
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    #define VAR_ALIGN(v, size) v;
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    #define ALIGNED_VARS_STOP() \#pragma section []
+#endif /* #ifdef _COSMIC_C_S32K1XX_ */
+
+/*************************************** HighTec **********************************************/
+#ifdef _HITECH_C_S32K1XX_
+    /**
+    * @brief Compiler abstraction for the asm keyword.
+    */
+    #define ASM_KEYWORD  __asm
+
+    /**
+    * @brief Compiler abstraction for the intrinsic wait instruction.
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define EXECUTE_WAIT()  \
+                do  \
+                {   \
+                    OsIf_ResumeAllInterrupts();                  \
+                    ASM_KEYWORD("  wait");                  \
+                    OsIf_SuspendAllInterrupts();                 \
+                } while (0)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_START(sec_name, align)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define VAR_ALIGN(v, size) __attribute__(( aligned(size) )) v;
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_STOP()
+#endif /* #ifdef _HITECH_C_S32K1XX_ */
+/**************************************** Linaro *********************************************/
+#ifdef _LINARO_C_S32K1XX_
+    /**
+    * @brief Compiler abstraction for the asm keyword.
+    */    
+    #define ASM_KEYWORD  __asm
+    /**
+    * @brief Compiler abstraction for the intrinsic wait instruction.
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define EXECUTE_WAIT()  \
+                do  \
+                {   \
+                    OsIf_ResumeAllInterrupts();                  \
+                    ASM_KEYWORD("  wfi");                   \
+                    OsIf_SuspendAllInterrupts();                 \
+                } while (0)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_START(sec_name, align)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define VAR_ALIGN(v, size) __attribute__(( aligned(size) )) v;
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_STOP()
+    
+    /**
+     * @brief Compiler abstraction for the packed qualifier
+     */
+    #define PACKED __attribute__((__packed__))
+    
+    /**
+     * @brief Compiler abstraction for MCAL Fault Injection tests 
+    */
+    #ifdef MCAL_ENABLE_FAULT_INJECTION
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_PUT_IN_QUOTES(x) #x
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_FAULT_INJECTION_POINT(label) ASM_KEYWORD(MCAL_PUT_IN_QUOTES(label:))
+    #else
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_FAULT_INJECTION_POINT(label)
+    #endif
+  
+#endif /* #ifdef _LINARO_C_S32K1XX_ */
+
+/**************************************** DS5 *********************************************/
+#ifdef _ARM_DS5_C_S32K1XX_
+    /**
+    * @brief Compiler abstraction for the asm keyword.
+    */    
+    #define ASM_KEYWORD  __asm
+    /**
+    * @brief Compiler abstraction for the intrinsic wait instruction.
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define EXECUTE_WAIT()  \
+                do  \
+                {   \
+                    OsIf_ResumeAllInterrupts();                  \
+                    ASM_KEYWORD("  wfi");                   \
+                    OsIf_SuspendAllInterrupts();                 \
+                } while (0)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_START(sec_name, align)
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define VAR_ALIGN(v, size) __align(size) v;
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define ALIGNED_VARS_STOP()
+    /**
+     * @brief Compiler abstraction for the packed qualifier
+     */
+    #define PACKED __packed 
+    
+    /**
+     * @brief Compiler abstraction for MCAL Fault Injection tests 
+    */
+    #ifdef MCAL_ENABLE_FAULT_INJECTION
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_PUT_IN_QUOTES(x) #x
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_FAULT_INJECTION_POINT(label) ASM_KEYWORD(MCAL_PUT_IN_QUOTES(label:))
+    #else
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_FAULT_INJECTION_POINT(label)
+    #endif
+    
+#endif /* #ifdef _ARM_DS5_C_S32K1XX_ */
+/**************************************** IAR *********************************************/
+#ifdef _IAR_C_S32K1XX_
+    
+    /**
+    * @brief Compiler abstraction for the "Put in Quotes".
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define MCAL_PUT_IN_QUOTES(x) #x
+    /**
+    * @brief Compiler abstraction for the "Double Put in Quotes" - Used by VAL_ALIGN.
+    */
+    /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+    #define MCAL_PUT_IN_QUOTES1(x) MCAL_PUT_IN_QUOTES(x)
+
+    /**
+    * @brief Compiler abstraction for the asm keyword.
+    */    
+    #define ASM_KEYWORD  __asm
+
+    /**
+    * @brief Compiler abstraction for the intrinsic wait instruction.
+    */
+    /*
+    * @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro.
+    */
+    #define EXECUTE_WAIT()  \
+                do  \
+                {   \
+                    OsIf_ResumeAllInterrupts();                  \
+                    ASM_KEYWORD("  wfi");                   \
+                    OsIf_SuspendAllInterrupts();                 \
+                } while (0)
+
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /*
+    * @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro.
+    */
+    #define ALIGNED_VARS_START(sec_name, align) 
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /*
+    * @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro.
+    */
+    #define VAR_ALIGN(v, size)  _Pragma(MCAL_PUT_IN_QUOTES1(data_alignment=size)) \
+                                v;
+    /**
+    * @brief Compiler abstraction for the data alignment
+    */
+    /*
+    * @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro.
+    */
+    #define ALIGNED_VARS_STOP() 
+    
+   /**
+    * @brief Compiler abstraction for the packed qualifier
+    */
+    /*
+    * @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro.
+    */
+    #define PACKED __packed 
+        
+    /**
+     * @brief Compiler abstraction for MCAL Fault Injection tests 
+    */
+    #ifdef MCAL_ENABLE_FAULT_INJECTION
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_FAULT_INJECTION_POINT(label)   ASM_KEYWORD(MCAL_PUT_IN_QUOTES(label:))
+    #else
+        /**  @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro. */
+        #define MCAL_FAULT_INJECTION_POINT(label)
+    #endif
+        
+#endif /* #ifdef _IAR_C_S32K1XX_ */
+
+/* check that the compiler used is supported (otherwise some defines might not exist) */
+#ifndef _GREENHILLS_C_S32K1XX_
+    #ifndef _DIABDATA_C_S32K1XX_
+        #ifndef _CODEWARRIOR_C_S32K1XX_
+            #ifndef _COSMIC_C_S32K1XX_
+                #ifndef _HITECH_C_S32K1XX_
+                    #ifndef _LINARO_C_S32K1XX_
+                        #ifndef _ARM_DS5_C_S32K1XX_
+                            #ifndef _IAR_C_S32K1XX_
+                                #error "Unsupported compiler. Compiler abstraction needs to be updated to use this compiler."
+                            #endif    
+                        #endif
+                    #endif
+                #endif
+            #endif
+        #endif
+    #endif
+#endif
+#if (MCAL_PLATFORM_ARM  == MCAL_ARM_AARCH64)
+/**
+* @brief Data Synchronization Barrier (DSB) completes when all instructions before this instruction complete
+*/
+/*
+* @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro.
+*/
+#define MCAL_DATA_SYNC_BARRIER()  ASM_KEYWORD("dsb sy":::"memory")
+/**
+* @brief  flushes the pipeline in the processor, so that all instructions following the ISB are fetched from cache or memory, after the ISB has been completed.
+*/
+/*
+* @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro.
+*/
+#define MCAL_INSTRUCTION_SYNC_BARRIER()  ASM_KEYWORD("isb":::"memory")
+#else
+/**
+* @brief Data Synchronization Barrier (DSB) completes when all instructions before this instruction complete
+*/
+/*
+* @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro.
+*/
+#define MCAL_DATA_SYNC_BARRIER()  ASM_KEYWORD(" DSB")
+
+/**
+* @brief  flushes the pipeline in the processor, so that all instructions following the ISB are fetched from cache or memory, after the ISB has been completed.
+*/
+/*
+* @violates @ref Mcal_h_REF_1 A function should be used in preference to a function-like macro.
+*/
+#define MCAL_INSTRUCTION_SYNC_BARRIER()  ASM_KEYWORD(" ISB")
+#endif
+
+#if defined(MCAL_PLATFORM_ARM_M4) || defined(MCAL_PLATFORM_ARM_M4F)
+    #if !defined(USING_OS_AUTOSAROS)
+        #define EXIT_INTERRUPT()  MCAL_DATA_SYNC_BARRIER()   /* DSB sy full system */
+    #else
+        #define EXIT_INTERRUPT()
+    #endif /* !defined(USING_OS_AUTOSAROS) */
+#else
+    #define EXIT_INTERRUPT()
+#endif
+
+/*==================================================================================================
+*                                             ENUMS
+==================================================================================================*/
+
+/*==================================================================================================
+*                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+/**
+* @brief Typedef for DEM error management implemented by MCAL drivers
+*/
+typedef struct
+{
+    uint32 state;   /**< enabling/disabling the DEM error: Active=STD_ON/ Inactive=STD_OFF */
+    uint32 id ;     /**< ID of DEM error (0 if STD_OFF)*/
+}Mcal_DemErrorType; 
+/*==================================================================================================
+*                                 GLOBAL VARIABLE DECLARATIONS
+==================================================================================================*/
+
+/*==================================================================================================
+*                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* #ifndef MCAL_H */
+
+/** @} */

+ 11 - 10
src/AppFuncLib.c

@@ -440,6 +440,7 @@ uint16 crc_chk(uint8 *data, uint8 length)
  */
  */
 void Fota_Func(uint8 *DataPtr, sint32 connectId)
 void Fota_Func(uint8 *DataPtr, sint32 connectId)
 {
 {
+	static uint32 currentAddr = 0;
     Fota_Type Fota_S;
     Fota_Type Fota_S;
     uint8 Fota_Answer[43];
     uint8 Fota_Answer[43];
     uint8 Fota_Cmd;
     uint8 Fota_Cmd;
@@ -486,25 +487,25 @@ void Fota_Func(uint8 *DataPtr, sint32 connectId)
         {
         {
             Fota_S.Fota_All_Data_Len = *(DataPtr + 33) << 24 | *(DataPtr + 34) << 16 | *(DataPtr + 35) << 8 | *(DataPtr + 36);
             Fota_S.Fota_All_Data_Len = *(DataPtr + 33) << 24 | *(DataPtr + 34) << 16 | *(DataPtr + 35) << 8 | *(DataPtr + 36);
             Fota_S.Fota_Current_Addres = *(DataPtr + 37) << 24 | *(DataPtr + 38) << 16 | *(DataPtr + 39) << 8 | *(DataPtr + 40);
             Fota_S.Fota_Current_Addres = *(DataPtr + 37) << 24 | *(DataPtr + 38) << 16 | *(DataPtr + 39) << 8 | *(DataPtr + 40);
+            currentAddr = Fota_S.Fota_Current_Addres;
             Fota_S.Fota_Recv_Data_Len = *(DataPtr + 41);
             Fota_S.Fota_Recv_Data_Len = *(DataPtr + 41);
-            memset(Fota_S.Fota_Recv_Data, 0x00, 100);
-            memcpy(Fota_S.Fota_Recv_Data, (DataPtr + 42), *(DataPtr + 41));
-            Fota_S.Fota_CRC = Fota_crc_chk(Fota_S.Fota_Recv_Data, Fota_S.Fota_Recv_Data_Len);
+            Fota_S.Fota_Recv_DataPtr = (DataPtr + 42);
+            Fota_S.Fota_CRC = Fota_crc_chk(Fota_S.Fota_Recv_DataPtr, Fota_S.Fota_Recv_Data_Len);
             if (Fota_S.Fota_CRC == *(DataPtr + Fota_S.Fota_Recv_Data_Len + 42))
             if (Fota_S.Fota_CRC == *(DataPtr + Fota_S.Fota_Recv_Data_Len + 42))
             {
             {
-                uint8 Fota_Recv_Data_Len_4 = 0;
-                if (Fota_S.Fota_Recv_Data_Len % 4 != 0)
+                uint8 Fota_Recv_Data_Len_8 = 0;
+                if (Fota_S.Fota_Recv_Data_Len % FLS_INTERNAL_WRITE_SIZE != 0)
                 {
                 {
-                    Fota_Recv_Data_Len_4 = Fota_S.Fota_Recv_Data_Len + 4 - (Fota_S.Fota_Recv_Data_Len % 4);
+                	Fota_Recv_Data_Len_8 = Fota_S.Fota_Recv_Data_Len + FLS_INTERNAL_WRITE_SIZE - (Fota_S.Fota_Recv_Data_Len % FLS_INTERNAL_WRITE_SIZE);
                 }
                 }
                 else
                 else
                 {
                 {
-                    Fota_Recv_Data_Len_4 = Fota_S.Fota_Recv_Data_Len;
+                	Fota_Recv_Data_Len_8 = Fota_S.Fota_Recv_Data_Len;
                 }
                 }
                 Data_Read_Buffer = malloc(Fota_S.Fota_Recv_Data_Len);
                 Data_Read_Buffer = malloc(Fota_S.Fota_Recv_Data_Len);
-                Hal_FlsWrite(Fota_S.Fota_Flash_Addres + Fota_S.Fota_Current_Addres, Fota_S.Fota_Recv_Data, Fota_Recv_Data_Len_4, 10);
+                Hal_FlsWrite(Fota_S.Fota_Flash_Addres + Fota_S.Fota_Current_Addres, Fota_S.Fota_Recv_DataPtr, Fota_Recv_Data_Len_8, 100);
                 memset(Data_Read_Buffer, 0x00, Fota_S.Fota_Recv_Data_Len);
                 memset(Data_Read_Buffer, 0x00, Fota_S.Fota_Recv_Data_Len);
-                Hal_FlsRead(Fota_S.Fota_Flash_Addres + Fota_S.Fota_Current_Addres, Data_Read_Buffer, Fota_S.Fota_Recv_Data_Len, 10);
+                Hal_FlsRead(Fota_S.Fota_Flash_Addres + Fota_S.Fota_Current_Addres, Data_Read_Buffer, Fota_S.Fota_Recv_Data_Len, 100);
                 Data_Read_Crc = Fota_crc_chk(Data_Read_Buffer, Fota_S.Fota_Recv_Data_Len);
                 Data_Read_Crc = Fota_crc_chk(Data_Read_Buffer, Fota_S.Fota_Recv_Data_Len);
                 if (Data_Read_Crc == Fota_S.Fota_CRC)
                 if (Data_Read_Crc == Fota_S.Fota_CRC)
                 {
                 {
@@ -513,7 +514,7 @@ void Fota_Func(uint8 *DataPtr, sint32 connectId)
                 else
                 else
                 {
                 {
                     Fota_Answer[3] = 0x02;
                     Fota_Answer[3] = 0x02;
-                    Hal_FlsErase(Fota_S.Fota_Flash_Addres + Fota_S.Fota_Current_Addres, Fota_Recv_Data_Len_4, 5);
+//                    Hal_FlsErase(Fota_S.Fota_Flash_Addres + Fota_S.Fota_Current_Addres, Fota_Recv_Data_Len_8, 5);
                 }
                 }
             }
             }
             else //Êý¾ÝУÑéʧ°Ü
             else //Êý¾ÝУÑéʧ°Ü

+ 3 - 3
src/AppGlobalVar.c

@@ -42,10 +42,10 @@ sint8 SocketId = -1;
 sint8 RegChkRet = 0;
 sint8 RegChkRet = 0;
 char WebSiteIp[20] = {0};
 char WebSiteIp[20] = {0};
 uint8 TcpWorkState = 0;
 uint8 TcpWorkState = 0;
-  const char WebSiteName[] = "\"iotp.fast-fun.cn\"";
-  const uint16 WebSitePort = 8712;
-//const char WebSiteName[] = "\"oss.li-ai.com.cn\"";
+//const char WebSiteName[] = "\"iotp.fast-fun.cn\"";
 //const uint16 WebSitePort = 8712;
 //const uint16 WebSitePort = 8712;
+const char WebSiteName[] = "\"nas.fast-fun.cn\"";
+const uint16 WebSitePort = 8812;
 
 
 #define EEP_START_SEC_VAR_INIT_8_NO_CACHEABLE
 #define EEP_START_SEC_VAR_INIT_8_NO_CACHEABLE
 #include "Eep_MemMap.h"
 #include "Eep_MemMap.h"

+ 9 - 9
src/AppGlobalVar.h

@@ -9,15 +9,15 @@
  */
  */
 /*
 /*
  * AppGlobal.h
  * AppGlobal.h
- *应用层全局变量
- *  Created on: 2022年1月19日
+ *应锟矫诧拷全锟街憋拷锟斤拷
+ *  Created on: 2022锟斤拷1锟斤拷19锟斤拷
  *      Author: QiXiang_CHENJIE
  *      Author: QiXiang_CHENJIE
  */
  */
 #ifndef APPGLOBALVAR_H_
 #ifndef APPGLOBALVAR_H_
 #define APPGLOBALVAR_H_
 #define APPGLOBALVAR_H_
 
 
-//#define APP_UART0_ENABLE //平峰项
-#define APP_CAN_ENABLE //重卡项
+//#define APP_UART0_ENABLE //平锟斤拷锟斤拷
+#define APP_CAN_ENABLE //锟截匡拷锟斤拷
 
 
 #include "hal_adapter.h"
 #include "hal_adapter.h"
 // test Var
 // test Var
@@ -34,7 +34,7 @@
 
 
 #define BMS_CELL_MAX_NUM 384
 #define BMS_CELL_MAX_NUM 384
 #define BMS_TEMP_MAX_NUM 64
 #define BMS_TEMP_MAX_NUM 64
-//*全局变量*//
+//*全锟街憋拷锟斤拷*//
 
 
 extern uint8 TcpbattSN[17];
 extern uint8 TcpbattSN[17];
 extern uint8 VIN[17];
 extern uint8 VIN[17];
@@ -63,11 +63,11 @@ typedef struct _Fota_Type
     uint32 Fota_All_Data_Len;
     uint32 Fota_All_Data_Len;
     uint32 Fota_Current_Addres;
     uint32 Fota_Current_Addres;
     uint8 Fota_Recv_Data_Len;
     uint8 Fota_Recv_Data_Len;
-    uint8 Fota_Recv_Data[100];
+    uint8 *Fota_Recv_DataPtr;
     uint32 Fota_Flash_Addres;
     uint32 Fota_Flash_Addres;
     uint8 Fota_CRC;
     uint8 Fota_CRC;
 } Fota_Type;
 } Fota_Type;
-/*以下变量均为TCP相关变量*/
+/*锟斤拷锟铰憋拷锟斤拷锟斤拷为TCP锟斤拷乇锟斤拷锟�*/
 extern uint8 CSQValue;
 extern uint8 CSQValue;
 extern sint8 SocketId;
 extern sint8 SocketId;
 extern sint8 RegChkRet;
 extern sint8 RegChkRet;
@@ -86,7 +86,7 @@ typedef struct _AppConfigType
 } AppConfigBody;
 } AppConfigBody;
 extern AppConfigBody AppConfigInfo;
 extern AppConfigBody AppConfigInfo;
 
 
-/*以下变量均为App_CAN相关变量*/
+/*锟斤拷锟铰憋拷锟斤拷锟斤拷为App_CAN锟斤拷乇锟斤拷锟�*/
 #ifdef APP_CAN_ENABLE
 #ifdef APP_CAN_ENABLE
 extern uint8 vehicleStatus;
 extern uint8 vehicleStatus;
 extern uint8 bmsHVOn;
 extern uint8 bmsHVOn;
@@ -106,7 +106,7 @@ extern uint8 retainLockSignal;
 extern uint8 dischargeLockSignal;
 extern uint8 dischargeLockSignal;
 extern uint8 chargeLockSignal;
 extern uint8 chargeLockSignal;
 extern uint8 chargeFlag;
 extern uint8 chargeFlag;
-// BCU解码变量
+// BCU锟斤拷锟斤拷锟斤拷锟�
 extern UINT32 BcuInTable[28];
 extern UINT32 BcuInTable[28];
 extern BOOL BcuRxShortError[28];
 extern BOOL BcuRxShortError[28];
 extern BOOL BcuRxLongError[28];
 extern BOOL BcuRxLongError[28];

+ 1 - 1
src/AppTaskCan.c

@@ -43,7 +43,7 @@ void CanTask(void *pvParameters)
 				{
 				{
 					DoRoutinePositiveAnswer();
 					DoRoutinePositiveAnswer();
 					RequestEnterBootloader();
 					RequestEnterBootloader();
-					DoResetECU();
+					SystemSoftwareReset();
 					break;
 					break;
 				}
 				}
 				else
 				else

+ 1 - 1
src/AppTaskMain.c

@@ -42,7 +42,7 @@ void MainTask(void *pvParameters)
 			//ÖØÆôÇ°±£´æÊý¾Ý
 			//ÖØÆôÇ°±£´æÊý¾Ý
 			AppConfigInfo.appSaveFlg = false;
 			AppConfigInfo.appSaveFlg = false;
 			HAL_EEP_Write(0,(uint8 *)&AppConfigInfo,sizeof(AppConfigInfo));
 			HAL_EEP_Write(0,(uint8 *)&AppConfigInfo,sizeof(AppConfigInfo));
-			DoResetECU();
+			SystemSoftwareReset();
 		}
 		}
 	}
 	}
 }
 }

+ 79 - 22
src/AppTaskUart1.c

@@ -14,6 +14,8 @@
  *      Author: QiXiang_CHENJIE
  *      Author: QiXiang_CHENJIE
  */
  */
 #include "AppTaskUart1.h"
 #include "AppTaskUart1.h"
+#include "hal_fls.h"
+
 const ATCmdFunc Atcmdfunc[] = {
 const ATCmdFunc Atcmdfunc[] = {
 	{AT_CMD_TEST, "AT\r\n", at_callbackFunc},
 	{AT_CMD_TEST, "AT\r\n", at_callbackFunc},
 	{AT_ATE0, "ATE0\r\n", at_callbackFunc},
 	{AT_ATE0, "ATE0\r\n", at_callbackFunc},
@@ -395,6 +397,10 @@ void InitFunc(void)
 			{
 			{
 				_4G_InitStep++;
 				_4G_InitStep++;
 			}
 			}
+			else
+			{
+				vTaskDelay(pdMS_TO_TICKS(100));
+			}
 			break;
 			break;
 		}
 		}
 		case 1: //关闭回显
 		case 1: //关闭回显
@@ -406,29 +412,24 @@ void InitFunc(void)
 			if (ReadLen > 0)
 			if (ReadLen > 0)
 			{
 			{
 				retptr = (uint8 *)strstr((char *)UartRecvPtr, (char *)("OK"));
 				retptr = (uint8 *)strstr((char *)UartRecvPtr, (char *)("OK"));
-
-
-
 				if (retptr)
 				if (retptr)
 				{
 				{
 					_4G_InitStep++;
 					_4G_InitStep++;
 				}
 				}
 				else
 				else
 				{
 				{
-					_4G_InitStep++;
+					_4G_InitStep=0;
 				}
 				}
 			}
 			}
 			else
 			else
 			{
 			{
-				_4G_InitStep++;
+				_4G_InitStep=0;
 			}
 			}
-
 			if(UartRecvPtr != NULL)
 			if(UartRecvPtr != NULL)
 			{
 			{
 				free(UartRecvPtr);
 				free(UartRecvPtr);
 			}
 			}
 			UartRecvPtr = NULL;
 			UartRecvPtr = NULL;
-
 			break;
 			break;
 		}
 		}
 		case 2: // IMEI获取
 		case 2: // IMEI获取
@@ -446,12 +447,15 @@ void InitFunc(void)
 					memcpy(ImeiNum, retptr + 8, 15);
 					memcpy(ImeiNum, retptr + 8, 15);
 					_4G_InitStep++;
 					_4G_InitStep++;
 				}
 				}
+				else
+				{
+					_4G_InitStep=0;
+				}
 			}
 			}
 			else
 			else
 			{
 			{
 				_4G_InitStep = 0;
 				_4G_InitStep = 0;
 			}
 			}
-
 			if(UartRecvPtr != NULL)
 			if(UartRecvPtr != NULL)
 			{
 			{
 				free(UartRecvPtr);
 				free(UartRecvPtr);
@@ -491,8 +495,36 @@ void InitFunc(void)
 			{
 			{
 				_4G_InitStep++;
 				_4G_InitStep++;
 			}
 			}
+			else
+			{
+				_4G_InitStep=0;
+			}
 			break;
 			break;
 		}
 		}
+		case 5:
+		{
+			ATCmdSend = (char *)("AT+CIPSENDMODE=0\r\n");
+			ATCmdSendLen = mstrlen(ATCmdSend);
+			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATCmdSend, ATCmdSendLen, &UartRecvPtr, &ReadLen, pdMS_TO_TICKS(100));
+			uint8 *retptr = NULL;
+			if (ReadLen > 0)
+			{
+				retptr = (uint8 *)strstr((char *)UartRecvPtr, (char *)("OK"));
+				if (retptr)
+				{
+					_4G_InitStep++;
+				}
+			}
+			else
+			{
+				_4G_InitStep = 0;
+			}
+			if(UartRecvPtr != NULL)
+			{
+				free(UartRecvPtr);
+			}
+			UartRecvPtr = NULL;
+		}
 		default:
 		default:
 		{
 		{
 			return;
 			return;
@@ -663,6 +695,10 @@ sint8 at_callbackFunc(char *PSendStr, char *pReadStr, uint8 CmdIdx, uint16 pRead
 		{
 		{
 			OutValue = 0;
 			OutValue = 0;
 		}
 		}
+		else
+		{
+			OutValue = -1;
+		}
 		break;
 		break;
 	}
 	}
 	default:
 	default:
@@ -676,7 +712,7 @@ void TcpDataEncode(uint32 *PtrSendAddr, uint16 *SendLen)
 	static uint32 TcpSendTimeCounter = 0;
 	static uint32 TcpSendTimeCounter = 0;
 	TcpSendTimeCounter++;
 	TcpSendTimeCounter++;
 
 
-	if (TcpSendTimeCounter == 1)
+	if (TcpSendTimeCounter%60 == 1)
 	{
 	{
 		DataIdx = VerMsg; //版本信息发送
 		DataIdx = VerMsg; //版本信息发送
 	}
 	}
@@ -1174,27 +1210,48 @@ static void TcpDataInfoRecvHandle(uint8 *DataRecv, uint16 DataRecvLen)
 sint8 tcpipConnectionSend(uint8 TcpConnectId, uint8 *SendDataPtr, uint16 SendDataLen)
 sint8 tcpipConnectionSend(uint8 TcpConnectId, uint8 *SendDataPtr, uint16 SendDataLen)
 {
 {
 	sint8 outValue = -1;
 	sint8 outValue = -1;
-	sint8 ATRet = -1;
+	uint8  sendErrConuter= 0;
 	uint8 ReadLen = 0;
 	uint8 ReadLen = 0;
-	char AtCmdSend[10] = {0};
+	char AtCmdSend[20] = {0};
 	uint8 AtCmdSendTotalLen = 0;
 	uint8 AtCmdSendTotalLen = 0;
-	sprintf(AtCmdSend, "%d,%d\r\n", TcpConnectId, SendDataLen);
-	AtCmdSendTotalLen = mstrlen(AtCmdSend);
-	AtcmdTransmit(AT_SEND, AtCmdSend, AtCmdSendTotalLen, &ATRet);
+	uint8 *UartRecvPtr1 =NULL;
 	uint8 *UartRecvPtr =NULL;
 	uint8 *UartRecvPtr =NULL;
-	if (ATRet == 0)
+	uint8 ret = 0;
+	sprintf(AtCmdSend, "AT+CIPSEND=%d,%d\r\n", TcpConnectId, SendDataLen);
+	AtCmdSendTotalLen = mstrlen(AtCmdSend);
+	myPrintf("send,test\n");
+	while(outValue!=0&&sendErrConuter<10)
 	{
 	{
-		UART_Query_Data(UART_LPUART1, UART_LPUART1, (uint8 *)SendDataPtr, SendDataLen, &UartRecvPtr, &ReadLen, pdMS_TO_TICKS(100));
-		if (ReadLen>0&&(uint8 *)strstr((char *)UartRecvPtr, (char *)("OK")))
+		ret = UART_Query_Data(UART_LPUART1, UART_LPUART1, (uint8 *)AtCmdSend, AtCmdSendTotalLen, &UartRecvPtr1, &ReadLen, 1000);
+		if (ret==0&&ReadLen>0&&(uint8 *)strstr((char *)UartRecvPtr1, (char *)(">")))
 		{
 		{
-			outValue = 0;
+			UART_Query_Data(UART_LPUART1, UART_LPUART1, (uint8 *)SendDataPtr, SendDataLen, &UartRecvPtr, &ReadLen, 1000);
+			if (ReadLen>0&&(uint8 *)strstr((char *)UartRecvPtr, (char *)("\r\nOK\r\n\r\n+CIPSEND")))
+			{
+				outValue = 0;
+			}
+			else
+			{
+				outValue = -2;
+			}
 		}
 		}
-
-		if(UartRecvPtr != NULL)
+		else
 		{
 		{
-			free(UartRecvPtr);
+			outValue = -1;
 		}
 		}
-		UartRecvPtr = NULL;
+		sendErrConuter++;
+		vTaskDelay(pdMS_TO_TICKS(100*sendErrConuter));
+	}
+
+	if(UartRecvPtr != NULL)
+	{
+		free(UartRecvPtr);
+	}
+	UartRecvPtr = NULL;
+	if(UartRecvPtr1 != NULL)
+	{
+		free(UartRecvPtr1);
 	}
 	}
+	UartRecvPtr1 = NULL;
 	return outValue;
 	return outValue;
 }
 }

+ 5 - 5
src/Hal_Fls.c

@@ -94,12 +94,12 @@ MemIf_JobResultType Hal_FlsWrite(Fls_AddressType u32TargetAddress, uint8 * pSour
 	if(TRUE == IsFlashEraseSuccessful())
 	if(TRUE == IsFlashEraseSuccessful())
 	{
 	{
 		Fls_Write(u32TargetAddress,pSourceAddressPtr,u32Length);
 		Fls_Write(u32TargetAddress,pSourceAddressPtr,u32Length);
-		while(MEMIF_IDLE != Fls_GetStatus() && timeOutMs>0)
+		do
 		{
 		{
 			Fls_MainFunction();
 			Fls_MainFunction();
 			vTaskDelay(pdMS_TO_TICKS(1));
 			vTaskDelay(pdMS_TO_TICKS(1));
 			timeOutMs--;
 			timeOutMs--;
-		}
+		}while(MEMIF_IDLE != Fls_GetStatus() && timeOutMs>0);
 		ret = Fls_GetJobResult();
 		ret = Fls_GetJobResult();
 	}
 	}
 	return ret;
 	return ret;
@@ -129,16 +129,16 @@ MemIf_JobResultType Hal_FlsErase(Fls_AddressType u32TargetAddress, uint32 eraseI
 	}
 	}
 	else
 	else
 	{
 	{
-		u32Length = ceil(eraseInternalLength/INTERNAL_SECTOR_SIZE) * INTERNAL_SECTOR_SIZE;
+		u32Length = ceil((double)(eraseInternalLength/(double)(INTERNAL_SECTOR_SIZE))) * INTERNAL_SECTOR_SIZE;
 	}
 	}
 
 
 	Fls_Erase(u32TargetAddress,u32Length);
 	Fls_Erase(u32TargetAddress,u32Length);
-	while(MEMIF_IDLE != Fls_GetStatus() && timeOutMs>0)
+	do
 	{
 	{
 		Fls_MainFunction();
 		Fls_MainFunction();
 		vTaskDelay(pdMS_TO_TICKS(1));
 		vTaskDelay(pdMS_TO_TICKS(1));
 		timeOutMs--;
 		timeOutMs--;
-	}
+	}while(MEMIF_IDLE != Fls_GetStatus() && timeOutMs>0);
 	ret = Fls_GetJobResult();
 	ret = Fls_GetJobResult();
 	if(ret == MEMIF_JOB_OK)
 	if(ret == MEMIF_JOB_OK)
 	{
 	{

+ 65 - 16
src/hal_adapter.c

@@ -6,6 +6,8 @@
  */
  */
 #include "hal_adapter.h"
 #include "hal_adapter.h"
 #include "AppGlobalVar.h"
 #include "AppGlobalVar.h"
+#include "stdio.h"
+#include "stdarg.h"
 uint8_t __attribute__((section(".non_cacheable_data"))) RX_Buffer[3][BUFFER_SIZE];
 uint8_t __attribute__((section(".non_cacheable_data"))) RX_Buffer[3][BUFFER_SIZE];
 uint32_t bufferIdx[3] = {0};
 uint32_t bufferIdx[3] = {0};
 volatile uint32 VarNotification_0 = 0;
 volatile uint32 VarNotification_0 = 0;
@@ -20,6 +22,18 @@ Adc_ValueGroupType ResultBuffer[NUM_RESULTS];
  void Uart_Hal_SendTask(void *pvParameters);
  void Uart_Hal_SendTask(void *pvParameters);
  Std_ReturnType UartStartRecvFunc(uint8 channel);
  Std_ReturnType UartStartRecvFunc(uint8 channel);
 Std_ReturnType ADC_Converter(Adc_ValueGroupType *Buffer, TP_Value_Type *ConvertedValueR);
 Std_ReturnType ADC_Converter(Adc_ValueGroupType *Buffer, TP_Value_Type *ConvertedValueR);
+static char sprint_buf[1024];
+uint16 myPrintf(const char *fmt, ...)
+{
+    va_list args;
+    int n;
+    va_start(args, fmt);
+    n = vsprintf(sprint_buf, fmt, args);
+    va_end(args);
+    Uart_AsyncSend(UART_LPUART0, sprint_buf, n);
+    return n;
+}
+
 Std_ReturnType UART_Query_Data(uint8 transChannel, uint8 recvChannel, const uint8 *txBuffer, uint32 sendLength, uint8 **rxBuffer, uint16 *rxlen, uint32 T_timeout)
 Std_ReturnType UART_Query_Data(uint8 transChannel, uint8 recvChannel, const uint8 *txBuffer, uint32 sendLength, uint8 **rxBuffer, uint16 *rxlen, uint32 T_timeout)
 {
 {
 	UartMsg_t UartRecvMsg;
 	UartMsg_t UartRecvMsg;
@@ -30,10 +44,8 @@ Std_ReturnType UART_Query_Data(uint8 transChannel, uint8 recvChannel, const uint
 	UartSendMsg.DataLen = sendLength;
 	UartSendMsg.DataLen = sendLength;
 	UartSendMsg.dataPrt = txBuffer;
 	UartSendMsg.dataPrt = txBuffer;
 	*rxlen = 0;
 	*rxlen = 0;
-	Sendret = xQueueSend(UartSendQueue[transChannel],&UartSendMsg,10);
-
+	Sendret = xQueueSend(UartSendQueue[transChannel],&UartSendMsg,50);
 	memset(&UartRecvMsg,0,sizeof(UartMsg_t));
 	memset(&UartRecvMsg,0,sizeof(UartMsg_t));
-
 	if(Sendret == pdTRUE)
 	if(Sendret == pdTRUE)
 	{
 	{
 		Recvret = xQueueReceive(UartRecvQueue[recvChannel],&UartRecvMsg,T_timeout);
 		Recvret = xQueueReceive(UartRecvQueue[recvChannel],&UartRecvMsg,T_timeout);
@@ -42,7 +54,23 @@ Std_ReturnType UART_Query_Data(uint8 transChannel, uint8 recvChannel, const uint
 			*rxlen = UartRecvMsg.DataLen;
 			*rxlen = UartRecvMsg.DataLen;
 			*rxBuffer = UartRecvMsg.dataPrt;
 			*rxBuffer = UartRecvMsg.dataPrt;
 			retVal = E_OK;
 			retVal = E_OK;
+			if(transChannel==1)
+			{
+				myPrintf("QR:%s\n",UartRecvMsg.dataPrt);
+			}
+		}
+		else
+		{
+			retVal = 3;
 		}
 		}
+		if(transChannel==1)
+		{
+			myPrintf("QS-%d:%s\n",*rxlen,txBuffer);
+		}
+	}
+	else
+	{
+		retVal = 2;
 	}
 	}
 	return retVal;
 	return retVal;
 }
 }
@@ -58,6 +86,10 @@ Std_ReturnType UART_Receive_Data(uint8 recvChannel, uint8 **rxBuffer, uint16 *rx
 		*rxlen = UartRecvMsg.DataLen;
 		*rxlen = UartRecvMsg.DataLen;
 		*rxBuffer = UartRecvMsg.dataPrt;
 		*rxBuffer = UartRecvMsg.dataPrt;
 		retVal = E_OK;
 		retVal = E_OK;
+		if(recvChannel==1)
+		{
+			myPrintf("RR:%s\n",UartRecvMsg.dataPrt);
+		}
 	}
 	}
 	return retVal;
 	return retVal;
 }
 }
@@ -80,10 +112,10 @@ Std_ReturnType UART_Send_Data(uint8 transChannel, const uint8 *txBuffer, uint32
 	 UartRecvQueue[0] = xQueueCreate(3, sizeof(UartMsg_t));
 	 UartRecvQueue[0] = xQueueCreate(3, sizeof(UartMsg_t));
 	 UartRecvQueue[1] = xQueueCreate(3, sizeof(UartMsg_t));
 	 UartRecvQueue[1] = xQueueCreate(3, sizeof(UartMsg_t));
 	 UartRecvQueue[2] = xQueueCreate(3, sizeof(UartMsg_t));
 	 UartRecvQueue[2] = xQueueCreate(3, sizeof(UartMsg_t));
-	 UartSendQueue[0] = xQueueCreate(1, sizeof(UartMsg_t));
-	 UartSendQueue[1] = xQueueCreate(1, sizeof(UartMsg_t));
-	 UartSendQueue[2] = xQueueCreate(1, sizeof(UartMsg_t));
-	 UartHalQueueHandle = xQueueCreate(6, sizeof(UartHalMsg_t));
+	 UartSendQueue[0] = xQueueCreate(2, sizeof(UartMsg_t));
+	 UartSendQueue[1] = xQueueCreate(2, sizeof(UartMsg_t));
+	 UartSendQueue[2] = xQueueCreate(2, sizeof(UartMsg_t));
+	 UartHalQueueHandle = xQueueCreate(9, sizeof(UartHalMsg_t));
 
 
 	 xTaskCreate(Uart_Hal_RecvTask, (const char *const)"UartRecv", 1024, (void *)0, main_TASK_PRIORITY + 3, NULL);
 	 xTaskCreate(Uart_Hal_RecvTask, (const char *const)"UartRecv", 1024, (void *)0, main_TASK_PRIORITY + 3, NULL);
 	 xTaskCreate(Uart_Hal_SendTask, (const char *const)"UartSend", 1024, (void *)0, main_TASK_PRIORITY + 2, NULL);
 	 xTaskCreate(Uart_Hal_SendTask, (const char *const)"UartSend", 1024, (void *)0, main_TASK_PRIORITY + 2, NULL);
@@ -153,25 +185,19 @@ Std_ReturnType UART_Send_Data(uint8 transChannel, const uint8 *txBuffer, uint32
 		 Uart_ReceiveStatus[UartIdx] = Uart_GetStatus(UartIdx, &T_bytesRemaining[UartIdx], UART_RECEIVE);
 		 Uart_ReceiveStatus[UartIdx] = Uart_GetStatus(UartIdx, &T_bytesRemaining[UartIdx], UART_RECEIVE);
 		 T_timeout[UartIdx]++;
 		 T_timeout[UartIdx]++;
 		 UartIdx = (UartIdx + 1) > 2 ? 0 : (UartIdx + 1);
 		 UartIdx = (UartIdx + 1) > 2 ? 0 : (UartIdx + 1);
-
-
 		  if(ret==pdTRUE)
 		  if(ret==pdTRUE)
 		  {
 		  {
 			  if(UartHalMsgRecv.event==LPUART_UART_IP_EVENT_RECV_IDLE)
 			  if(UartHalMsgRecv.event==LPUART_UART_IP_EVENT_RECV_IDLE)
 			  {
 			  {
 					UartMsg.DataLen = UartHalMsgRecv.value;
 					UartMsg.DataLen = UartHalMsgRecv.value;
-//					UartMsg.dataPrt = RX_Buffer[UartHalMsgRecv.Channel];
-
 					UartMsg.dataPrt = malloc(UartMsg.DataLen);
 					UartMsg.dataPrt = malloc(UartMsg.DataLen);
 					memset(UartMsg.dataPrt,0,UartMsg.DataLen);
 					memset(UartMsg.dataPrt,0,UartMsg.DataLen);
 					memcpy(UartMsg.dataPrt,RX_Buffer[UartHalMsgRecv.Channel],UartMsg.DataLen);
 					memcpy(UartMsg.dataPrt,RX_Buffer[UartHalMsgRecv.Channel],UartMsg.DataLen);
-
-					xQueueSendToFront(UartRecvQueue[UartHalMsgRecv.Channel],&UartMsg,1);
-
+					xQueueSend(UartRecvQueue[UartHalMsgRecv.Channel],&UartMsg,10);
 					T_timeout[UartHalMsgRecv.Channel] = 0;
 					T_timeout[UartHalMsgRecv.Channel] = 0;
+					UartHalMsgRecv.value = 0;
 					UartState[UartHalMsgRecv.Channel] = UartRecvComplete;
 					UartState[UartHalMsgRecv.Channel] = UartRecvComplete;
-
-//					Uart_ReceiveStatus[UartHalMsgRecv.Channel] = Uart_GetStatus(UartIdx, &T_bytesRemaining[UartIdx], UART_RECEIVE);
+					memset(RX_Buffer[UartHalMsgRecv.Channel],0,UartMsg.DataLen);
 			  }
 			  }
 		  }
 		  }
 	 }
 	 }
@@ -446,6 +472,10 @@ void UART_Callback(uint32 hwInstance, Lpuart_Uart_Ip_EventType event)
  		UartHalMsg.value = bufferIdx[hwInstance];
  		UartHalMsg.value = bufferIdx[hwInstance];
  		xQueueSendFromISR(UartHalQueueHandle,&UartHalMsg,pdFALSE);
  		xQueueSendFromISR(UartHalQueueHandle,&UartHalMsg,pdFALSE);
     }
     }
+    if(hwInstance==1)
+    {
+    	myPrintf("event=%d\n",event);
+    }
 }
 }
 
 
 /*CAN*/
 /*CAN*/
@@ -812,3 +842,22 @@ Std_ReturnType HAL_EEP_Compare(uint32 eepCompareStartAddr, uint8 *pDataNeedtoCom
     }
     }
     return E_OK;
     return E_OK;
 }
 }
+/* @brief VECTKEY value so that AIRCR register write is not ignored. */
+#define FEATURE_SCB_VECTKEY               (0x05FAU)
+void SystemSoftwareReset(void)
+{
+    uint32_t regValue;
+
+    /* Read Application Interrupt and Reset Control Register */
+    regValue = S32_SCB->AIRCR;
+
+    /* Clear register key */
+    regValue &= ~( S32_SCB_AIRCR_VECTKEY_MASK);
+
+    /* Configure System reset request bit and Register Key */
+    regValue |= S32_SCB_AIRCR_VECTKEY(FEATURE_SCB_VECTKEY);
+    regValue |= S32_SCB_AIRCR_SYSRESETREQ(0x1u);
+
+    /* Write computed register value */
+    S32_SCB->AIRCR = regValue;
+}

+ 4 - 2
src/hal_adapter.h

@@ -72,8 +72,8 @@ typedef signed long INT32;
 #define TJA1153_START_ID (uint32_t)(0x555u)
 #define TJA1153_START_ID (uint32_t)(0x555u)
 #define TJA1153_CONFIG_ID (uint32_t)(0x18DA00F1u)
 #define TJA1153_CONFIG_ID (uint32_t)(0x18DA00F1u)
 #define NUM_RESULTS ADC_CFGSET_VS_0_GROUP_0_CHANNELS
 #define NUM_RESULTS ADC_CFGSET_VS_0_GROUP_0_CHANNELS
-#define BUFFER_SIZE 1000
-#define DMA_SIZE 20
+#define BUFFER_SIZE 1024
+#define DMA_SIZE 128
 
 
 
 
 
 
@@ -111,6 +111,7 @@ typedef signed long INT32;
  }ADC_TP_Channel_Type;
  }ADC_TP_Channel_Type;
 
 
 typedef uint32 TP_Value_Type;
 typedef uint32 TP_Value_Type;
+uint16 myPrintf(const char *fmt, ...);
 Std_ReturnType ADC_ReadValue(void);
 Std_ReturnType ADC_ReadValue(void);
 // extern uint8 GpsBufferGet[GPSBUFFER_SIZE];
 // extern uint8 GpsBufferGet[GPSBUFFER_SIZE];
 Std_ReturnType UART_Query_Data(uint8 transChannel, uint8 recvChannel, const uint8 *txBuffer, uint32 sendLength, uint8 **rxBuffer, uint16 *rxlen, uint32 T_timeout);
 Std_ReturnType UART_Query_Data(uint8 transChannel, uint8 recvChannel, const uint8 *txBuffer, uint32 sendLength, uint8 **rxBuffer, uint16 *rxlen, uint32 T_timeout);
@@ -118,6 +119,7 @@ Std_ReturnType UART_Send_Data(uint8 transChannel, const uint8 *txBuffer, uint32
 Std_ReturnType UART_Receive_Data(uint8 recvChannel, uint8 **rxBuffer, uint16 *rxlen, sint32 T_timeout);
 Std_ReturnType UART_Receive_Data(uint8 recvChannel, uint8 **rxBuffer, uint16 *rxlen, sint32 T_timeout);
 void UART_Callback(uint32 hwInstance, Lpuart_Uart_Ip_EventType event);
 void UART_Callback(uint32 hwInstance, Lpuart_Uart_Ip_EventType event);
 void UartInit(void);
 void UartInit(void);
+void SystemSoftwareReset(void);
 /*CAN*/
 /*CAN*/
 typedef enum
 typedef enum
 {
 {

+ 4 - 2
src/main.c

@@ -120,9 +120,8 @@ int main(void)
 #else
 #else
 	Adc_Init(&Adc_Config_VS_0);
 	Adc_Init(&Adc_Config_VS_0);
 #endif /* ADC_PRECOMPILE_SUPPORT == STD_ON */
 #endif /* ADC_PRECOMPILE_SUPPORT == STD_ON */
-
     /* Partition only if it was not partitioned before for EERAM with code 0x4 */
     /* Partition only if it was not partitioned before for EERAM with code 0x4 */
-//    Eep_DepartParitition(T_EEEPROM_SIZE);
+    Eep_DepartParitition(T_EEEPROM_SIZE);
     /* Initialize Eep driver */
     /* Initialize Eep driver */
 #if defined (EEP_PRECOMPILE_SUPPORT)
 #if defined (EEP_PRECOMPILE_SUPPORT)
     Eep_Init(NULL_PTR);
     Eep_Init(NULL_PTR);
@@ -158,6 +157,9 @@ int main(void)
 
 
 	WdgInit();
 	WdgInit();
 
 
+
+
+
 	IP_LPUART0->CTRL |= LPUART_CTRL_ILT(1);
 	IP_LPUART0->CTRL |= LPUART_CTRL_ILT(1);
 	IP_LPUART1->CTRL |= LPUART_CTRL_ILT(1);
 	IP_LPUART1->CTRL |= LPUART_CTRL_ILT(1);
 	IP_LPUART2->CTRL |= LPUART_CTRL_ILT(1);
 	IP_LPUART2->CTRL |= LPUART_CTRL_ILT(1);