Browse Source

FTP测试

LAPTOP-KB7QFH2U\ChenJie-PC 2 years ago
parent
commit
7f49eb1980

+ 6 - 1
.cproject

@@ -25,6 +25,8 @@
 							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.abi.2049331992" name="Float ABI" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.abi" useByScannerDiscovery="false" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.abi.hard" valueType="enumerated"/>
 							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.unit.515607088" name="FPU Type" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.unit" useByScannerDiscovery="false" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.fpu.unit.fpv4spd16" valueType="enumerated"/>
 							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.unalignedaccess.721888033" name="Unaligned access" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.unalignedaccess" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.target.unalignedaccess.default" valueType="enumerated"/>
+							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.createflash.1857588641" name="Create flash image" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.createflash" value="true" valueType="boolean"/>
+							<option id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.createlisting.1015999347" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.option.addtools.createlisting" value="false" valueType="boolean"/>
 							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.64147430" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
 							<builder buildPath="${workspace_loc:/S32K146_4G}/Debug_FLASH" id="com.freescale.s32ds.cross.gnu.builder.466747471" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="FSL Make Builder" superClass="com.freescale.s32ds.cross.gnu.builder"/>
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.tool.c.compiler.1980082058" name="Standard S32DS C Compiler" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.tool.c.compiler">
@@ -164,7 +166,9 @@
 								<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"/>
 							</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.1410567734" superClass="com.freescale.s32ds.cross.gnu.option.createflash.choice" useByScannerDiscovery="false" value="com.freescale.s32ds.cross.gnu.option.createflash.choice.ihex" valueType="enumerated"/>
+							</tool>
 							<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.allheaders.743274389" name="Display all headers (--all-headers|-x)" superClass="com.freescale.s32ds.cross.gnu.option.createlisting.allheaders" value="true" valueType="boolean"/>
@@ -174,6 +178,7 @@
 							</tool>
 							<tool id="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.printsize.1466716249" name="Standard S32DS Print Size" superClass="com.nxp.s32ds.cle.arm.mbs.arm32.bare.tool.printsize">
 								<option id="com.freescale.s32ds.cross.gnu.option.printsize.format.1897015732" name="Size format" superClass="com.freescale.s32ds.cross.gnu.option.printsize.format" useByScannerDiscovery="false"/>
+								<option id="com.freescale.s32ds.cross.gnu.option.printsize.hex.1120668054" name="Hex" superClass="com.freescale.s32ds.cross.gnu.option.printsize.hex" useByScannerDiscovery="false" value="true" valueType="boolean"/>
 							</tool>
 							<tool id="com.freescale.s32ds.cross.gnu.c.preprocessor.179719808" name="Standard S32DS C Preprocessor" superClass="com.freescale.s32ds.cross.gnu.c.preprocessor"/>
 							<tool id="com.freescale.s32ds.cross.gnu.cpp.preprocessor.2124652268" name="Standard S32DS C++ Preprocessor" superClass="com.freescale.s32ds.cross.gnu.cpp.preprocessor"/>

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

@@ -5,7 +5,7 @@
 			<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.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<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">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="790642141140153044" 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.g++"/>
 			</provider>
@@ -16,7 +16,7 @@
 			<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.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<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">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="790642141140153044" 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.g++"/>
 			</provider>
@@ -27,7 +27,7 @@
 			<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.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<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">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="790642141140153044" 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.g++"/>
 			</provider>
@@ -38,7 +38,7 @@
 			<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.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
-			<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">
+			<provider class="com.freescale.s32ds.cross.gnu.CrossGCCBuiltinSpecsDetector" console="false" env-hash="790642141140153044" 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.g++"/>
 			</provider>

+ 9 - 9
Project_Settings/Debugger/S32K146_4G_Debug_FLASH_PNE.launch

@@ -97,7 +97,7 @@
 <stringAttribute key="com.pemicro.debug.gdbjtag.pne.ml.CYCLONE_IP" value=""/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.ml.DO_RESET_DELAY" value="false"/>
 <intAttribute key="com.pemicro.debug.gdbjtag.pne.ml.INTERFACE_PORT" value="0"/>
-<stringAttribute key="com.pemicro.debug.gdbjtag.pne.ml.INTERFACE_PORT_STRING" value=""/>
+<stringAttribute key="com.pemicro.debug.gdbjtag.pne.ml.INTERFACE_PORT_STRING" value="USB1"/>
 <stringAttribute key="com.pemicro.debug.gdbjtag.pne.ml.NETWORK_CARD_IP" value=""/>
 <stringAttribute key="com.pemicro.debug.gdbjtag.pne.ml.POWER_DOWN_DELAY" value="250"/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.ml.POWER_OFF" value="false"/>
