<?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>ColdFire/68K Microcontrollers and Processorsのトピックdeclare ram variable at fixed known address</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/declare-ram-variable-at-fixed-known-address/m-p/164320#M5522</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a decent amount of information on how to declare a variable in ram at a fixewd known address - but none is concise or complete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On my MC52259 board (64K ram), I wanted a ram var at say: 0x20000400. It is 0x20 bytes long. I modeled the declaration after similar variables in flash, I get what I want, except the linker fails as the "next var" (as per the lcf linker control file) must be on a 512-byte boundary. So I'd wasting ram unless I put in code for specific use of wha's left in that area.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to have a small variable of 0x20 bytes at a specified, well-known address without the boundary issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume that I'll have some sort of declaration in the .lcf file, and a #pragma in my main.c module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Dec 2009 08:46:26 GMT</pubDate>
    <dc:creator>EdProulx</dc:creator>
    <dc:date>2009-12-29T08:46:26Z</dc:date>
    <item>
      <title>declare ram variable at fixed known address</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/declare-ram-variable-at-fixed-known-address/m-p/164320#M5522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a decent amount of information on how to declare a variable in ram at a fixewd known address - but none is concise or complete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On my MC52259 board (64K ram), I wanted a ram var at say: 0x20000400. It is 0x20 bytes long. I modeled the declaration after similar variables in flash, I get what I want, except the linker fails as the "next var" (as per the lcf linker control file) must be on a 512-byte boundary. So I'd wasting ram unless I put in code for specific use of wha's left in that area.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to have a small variable of 0x20 bytes at a specified, well-known address without the boundary issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume that I'll have some sort of declaration in the .lcf file, and a #pragma in my main.c module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Dec 2009 08:46:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/declare-ram-variable-at-fixed-known-address/m-p/164320#M5522</guid>
      <dc:creator>EdProulx</dc:creator>
      <dc:date>2009-12-29T08:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: declare ram variable at fixed known address</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/declare-ram-variable-at-fixed-known-address/m-p/164321#M5523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would need the same thing and I have the same MCU.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;UP!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 23:55:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/declare-ram-variable-at-fixed-known-address/m-p/164321#M5523</guid>
      <dc:creator>LordMark</dc:creator>
      <dc:date>2010-01-05T23:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: declare ram variable at fixed known address</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/declare-ram-variable-at-fixed-known-address/m-p/164322#M5524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an starting point, here are the steps for the mcf5213- very similar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Download dBUG source ode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/netcomm/software/app_software/dbug_rom_monitors/M5213EVB_DBUG_SRC.zip?fpsp=1" target="test_blank"&gt;http://www.freescale.com/files/netcomm/software/app_software/dbug_rom_monitors/M5213EVB_DBUG_SRC.zip?fpsp=1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Look for mwerks.h, flash.lcf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Inside LCF:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; *(.relocate_code)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; *(.relocate_const)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; *(.relocate_data)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Inside mwerks.h:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#pragma define_section relocate_code ".relocate_code" far_absolute RX&lt;BR /&gt;#pragma define_section relocate_data ".relocate_data" far_absolute RW&lt;BR /&gt;#pragma define_section relocate_const ".relocate_const" far_absolute R&lt;BR /&gt;#define __relocate_code__&amp;nbsp;&amp;nbsp; __declspec(relocate_code)&lt;BR /&gt;#define __relocate_data__&amp;nbsp;&amp;nbsp; __declspec(relocate_data)&lt;BR /&gt;#define __relocate_const__&amp;nbsp; __declspec(relocate_const)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5. For a variable is used as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;__relocate_data__&lt;BR /&gt;char ovbuffer[60];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;__relocate_const__ char&lt;BR /&gt;erase_flash[] = "Erasing Flash...";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;6. For a function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;__relocate_code__&lt;BR /&gt;static uint8&lt;BR /&gt;dldbug_getchar(void)&lt;BR /&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this gives you a hint, also the AN3521SW has a source code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jan 2010 03:52:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/declare-ram-variable-at-fixed-known-address/m-p/164322#M5524</guid>
      <dc:creator>PaoloRenzo</dc:creator>
      <dc:date>2010-01-06T03:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: declare ram variable at fixed known address</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/declare-ram-variable-at-fixed-known-address/m-p/164323#M5525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Every body,&lt;/P&gt;&lt;P&gt;I am working on MCF5213 controller.&lt;/P&gt;&lt;P&gt;I have a requirement where in i should use, some part of CPU Flash should be used as RAM.&lt;/P&gt;&lt;P&gt;Will any one guide me in this implementation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 18:34:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/declare-ram-variable-at-fixed-known-address/m-p/164323#M5525</guid>
      <dc:creator>MadhuBhaskar</dc:creator>
      <dc:date>2011-11-08T18:34:56Z</dc:date>
    </item>
  </channel>
</rss>

