Jelajahi Sumber

[Improve][Modularization][All]

2021.03.25 / Folus Wen

Actions:
1. flash_erase size parameter change to 0 cover different flash size ECC issue.

Files:
1. As follow commit history

Image version: D0.00.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 4 tahun lalu
induk
melakukan
a5c790d803

+ 8 - 8
EVSE/Modularization/Module_ProduceUtils.c

@@ -16,12 +16,12 @@
 
 #include 	<unistd.h>
 #include 	<stdarg.h>
-#include    <stdio.h>		/*標準輸入輸出定義*/
-#include    <stdlib.h>		/*標準函數庫定義*/
-#include    <unistd.h>		/*Unix 標準函數定義*/
-#include    <fcntl.h>		/*檔控制定義*/
-#include    <termios.h>		/*PPSIX 終端控制定義*/
-#include    <errno.h>		/*錯誤號定義*/
+#include    <stdio.h>
+#include    <stdlib.h>
+#include    <unistd.h>
+#include    <fcntl.h>
+#include    <termios.h>
+#include    <errno.h>
 #include 	<errno.h>
 #include 	<string.h>
 #include	<time.h>
@@ -240,12 +240,12 @@ int StoreUsrConfigData(struct SysConfigData *UsrData)
 
 
 			DEBUG_INFO("Erase /dev/mtd10.\n");
-			runShellCmd("flash_erase /dev/mtd10 0 12");
+			runShellCmd("flash_erase /dev/mtd10 0 0");
 			DEBUG_INFO("Write /dev/mtd10.\n");
 			runShellCmd("nandwrite -p /dev/mtd10 /mnt/EvseConfig.bin");
 
 			DEBUG_INFO("Erase /dev/mtd11.\n");
-			runShellCmd("flash_erase /dev/mtd11 0 12");
+			runShellCmd("flash_erase /dev/mtd11 0 0");
 			DEBUG_INFO("Write /dev/mtd11.\n");
 			runShellCmd("nandwrite -p /dev/mtd11 /mnt/EvseConfig.bin");
 

+ 11 - 11
EVSE/Modularization/Module_Upgrade.c

