<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Ok, got it working. Posting here for future reference.
<div><br>
</div>
<div>Turns out this isn't all that difficult.</div>
<div><br>
</div>
<div>Firstly, one must set up an "attach" launcher in CodeWarrior when you create your project. Then under "Debug Configurations" modify that attach launcher thusly:</div>
<div><br>
</div>
<div>1) Under the "Source" tab of the debug configurations page add the .../development/rtems/git folder and be sure to click the "search sub-directories" check box</div>
<div><br>
</div>
<div>2) Under the "Trace and Profile" click the "User Code" radio button and put in your start address (0x4000 in the case of hello.exe).</div>
<div><br>
</div>
<div>3) Under the "Main" make sure that debug session type is set to attach. Open the C/C++ application item and use the browse button to point to the executable (in my case .../development/rtems/build-powerpc/powerpc-rtems4.12/c/qoriq_t2080rdb/testsuites/samples/hello/hello.exe.
 Under Build make sure the disable auto build radio button is selected and under Target make sure your Connection is set properly and your target board is selected.</div>
<div><br>
</div>
<div>Now... time to fly it.</div>
<div><br>
</div>
<div>Boot u-boot and hit enter to interrupt the auto boot process at the u-boot console and load the hello.bin file (created from hello.exe using "<span class="Apple-style-span" style="font-size: 14px; ">powerpc-rtems4.12-objcopy -Obinary hello.exe hello.bin")
 at the entry address (0x4000).</span></div>
<div><span class="Apple-style-span" style="font-size: 14px; "><br>
</span></div>
<div><span class="Apple-style-span" style="font-size: 14px; ">Back in CodeWarrior, fire up the debugger and it will attach.</span></div>
<div><span class="Apple-style-span" style="font-size: 14px; "><br>
</span></div>
<div><span class="Apple-style-span" style="font-size: 14px; ">Suspend the processor and in the disassembly window take a look at your entry point (0x4000). I like to set a breakpoint there just because.</span></div>
<div><span class="Apple-style-span" style="font-size: 14px; "><br>
</span></div>
<div><span class="Apple-style-span" style="font-size: 14px; ">Now resume and type "go <your entry point>" at the u-boot command prompt. You should immediately hit the breakpoint you set and you should see the start.S source in your debug window. From this point
 you are basically there. The debugger is then able to associate source files such as bspstart.c with the executable you are running.</span></div>
<div><span class="Apple-style-span" style="font-size: 14px; "><br>
</span></div>
<div><span class="Apple-style-span" style="font-size: 14px; ">Enjoy!</span></div>
<div><span class="Apple-style-span" style="font-size: 14px; "><br>
</span></div>
<div><span class="Apple-style-span" style="font-size: 14px; ">--Travis</span></div>
<div><font class="Apple-style-span" size="4"><br>
</font></div>
<div><br>
<div>
<div>On Mar 31, 2016, at 1:38 PM, Travis Wheatley wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br>
<div>
<div>On Mar 30, 2016, at 10:39 PM, Chris Johns wrote:</div>
<div><br>
</div>
<Snip></div>
<div><br>
<blockquote type="cite">
<div><font class="Apple-style-span"><br>
</font><br>
<blockquote type="cite">So... can anyone point me to the "Here's how you do source level RTEMS debug from an ide" documentation?<br>
</blockquote>
<br>
I can only guess from a quick search Codewarrior is Eclipse based. Is this true?<br>
</div>
</blockquote>
<div><br>
</div>
Yes, Codewarrior is Eclipse based.</div>
<div><br>
<blockquote type="cite">
<div><br>
Does the debugger behind the IDE GUI have a command line interface?<br>
</div>
</blockquote>
<div><br>
</div>
Not that I am aware of, but I could be mistaken.</div>
<div><br>
<blockquote type="cite">
<div><br>
Does the Codewarrior debugger use ELF format files and so DWARF?<br>
</div>
</blockquote>
<div><br>
</div>
It is my understanding that Codewarrior understands ELF/DWARF.</div>
<div><br>
<blockquote type="cite">
<div><br>
If it does you are a long way to being able to support debugging.<br>
<br>
</div>
</blockquote>
<div><br>
</div>
Good news...</div>
<div><br>
<blockquote type="cite">
<div>If ELF is supported does the debugger understand the level of DWARF gcc generates with the 4.12 tools? There are a number of options to tweak the debug info gcc generates.<br>
<br>
</div>
</blockquote>
<div><br>
</div>
<div>Doing a search for DWARF in the CodeWarrior docs only pulls up some flags that one can send to the compiler to change the level of DWARF generated by the compiler the IDE uses but doesn't really say anything about what level the debug tools actually support.</div>
<br>
<blockquote type="cite">
<div>I suggest you try an existing sample exe and open it in the debugger. A hack is to create a bare application in the IDE and replace the executable Codewarrior creates with hello.exe.<br>
<br>
</div>
</blockquote>
<div><br>
</div>
<div>An interesting test, but not sure how it furthers the cause. One problem here is that I am running u-boot on the target board to do basic initialization with the intent of eventually treating my RTEMS application as a bootable image. So... I think that
 I have to boot the platform and then "attach" to it before running bootm or jumping to a location that contains my target code. I believe I can ignore CW whining about having a null target, do the download manually, set a breakpoint at the entry point of my
 code, then execute. Assuming that is correct I still don't know how to tell CW to use the hello.ralf file as its magic decoder ring nor how to point to the source since what I really want to debug is exactly where the exception that sends me to the kernel
 panic handler in bspstart.c occurred.</div>
</div>
<br>
<div>-- Travis</div>
<div><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>