<?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>Kinetis Microcontrollers中的主题 Reserve and use RAM region to store application data on K60</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reserve-and-use-RAM-region-to-store-application-data-on-K60/m-p/343425#M16647</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I am using K60DN512 with MQX 3.8.1 for a project. I want to log runtime errors of my code and send the logfile over when requested or at the startup of application.I want to store the logs in the RAM reserved section, and read it at runtime of the application. Has anyone tried that before. Any pointers how to modify the linker file to reserve RAM space would be really helpful.&lt;/P&gt;&lt;P&gt;PS:&amp;nbsp; I know MQX has the log module but do not want to use the log module because I presume the logs wont be persistent after power cycle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Nikhil &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Oct 2014 09:11:19 GMT</pubDate>
    <dc:creator>nikhilsarnaik</dc:creator>
    <dc:date>2014-10-22T09:11:19Z</dc:date>
    <item>
      <title>Reserve and use RAM region to store application data on K60</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reserve-and-use-RAM-region-to-store-application-data-on-K60/m-p/343425#M16647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I am using K60DN512 with MQX 3.8.1 for a project. I want to log runtime errors of my code and send the logfile over when requested or at the startup of application.I want to store the logs in the RAM reserved section, and read it at runtime of the application. Has anyone tried that before. Any pointers how to modify the linker file to reserve RAM space would be really helpful.&lt;/P&gt;&lt;P&gt;PS:&amp;nbsp; I know MQX has the log module but do not want to use the log module because I presume the logs wont be persistent after power cycle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Nikhil &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 09:11:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reserve-and-use-RAM-region-to-store-application-data-on-K60/m-p/343425#M16647</guid>
      <dc:creator>nikhilsarnaik</dc:creator>
      <dc:date>2014-10-22T09:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reserve and use RAM region to store application data on K60</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reserve-and-use-RAM-region-to-store-application-data-on-K60/m-p/343426#M16648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I found the answer in the IAR documentation. Hope it would be helpful to someone in future&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RESERVING SPACE IN RAM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Often, an application must have an empty uninitialized memory area to be used for&lt;/P&gt;&lt;P&gt;temporary storage, for example a heap or a stack. It is easiest to achieve this at link time.&lt;/P&gt;&lt;P&gt;You must create a block with a specified size and then place it in a memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the linker configuration file, it can look like this:&lt;/P&gt;&lt;P&gt;define block TempStorage with size = 0x1000, alignment = 4 { };&lt;/P&gt;&lt;P&gt;place in RAM { block TempStorage };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To retrieve the start of the allocated memory from the application, the source code could&lt;/P&gt;&lt;P&gt;look like this:&lt;/P&gt;&lt;P&gt;/* Define a section for temporary storage. */&lt;/P&gt;&lt;P&gt;#pragma section = "TEMPSTORAGE"&lt;/P&gt;&lt;P&gt;char *GetTempStorageStartAddress()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;/* Return start address of section TEMPSTORAGE. */&lt;/P&gt;&lt;P&gt;return __section_begin("TEMPSTORAGE");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2014 09:52:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reserve-and-use-RAM-region-to-store-application-data-on-K60/m-p/343426#M16648</guid>
      <dc:creator>nikhilsarnaik</dc:creator>
      <dc:date>2014-10-22T09:52:10Z</dc:date>
    </item>
  </channel>
</rss>