@@ -237,7 +237,7 @@ int Upgrade_Flash(unsigned int Type,char *SourcePath,char *ModelName)
                                 else
                                 {
                                 	DEBUG_INFO("Erase /dev/mtd0.\n");
-                                	runShellCmd("flash_erase /dev/mtd0 0 1");
+                                	runShellCmd("flash_erase /dev/mtd0 0 0");
 
                                 	DEBUG_INFO("Write /dev/mtd0.\n");
                                 	runShellCmd("nandwrite -p /dev/mtd0 /mnt/imgBuffer");
@@ -268,13 +268,13 @@ int Upgrade_Flash(unsigned int Type,char *SourcePath,char *ModelName)
                                 else
                                 {
                                 	DEBUG_INFO("Erase /dev/mtd1.\n");
-                                	runShellCmd("flash_erase /dev/mtd1 0 2");
+                                	runShellCmd("flash_erase /dev/mtd1 0 0");
 
 									DEBUG_INFO("Write /dev/mtd1.\n");
 									runShellCmd("nandwrite -p /dev/mtd1 /mnt/imgBuffer");
 
 									DEBUG_INFO("Erase /dev/mtd3.\n");
-									runShellCmd("flash_erase /dev/mtd3 0 2");
+									runShellCmd("flash_erase /dev/mtd3 0 0");
 
 									DEBUG_INFO("Write /dev/mtd3.\n");
 									runShellCmd("nandwrite -p /dev/mtd3 /mnt/imgBuffer");
@@ -305,13 +305,13 @@ int Upgrade_Flash(unsigned int Type,char *SourcePath,char *ModelName)
                                 else
                                 {
                                     DEBUG_INFO("Erase /dev/mtd4.\n");
-                                    runShellCmd("flash_erase /dev/mtd4 0 1");
+                                    runShellCmd("flash_erase /dev/mtd4 0 0");
 
 									DEBUG_INFO("Write /dev/mtd4.\n");
 									runShellCmd("nandwrite -p /dev/mtd4 /mnt/imgBuffer");
 
 									DEBUG_INFO("Erase /dev/mtd5.\n");
-									runShellCmd("flash_erase /dev/mtd5 0 1");
+									runShellCmd("flash_erase /dev/mtd5 0 0");
 
 									DEBUG_INFO("Write /dev/mtd5.\n");
 									runShellCmd("nandwrite -p /dev/mtd5 /mnt/imgBuffer");
@@ -342,12 +342,12 @@ int Upgrade_Flash(unsigned int Type,char *SourcePath,char *ModelName)
                                 else
                                 {
                                 	DEBUG_INFO("Erase /dev/mtd6.\n");
-                                	runShellCmd("flash_erase /dev/mtd6 0 20");
+                                	runShellCmd("flash_erase /dev/mtd6 0 0");
 									DEBUG_INFO("Write /dev/mtd6.\n");
 									runShellCmd("nandwrite -p /dev/mtd6 /mnt/imgBuffer");
 
 									DEBUG_INFO("Erase /dev/mtd7.\n");
-									runShellCmd("flash_erase /dev/mtd7 0 20");
+									runShellCmd("flash_erase /dev/mtd7 0 0");
 									DEBUG_INFO("Write /dev/mtd7.\n");
 									runShellCmd("nandwrite -p /dev/mtd7 /mnt/imgBuffer");
 
@@ -376,12 +376,12 @@ int Upgrade_Flash(unsigned int Type,char *SourcePath,char *ModelName)
                                 else
                                 {
                                 	DEBUG_INFO("Erase /dev/mtd8.\n");
-                                	runShellCmd("flash_erase /dev/mtd8 0 96");
+                                	runShellCmd("flash_erase /dev/mtd8 0 0");
                                 	DEBUG_INFO("Write /dev/mtd8.\n");
                                 	runShellCmd("nandwrite -p /dev/mtd8 /mnt/imgBuffer");
 
                                 	DEBUG_INFO("Erase /dev/mtd9.\n");
-                                	runShellCmd("flash_erase /dev/mtd9 0 96");
+                                	runShellCmd("flash_erase /dev/mtd9 0 0");
                                 	DEBUG_INFO("Write /dev/mtd9.\n");
                                 	runShellCmd("nandwrite -p /dev/mtd9 /mnt/imgBuffer");
 
@@ -411,12 +411,12 @@ int Upgrade_Flash(unsigned int Type,char *SourcePath,char *ModelName)
                                 else
                                 {
                                 	DEBUG_INFO("Erase /dev/mtd10.\n");
-                                	runShellCmd("flash_erase /dev/mtd10 0 12");
+                                	runShellCmd("flash_erase /dev/mtd10 0 0");
 									DEBUG_INFO("Write /dev/mtd10.\n");
 									runShellCmd("nandwrite -p /dev/mtd10 /mnt/imgBuffer");
 
 									DEBUG_INFO("Erase /dev/mtd11.\n");
-									runShellCmd("flash_erase /dev/mtd11 0 12");
+									runShellCmd("flash_erase /dev/mtd11 0 0");
 									DEBUG_INFO("Write /dev/mtd11.\n");
 									runShellCmd("nandwrite -p /dev/mtd11 /mnt/imgBuffer");
 

+ 8 - 8
EVSE/Projects/AW-CCS/Apps/Module_ConfigTools.c

@@ -22,12 +22,12 @@
 
 #include 	<unistd.h>
 #include 	<stdarg.h>
-#include    <stdio.h>      /*標準輸入輸出定義*/
-#include    <stdlib.h>     /*標準函數庫定義*/
-#include    <unistd.h>     /*Unix 標準函數定義*/
-#include    <fcntl.h>      /*檔控制定義*/
-#include    <termios.h>    /*PPSIX 終端控制定義*/
-#include    <errno.h>      /*錯誤號定義*/
+#include    <stdio.h>
+#include    <stdlib.h>
+#include    <unistd.h>
+#include    <fcntl.h>
+#include    <termios.h>
+#include    <errno.h>
 #include 	<errno.h>
 #include 	<string.h>
 #include	<time.h>
@@ -152,12 +152,12 @@ int StoreUsrConfigData(struct SysConfigData *UsrData)
 
 
 		DEBUG_INFO("Erase /dev/mtd10.\n");
-		runShellCmd("flash_erase /dev/mtd10 0 12");
+		runShellCmd("flash_erase /dev/mtd10 0 0");
 		DEBUG_INFO("Write /dev/mtd10.\n");
 		runShellCmd("nandwrite -p /dev/mtd10 /mnt/EvseConfig.bin");
 
 		DEBUG_INFO("Erase /dev/mtd11.\n");
-		runShellCmd("flash_erase /dev/mtd11 0 12");
+		runShellCmd("flash_erase /dev/mtd11 0 0");
 		DEBUG_INFO("Write /dev/mtd11.\n");
 		runShellCmd("nandwrite -p /dev/mtd11 /mnt/EvseConfig.bin");
 

+ 9 - 9
EVSE/Projects/AW-CCS/Apps/Module_FactoryConfig.c

@@ -15,12 +15,12 @@
 
 #include 	<unistd.h>
 #include 	<stdarg.h>
-#include    <stdio.h>      /*標準輸入輸出定義*/
-#include    <stdlib.h>     /*標準函數庫定義*/
-#include    <unistd.h>     /*Unix 標準函數定義*/
-#include    <fcntl.h>      /*檔控制定義*/
-#include    <termios.h>    /*PPSIX 終端控制定義*/
-#include    <errno.h>      /*錯誤號定義*/
+#include    <stdio.h>
+#include    <stdlib.h>
+#include    <unistd.h>
+#include    <fcntl.h>
+#include    <termios.h>
+#include    <errno.h>
 #include 	<errno.h>
 #include 	<string.h>
 #include	<time.h>
@@ -404,17 +404,17 @@ int main(int argc, char *argv[])
 	if((outType&OUTPUT_FLASH)>0)
 	{
 		DEBUG_INFO("Erase /dev/mtd10.\n");
-		runShellCmd("flash_erase /dev/mtd10 0 12");
+		runShellCmd("flash_erase /dev/mtd10 0 0");
 		DEBUG_INFO("Write /dev/mtd10.\n");
 		runShellCmd("nandwrite -p /dev/mtd10 /mnt/FactoryDefaultConfig.bin");
 
 		DEBUG_INFO("Erase /dev/mtd11.\n");
-		runShellCmd("flash_erase /dev/mtd11 0 12");
+		runShellCmd("flash_erase /dev/mtd11 0 0");
 		DEBUG_INFO("Write /dev/mtd11.\n");
 		runShellCmd("nandwrite -p /dev/mtd11 /mnt/FactoryDefaultConfig.bin");
 
 		DEBUG_INFO("Erase /dev/mtd12.\n");
-		runShellCmd("flash_erase /dev/mtd12 0 12");
+		runShellCmd("flash_erase /dev/mtd12 0 0");
 		DEBUG_INFO("Write /dev/mtd12.\n");
 		runShellCmd("nandwrite -p /dev/mtd12 /mnt/FactoryDefaultConfig.bin");
 

+ 2 - 2
EVSE/Projects/AW-CCS/Apps/main.c

@@ -1640,12 +1640,12 @@ int StoreUsrConfigData(struct SysConfigData *UsrData)
 		DEBUG_INFO("EvseConfig write to file in /mnt OK.\n");
 
 		DEBUG_INFO("Erase /dev/mtd10.\n");
-		runShellCmd("flash_erase /dev/mtd10 0 12");
+		runShellCmd("flash_erase /dev/mtd10 0 0");
 		DEBUG_INFO("Write /dev/mtd10.\n");
 		runShellCmd("nandwrite -p /dev/mtd10 /mnt/EvseConfig.bin");
 
 		DEBUG_INFO("Erase /dev/mtd11.\n");
-		runShellCmd("flash_erase /dev/mtd11 0 12");
+		runShellCmd("flash_erase /dev/mtd11 0 0");
 		DEBUG_INFO("Write /dev/mtd11.\n");
 		runShellCmd("nandwrite -p /dev/mtd11 /mnt/EvseConfig.bin");