From 5daa5a51ac9a611c67118962ceb126e0bae9e491 Mon Sep 17 00:00:00 2001 From: duplo Date: Wed, 26 Aug 2009 16:00:14 +0000 Subject: [PATCH] Add new parameter to the makefile git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2785 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/bertos_utils.py | 3 +++ wizard/const.py | 7 +++++-- wizard/mktemplates/template_wiz.mk | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index 71b07384..8ad1568b 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -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]) diff --git a/wizard/const.py b/wizard/const.py index fd72ee81..07eeb2fa 100644 --- a/wizard/const.py +++ b/wizard/const.py @@ -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 +} diff --git a/wizard/mktemplates/template_wiz.mk b/wizard/mktemplates/template_wiz.mk index eeca4c9f..4caf7f2f 100644 --- a/wizard/mktemplates/template_wiz.mk +++ b/wizard/mktemplates/template_wiz.mk @@ -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 -- 2.25.1