<?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>LPC MicrocontrollersのトピックLPC4350 IAR and J-Trace Cortex M</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4350-IAR-and-J-Trace-Cortex-M/m-p/565795#M17174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gregd on Tue Jul 31 20:03:47 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the Hitex LPC4350 Rev A4 evaluation board along with the Segger J-Trace Cortex M with the IAR EWARM v6.40.1.3812. I am running J-Link DLL v4.50m and J-Trace Cortex-M Rev.3 firmware.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been using this setup for several months. At first everything seemed to work very reliably. As my project got larger, I have started having problems downloading the images to the board. I have tried two different Hitex boards with the same results. The same issue seems to occur with a standard J-Link ARM debugger as well. I am storing the program in the external NOR flash on the board when debugging and I have “verify download” enabled. I am using the latest version of the Hitex NOR flash program that came with the lpc43xx.git project (LPC43xx CMSIS driver library) from the sw.lpcware.com website. I have also tried the flash program included with IAR with the same results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, what seems to be occurring is that 99% of the time, the first download/debug attempt fails with the results shown in the attached file. The second attempt always works 99.9999% of the time with no errors. If you simply hit the debug tool bar button over and over without recompiling, it seems to be successful only every other time very repeatedly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the attached file, I have included the debug log and flash0.trace file, and IAR J-Link configuration dialog boxes for your review. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone have any suggestions? This issue eventually starts to waste a lot of time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg Dunn&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;304-542-4383&lt;/SPAN&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338054"&gt;LPC4350%20Download%20Problems.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:49:59 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:49:59Z</dc:date>
    <item>
      <title>LPC4350 IAR and J-Trace Cortex M</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4350-IAR-and-J-Trace-Cortex-M/m-p/565795#M17174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gregd on Tue Jul 31 20:03:47 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the Hitex LPC4350 Rev A4 evaluation board along with the Segger J-Trace Cortex M with the IAR EWARM v6.40.1.3812. I am running J-Link DLL v4.50m and J-Trace Cortex-M Rev.3 firmware.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been using this setup for several months. At first everything seemed to work very reliably. As my project got larger, I have started having problems downloading the images to the board. I have tried two different Hitex boards with the same results. The same issue seems to occur with a standard J-Link ARM debugger as well. I am storing the program in the external NOR flash on the board when debugging and I have “verify download” enabled. I am using the latest version of the Hitex NOR flash program that came with the lpc43xx.git project (LPC43xx CMSIS driver library) from the sw.lpcware.com website. I have also tried the flash program included with IAR with the same results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, what seems to be occurring is that 99% of the time, the first download/debug attempt fails with the results shown in the attached file. The second attempt always works 99.9999% of the time with no errors. If you simply hit the debug tool bar button over and over without recompiling, it seems to be successful only every other time very repeatedly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the attached file, I have included the debug log and flash0.trace file, and IAR J-Link configuration dialog boxes for your review. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone have any suggestions? This issue eventually starts to waste a lot of time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg Dunn&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;304-542-4383&lt;/SPAN&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338054"&gt;LPC4350%20Download%20Problems.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:49:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4350-IAR-and-J-Trace-Cortex-M/m-p/565795#M17174</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4350 IAR and J-Trace Cortex M</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4350-IAR-and-J-Trace-Cortex-M/m-p/565796#M17175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gregd on Thu Aug 02 05:34:47 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I may have finally figured out the issue on my own.&amp;nbsp; It has to do with the M0 core being allowed to run at some point during the flashing process.&amp;nbsp; In my case the M0 application was writing data to the portion of internal ram where the flashing buffer was located.&amp;nbsp; The data was apparently being changed between the time that it was written to the buffer and before the flashing algorithm wrote it to flash.&amp;nbsp; This would cause the verification step to fail.&amp;nbsp; To fix the problem, I updated the the icf file used by the flashing algorithm project on the following entries:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;define symbol __ICFEDIT_intvec_start__ = 0x2000C000; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;define symbol __ICFEDIT_region_RAM_start__ = 0x2000C040; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;define symbol __ICFEDIT_region_RAM_end__&amp;nbsp;&amp;nbsp; = 0x2000FFFF; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This moves the location of the flashing code and buffer to a memory location which is not currently used by either my M4 or M0 application.&amp;nbsp; This area of memory can be configured for use as the Embedded Trace Buffer but appears to be disabled by default during reset.&amp;nbsp; I am not currently using the ETM portion of the internal ram (0x2000C000 to 0x2000FFF) in my application so this will probably work for now.&amp;nbsp; As my application continues to grow, I may start using this memory area however.&amp;nbsp; A more general purpose solution would be to make sure that the M0 cannot run during the flashing process.&amp;nbsp; I also tried to update the flashing macro code to add a dummy loop for the M0 to run as I have seen in other example macros:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Load loop code so M0 simply loops without executing any damaging code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; __writeMemory32(0x00001F00,0x10080000,"Memory");&amp;nbsp;&amp;nbsp; /* dummy stack pointer */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; __writeMemory32(0x000000D5,0x10080004,"Memory");&amp;nbsp;&amp;nbsp; /* reset handler */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; __writeMemory32(0xE7FEE7FE,0x100800D4,"Memory");&amp;nbsp;&amp;nbsp; /* jump to itself instruction for M0a */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; __writeMemory32(0x10080000,0x40043404,"Memory");&amp;nbsp;&amp;nbsp; /* M0 shadow pointer. */&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This didn't seem to help the problem however.&amp;nbsp; It must be because the M4 code copies the M0 application code from external flash to internal RAM for execution during reset.&amp;nbsp; Maybe the M4 is allowed to run at some point during the flash process also, or maybe I needed to reset the M0 in the macro as well.&amp;nbsp; Anyway, I could not find a solution that will work in all cases.&amp;nbsp; If someone knows the internals of how everything works they may be able to suggest a solution that will work even if the M0 application uses the entire internal ram space.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg Dunn&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:50:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4350-IAR-and-J-Trace-Cortex-M/m-p/565796#M17175</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4350 IAR and J-Trace Cortex M</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4350-IAR-and-J-Trace-Cortex-M/m-p/565797#M17176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by david_sh on Mon Aug 13 05:32:13 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have met the same issue,&amp;nbsp; try some ways for two days, but no effect, maybe we have to change to keil MDK?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:50:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4350-IAR-and-J-Trace-Cortex-M/m-p/565797#M17176</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:50:01Z</dc:date>
    </item>
  </channel>
</rss>

