<?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>MQX Software Solutions中的主题 Re: _mem_extend usage</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229964#M6251</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I moved my _mem_extend() call into mcf5225_init, and now it doesn't lock up, but I don't believe it's working.&amp;nbsp; When I try to perform the operations that use the extra memory which caused me to add the external RAM, it locks up.&amp;nbsp; Furthermore each time this code runs, it seems to mess up something in the Flash code space because I have to reflash through the bootloader every time.&amp;nbsp; Not sure what that's about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm fairly certain I'm missing a step in getting the external memory in use by the kernel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 12:39:51 GMT</pubDate>
    <dc:creator>ARQuattr</dc:creator>
    <dc:date>2013-04-26T12:39:51Z</dc:date>
    <item>
      <title>_mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229952#M6239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Due to memory problems, we have designed a new hardware with an external sram memory. So I'm trying now to move RAM usage from the internal memory to external memory. For now, I've configured the flexbus peripheral to access this memory through the address 0x9000 0000 and i've checked I can write and read from this memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I'm trying to add the external memory to the default memory pool. I'm using the function _mem_extend().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13585239869707738" jivemacro_uid="_13585239869707738"&gt;
&lt;P&gt;_mem_extend((pointer)0x90000000, 0x20000)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I continue having the same memory problems. Debugging a bit, I've checked the _mem_extend stops in the file mem_exti.c at&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_13585242247896120 jive_text_macro jive_macro_code" jivemacro_uid="_13585242247896120"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if (mem_pool_ptr-&amp;gt;VALID != MEMPOOL_VALID) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(MQX_INVALID_COMPONENT_HANDLE);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; }/* Endif */&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;What's the problem? Any idea? I've no found relevant information about the _mem_extend usage.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Thanks for your help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Regards&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 15:53:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229952#M6239</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2013-01-18T15:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229953#M6240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I've solved the problem using the next defines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13585336762987035" jivemacro_uid="_13585336762987035"&gt;
&lt;P&gt;#define MQX_USE_MEM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;#define MQX_USE_LWMEM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;
&lt;P&gt;#define MQX_USE_LWMEM_ALLOCATOR 0&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is I was using light weight memory instead the normal module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have now an aditional problem. What are the implications about changing from lightweight memory to normal memory? I ask because in my software, i've implemented an ftp server, and with these changes, I can't stablish a connection to it. Although I've availaible more memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I change the stack size in rtcs or the stack used for a socket????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2013 18:31:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229953#M6240</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2013-01-18T18:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229954#M6241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ardoster,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is not much to do with stack usage. I suggest you to define SRAM and UNCACHED pools in KERNEL_DATA in this situation. You can look for example at MK70F BSP files how the SRAM pool is created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2013 08:46:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229954#M6241</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2013-01-21T08:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229955#M6242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you for your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't find the SRAM define you are refering to. But I'll try using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13588443790584872" jivemacro_uid="_13588443790584872"&gt;
&lt;P&gt;#define MQX_USE_UNCACHED_MEM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I'm not really very optimistic about this test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 08:47:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229955#M6242</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2013-01-22T08:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229956#M6243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, I am telling about&lt;/P&gt;&lt;P&gt;kernel_data-&amp;gt;SRAM_POOL and kernel_data-&amp;gt;UNCACHED_POOL. These should be somehow defined (not NULL).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 08:50:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229956#M6243</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2013-01-22T08:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229957#M6244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've made a search in the MQX path and I can't find the string "SRAM_POOL". I'm using MQX 3.7, so I think that maybe that entry is not implemented in my version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the other hand, I've tested with&amp;nbsp; &lt;SPAN class="preprocessor"&gt;MQX_USE_UNCACHED_MEM&amp;nbsp; with the same results. It must be something different, because aparently, no one socket is correctly working: no ftp, no telnet, no ping, etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;Any suggestions???&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;Thanks you in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 09:49:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229957#M6244</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2013-01-22T09:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229958#M6245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to search for "UNCACHED_MEMORY_POOL" or "UNCACHED_POOL".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 10:35:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229958#M6245</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2013-01-22T10:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229959#M6246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, yes. Uncached Pool is used when &lt;SPAN class="preprocessor"&gt;MQX_USE_UNCACHED_MEM. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;I'm starting to think the memory extension is not being correctly done in _mem_extend().... altough I can see the memory access to the external sram memory using an oscylloscope.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="preprocessor"&gt;Thanks you&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jan 2013 15:49:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229959#M6246</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2013-01-22T15:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229960#M6247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not been able to find what's the problem. But I've discovered that if I create my tasks in the internal memory, and the ftp server in the external memory (after calling _mem_extend() ), the application works correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've no explanation. But maybe this result could help someone else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks you for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 11:47:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229960#M6247</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2013-01-23T11:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229961#M6248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I am trying to do something very similar and am also having problems. I don't believe you stated your processor - I'm using the MCF52259 – although I'm not sure it's very relevant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 128kB external SRAM wired to the 52259 (I also have a tower setup with the TWR-MEM board I can test with). I have used the _mem_extend(), but at 0x10000000 since that's where the existing linker put the MRAM (the hardware and project is based on the tower project).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added the defines you showed and rebuilt everything, so it compiles but when it gets to the _mem_extend() it locks up. I'm going to try to debug this, (which is tough since I'm using a bootloader) but I wondered if you could give some pointers on what I might be missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Angelo&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 13:53:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229961#M6248</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2013-04-25T13:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229962#M6249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, i'm using the same processor as you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe it's a silly question, but have you correctly configured the mini flexbus peripheral to map your external memory at your selected base address?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 14:09:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229962#M6249</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2013-04-25T14:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229963#M6250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply.&amp;nbsp; Not a silly question at all, since I'm really in new territory here.&amp;nbsp; Please ask away.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I'm using the same bsp as the 52259 tower board, I have the same linker (modified slightly for the bootloader) and the bsp_init.c is essentially the same (aside from setting up a few other I/O for this application).&amp;nbsp; As far as I can tell none of these changes conflict with the flex bus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The mcf5225_init() call includes these at the end:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; /* init flexbus */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; _bsp_flexbus_setup();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; /* init MRAM */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; _bsp_flexbus_mram_setup((uint_32)BSP_EXTERNAL_MRAM_BASE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;BSP_EXTERNAL_MRAM_BASE is set to 0x10000000 in the linker.&lt;/P&gt;&lt;P&gt;My call to _mem_extend is _mem_extend((pointer)0x10000000, 0x10000);&lt;/P&gt;&lt;P&gt;This is done in the main task.&amp;nbsp; Should this be done in the mcf5225_init(), i.e. before the kernel starts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 14:18:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229963#M6250</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2013-04-25T14:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229964#M6251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I moved my _mem_extend() call into mcf5225_init, and now it doesn't lock up, but I don't believe it's working.&amp;nbsp; When I try to perform the operations that use the extra memory which caused me to add the external RAM, it locks up.&amp;nbsp; Furthermore each time this code runs, it seems to mess up something in the Flash code space because I have to reflash through the bootloader every time.&amp;nbsp; Not sure what that's about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm fairly certain I'm missing a step in getting the external memory in use by the kernel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 12:39:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229964#M6251</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2013-04-26T12:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229965#M6252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, do you have to re flash every time you execute your program? That's&lt;/P&gt;&lt;P&gt;strange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not in the office, so I can't check the datasheet. The first to check&lt;/P&gt;&lt;P&gt;is if you're trying to map external memory in internal flash memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later, you may try to check if you re getting the external memory using a&lt;/P&gt;&lt;P&gt;oscilloscope. So you could see the signals when accessing external memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And finally, you have to check if the operations you are trying to use the&lt;/P&gt;&lt;P&gt;extra memory, are effectively using it. When I did my tests, all the tasks&lt;/P&gt;&lt;P&gt;created before calling &lt;U&gt;mem&lt;/U&gt;extend, were still running in internal memory.&lt;/P&gt;&lt;P&gt;All the other tasks created after this call, were using the external&lt;/P&gt;&lt;P&gt;memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this and tell me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;El 26/04/2013 14:40, "Angelo Quattrociocchi" &amp;lt;admin@community.freescale.com&amp;gt;&lt;/P&gt;&lt;P&gt;escribió:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE level="1"&gt;&lt;P&gt;**&lt;/P&gt;&lt;P&gt;     &lt;A href="image: Freescale Community"&gt;image: Freescale Community&lt;/A&gt;&amp;lt;https://community.freescale.com/index.jspa&amp;gt;  &lt;U&gt;mem&lt;/U&gt;extend usage created by Angelo&lt;/P&gt;&lt;P&gt;Quattrociocchi &amp;lt;https://community.freescale.com/people/ARQuattr&amp;gt; in *MQX&lt;/P&gt;&lt;P&gt;Software Solutions* - View the full discussion&amp;lt;https://community.freescale.com/message/326545#326545&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 15:47:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229965#M6252</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2013-04-26T15:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229966#M6253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I have to reflash each time.&amp;nbsp; I was looking at the CSAR (sec. 19.3) in the data sheet and I thought I was setting this OK - I actually didn't change anything and the linker file already puts MRAM at 0x10000000 so I left that and just used the same address when calling _mem_extend.&amp;nbsp; But again I'm not very confident in my understanding of all this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put the pins (MB_CS0#, MB_RW#, MS_OE#) on a logic probe and saw no activity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Apr 2013 02:21:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229966#M6253</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2013-04-28T02:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229967#M6254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is effectively you're mapping on-chip flash memory instead external ram memory. You have to check the memory map overview in the MCF52259RM.pdf file. There, you can see the on-chip flash memory goes from 0x0000 0000 to 0x4000 0000. So, when you do &lt;SPAN style="font-size: 12px; font-family: helvetica, arial; color: #000000; background-color: #ffffff;"&gt;_mem_extend((pointer)&lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: helvetica, arial; color: green; background-color: #ffffff;"&gt;0x10000000&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: helvetica, arial; color: #000000; background-color: #ffffff;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: helvetica, arial; color: green; background-color: #ffffff;"&gt;0x20000&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: helvetica, arial; color: #000000; background-color: #ffffff;"&gt;) , your memory extension is useless.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You've to map the external ram above 0x8000 0000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way: are you sure you are correctly configuring your mini-flex bus????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 07:27:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229967#M6254</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2013-04-29T07:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229968#M6255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, yes I thought that address seemed strange, but I assumed since that's the way the example projects came configured I should leave it.&amp;nbsp; I will try moving it to x8000 0000.&amp;nbsp; I noticed you used x9000 0000, was there a reason for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked over the init functions for the flexbus and they appear to be OK.&amp;nbsp; Again, these are the same functions that were included with the tower BSP but I didn't see any need to change anything there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 11:27:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229968#M6255</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2013-04-29T11:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229969#M6256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed it to x80000000 but it behaved the same way.&amp;nbsp; (Corrupts flash each time it runs, no activity on the flexbus)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The flexbus and mem_extend are setup with the following calls in bsp_init.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; _bsp_flexbus_setup();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; _bsp_flexbus_mram_setup((uint_32)BSP_EXTERNAL_MRAM_BASE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; _mem_extend((pointer)BSP_EXTERNAL_MRAM_BASE, (uint_32)BSP_EXTERNAL_MRAM_SIZE);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static void _bsp_flexbus_setup (void) &lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; VMCF5225_STRUCT_PTR reg_ptr = (VMCF5225_STRUCT_PTR)BSP_IPSBAR;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; /* Enable Mini FlexBUS signals (used by external MRAM and CPLD) */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; reg_ptr-&amp;gt;GPIO.PASPAR = 0x20;&amp;nbsp;&amp;nbsp; /* enable CS1 operation for CPLD */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; reg_ptr-&amp;gt;GPIO.PTEPAR = 0xff;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; reg_ptr-&amp;gt;GPIO.PTFPAR = 0xff;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; reg_ptr-&amp;gt;GPIO.PTGPAR = 0xff;&amp;nbsp;&amp;nbsp; /* enable CS0 operation for MRAM */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; reg_ptr-&amp;gt;GPIO.PTHPAR = 0x5555;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static void _bsp_flexbus_mram_setup (const uint_32 base_address)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VMCF5XXX_MINIFB_STRUCT_PTR fb_ptr = &amp;amp;((VMCF5225_STRUCT_PTR)BSP_IPSBAR)-&amp;gt;FB;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Enable external MRAM mapped on CS0 */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fb_ptr-&amp;gt;CSAR0 = MCF5XXX_FBCS_CSAR_BA(base_address); /* CS0 base address */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fb_ptr-&amp;gt;CSCR0 = 0x00000540; /* CS0 control (8bit data, 1 waitstate) */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fb_ptr-&amp;gt;CSMR0 = 0x00070001; /* CS0 address mask and enable */&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;In the linker file there are these lines under 'SECTIONS':&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; ___EXTERNAL_MRAM_BASE&amp;nbsp; = 0x80000000;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ___EXTERNAL_MRAM_SIZE&amp;nbsp; = 0x00080000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the external RAM tied to CS0.&amp;nbsp; I didn't see anything that needed to change in the code, only the linker file was changed. Is that correct?&amp;nbsp; Of course when you do this and go to recompile the BSP and application, it says there is nothing to be done because the code itself didn't change, so I made a dummy edit to force it to recompile.&amp;nbsp; I'm not sure if this is normal, or I missed some definition somewhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 12:16:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229969#M6256</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2013-04-29T12:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229970#M6257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code seems correct, so the problem must be other.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, i'm not sure you have to modify the linker file. In fact, i didn't modify it: if you modify it, you're telling your program there's ram memory at that base address... but that's not really true, because the ram memory is not available until you call _mem_extend().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure I can continue helping you. I hope any other user more experienced than me could help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2013 11:19:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229970#M6257</guid>
      <dc:creator>Ardoster</dc:creator>
      <dc:date>2013-04-30T11:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: _mem_extend usage</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229971#M6258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; So do you use the same code to set up the flexbus?&amp;nbsp; Or do you mind showing me the code you are using?&amp;nbsp; If you use similar code, and didn't change the linker, where is the memory base address coming from?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Apr 2013 12:00:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/mem-extend-usage/m-p/229971#M6258</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2013-04-30T12:00:44Z</dc:date>
    </item>
  </channel>
</rss>

