<?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>topic Re: OpenSDA debugging problem when relocating code to RAM on KEAZ128 in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780557#M14643</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Wang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please share your project , it will be better to point the code about relocating code into RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Nov 2017 05:23:05 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2017-11-19T05:23:05Z</dc:date>
    <item>
      <title>OpenSDA debugging problem when relocating code to RAM on KEAZ128</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780556#M14642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dears,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are working on a design based on Kinetis KEAZ128. To boost the performance of poor 40MHz Cortex M0+ core, we decided to put some key C functions into RAM to avoid Flash ROM access latency.&lt;/P&gt;&lt;P&gt;We have studied the document below and modified our code as chaptor 4.3:&lt;/P&gt;&lt;P&gt;Relocating Code and Data Using the CW GCC Linke... | NXP Community&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-101433"&gt;https://community.nxp.com/docs/DOC-101433&lt;/A&gt;&lt;/P&gt;&lt;P&gt;With Codewarrior 10.7, code built with no error, .map file looks also OK, but problem happened when we begin to debug the code on a FRDM-KEAZ128 board with OpenSDA, here are error messages:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INF: CMD&amp;gt;VC&lt;BR /&gt;INF: Verifying object file CRC-16 to device ranges ... &lt;BR /&gt;INF: block 00000000-000000BF ... &lt;BR /&gt;INF: Ok.&lt;BR /&gt;INF: block 00000400-0000B8FF ... &lt;BR /&gt;INF: Ok.&lt;BR /&gt;INF: block 0000B880-0000B897 ... &lt;BR /&gt;INF: CRC-16 Error in block. (File = $9AC8, Device = $0000)&lt;BR /&gt;ERR: Error verifying flash of device&lt;BR /&gt;ERR: Error occured during Flash programming.&lt;BR /&gt;&lt;SPAN&gt;INF: Warning 17927. Target MCU mismatch. Download performance limited. See &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.pemicro.com%2Fopensda%2Fpe_tools.cfm" rel="nofollow" target="_blank"&gt;http://www.pemicro.com/opensda/pe_tools.cfm&lt;/A&gt;&lt;SPAN&gt; for information on debugging external processors.&lt;/SPAN&gt;&lt;BR /&gt;GDI: =&amp;gt; DI_ERR_FATAL&lt;BR /&gt;GDI: Memory access performed successfully&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We guess this should be caused by the re-locating, but have no idea how to deal with.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone can help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 12:03:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780556#M14642</guid>
      <dc:creator>walter_wang</dc:creator>
      <dc:date>2017-11-16T12:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: OpenSDA debugging problem when relocating code to RAM on KEAZ128</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780557#M14643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Wang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please share your project , it will be better to point the code about relocating code into RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Nov 2017 05:23:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780557#M14643</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2017-11-19T05:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: OpenSDA debugging problem when relocating code to RAM on KEAZ128</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780558#M14644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've created a very simple project to test the ram function but still failed, see attached. It was created by CW10.7.&lt;/P&gt;&lt;P&gt;Changes are made according to the article&amp;nbsp;&lt;A _jive_internal="true" class="" data-containerid="2020" data-containertype="14" data-content-finding="Community" data-objectid="101433" data-objecttype="102" href="https://community.nxp.com/docs/DOC-101433" style="color: #5e89c1; background-color: #ffffff; border: 0px; padding: 1px 0px 1px calc(12px + 0.35ex);"&gt;https://community.nxp.com/docs/DOC-101433&lt;/A&gt;&lt;/P&gt;&lt;P&gt;(Due to company policy I cannot send you our project, sorry for this.)&lt;/P&gt;&lt;P&gt;Also, I just paste codes here for easy discussion, it's very simple.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********* my code *******************************************&lt;/P&gt;&lt;P&gt;word Value;&lt;BR /&gt;void RAM_Func(word * val);&lt;/P&gt;&lt;P&gt;/*lint -save -e970 Disable MISRA rule (6.3) checking. */&lt;BR /&gt;int main(void)&lt;BR /&gt;/*lint -restore Enable MISRA rule (6.3) checking. */&lt;BR /&gt;{&lt;BR /&gt; /* Write your local variable definition here */&lt;/P&gt;&lt;P&gt;/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;BR /&gt; PE_low_level_init();&lt;BR /&gt; /*** End of Processor Expert internal initialization. ***/&lt;/P&gt;&lt;P&gt;/* Write your code here */&lt;BR /&gt; /* For example: for(;;) { } */&lt;BR /&gt; &lt;BR /&gt; Value=0;&lt;BR /&gt; for(;;){&lt;BR /&gt; &lt;BR /&gt; RAM_Func(&amp;amp;Value);&lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/*** Don't write any code pass this line, or it will be deleted during code generation. ***/&lt;BR /&gt; /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/&lt;BR /&gt; #ifdef PEX_RTOS_START&lt;BR /&gt; PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */&lt;BR /&gt; #endif&lt;BR /&gt; /*** End of RTOS startup code. ***/&lt;BR /&gt; /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/&lt;BR /&gt; for(;;){}&lt;BR /&gt; /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/&lt;BR /&gt;} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/&lt;/P&gt;&lt;P&gt;/* END main */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;__attribute__ ((section(".ramfunc"))) void RAM_Func(word * val)&amp;nbsp;&amp;nbsp;&amp;nbsp;//The RAM function&lt;/SPAN&gt;&lt;BR /&gt;{&lt;BR /&gt; (* val)++;&lt;BR /&gt; return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********* Changes in linker setting file ProcessorExpert.ld&amp;nbsp;*******************************************&lt;/P&gt;&lt;P&gt;/* Initialized data sections goes into RAM, load LMA copy after code */&lt;BR /&gt; .data : AT(___ROM_AT)&lt;BR /&gt; {&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; _sdata = .; /* create a global symbol at data start */&lt;BR /&gt; *(.data) /* .data sections */&lt;BR /&gt; *(.data*) /* .data* sections */&lt;BR /&gt; &lt;SPAN style="color: #339966;"&gt;*(.ramfunc) &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* My newly defined RAM function area */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;. = ALIGN(4);&lt;/P&gt;&lt;P&gt;_edata = .; /* define a global symbol at data end */&lt;BR /&gt; } &amp;gt; m_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Nov 2017 10:27:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780558#M14644</guid>
      <dc:creator>walter_wang</dc:creator>
      <dc:date>2017-11-19T10:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: OpenSDA debugging problem when relocating code to RAM on KEAZ128</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780559#M14645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Wang,&lt;/P&gt;&lt;P&gt;I haven't the FRDM-KEAZ128 board, I test your project on TRK-KEA128 board,&lt;/P&gt;&lt;P&gt;when use the P&amp;amp;E debug mode , the same error with yours.&lt;/P&gt;&lt;P&gt;While when I change the Opensda to J-link interface, it can work well.&lt;/P&gt;&lt;P&gt;So could you please update your board to J-link , refer to &amp;nbsp; Quick Start of your board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 07:48:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780559#M14645</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2017-11-21T07:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: OpenSDA debugging problem when relocating code to RAM on KEAZ128</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780560#M14646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The RAM function is running properly after I updated my FRDM board FW&amp;nbsp;to J-link FW (downloaded from Segger) and change debug profile to JLink.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the feedback.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 11:59:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780560#M14646</guid>
      <dc:creator>walter_wang</dc:creator>
      <dc:date>2017-11-21T11:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: OpenSDA debugging problem when relocating code to RAM on KEAZ128</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780561#M14647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I reproduced the issue and it's indeed a defect.&lt;/P&gt;&lt;P&gt;I'd recommend you to use Flash Programmer instead and then connect to the device or use J-link Firmware as suggested by Alice as a workaround:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) create a target task that programs the elf file to the device and save it to the project directory:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_6.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/33510i89339218B5B22D91/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_6.png" alt="pastedImage_6.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) adjust the debug configuration so it does not use the default download but executes the target task instead:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/33558i3121818F5C63793E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_7.png" alt="pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) apply and now if you press "Debug" you should always be able to program the mcu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 13:39:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780561#M14647</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2017-11-21T13:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: OpenSDA debugging problem when relocating code to RAM on KEAZ128</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780562#M14648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Stan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've tried your proposal and it works well. Probably we prefer OpenSDA because we have no license available for J-Link Flasher.&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Walter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 08:26:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/OpenSDA-debugging-problem-when-relocating-code-to-RAM-on-KEAZ128/m-p/780562#M14648</guid>
      <dc:creator>walter_wang</dc:creator>
      <dc:date>2017-11-22T08:26:57Z</dc:date>
    </item>
  </channel>
</rss>

