Add support for file passed as sources for gdb
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 Aug 2009 14:32:48 +0000 (14:32 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 Aug 2009 14:32:48 +0000 (14:32 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2798 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/cltemplates/bertos.project
wizard/const.py
wizard/plugins/codelite.py

index 8a3a6b451b42ffa12ee25b03e637ab4f599cb3c8..e6a16f891b813355de00262b1e5813939b385fff 100644 (file)
@@ -11,8 +11,9 @@ $filelist
       </Compiler>
       <Linker Required="yes" Options=""/>
       <Debugger IsRemote="yes" RemoteHostName="localhost" RemoteHostPort="3333" DebuggerPath="$debuggerpath">
-        <PostConnectCommands>monitor soft_reset_halt
-tbreak main</PostConnectCommands>
+        <PostConnectCommands>
+source $initscript
+       </PostConnectCommands>
         <StartupCommands></StartupCommands>
       </Debugger>      
       <ResourceCompiler Required="no" Options=""/>
index 07eeb2faf1faa35d81bad7c35fda972b0a5fd38e..5fc1d562e7aaecab476046895a54f4eb78031e7b 100644 (file)
@@ -63,6 +63,7 @@ CPU_DEF = {
     "PROGRAMMER_CPU": "",
     "FLASH_SCRIPT": "",
     "DEBUG_SCRIPT": "",
+    "GDB_INIT_SCRIPT": "",
 }
 
 TOOLCHAIN_ITEMS = ("ld", "as")
index c5e7007d704337d8554107ef03b73736302b98ae..9f4b2540666b7d9c789decccfe2473b4d162196c 100644 (file)
@@ -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):