Add support for cpu parameter to be added in the mk file
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 28 Aug 2009 13:49:02 +0000 (13:49 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 28 Aug 2009 13:49:02 +0000 (13:49 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2811 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BCpuPage.py
wizard/bertos_utils.py

index 463e333fa7c4954b394c15b0691fe55b92d943d7..d5ef0b50ac3fdcd22d84ee836d37576660be86ce 100644 (file)
@@ -61,12 +61,14 @@ class BCpuPage(BWizardPage):
             self.pageContent.frequencySpinBox.setVisible(True)
             infos = qvariant_converter.getDict(self.pageContent.cpuList.currentItem().data(Qt.UserRole))
             for key, value in infos.items():
-               if key in CPU_DEF:
-                   if type(CPU_DEF[key]) == list:
-                       infos[key] = qvariant_converter.getStringList(value)
-                   if type(CPU_DEF[key]) == str or type(CPU_DEF) == unicode:
-                       infos[key] = qvariant_converter.getString(value)
-               else:
+                if key in CPU_DEF:
+                    if type(CPU_DEF[key]) == list:
+                        infos[key] = qvariant_converter.getStringList(value)
+                    if type(CPU_DEF[key]) == str or type(CPU_DEF) == unicode:
+                        infos[key] = qvariant_converter.getString(value)
+                elif key.startswith("MK_"):
+                    pass
+                else:
                     del infos[key]
             self.setProjectInfo("CPU_INFOS", infos)
             self.setProjectInfo("CPU_NAME", unicode(self.pageContent.cpuList.currentItem().text()))
index fcfa3da7097c3a10f3a9f49310d927588ac8f865..812b728689ff600d11d584f6ba4d5b406e3d8a11 100644 (file)
@@ -219,7 +219,8 @@ def mkGenerator(project_info, makefile):
     cpu_mk_parameters = []
     for key, value in project_info.info("CPU_INFOS").items():
         if key.startswith("MK_"):
-            cpu_mk_parameters.append("%s = %s" %(key.replace("MK_", mk_data["$pname"]), value))
+            cpu_mk_parameters.append("%s = %s" %(key.replace("MK", mk_data["$pname"]), value))
+    print project_info.info("CPU_INFOS")
     mk_data["$cpuparameters"] = "\n".join(cpu_mk_parameters)
     mk_data["$csrc"], mk_data["$pcsrc"], mk_data["$cppasrc"], mk_data["$cxxsrc"], mk_data["$asrc"], mk_data["$constants"] = csrcGenerator(project_info)
     mk_data["$prefix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[0])