2 from GenFdsGlobalVariable import GenFdsGlobalVariable
\r
6 from CommonDataClass.FdfClassObject import DataSectionClassObject
\r
8 class DataSection (DataSectionClassObject):
\r
10 DataSectionClassObject.__init__(self)
\r
12 def GenSection(self, OutputPath, ModuleName, keyStringList, FfsInf = None):
\r
14 # Prepare the parameter of GenSection
\r
17 self.Alignment = FfsInf.__ExtendMarco__(self.Alignemnt)
\r
18 self.SecType = FfsInf.__ExtendMarco__(self.SecType)
\r
19 self.SectFileName = FfsInf.__ExtendMarco__(self.SectFileName)
\r
21 self.SectFileName = GenFdsGlobalVariable.ReplaceWorkspaceMarco(self.SectFileName)
\r
22 """Check Section file exist or not !"""
\r
24 if not os.path.exists(self.SectFileName):
\r
25 self.SectFileName = os.path.join (GenFdsGlobalVariable.WorkSpaceDir,
\r
27 if self.SecType == 'TE':
\r
28 TeFile = os.path.join( OutputPath, ModuleName + 'Te.raw')
\r
29 GenTeCmd = 'GenFW -t ' + \
\r
33 GenFdsGlobalVariable.ExtendMarco(self.SectFileName)
\r
35 GenFdsGlobalVariable.CallExternalTool(GenTeCmd, "GenFw Failed !")
\r
36 self.SectFileName = TeFile
\r
38 OutputFile = os.path.join (OutputPath, ModuleName + Ffs.SectionSuffix.get(self.SecType))
\r
39 OutputFile = os.path.normpath(OutputFile)
\r
41 GenSectionCmd = 'GenSec -o ' + \
\r
44 Section.Section.SectionType.get (self.SecType) + \
\r
46 GenFdsGlobalVariable.ExtendMarco(self.SectFileName)
\r
53 GenFdsGlobalVariable.CallExternalTool(GenSectionCmd, "GenSection Failed!")
\r
54 return OutputFile, self.Alignment
\r