From 447d13a467817073c1f2fd336e1cf8584ea8ae78 Mon Sep 17 00:00:00 2001 From: duplo Date: Thu, 27 Aug 2009 14:32:48 +0000 Subject: [PATCH] Add support for file passed as sources for gdb git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2798 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/cltemplates/bertos.project | 5 +++-- wizard/const.py | 1 + wizard/plugins/codelite.py | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wizard/cltemplates/bertos.project b/wizard/cltemplates/bertos.project index 8a3a6b45..e6a16f89 100644 --- a/wizard/cltemplates/bertos.project +++ b/wizard/cltemplates/bertos.project @@ -11,8 +11,9 @@ $filelist - monitor soft_reset_halt -tbreak main + +source $initscript + diff --git a/wizard/const.py b/wizard/const.py index 07eeb2fa..5fc1d562 100644 --- a/wizard/const.py +++ b/wizard/const.py @@ -63,6 +63,7 @@ CPU_DEF = { "PROGRAMMER_CPU": "", "FLASH_SCRIPT": "", "DEBUG_SCRIPT": "", + "GDB_INIT_SCRIPT": "", } TOOLCHAIN_ITEMS = ("ld", "as") diff --git a/wizard/plugins/codelite.py b/wizard/plugins/codelite.py index c5e7007d..9f4b2540 100644 --- a/wizard/plugins/codelite.py +++ b/wizard/plugins/codelite.py @@ -97,6 +97,7 @@ def codeliteProjectGenerator(project_info): template = open("cltemplates/bertos.project", "r").read() filelist = "\n".join(clFiles(findSources(project_info.info("PROJECT_PATH")), "")) debugger_path = project_info.info("TOOLCHAIN")["path"].replace("gcc", "gdb") + init_script = project_info.info("CPU_INFOS")["GDB_INIT_SCRIPT"] while template.find("$filelist") != -1: template = template.replace("$filelist", filelist) project_name = os.path.basename(project_info.info("PROJECT_PATH")) @@ -104,6 +105,8 @@ def codeliteProjectGenerator(project_info): template = template.replace("$project", project_name) while template.find("$debuggerpath") != -1: template = template.replace("$debuggerpath", debugger_path) + while template.find("$initscript") != -1: + template = template.replace("$initscript", init_script) return template def codeliteWorkspaceGenerator(project_info): -- 2.25.1