Add new parameter to the makefile
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 26 Aug 2009 16:00:14 +0000 (16:00 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 26 Aug 2009 16:00:14 +0000 (16:00 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2785 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py
wizard/const.py
wizard/mktemplates/template_wiz.mk

index 71b073848c50f978adee9f585a47f0f44dc43e76..8ad1568b1d9280b1ce60cc844176eb31f1370eca 100644 (file)
@@ -229,6 +229,9 @@ def mkGenerator(project_info, makefile):
     mk_data["$prefix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[0])
     mk_data["$suffix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[1])
     mk_data["$main"] = os.path.basename(project_info.info("PROJECT_PATH")) + "/main.c"
+    mk_data["$programmercpu"] = project_info.info("CPU_INFOS")["PROGRAMMER_CPU"]
+    mk_data["$flashscript"] = project_info.info("CPU_INFOS")["FLASH_SCRIPT"]
+    mk_data["$debugscript"] = project_info.info("CPU_INFOS")["DEBUG_SCRIPT"]
     for key in mk_data:
         while makefile.find(key) != -1:
             makefile = makefile.replace(key, mk_data[key])
index fd72ee81565c2fca70a711802f2b12bfcf63230b..07eeb2faf1faa35d81bad7c35fda972b0a5fd38e 100644 (file)
@@ -59,7 +59,10 @@ CPU_DEF = {
     "SUPPORTED_DRV" : [],
     "PC_SRC" : [],
     "CPU_DESC" : [],
-    "CPU_DEFAULT_FREQ": "1000000"
+    "CPU_DEFAULT_FREQ": "1000000",
+    "PROGRAMMER_CPU": "",
+    "FLASH_SCRIPT": "",
+    "DEBUG_SCRIPT": "",
 }
 
 TOOLCHAIN_ITEMS = ("ld", "as")
@@ -95,4 +98,4 @@ MODULE_DEFINITION = {
     "module_harvard": "module_harvard",
     "module_hw": "module_hw",
     "module_supports": "module_supports",
-}
\ No newline at end of file
+}
index eeca4c9fbd813419decf0abe8374ad701a27d151..4caf7f2fed522e249f7fbc49d3e2a6de79792a75 100644 (file)
@@ -52,3 +52,7 @@ $pname_CPPAFLAGS = $cppaflags
 $pname_CXXFLAGS = $cxxflags
 $pname_ASFLAGS = $asflags
 $pname_ARFLAGS = $arflags
+
+$pname_PROGRAMMER_CPU = $programmercpu
+$pname_FLASH_SCRIPT = $flashscript
+$pname_DEBUG_SCRIPT = $debugscript