<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>OSBDM and TBDMLのトピックbeginner Problem - debug the software in RAM</title>
    <link>https://community.nxp.com/t5/OSBDM-and-TBDML/beginner-Problem-debug-the-software-in-RAM/m-p/124377#M1</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT color="#ff0000"&gt;This message contains an entire topic ported from a separate forum. The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value to you as you search for answers to your questions.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#ff0000"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 8:37 am&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt; I have one Problem and hope you can help me with this. I have written lots of software on Windows-Based PCs. But now I am writing my very first software for a Mikrocontroller. So I have one beginner Problem.&lt;BR /&gt;&lt;BR /&gt; I Use the Metrowerks Special Edition Compiler for HC(S)12 Version 3.1 and the TBDML background debug cable. My Controller is a HCS12DG256 on a PCB from Elektronikladen. This one: &lt;A href="http://elmicro.com/en/cards12.php" rel="nofollow noopener noreferrer" target="_blank"&gt;http://elmicro.com/en/cards12.php&lt;/A&gt;&lt;BR /&gt; In the Memory is a Monitor-Software installed, which redirects all vectors to RAM. The Interrupt -Vector is redirected in the range from TP_RAMTOP to TP_RAMTOP-189. In this Range I have to write one Jump-Instruction to the Function for each Interrupt Service Routine.&lt;BR /&gt;&lt;BR /&gt; I want to debug the software in RAM. So what do I have to do to place the software in the RAM and use the redirected Interrupt-Vector.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;PS: Sorry for my bad English. I don’t have much practice in this language. &lt;IMG alt="Sad" border="0" src="http://www.freegeeks.net/modules/Forums/images/smiles/icon_sad.gif" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 10:01 am&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;The obvious question is why do you need to keep the monitor if you are using TBDML? Do you have a particular reason for wanting to use the RAM rather than reprogramming the flash?&lt;BR /&gt; Of course the big disadvantage of RAM is that you have to reload it every time from startup.&lt;BR /&gt;&lt;BR /&gt; If you do want to use the monitor and RAM you should place a table in RAM that contains jump (JMP) instructions to your interrupt handlers. To put this and your code in RAM you should use a linker parameter file to identify the segments where the code and table are placed.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 10:44 am&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;I&amp;nbsp;don’t need the monitor! I just want to place the software in the RAM while I’m debugging. You can’t place software-breakepoints while the software is located in Flash, right? If the software is finished I would certainly put the software into the Flash memory.&lt;BR /&gt; The problem is: I don’t see the switch in the Metrowerks IDE to set the location of the software. Before I used the Metrowerks Compiler, I used the Compiler from Imagecraft. In this IDE I could easily define all the things I need, but the TBDML doesn’t support debugging with Imagecraft / NoICE. So I switched to Metrowerks. But this IDE is probably a big to huge for a beginner.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 3:35 pm&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;Ok, I understand - don't forget that you hav hardware breakpoints that work in flash too.&lt;BR /&gt; The linker parameter file is where you tell CodeWarrior where to put stuff. The default for code will be flash but by simply selecting a user segment that goes into RAM you can change this.&lt;BR /&gt;&lt;BR /&gt; The default CW projects define a standard linker file for you to begin with&lt;BR /&gt; RAM will probably be defined as a segment at&lt;BR /&gt;&lt;BR /&gt; RAM INTO READ_WRITE 0x2000 TO 0x3FFF&lt;BR /&gt;&lt;BR /&gt; so all you have to do is to put your user code segment (say CODE_RAM) into that segment&lt;BR /&gt;&lt;BR /&gt; CODE_RAM INTO RAM&lt;BR /&gt;&lt;BR /&gt; in the placement section.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 4:06 pm&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;Guys, there is now a port of TBDML to the No-ice debugger, I will have a look for a link.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 9:02 pm&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;I checked I found an email from John at NoIce, and it is supported, drop them a line on the subject.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Wed May 25, 2005 7:18 am&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;OK, thanks for response.&lt;BR /&gt;&lt;BR /&gt; I have altered the Linker-File and created three sections in the RAM:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;RAM = READ_WRITE 0x1000 TO 0x1FFF; RAM_CODE = READ_ONLY 0x2000 TO 0x2FFF; RAM_DEFAULT = READ_ONLY 0x3000 TO 0x3FFF; &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;And I used the sections like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;PLACEMENT _PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */ STARTUP, /* startup data structures */ ROM_VAR, /* constant variables */ STRINGS, /* string literals */ VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */ NON_BANKED, /* runtime routines which must not be banked */ COPY /* copy down information: how to initialize variables */ /* in case you want to use ROM_4000 here as well, make sure that all files (incl. library files) are compiled with the option: -OnB=b */ INTO RAM_CODE; DEFAULT_ROM INTO RAM_DEFAULT; DEFAULT_RAM INTO RAM; END &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;Is that OK?&lt;BR /&gt;&lt;BR /&gt;Now I have another Problem. The HiWave debugger didn’t find the source code. In the Child-Window with the name “Source” is no code visible. Just a Message “no source reference found”.&lt;BR /&gt;&lt;BR /&gt;The Command Window Prints these Messages:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;!Command &amp;lt; attributes CACHESIZE 1000 !bckcolor 50331647 !font 'Courier New' 9 BLACK !AUTOSIZE on !ACTIVATE Data:2 Command Procedure Data:1 Source Register Assembly Memory done C_layout.hwl Loading Target ... SETCOMM DRIVER NOPROTOCOL NOPERIODICAL "tbdml_gdi12.dll" SETCOMM COMPORT LPT "TBDML #1" Startup command file does not exist. Startup command file does not exist. RUNNING STOPPING Preload command file does not exist. executing D:\DATA\Microcontroller\HC12\bin\Simulator.bpt !savebp off HALTED done D:\DATA\Microcontroller\HC12\bin\Simulator.bpt executing D:\DATA\Microcontroller\HC12\bin\Simulator.mrk !MARKPOINTS SAVE OFF done D:\DATA\Microcontroller\HC12\bin\Simulator.mrk Postload command file does not exist. in&amp;gt; &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;I will send a Mail to NoICE if the “Metrowerks experiment” fails&lt;/P&gt;&lt;P&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Sun Jun 05, 2005 6:06 am&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt; my personal “Metrowerks experiment” failed. This IDE is a lot to huge for a beginner. Now I’m using the Imagecraft Compiler, again. John Hartman from NoICE told me that the TBDML will be supported in Version 8.4, which will be released in a few days.&lt;BR /&gt;&lt;BR /&gt; Thanks for the Help.&lt;/SPAN&gt;&lt;SPAN class="gensmall"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jan 2006 01:18:12 GMT</pubDate>
    <dc:creator>RChapman</dc:creator>
    <dc:date>2006-01-27T01:18:12Z</dc:date>
    <item>
      <title>beginner Problem - debug the software in RAM</title>
      <link>https://community.nxp.com/t5/OSBDM-and-TBDML/beginner-Problem-debug-the-software-in-RAM/m-p/124377#M1</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT color="#ff0000"&gt;This message contains an entire topic ported from a separate forum. The original message and all replies are in this single message. We have seeded this new forum with selected information that we expect will be of value to you as you search for answers to your questions.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#ff0000"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 8:37 am&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt; I have one Problem and hope you can help me with this. I have written lots of software on Windows-Based PCs. But now I am writing my very first software for a Mikrocontroller. So I have one beginner Problem.&lt;BR /&gt;&lt;BR /&gt; I Use the Metrowerks Special Edition Compiler for HC(S)12 Version 3.1 and the TBDML background debug cable. My Controller is a HCS12DG256 on a PCB from Elektronikladen. This one: &lt;A href="http://elmicro.com/en/cards12.php" rel="nofollow noopener noreferrer" target="_blank"&gt;http://elmicro.com/en/cards12.php&lt;/A&gt;&lt;BR /&gt; In the Memory is a Monitor-Software installed, which redirects all vectors to RAM. The Interrupt -Vector is redirected in the range from TP_RAMTOP to TP_RAMTOP-189. In this Range I have to write one Jump-Instruction to the Function for each Interrupt Service Routine.&lt;BR /&gt;&lt;BR /&gt; I want to debug the software in RAM. So what do I have to do to place the software in the RAM and use the redirected Interrupt-Vector.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;PS: Sorry for my bad English. I don’t have much practice in this language. &lt;IMG alt="Sad" border="0" src="http://www.freegeeks.net/modules/Forums/images/smiles/icon_sad.gif" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 10:01 am&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;The obvious question is why do you need to keep the monitor if you are using TBDML? Do you have a particular reason for wanting to use the RAM rather than reprogramming the flash?&lt;BR /&gt; Of course the big disadvantage of RAM is that you have to reload it every time from startup.&lt;BR /&gt;&lt;BR /&gt; If you do want to use the monitor and RAM you should place a table in RAM that contains jump (JMP) instructions to your interrupt handlers. To put this and your code in RAM you should use a linker parameter file to identify the segments where the code and table are placed.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 10:44 am&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;I&amp;nbsp;don’t need the monitor! I just want to place the software in the RAM while I’m debugging. You can’t place software-breakepoints while the software is located in Flash, right? If the software is finished I would certainly put the software into the Flash memory.&lt;BR /&gt; The problem is: I don’t see the switch in the Metrowerks IDE to set the location of the software. Before I used the Metrowerks Compiler, I used the Compiler from Imagecraft. In this IDE I could easily define all the things I need, but the TBDML doesn’t support debugging with Imagecraft / NoICE. So I switched to Metrowerks. But this IDE is probably a big to huge for a beginner.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 3:35 pm&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;Ok, I understand - don't forget that you hav hardware breakpoints that work in flash too.&lt;BR /&gt; The linker parameter file is where you tell CodeWarrior where to put stuff. The default for code will be flash but by simply selecting a user segment that goes into RAM you can change this.&lt;BR /&gt;&lt;BR /&gt; The default CW projects define a standard linker file for you to begin with&lt;BR /&gt; RAM will probably be defined as a segment at&lt;BR /&gt;&lt;BR /&gt; RAM INTO READ_WRITE 0x2000 TO 0x3FFF&lt;BR /&gt;&lt;BR /&gt; so all you have to do is to put your user code segment (say CODE_RAM) into that segment&lt;BR /&gt;&lt;BR /&gt; CODE_RAM INTO RAM&lt;BR /&gt;&lt;BR /&gt; in the placement section.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 4:06 pm&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;Guys, there is now a port of TBDML to the No-ice debugger, I will have a look for a link.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Tue May 24, 2005 9:02 pm&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;I checked I found an email from John at NoIce, and it is supported, drop them a line on the subject.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Wed May 25, 2005 7:18 am&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;OK, thanks for response.&lt;BR /&gt;&lt;BR /&gt; I have altered the Linker-File and created three sections in the RAM:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;RAM = READ_WRITE 0x1000 TO 0x1FFF; RAM_CODE = READ_ONLY 0x2000 TO 0x2FFF; RAM_DEFAULT = READ_ONLY 0x3000 TO 0x3FFF; &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;And I used the sections like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;PLACEMENT _PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */ STARTUP, /* startup data structures */ ROM_VAR, /* constant variables */ STRINGS, /* string literals */ VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */ NON_BANKED, /* runtime routines which must not be banked */ COPY /* copy down information: how to initialize variables */ /* in case you want to use ROM_4000 here as well, make sure that all files (incl. library files) are compiled with the option: -OnB=b */ INTO RAM_CODE; DEFAULT_ROM INTO RAM_DEFAULT; DEFAULT_RAM INTO RAM; END &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;Is that OK?&lt;BR /&gt;&lt;BR /&gt;Now I have another Problem. The HiWave debugger didn’t find the source code. In the Child-Window with the name “Source” is no code visible. Just a Message “no source reference found”.&lt;BR /&gt;&lt;BR /&gt;The Command Window Prints these Messages:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;!Command &amp;lt; attributes CACHESIZE 1000 !bckcolor 50331647 !font 'Courier New' 9 BLACK !AUTOSIZE on !ACTIVATE Data:2 Command Procedure Data:1 Source Register Assembly Memory done C_layout.hwl Loading Target ... SETCOMM DRIVER NOPROTOCOL NOPERIODICAL "tbdml_gdi12.dll" SETCOMM COMPORT LPT "TBDML #1" Startup command file does not exist. Startup command file does not exist. RUNNING STOPPING Preload command file does not exist. executing D:\DATA\Microcontroller\HC12\bin\Simulator.bpt !savebp off HALTED done D:\DATA\Microcontroller\HC12\bin\Simulator.bpt executing D:\DATA\Microcontroller\HC12\bin\Simulator.mrk !MARKPOINTS SAVE OFF done D:\DATA\Microcontroller\HC12\bin\Simulator.mrk Postload command file does not exist. in&amp;gt; &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;I will send a Mail to NoICE if the “Metrowerks experiment” fails&lt;/P&gt;&lt;P&gt;&lt;SPAN class="postdetails"&gt;&lt;STRONG&gt;Posted: Sun Jun 05, 2005 6:06 am&lt;SPAN class="gen"&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt; my personal “Metrowerks experiment” failed. This IDE is a lot to huge for a beginner. Now I’m using the Imagecraft Compiler, again. John Hartman from NoICE told me that the TBDML will be supported in Version 8.4, which will be released in a few days.&lt;BR /&gt;&lt;BR /&gt; Thanks for the Help.&lt;/SPAN&gt;&lt;SPAN class="gensmall"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;SPAN class="gensmall"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;SPAN class="postdetails"&gt;&lt;SPAN class="postbody"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2006 01:18:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/OSBDM-and-TBDML/beginner-Problem-debug-the-software-in-RAM/m-p/124377#M1</guid>
      <dc:creator>RChapman</dc:creator>
      <dc:date>2006-01-27T01:18:12Z</dc:date>
    </item>
  </channel>
</rss>

