//\r
Count = 0;\r
if (exitBootList != null) {\r
- if (setVirtualList != null) {\r
- for (i = 0; i < exitBootList.length; i++) {\r
- if (exitBootList[i].equalsIgnoreCase("")) {\r
- break;\r
- }\r
+ for (i = 0; i < exitBootList.length; i++) {\r
+ if (exitBootList[i].equalsIgnoreCase("")) {\r
+ break;\r
}\r
- Count = i;\r
}\r
+ Count = i;\r
}\r
fileBuffer.append(Integer.toString(Count));\r
fileBuffer.append(";\r\n\r\n");\r
int size = (int)inFile.length();\r
byte[] buffer = new byte[size];\r
File outFile = new File (this.outputPath + File.separatorChar + CommonDefinition.tianoR8FlashMapH);\r
- try{\r
- if (inFile.exists()) {\r
- FileInputStream fis = new FileInputStream (inFile);\r
- fis.read(buffer);\r
- FileOutputStream fos = new FileOutputStream(outFile);\r
- fos.write(buffer);\r
- fis.close();\r
- fos.close();\r
- }else {\r
- throw new AutoGenException("The flashMap.h file don't exist!!");\r
+ //\r
+ // If TianoR8FlashMap.h existed and the flashMap.h don't change, \r
+ // do nothing.\r
+ // \r
+ if ((!outFile.exists()) ||(inFile.lastModified() - outFile.lastModified()) >= 0) {\r
+ try{\r
+ if (inFile.exists()) {\r
+ FileInputStream fis = new FileInputStream (inFile);\r
+ fis.read(buffer);\r
+ FileOutputStream fos = new FileOutputStream(outFile);\r
+ fos.write(buffer);\r
+ fis.close();\r
+ fos.close();\r
+ }else {\r
+ throw new AutoGenException("The flashMap.h file don't exist!!");\r
+ }\r
+ } catch (Exception e){\r
+ throw new AutoGenException(e.getMessage());\r
}\r
- } catch (Exception e){\r
- throw new AutoGenException(e.getMessage());\r
- }\r
- \r
+ }\r
}\r
-\r
}
\ No newline at end of file