@@ -116,12 +116,12 @@
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemory0" value="false"/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemory1" value="false"/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemory2" value="false"/>
-<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryFrom0" value="0"/>
-<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryFrom1" value="0"/>
-<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryFrom2" value="0"/>
-<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryTo0" value="3"/>
-<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryTo1" value="3"/>
-<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryTo2" value="3"/>
+<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryFrom0" value="10000000"/>
+<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryFrom1" value="4"/>
+<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryFrom2" value="8"/>
+<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryTo0" value="1000ffff"/>
+<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryTo1" value="7"/>
+<stringAttribute key="com.pemicro.debug.gdbjtag.pne.preserveMemoryTo2" value="b"/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.preservePartioning" value="false"/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.programtrim" value="false"/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.sda.ALWAYS_ERASE" value="false"/>
@@ -204,7 +204,7 @@
 <intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
 <stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
 <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
-<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug_FLASH/S32K146_4G.elf"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="D:\1_WorkFiles\1_Device\2_4G_G1\2_SW\workspace\S32K146_4G\Debug_FLASH\S32K146_4G.elf"/>
 <stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="S32K146_4G"/>
 <booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
 <stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.nxp.s32ds.cle.arm.mbs.arm32.bare.gnu.9.2.exe.debug.222968549"/>
@@ -216,5 +216,5 @@
 </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;gdbmemoryBlockExpression address=&quot;536805632&quot; label=&quot;0x1fff0100&quot;/&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;536806632&quot; label=&quot;0x1fff04e8&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionList&gt;&#13;&#10;"/>
 <stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
-<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0x14000,0x0,0x1fffb21c,0x1fffb600,0x1fff04e8,14000000,0x14000000,0x1fffbd12,0x1fffb0f0,0x1fff0500,0x1fffbe28,0x1fffbca0,0x1fffbb50,0x1fffbb20,0x1fffbb08"/>
+<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0x8000000,0x80000000,0x140000,0x1400000,0x14000000,0x80080,0x80200,0x1fffbe77,0x1fffbce0,0x1fffbcd7,0x10000010,0x1000000,0x10000000,0x1fffbea0,0x1fff7dee"/>
 </launchConfiguration>

+ 8 - 2
Project_Settings/Debugger/S32K146_4G_Debug_RAM_PNE.launch

@@ -1,7 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="com.pemicro.debug.gdbjtag.pne.launchConfigurationType">
+<booleanAttribute key="com.nxp.s32ds.ext.cdt.debug.svd.ask_before_clean" value="false"/>
+<booleanAttribute key="com.nxp.s32ds.ext.cdt.debug.svd.clean_watch_view" value="false"/>
 <stringAttribute key="com.nxp.s32ds.ext.cdt.debug.svd.merge_strategy" value="ALL"/>
+<stringAttribute key="com.nxp.s32ds.ext.cdt.debug.svd.svd_path" value=""/>
+<booleanAttribute key="com.nxp.s32ds.ext.cdt.debug.svd.use_default" value="true"/>
 <listAttribute key="com.pemicro.debug.gdbjtag.pne.ELVES"/>
+<listAttribute key="com.pemicro.debug.gdbjtag.pne.ELVES_OFFSET"/>
 <intAttribute key="com.pemicro.debug.gdbjtag.pne.NUMBER_ELVES" value="0"/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.PE.BUSERR" value="true"/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.PE.CHKERR" value="true"/>
@@ -42,7 +47,7 @@
 <stringAttribute key="com.pemicro.debug.gdbjtag.pne.cyc_ser.CYCLONE_IP" value=""/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.cyc_ser.DO_RESET_DELAY" value="false"/>
 <intAttribute key="com.pemicro.debug.gdbjtag.pne.cyc_ser.INTERFACE_PORT" value="0"/>
-<stringAttribute key="com.pemicro.debug.gdbjtag.pne.cyc_ser.INTERFACE_PORT_STRING" value="COM1"/>
+<stringAttribute key="com.pemicro.debug.gdbjtag.pne.cyc_ser.INTERFACE_PORT_STRING" value=""/>
 <stringAttribute key="com.pemicro.debug.gdbjtag.pne.cyc_ser.NETWORK_CARD_IP" value=""/>
 <stringAttribute key="com.pemicro.debug.gdbjtag.pne.cyc_ser.POWER_DOWN_DELAY" value="250"/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.cyc_ser.POWER_OFF" value="false"/>
@@ -92,7 +97,7 @@
 <stringAttribute key="com.pemicro.debug.gdbjtag.pne.ml.CYCLONE_IP" value=""/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.ml.DO_RESET_DELAY" value="false"/>
 <intAttribute key="com.pemicro.debug.gdbjtag.pne.ml.INTERFACE_PORT" value="0"/>
