Add debug configuration for codelite projets
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 Aug 2009 14:24:44 +0000 (14:24 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 27 Aug 2009 14:24:44 +0000 (14:24 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2797 38d2e660-2303-0410-9eaa-f027e97ec537

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

index 4bacd61891873f55be6d9a27d8cfe869865eb77a..8a3a6b451b42ffa12ee25b03e637ab4f599cb3c8 100644 (file)
@@ -5,15 +5,16 @@ $filelist
   <Dependencies/>
   <Settings Type="Dynamic Library">
     <Configuration Name="Debug" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library">
-      <General OutputFile="" IntermediateDirectory="./Debug" Command="" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+     <General OutputFile="" IntermediateDirectory="./Debug" Command="./images/$project.elf" CommandArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
       <Compiler Required="yes" Options="-g">
         <IncludePath Value="."/>
       </Compiler>
       <Linker Required="yes" Options=""/>
-      <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
-        <PostConnectCommands></PostConnectCommands>
+      <Debugger IsRemote="yes" RemoteHostName="localhost" RemoteHostPort="3333" DebuggerPath="$debuggerpath">
+        <PostConnectCommands>monitor soft_reset_halt
+tbreak main</PostConnectCommands>
         <StartupCommands></StartupCommands>
-      </Debugger>
+      </Debugger>      
       <ResourceCompiler Required="no" Options=""/>
       <PreBuild/>
       <PostBuild/>
index 543cb6d1498a4e9c1d3319e5d49ca0d8611756f3..c5e7007d704337d8554107ef03b73736302b98ae 100644 (file)
@@ -96,11 +96,14 @@ 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")
     while template.find("$filelist") != -1:
         template = template.replace("$filelist", filelist)
     project_name = os.path.basename(project_info.info("PROJECT_PATH"))
     while template.find("$project") != -1:
         template = template.replace("$project", project_name)
+    while template.find("$debuggerpath") != -1:
+        template = template.replace("$debuggerpath", debugger_path)
     return template
 
 def codeliteWorkspaceGenerator(project_info):