-<stringAttribute key="com.pemicro.debug.gdbjtag.pne.ml.INTERFACE_PORT_STRING" value=""/>
+<stringAttribute key="com.pemicro.debug.gdbjtag.pne.ml.INTERFACE_PORT_STRING" value="USB1"/>
 <stringAttribute key="com.pemicro.debug.gdbjtag.pne.ml.NETWORK_CARD_IP" value=""/>
 <stringAttribute key="com.pemicro.debug.gdbjtag.pne.ml.POWER_DOWN_DELAY" value="250"/>
 <booleanAttribute key="com.pemicro.debug.gdbjtag.pne.ml.POWER_OFF" value="false"/>
@@ -174,6 +179,7 @@
 <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
 <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
 <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="GNU ARM PEMicro Interface"/>
+<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDeviceId" value="com.pemicro.debug.gdbjtag.pne.jtagdeviceid"/>
 <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
 <booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
 <stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>

+ 4 - 0
Project_Settings/Linker_Files/linker_flash_s32k146.ld

@@ -47,6 +47,10 @@ ENTRY(Reset_Handler)
 
 SECTIONS
 {
+   .eeeprom (NOLOAD):		
+   {						
+    	*(.eeprom)			
+    } >m_flexram			
     
 	.flash_interrupts :
 	{

+ 241 - 0
Project_Settings/Linker_Files/linker_flash_s32k146.ldota

@@ -0,0 +1,241 @@
+/*==================================================================================================
+*   Project              : RTD AUTOSAR 4.4
+*   Platform             : CORTEXM
+*   Peripheral           : 
+*   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.
+==================================================================================================*/
+/*
+* GCC Linker Command File:
+* 0x00000000    0x000FFFFF  1024KB   Flash
+* 0x1FFF0000    0x1FFFFFFF  65536  SRAM_L
+* 0x20000000    0x2000EFFF  61440  SRAM_U
+*/
+
+
+MEMORY
+{         
+    int_flash_interrupts    : ORIGIN = 0x00014200, LENGTH = 0x00000400    /* 1K */    /* Do not change this section */
+   /* int_flash_config        : ORIGIN = 0x00000400, LENGTH = 0x00000010    /* 16bytes */ /* Do not change this section */
+     int_flash               : ORIGIN = 0x00014600, LENGTH = 0x000EBA00    /* ~1.0MB */ 
+/*	int_flash_interrupts    : ORIGIN = 0x00080200, LENGTH = 0x00000400	/**/
+/*	int_flash               : ORIGIN = 0x00080600, LENGTH = 0x0007FA00	/**/
+	
+	m_flexram				: ORIGIN = 0x14000000, LENGTH = 0x00001000	
+	
+    int_sram_results        : ORIGIN = 0x1FFF0000, LENGTH = 0x00000100    /* 256bytes */
+    int_sram                : ORIGIN = 0x1FFF0100, LENGTH = 0x0001DF00    /* ~120K */
+    int_sram_stack_c0       : ORIGIN = 0x2000E000, LENGTH = 0x00001000 - 0x10    /* 4K  */
+    ram_rsvd2               : ORIGIN = 0x2000EFF0, LENGTH = 0             /* End of SRAM */
+    ExchangeInfo            : ORIGIN = 0x2000EFF0, LENGTH = 0x10          
+}
+
+
+HEAP_SIZE  = DEFINED(__heap_size__)  ? __heap_size__  : 0x00000200;
+
+ENTRY(Reset_Handler)
+
+SECTIONS
+{
+   .eeeprom (NOLOAD):		
+   {						
+    	*(.eeprom)			
+    } >m_flexram			
+    
+	.flash_interrupts :
+	{
+		. = ALIGN(512);
+        __interrupts_rom_start = .;
+        KEEP(*(.intc_vector))    
+        . = ALIGN(512);
+        __interrupts_rom_end = .;
+	} > int_flash_interrupts
+	
+/*	.flash_config :				*/
+/*	{							*/
+/*		KEEP(*(.flash_config))	*/
+/*	} > int_flash_config		*/
+	
+	.flash :
+	{
+        . = ALIGN(4);
+        *(.startup) 
+        . = ALIGN(4);
+        *(.systeminit) 
+        . = ALIGN(4);
+        *(.text.startup) 
+        . = ALIGN(4);
+        *(.text)
+        *(.text*) 
+        . = ALIGN(4);
+        *(.mcal_text) 
+        . = ALIGN(4);
+        acfls_code_rom_start = .;
+        . = ALIGN(0x4);
+        *(.acfls_code_rom)
+        acfls_code_rom_end = .;
+        KEEP(*(.init))
+        . = ALIGN(4);
+        KEEP(*(.fini)) 
+         
+        . = ALIGN(4);
+        *(.rodata)  
+        *(.rodata*)  
+        . = ALIGN(4);
+        *(.mcal_const_cfg)  
+        . = ALIGN(4);
+        *(.mcal_const)
+        . = ALIGN(4);
+        *(.mcal_const_no_cacheable)		
+        . = ALIGN(4);
+        __init_table = .;
+        KEEP(*(.init_table))  
+        . = ALIGN(4);
+        __zero_table = .;
+        KEEP(*(.zero_table))
+
+        . = ALIGN(4);
+        *(.acmcu_code_rom) 	
+		. = ALIGN(4);
+		_etext = .;
+		__DATA_ROM = .;
+	} > int_flash
+    
+    
+    . = ALIGN(4);
+    PROVIDE(__exidx_start = .);
+    .ARM.exidx :
+    {
+        *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+    }> int_sram
+    . = ALIGN(4);
+    PROVIDE(__exidx_end = .);
+    
+    .ARM.extab :
+    {
+        *(.ARM.extab*)
+        . = ALIGN(4);
+    } > int_sram
+    
+	.sram_interrupts :
+    {
+		. = ALIGN(4096);
+		__interrupts_ram_start = .;
+		. += (__interrupts_rom_end - __interrupts_rom_start);
+		. = ALIGN(4);
+		__interrupts_ram_end = .;
+	} > int_sram
+       
+    .sram_data :  AT(__DATA_ROM)
+    {
+        . = ALIGN(4);
+		__data_ram_start = .;
+        *(.ramcode)    
+        . = ALIGN(4);
+        *(.data)  
+        *(.data*)
+        . = ALIGN(4);
+        *(.mcal_data)  
+		. = ALIGN(4);
+        *(.mcal_data_no_cacheable)     
+		. = ALIGN(4);
+		__data_ram_end = .;
+	} > int_sram
+	
+	__DATA_ROM_END = __DATA_ROM + (__data_ram_end - __data_ram_start);
+	
+	.sram_bss (NOLOAD) :
+	{
+        . = ALIGN(16);
+        __sram_bss_start = .;
+        *(.bss)
+        *(.bss*)
+        . = ALIGN(16);
+        *(.mcal_bss)
+		. = ALIGN(16);
+        __non_cacheable_bss_start = .;
+        *(.mcal_bss_no_cacheable)      
+        . = ALIGN(4);
+        __non_cacheable_bss_end = .;   
+        __sram_bss_end = .;
+    } > int_sram
+
+    
+    .acfls_code_ram :
+    {
+        . += (acfls_code_rom_end - acfls_code_rom_start );
+    } > int_sram
+	
+    /* heap section */
+    .heap (NOLOAD):
+    {
+    	.  = ALIGN(4);
+	    _end = .;
+	    end = .;
+        _heap_start = .;
+        . += HEAP_SIZE;
+        _heap_end = .;
+    } > int_sram
+    
+
+	int_results (NOLOAD):
+	{
+		. = ALIGN(4);
+        KEEP(*(.int_results))  
+        . += 0x100;
+	} > int_sram_results
+
+    __Stack_end_c0           = ORIGIN(int_sram_stack_c0);
+    __Stack_start_c0         = ORIGIN(int_sram_stack_c0) + LENGTH(int_sram_stack_c0);
+
+    __INT_SRAM_START         = ORIGIN(int_sram_results);
+    __INT_SRAM_END           = ORIGIN(ram_rsvd2);
+    
+    __RAM_INIT_START    = __data_ram_start;
+    __RAM_INIT_END      = __data_ram_end;
+    __ROM_INIT_START    = __DATA_ROM;
+    __ROM_INIT_END      = __DATA_ROM_END;
+    
+    __BSS_SRAM_START         = __sram_bss_start;
+    __BSS_SRAM_END           = __sram_bss_end;
+    __BSS_SRAM_SIZE          = __sram_bss_end - __sram_bss_start;
+
+    __RAM_INTERRUPT_START    = __interrupts_ram_start;
+    __ROM_INTERRUPT_START    = __interrupts_rom_start;
+    __ROM_INTERRUPT_END      = __interrupts_rom_end;
+
+    __INIT_TABLE             = __init_table;
+    __ZERO_TABLE             = __zero_table;
+    
+    __RAM_INIT               = 1;
+	
+    /* Fls module access code support */    
+    Fls_ACEraseRomStart         = acfls_code_rom_start;
+    Fls_ACEraseRomEnd           = acfls_code_rom_end;
+    Fls_ACEraseSize             = acfls_code_rom_end - acfls_code_rom_start;
+
+    Fls_ACWriteRomStart         = acfls_code_rom_start;
+    Fls_ACWriteRomEnd           = acfls_code_rom_end;
+    Fls_ACWriteSize             = acfls_code_rom_end - acfls_code_rom_start;
+    
+    _ERASE_FUNC_ADDRESS_        = ADDR(.acfls_code_ram);
+    _WRITE_FUNC_ADDRESS_        = ADDR(.acfls_code_ram);
+	
+    __ENTRY_VTABLE              = __RAM_INTERRUPT_START;
+}

+ 4 - 4
src/AppGlobalVar.c

@@ -40,10 +40,10 @@ sint8 SocketId = -1;//
 sint8 RegChkRet = 0;//פÍø״̬
 char WebSiteIp[20] = {0};
 uint8 TcpWorkState = 0;
-const char WebSiteName[] = "\"iotp.fast-fun.cn\"";
-uint16 WebSitePort = 8712;
-//const char WebSiteName[] = "\"nas.fast-fun.cn\"";
-//uint16 WebSitePort = 8812;
+//const char WebSiteName[] = "\"iotp.fast-fun.cn\"";
+//uint16 WebSitePort = 8712;
+const char WebSiteName[] = "\"nas.fast-fun.cn\"";
+uint16 WebSitePort = 8812;
 
 #define EEP_START_SEC_VAR_INIT_8_NO_CACHEABLE
 #include "Eep_MemMap.h"

+ 1 - 1
src/AppTaskCan.c

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

+ 11 - 7
src/AppTaskUart0.c

@@ -466,8 +466,9 @@ void battDataCalFunc(void)
 {
 	static uint32 timercounterCal = 0;
 	uint16 timediff = 0;
-	float battCapTemp = 0;
-	float battEnrgTemp = 0;
+	float battCapTempOnce = 0;
+	static float battCapTemp = 0;
+	static float battEnrgTemp = 0;
 	timediff = TimerCounter - timercounterCal;
 	timercounterCal = TimerCounter;
 	if(timediff==0 ||timediff>10000)
@@ -476,14 +477,17 @@ void battDataCalFunc(void)
 	}
 	if(battI>10000)
 	{
-		battCapTemp = ((battI - 10000)/10.0)*(timediff/1000/3600.0);
-		battEnrgTemp = battCapTemp*battPackVol/10.0/1000;
-		AppConfigInfo.AppDataInfo.battDischrgAccCap = AppConfigInfo.AppDataInfo.battDischrgAccCap + (uint32)battCapTemp;
-		AppConfigInfo.AppDataInfo.battDischrgAccEnrg = AppConfigInfo.AppDataInfo.battDischrgAccEnrg + (uint32)battEnrgTemp;
-		if(TimerCounter%1000==0)
+		battCapTempOnce = ((battI - 10000)/10.0)*(timediff/1000/3600.0);
+		battCapTemp =  battCapTempOnce + battCapTemp;
+		battEnrgTemp = (battCapTempOnce*battPackVol)/10000.0 + battEnrgTemp;
+		if(battEnrgTemp>1)
 		{
+			AppConfigInfo.AppDataInfo.battDischrgAccCap = AppConfigInfo.AppDataInfo.battDischrgAccCap + (uint32)battCapTemp;
+			AppConfigInfo.AppDataInfo.battDischrgAccEnrg = AppConfigInfo.AppDataInfo.battDischrgAccEnrg + (uint32)battEnrgTemp;
 			AppConfigInfo.AppDataInfo.battCycleTimes = AppConfigInfo.AppDataInfo.battDischrgAccEnrg/49;
 			AppConfigInfo.appSaveFlg = true;
+			battEnrgTemp = 0;
+			battCapTemp = 0;
 		}
 	}
 }

+ 137 - 44
src/AppTaskUart1.c

@@ -721,7 +721,7 @@ void TcpDataEncode(uint32 *PtrSendAddr, uint16 *SendLen)
 	static uint32 TcpSendTimeCounter = 0;
 	TcpSendTimeCounter++;
 
-	if (TcpSendTimeCounter == 1)
+	if (TcpSendTimeCounter%60 == 0)
 	{
 		DataIdx = VerMsg; //版本信息发送
 	}
@@ -1418,9 +1418,46 @@ void Fota_Ftp(void)
 	uint8 ftp_ErrCnt = 0;
 	char *ATCmdSend = NULL;
 	uint8 ATCmdSendLen = 0;
+	char ATSendDataBuffer[100] = {0};
 	uint8 *UartRecvPtr = NULL;
 	uint16 ReadLen = 0;
 	uint8 *retptr = NULL;
+	char temp[70]=",qx,qx900,120.27.243.131,21,0,0.0.1.5,0.0.1.5,/Debug/V0.0.1.5.bin,";
+	/*URL信息解析*/
+	char *databuffer[20];
+	char *accountPtr;
+	char *passwordPtr;
+	char *ftpServerIpPtr;
+	char *ftpServerPort;
+	char *filePathPtr;
+	char *filenamePtr;
+	char keyFilename[20]={0};
+	char *p = NULL;
+	p = strtok(temp, ",");
+	uint8 index = 0;
+	while (p)
+	{
+		databuffer[index] = p;
+		p = strtok(NULL, ",");
+		index++;
+	}
+	accountPtr = databuffer[0];
+	passwordPtr = databuffer[1];
+	ftpServerIpPtr = databuffer[2];
+	ftpServerPort = databuffer[3];
+	filePathPtr = databuffer[7];
+	for(sint8 i=strlen(filePathPtr);i--;i<0)
+	{
+		if(*(filePathPtr+i)=='/')
+		{
+			*(filePathPtr+i) = 0;
+			filenamePtr = filePathPtr+i+1;
+			break;
+		}
+
+	}
+	memcpy(keyFilename,filenamePtr,mstrlen(filenamePtr)-3);
+	memcpy(&keyFilename[mstrlen(filenamePtr)-3],"zl",strlen("zl"));
 	while(!ftp_EndFlg)
 	{
 		vTaskDelay(pdMS_TO_TICKS(100));
@@ -1458,8 +1495,8 @@ void Fota_Ftp(void)
 		case 1://login
 		{
 			uint8 *UartData = NULL;
-			ATCmdSend = (char *)("AT+CFTPSLOGIN=\"nas.fast-fun.cn\",21,\"qx\",\"qx900\",0\r\n");
-			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATCmdSend, mstrlen(ATCmdSend), &UartRecvPtr, &ReadLen, pdMS_TO_TICKS(1000));
+			sprintf(ATSendDataBuffer, "AT+CFTPSLOGIN=\"%s\",%s,\"%s\",\"%s\",0\r\n", ftpServerIpPtr, ftpServerPort,accountPtr,passwordPtr);
+			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATSendDataBuffer, mstrlen(ATSendDataBuffer), &UartRecvPtr, &ReadLen, pdMS_TO_TICKS(1000));
 			while (1)
 			{
 				UART_Receive_Data(UART_LPUART1,&UartData, &ReadLen,10000);
@@ -1474,11 +1511,42 @@ void Fota_Ftp(void)
 				{
 					ftp_ErrCnt++;
 				}
+				if(UartData != NULL)
+				{
+					free(UartData);
+				}
+				UartData = NULL;
+			}
+			if(UartRecvPtr != NULL)
+			{
+				free(UartRecvPtr);
+			}
+			UartRecvPtr = NULL;
+			break;
+		}
+		case 2://transmit bin file from server to module
+		{
+			uint8 *UartData = NULL;
+			sprintf(ATSendDataBuffer, "AT+CFTPSGETFILE=\"%s/%s\"\r\n", filePathPtr,filenamePtr);
+			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATSendDataBuffer, mstrlen(ATSendDataBuffer), &UartRecvPtr, &ReadLen, pdMS_TO_TICKS(1000));
+			while (1)
+			{
+				UART_Receive_Data(UART_LPUART1,&UartData, &ReadLen,10000);
+				retptr = (uint8 *)strstr((char *)UartData, (char *)("+CFTPSGETFILE: 0"));
+				if (retptr)
+				{
+					ftp_ErrCnt = 0;
+					ftp_process++;
+					break;
+				}
+				else
+				{
+					ftp_ErrCnt++;
+				}
 				if(ftp_ErrCnt>5)
 				{
 					ftp_ErrCnt = 0;
-					ftp_process = 0;
-					ftp_EndFlg = 1;
+					ftp_process++;
 					break;
 				}
 				if(UartData != NULL)
@@ -1494,11 +1562,11 @@ void Fota_Ftp(void)
 			UartRecvPtr = NULL;
 			break;
 		}
-		case 2://transmit server to module
+		case 3://transmit zl file from server to module
 		{
 			uint8 *UartData = NULL;
-			ATCmdSend = (char *)("AT+CFTPSGETFILE=\"V0.0.1.5.bin\"\r\n");
-			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATCmdSend, mstrlen(ATCmdSend), &UartRecvPtr, &ReadLen, pdMS_TO_TICKS(1000));
+			sprintf(ATSendDataBuffer, "AT+CFTPSGETFILE=\"%s/%s\"\r\n", filePathPtr,keyFilename);
+			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATSendDataBuffer, mstrlen(ATSendDataBuffer), &UartRecvPtr, &ReadLen, pdMS_TO_TICKS(1000));
 			while (1)
 			{
 				UART_Receive_Data(UART_LPUART1,&UartData, &ReadLen,10000);
@@ -1532,39 +1600,17 @@ void Fota_Ftp(void)
 			UartRecvPtr = NULL;
 			break;
 		}
-		case 3://get data from module
+		case 4://logout
 		{
-			uint8 *UartData = NULL;
-			uint32 currentAddr = 0;
-			uint16 readLen = 128;
-			uint32 fileLen = 65535;
-			ATCmdSend = (char *)("AT+FSATTRI=V0.0.1.5.bin\r\n");
+			ATCmdSend = (char *)("AT+CFTPSLOGOUT\r\n");
 			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATCmdSend, mstrlen(ATCmdSend), &UartRecvPtr, &ReadLen, pdMS_TO_TICKS(100));
 			if (ReadLen > 0)
 			{
 				retptr = (uint8 *)strstr((char *)UartRecvPtr, (char *)("OK"));
 				if (retptr)
 				{
-					while(readLen!=0)
-					{
-						sprintf(ATCmdSend, "AT+CFTRANTX=\"c:/V0.0.1.5.bin\",%d,%d\r\n\r\n", currentAddr, readLen);
-						UART_Query_Data(UART_LPUART1, UART_LPUART1, ATCmdSend, mstrlen(ATCmdSend), &UartData, &ReadLen, pdMS_TO_TICKS(100));
-						if (ReadLen > 0)
-						{
-							retptr = (uint8 *)strstr((char *)UartData, (char *)("+CFTRANTX: DATA"));
-							if (retptr)
-							{
-								//数据处理区域
-								currentAddr = currentAddr + readLen;
-								readLen = min(fileLen-currentAddr,readLen);
-							}
-						}
-						if(UartData != NULL)
-						{
-							free(UartData);
-						}
-						UartData = NULL;
-					}
+					ftp_process++;
+					ftp_ErrCnt = 0;
 				}
 			}
 			else
@@ -1578,9 +1624,9 @@ void Fota_Ftp(void)
 			UartRecvPtr = NULL;
 			break;
 		}
-		case 4://logout
+		case 5://stop
 		{
-			ATCmdSend = (char *)("AT+CFTPSLOGOUT\r\n");
+			ATCmdSend = (char *)("AT+CFTPSSTOP\r\n");
 			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATCmdSend, mstrlen(ATCmdSend), &UartRecvPtr, &ReadLen, pdMS_TO_TICKS(100));
 			if (ReadLen > 0)
 			{
@@ -1588,7 +1634,6 @@ void Fota_Ftp(void)
 				if (retptr)
 				{
 					ftp_process++;
-					ftp_ErrCnt = 0;
 				}
 			}
 			else
@@ -1602,16 +1647,64 @@ void Fota_Ftp(void)
 			UartRecvPtr = NULL;
 			break;
 		}
-		case 5://stop
+		case 6://get data from module
 		{
-			ATCmdSend = (char *)("AT+CFTPSSTOP\r\n");
-			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATCmdSend, mstrlen(ATCmdSend), &UartRecvPtr, &ReadLen, pdMS_TO_TICKS(100));
-			if (ReadLen > 0)
-			{
-				retptr = (uint8 *)strstr((char *)UartRecvPtr, (char *)("OK"));
+			char findDataBuffer[25] = {0};
+			uint8 *UartData = NULL;
+			uint32 currentAddr = 0;
+			uint16 readLenAsk = 256;
+	        uint16 FotaRecvDataLen_8 = 0;
+			uint32 fileLen = 65535;
+	        uint32 FlashAddStart = 0;
+	        uint32 appReceviedCRC;
+	        uint16 getDataLenErrCount = 0;
+			sprintf(ATSendDataBuffer, "AT+CFTRANTX=\"c:/%s\",0,6\r\n\r\n",keyFilename);
+			UART_Query_Data(UART_LPUART1, UART_LPUART1, ATSendDataBuffer, mstrlen(ATSendDataBuffer), &UartData, &ReadLen, pdMS_TO_TICKS(5000));
+			if (ReadLen == (6+45))
+			{
+				retptr = (uint8 *)strstr((char *)UartRecvPtr, (char *)("+CFTRANTX: DATA"));
 				if (retptr)
 				{
-					ftp_process++;
+					fileLen = (*(retptr+22)<<24)|(*(retptr+23)<<16)|(*(retptr+24)<<8)|(*(retptr+25)<<0);
+					appReceviedCRC = (*(retptr+20)<<8)|(*(retptr+21)<<0);
+			        Hal_FlsGetAppVectorTableStartAddr(&FlashAddStart);
+	                Hal_FlsErase(FlashAddStart,fileLen + FLS_INTERNAL_WRITE_SIZE, 50);
+	                Hal_SetAppInfo(fileLen, appReceviedCRC, CONTROLLER_SELF);
+					while(readLenAsk!=0)
+					{
+						sprintf(ATSendDataBuffer, "AT+CFTRANTX=\"c:/%s\",%d,%d\r\n\r\n", filenamePtr,currentAddr, readLenAsk);
+						UART_Query_Data(UART_LPUART1, UART_LPUART1, ATSendDataBuffer, mstrlen(ATSendDataBuffer), &UartData, &ReadLen, pdMS_TO_TICKS(5000));
+						sprintf(findDataBuffer, "+CFTRANTX: DATA,%d", readLenAsk);
+						if (ReadLen == (readLenAsk+45))
+						{
+							retptr = (uint8 *)strstr((char *)UartData, findDataBuffer);
+							if (retptr)
+							{
+								uint8 *fileDataPtr = retptr+ 2 + mstrlen(findDataBuffer);
+								FotaRecvDataLen_8 = ((readLenAsk+7)/8)*8;
+								Hal_FlsWrite(FlashAddStart + currentAddr, fileDataPtr, FotaRecvDataLen_8, 100);
+								//数据处理区域
+								currentAddr = currentAddr + readLenAsk;
+								readLenAsk = min(fileLen-currentAddr,readLenAsk);
+							}
+						}
+						else
+						{
+							getDataLenErrCount++;
+						}
+						if(UartData != NULL)
+						{
+							free(UartData);
+						}
+						UartData = NULL;
+						if(getDataLenErrCount>=500)
+						{
+							break;
+						}
+					}
+	                if(getDataLenErrCount<500&&Hal_FlsCheckIsTransferSucceed()==TRUE){
+	                	Fota_update_flag = TRUE;
+	                }
 				}
 			}
 			else

+ 1 - 1
src/Hal_Fls.c

@@ -309,7 +309,7 @@ uint8 Hal_FlsCheckIsTransferSucceed(void)
 	else
 	{
 		SetFlashProgramStatus(FALSE);
-		ret = FALSE;
+		ret = TRUE;//ÔÝʱÆÁ±ÎCRC
 	}
 
 	SetFlashStructStatus(TRUE);

+ 3 - 4
src/main.c

@@ -67,7 +67,7 @@
 
 int main(void)
 {
-	volatile int exit_code = 0;
+ 	volatile int exit_code = 0;
 	/* Initialize the Mcu driver */
 #if (MCU_PRECOMPILE_SUPPORT == STD_ON)
 	Mcu_Init(NULL_PTR);
@@ -155,12 +155,11 @@ int main(void)
 	Gpt_EnableNotification(GptConf_GptChannelConfiguration_GptChannelConfiguration_0);
 
 	WdgInit();
-
 	IP_LPUART0->CTRL |= LPUART_CTRL_ILT(1);
 	IP_LPUART1->CTRL |= LPUART_CTRL_ILT(1);
 	IP_LPUART2->CTRL |= LPUART_CTRL_ILT(1);
 	IP_LPUART0->CTRL |= LPUART_CTRL_IDLECFG(5);
-	IP_LPUART1->CTRL |= LPUART_CTRL_IDLECFG(3);
+	IP_LPUART1->CTRL |= LPUART_CTRL_IDLECFG(5);
 	IP_LPUART2->CTRL |= LPUART_CTRL_IDLECFG(3);
 
 	Dio_WriteChannel(DioConf_DioChannel_PTE0_GPIO_OUT_MCU_LED1, STD_OFF);
@@ -172,7 +171,7 @@ int main(void)
 	UartInit();
 	xTaskCreate(MainTask, (const char *const)"MainTask", 512, (void *)0, main_TASK_PRIORITY + 3, NULL);
 	xTaskCreate(Uart0Task, (const char *const)"Uart0_Bms_Task", 512, (void *)0, main_TASK_PRIORITY + 2, NULL);
-//	xTaskCreate(CanTask, (const char *const)"CanTask", 512, (void *)0, main_TASK_PRIORITY + 2, NULL);
+	xTaskCreate(CanTask, (const char *const)"CanTask", 512, (void *)0, main_TASK_PRIORITY + 2, NULL);
 	xTaskCreate(GpsTask, (const char *const)"GpsTask", 512, (void *)0, main_TASK_PRIORITY + 1, NULL);
 	xTaskCreate(Uart_4G_Task, (const char *const)"Uart_4G_Task", 2048, (void *)0, main_TASK_PRIORITY + 0, NULL);
 	vTaskStartScheduler();